/* CSS per a Ruta a Ruta - Viatges de Muntanya */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    /* Paleta de colors extreta del logo */
    --color-primary: #5d8492;
    /* Blau Muntanya */
    --color-secondary: #8fa87a;
    /* Verd Vall */
    --color-secondary-dark: #758a62;
    /* Verd Vall Fosc (Hover) */
    --color-accent: #e07a5f;
    /* Taronja Sol (Accent) */
    --color-text: #4a4a4a;
    /* Gris Carbó Logo */
    --color-bg: #fdfcf0;
    /* Crema clar */
    --color-white: #ffffff;

    /* Tipografia */
    --font-main: 'Outfit', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Mides per a gent gran i llegibilitat */
    --text-base: 20px;
    --text-lg: 1.5rem;
    --text-xl: 3rem;
    --spacing-unit: 1rem;

    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    font-size: var(--text-base);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    text-align: justify;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: 800;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

/* Header Styles */
header {
    background: var(--color-white);
    padding: 0.3rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-soft);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--color-secondary);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

nav ul li a {
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--color-secondary);
    transition: var(--transition-smooth);
}

nav ul li a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?auto=format&fit=crop&q=80&w=2000') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--color-white);
    padding: 0 5%;
}

.hero h1 {
    font-size: 4rem;
    color: var(--color-white);
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.5rem;
    max-width: 800px;
    margin-bottom: 2rem;
    font-weight: 400;
}

.btn {
    background: var(--color-secondary);
    color: var(--color-white);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(224, 122, 95, 0.4);
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-5px);
    background: var(--color-secondary-dark);
}

/* Destinations Section */
.destinations {
    padding: 1.5rem 5%;
}

.section-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

.section-title h2 {
    font-size: 2.5rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    align-items: stretch;
}

.card {
    background: var(--color-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: scale(1.02);
}

.card-img {
    height: 300px;
    width: 100%;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    margin-bottom: 0.8rem;
    font-size: 1.5rem;
    min-height: 3.5rem;
    display: flex;
    align-items: center;
    line-height: 1.2;
}

.card-content p {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    flex-grow: 1;
    /* Fa que el paràgraf ocupi tot l'espai restant si n'hi ha */
    text-align: justify;
}

.card-content .btn {
    margin-top: auto;
    align-self: flex-start;
}

.tag {
    display: inline-block;
    width: fit-content;
    padding: 0.3rem 0.8rem;
    background: var(--color-secondary);
    color: var(--color-white);
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

/* Footer Section */
footer {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 5rem 5% 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-about h3 {
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

/* Colors reals de les icones */

/* WhatsApp: Verd oficial */
.fa-whatsapp {
    color: #25D366 !important;
}

/* Telèfon: Normalment es representa amb un verd de trucada o blau estàndard */
.fa-phone {
    color: #34b7f1 !important;
    /* Blau de comunicacions */
}

/* Email: Vermell Google/Gmail o un gris metàl·lic */
.fa-envelope {
    color: #EA4335 !important;
    /* Vermell Gmail */
}

/* Ajust addicional per a la línia de contacte */
.footer-links p {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.footer-links i {
    font-size: 1.3rem;
    /* Una mica més gran per ressaltar els colors */
    width: 25px;
    text-align: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    /* Dona una mica de relleu */
}

/* Estil per fer que tota la card sigui clicable sense subratllats */
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

/* Botó petit per a la vista de llista */
.btn-small {
    display: inline-block;
    margin-top: auto;
    color: var(--color-secondary);
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    border-bottom: 2px solid var(--color-secondary);
    align-self: flex-start;
}

/* Millora de la grid per a la pàgina de destins */
.destinations {
    min-height: 70vh;
    /* Perquè el footer no pugi massa si hi ha pocs destins */
}

/* Responsivitat */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    nav ul {
        display: none;
    }

    /* Per simplicitat aquí, en una web real fariem un menú hamburguesa */
}

/* Carousel Styles */
.gallery-carousel {
    position: relative;
    margin: 2rem 0;
    width: 100%;
}

.carousel-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1.5rem;
    padding: 1rem 0;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    scroll-behavior: smooth;
}

.carousel-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.carousel-item {
    flex: 0 0 100%;
    /* Show one image at a time by default */
    scroll-snap-align: start;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    aspect-ratio: 16 / 9;
}

@media (min-width: 768px) {
    .carousel-item {
        flex: 0 0 calc(50% - 0.75rem);
        /* Show two images on desktop */
    }
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.carousel-item:hover img {
    transform: scale(1.05);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 10;
    color: var(--color-primary);
    transition: var(--transition-smooth);
}

.carousel-btn:hover {
    background: var(--color-secondary);
    color: white;
}

.carousel-btn.prev {
    left: -22px;
}

.carousel-btn.next {
    right: -22px;
}

@media (max-width: 1024px) {
    .carousel-btn {
        display: none;
    }

    /* Hide buttons on mobile/tablet */
}