/*-------------------------------INFO GENERAL--------------------------*/
p {
    text-align: justify;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: white;
}

/* ---------------- HEADER / NAV / FOOTER ---------------- */
header {
    background-color: #7bc142;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    gap: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
}

header.hide {
    transform: translateY(-100%);
}

header img {
    height: 50px;
}

/* NAV */
nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

nav a {
    color: white;
    text-decoration: none;
    display: inline-block;
    padding: 8px 10px;
    line-height: 1;
}

/* ---------------- DROPDOWN RUTES ---------------- */

.nav-rutes {
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

.dropdown-menu {
    display: none; 
    position: absolute;
    top: calc(100% - 6px);
    left: 0;
    margin: 0;
    padding: 6px;                     
    background-color: #ffffff;
    list-style: none;
    border-radius: 8px;               
    box-shadow: 0 8px 28px rgba(0,0,0,0.14);
    min-width: 220px;
    z-index: 200;
    white-space: nowrap;
    pointer-events: auto;
}

.dropdown-menu li { margin: 0; }
.dropdown-menu li a {
    display: block;
    padding: 10px 16px;
    color: #333;                      
    text-decoration: none;
    border-radius: 6px;               
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.06s ease;
    will-change: background-color, color;
}

.dropdown-menu li a:hover,
.dropdown-menu li a:focus {
    background-color: #f0f0f0;        
    color: #6d7a78;                   
    outline: none;
    transform: translateY(-1px);      
}

.dropdown-menu li a:active {
    transform: translateY(0);
}

.dropdown-menu li a:focus-visible {
    outline: 3px solid rgba(123,193,66,0.22); 
    outline-offset: 3px;
    border-radius: 6px;
}

.nav-rutes > a:hover {
    background: transparent;   
    color: white;              
}

.nav-rutes:hover .dropdown-menu,
.nav-rutes.open .dropdown-menu {
    display: block;
}

/*-------------------------------------------------------------*/
/*-------------------------------FOOTER--------------------------*/
footer {
    background-color: #7bc142;
    color: white;
    padding: 3rem 2rem 2rem; 
    text-align: center;
}
footer h2 { margin-bottom: 1rem; }
footer a { color: #333; text-decoration: none; }

.footer-xarxes {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.btn-redes {
    background-color: #333;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s;
}
.btn-redes:hover { background-color: #333; }

.footer-p {
    text-align: center;
    color: white;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    opacity: 0.9;
    margin: 0.3rem 0;
}

/*-------------------------------------------------------------*/
/*-------------------------------SECTION TITLES--------------------------*/
.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    font-weight: bold;
    color: #6d7a78;
}
.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: #6d7a78;
    margin: 0.5rem auto 0;
}

/*-------------------------------------------------------------*/
/*-------------------------------CANVI D'IDIOMA--------------------------*/
.language-switch {
    position: relative;
    margin-right: 2rem;
}
.lang-btn {
    background-color: transparent;
    border: 2px solid white;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}
.lang-btn:hover {
    background-color: white;
    color: #6d7a78;
}
.lang-menu {
    position: absolute;
    right: 0;
    top: 120%;
    list-style: none;
    background: white;
    padding: 0.5rem 0;
    margin: 0;
    border-radius: 6px;
    display: none;
    min-width: 120px;
}
.lang-menu li { padding: 0; }
.lang-menu a {
    display: block;
    padding: 0.4rem 1rem;
    color: #333;
    text-decoration: none;
}
.lang-menu a:hover { background-color: #f0f0f0; }
.lang-menu.open { display: block; }

/* ---------------- GENERIC UTILITIES ---------------- */
.hidden { opacity: 0; }


/*-------------------------------------------------------------*/
/*-------------------------------INICI--------------------------*/
#inici {
    height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #6d7a78;
    color: white;
    padding: 6rem 2rem 2rem;
}

.inici-content {
    display: flex;
    max-width: 1200px;
    width: 100%;
    gap: 2rem;
    align-items: center;
}

.inici-text {
    flex: 1;
    max-width: 50%;
}

.inici-text h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: white;
}

.inici-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: white;
}


.inici-galeria {
    flex: 1;
    max-width: 500px;
    width: 100%;
    aspect-ratio: 3 / 4;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background-color: #444;
    margin-left: 60px;
}
.inici-galeria .slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
.inici-galeria .slide.visible { opacity: 1; }

/*-------------------------------------------------------------*/
/*-------------------------------COM--------------------------*/
#com {
    background-color: white;
    padding: 3rem 0.5rem;
    max-width: 1200px;
    margin: 0 auto;
}
.com-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
    text-align: justify;
}

/* mòbil per COM */
@media (max-width: 768px) {
    #com { padding: 2rem 1.5rem; }
}

.hero {
    background-color: #6d7a78;
    color: white;
    text-align: center;
    padding: 4rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.presentacio, .equip {
    padding: 2rem;
}

/*-------------------------------------------------------------*/
/*-------------------------------QUI--------------------------*/

.qui {
    padding: 40px 0;
    box-sizing: border-box;
    background-color: white; 
}

.qui .section-title {
    flex-basis: 100%;
    text-align: center;
    margin-bottom: 2rem;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 2rem;
    font-weight: bold;
    position: relative;
}

.qui-top {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 32px;
    align-items: flex-start; 
    padding: 0 20px;
    box-sizing: border-box;
}

.qui-foto {
    flex: 0 0 45%;
    max-width: 45%;
    aspect-ratio: 3 / 4;   
    overflow: hidden;
    border-radius: 12px;
    background-color: #444;
    isolation: isolate;
}

.qui-foto .base {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%); 
    transition: none; 
    image-rendering: auto;
}

.qui-text {
    flex: 1 1 55%;
    max-width: 55%;
    align-self: flex-start; 
}

.qui-name {
    font-size: 1.4rem;
    margin: 0 0 1rem 0;
    color: #444;
    font-weight: 700;
}
#qui-info {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    text-align: justify;
}
.qui-text p:first-child {
    margin-top: 0;
}


/* RESPONSIU: apilar en mòbil */
@media (max-width: 768px) {
    .qui-top {
        flex-direction: column;
        gap: 18px;
        padding: 0 16px;
    }
    /* en mòbil tornem a un comportament normal perquè una imatge molt alta pot ser massa */
    .qui-foto {
        max-width: 100%;
        flex: 0 0 auto;
        aspect-ratio: auto;   /* <<-- important: desfem l'aspect-ratio fixe a mòbil */
        height: auto;
    }
    .qui-foto .base img {
        width: 100%;
        height: auto;
    }
    .qui-text {
        max-width: 100%;
        align-self: auto; /* deixar que el flux determine l'alineació en mòbil */
    }
}

/*-------------------------------------------------------------*/
/*-------------------------------RUTES--------------------------*/
#rutes {
    padding: 60px 0;
}
#rutes .section-intro {
    max-width: 800px;
    margin: 0 auto 20px auto;
    text-align: center;
    font-size: 1.5rem;
    line-height: 1.6;
    color: #555;
}
#rutes .section-intro2 {
    max-width: 1200px;
    margin: 0 auto 20px auto;
    text-align: center;
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
}


.rutes-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 20px 20px 20px 60px;
    scroll-behavior: smooth;
}
.rutes-slider::-webkit-scrollbar { display: none; }
.rutes-slider { -ms-overflow-style: none; scrollbar-width: none; }


.ruta-card {
    position: relative;
    aspect-ratio: 3 / 4;
    height: 70vh;
    border-radius: 20px;
    overflow: hidden;
    scroll-snap-align: center;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.ruta-card:hover { transform: scale(1.05); }
.ruta-title {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    font-size: 1.8em;
    color: #fff;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

/* Controls */
.rutes-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
}
.rutes-btn {
    background: linear-gradient(180deg, #7bc142 0%, #65a034 100%);
    color: #fff;
    border: 2px solid rgba(0,0,0,0.08);
    padding: 12px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 20px;
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12), inset 0 -2px 0 rgba(0,0,0,0.03);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.rutes-btn:active { transform: translateY(1px) scale(0.98); }
.rutes-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0,0,0,0.14), inset 0 -2px 0 rgba(0,0,0,0.04);
}

.ruta-detall {
    display: flex;
    gap: 20px;
    align-items: stretch;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}
.detall-mapa,
.detall-fotos {
    flex: 1 1 0;
    min-width: 220px;
    height: 320px;
    overflow: hidden;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    background-color: transparent;
}
.detall-fotos img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.detall-fotos2 {
    flex: 0 0 55%;
    min-width: 220px;
    max-width: 700px;
    height: 670px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.detall-fotos2 img { width: 100%; height: 100%; object-fit: cover; }

.detall-mapa {
    position: relative;
}

.detall-mapa iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.detall-mapa .map-label {
    position: absolute;         
    top: 10px;
    left: 10px;
    font-weight: 600;
    color: #333;
    background-color: rgba(255, 255, 255, 0.85); 
    padding: 2px 6px;           
    border-radius: 4px;          
    z-index: 2;
    white-space: nowrap;         
    box-shadow: 0 1px 3px rgba(0,0,0,0.2); 
}
.ruta-foto-gran img {
    width: 100%;
    height: auto;         
    object-fit: contain;   
    display: block;
}
.ruta-foto-gran {
    height: auto;          
    overflow: visible;     
}
@media (max-width: 768px) {
    .ruta-detall { flex-direction: column; gap: 16px; margin: 20px auto; }
    .detall-mapa { width: 100%; height: 320px; min-width: 0; }
    .detall-fotos { width: 100%; justify-content: center; }
    .detall-fotos img { max-width: 100%; height: auto; }
    .detall-mapa iframe { height: 200px; }
}

.ruta-intro {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 8rem 2rem 4rem;
    background-color: #6d7a78;
    color: white;
    min-height: 80vh;
}
.ruta-intro .ruta-text { flex: 1; max-width: 50%; }
.ruta-intro .ruta-titol {
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
    margin-top: 1.5rem;
}
.ruta-intro p { margin-bottom: 1rem; line-height: 1.6; margin-top: 1rem; }
.ruta-punts { margin: 1.5rem 0 2rem 1.2rem; padding: 0; list-style-type: disc; }
.ruta-punts li { margin-bottom: 0.6rem; font-size: 1rem; }
.ruta-punts li > strong { display: block; margin-bottom: 0.5rem; font-weight: 700; }

@media (max-width: 768px) {
    .ruta-intro { flex-direction: column; text-align: center; }
    .ruta-intro .ruta-text, .inici-galeria { max-width: 100%; }
    .ruta-intro .ruta-titol { margin-top: 0.5rem; }
}

/*-------------------------------------------------------------*/
/*-------------------------------VIATGES--------------------------*/
#viatges { padding: 60px 0; }

.viatges-container {
    background: #7bc142;
    color: #fff;
    border-radius: 20px;
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}
.viatges-info { max-width: 800px; margin: 0 auto 20px auto; }
.viatges-info p { font-size: 1rem; line-height: 1.6; margin-bottom: 20px; }
.viatges-btn { display: none; }
.viatges-subtitle { margin: 30px 0 20px 0; font-size: 1.4rem; font-weight: bold; }

.viatges-grid {
    display: block;
    width: 100%;
    margin: 0 auto;
}
.viatges-grid .card {
    display: block;
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
    position: relative;
}
.viatges-grid .card.full-span { width: 100%; }
.viatges-grid .card:hover { transform: scale(1.03); }
.viatges-grid .card-title {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    font-size: 1.5em;
    color: #fff;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}
.viatges-grid .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4em;
    font-weight: bold;
}
.viatges-grid .card:hover .overlay { opacity: 1; }
@media (max-width: 768px) {
    .viatges-grid .card { height: 250px; }
}

/* ---------- BOTÓ COAC (ruta-intro) ---------- */

.coac-button {
    display: inline-block;
    background-color: #7bc142;   
    color: #ffffff;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    border: none;
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    vertical-align: middle;
}

.coac-button:hover,
.coac-button:focus {
    background-color: #65a034; 
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 12px 28px rgba(0,0,0,0.16);
}

.coac-button:active {
    transform: translateY(0) scale(0.995);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.coac-button:focus-visible {
    outline: 3px solid rgba(123,193,66,0.22);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .coac-button,
    .coac-button:hover,
    .coac-button:focus,
    .coac-button:active {
        transition: none;
        transform: none;
    }
}

@media (max-width: 480px) {
    .coac-button:hover,
    .coac-button:focus {
        transform: translateY(-1px) scale(1.02);
    }
}


/*-------------------------------------------------------------*/
/*-------------------------------STUDY ABROAD--------------------------*/
#study-abroad { padding: 60px 0; }
.study-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f2f2f2;
    border-radius: 20px;
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 30px;
    color: #333;
}
.study-info { flex: 1; }
.study-info p { font-size: 1rem; line-height: 1.6; margin-bottom: 20px; }
.study-btn {
    background-color: #7bc142;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.study-btn:hover { background-color: #65a534; }
.study-image img {
    width: 350px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 16px;
    display: block;
}
@media (max-width: 768px) {
    .calendari-container,
    .study-container { flex-direction: column; padding: 0 1rem; }
    .study-image img { width: 100%; height: auto; max-width: 350px; }
}

/*-------------------------------------------------------------*/
/*-------------------------------EDUCACIÓ--------------------------*/
#educacio { padding: 60px 0; }
#educacio .intro-text {
    max-width: 800px;
    margin: 0 auto 40px auto;
    text-align: center;
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
}
.educacio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.card {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.card:hover { transform: scale(1.03); }
.card-title {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    font-size: 1.5em;
    color: #fff;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}
.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-size: 0.9em;
    line-height: 1.4;
    color: white;
    text-align: center;
}
.card:hover .overlay { opacity: 1; }

/*-------------------------------------------------------------*/
/*-------------------------------CALENDARI--------------------------*/
.calendari-section {
    padding: 2rem 0 4rem;
    background: #fff;
}
.calendari-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    align-items: center;
    padding: 0 2rem;
}
.calendari-foto { flex: 0 0 40%; max-width: 420px; }
.calendari-foto img { width: 100%; height: auto; border-radius: 12px; display: block; }
.calendari-text { flex: 1 1 55%; }
.calendari-text h3 { font-size: 1.6rem; color: #6d7a78; margin-bottom: 0.5rem; }
.calendari-text p { font-size: 1rem; line-height: 1.6; color: #333; }

/* =========================================================OVERLAY ESTÀTIC RESERVA RUTES ========================================================= */

#calendarOverlayStatic {
    display: none;
    position: fixed;
    inset: 0;

    align-items: center;
    justify-content: center;

    z-index: 1500;
    pointer-events: none;
}

#calendarOverlayStatic.open {
    display: flex;
    pointer-events: auto;
}

.calendar-overlay-box {
    width: calc(100% - 40px);
    max-width: 900px;

    background: #ffffff;
    border-radius: 12px;
    padding: 24px;

    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    position: relative;
}

.overlay-close {
    position: absolute;
    top: 12px;
    right: 14px;

    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.calendar-overlay-box h2 {
    margin-bottom: 16px;
    font-size: 1.3rem;
}

.calendar-grid-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.options-grid-static {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.option-card-static {
    padding: 16px;
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.05);

    background: linear-gradient(180deg, #ffffff, #f9f9f9);
}

.option-title-static {
    font-weight: 700;
    margin-bottom: 6px;
}

.option-sub-static {
    font-size: 0.9rem;
    color: #666;
}

.calendar-actions-static {
    display: flex;
    justify-content: flex-end;
}

.mail-button-static {
    display: inline-block;
    padding: 10px 18px;

    background: linear-gradient(180deg, #7bc142, #65a034);
    color: white;
    text-decoration: none;
    font-weight: 700;

    border-radius: 8px;
}

.mail-button-static:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 600px) {
    .options-grid-static {
        grid-template-columns: 1fr;
    }
}



/* =================== RESPOSIVE / MOBILE ADDITIONS =================== */

.hamburger {
    display: none;
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    padding: 8px;
    cursor: pointer;
    color: white;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

nav.open {
    position: fixed;
    inset: 64px 0 0 0; /* under header */
    background: rgba(123,193,66,0.98);
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    padding: 1.25rem 1rem;
    z-index: 2000;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

nav.open ul {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
}

nav.open a {
    display: block;
    width: 100%;
    padding: 12px 16px;
    color: white;
    text-align: center;
    border-radius: 8px;
}

body.nav-open::before {
    content: "";
    position: fixed;
    inset: 64px 0 0 0;
    background: rgba(0,0,0,0.32);
    z-index: 1500;
}

.rutes-slider {
    padding-left: 20px; 
}

@media (max-width: 1024px) {
    .inici-text h1 { font-size: 2.4rem; }
    .inici-text p { font-size: 1rem; }
    .inici-galeria { margin-left: 20px; max-width: 420px; }
}

@media (max-width: 768px) {

    header {
        padding: 0.6rem 1rem;
        gap: 0.5rem;
    }
    header img { height: 42px; }

    .hamburger { display: inline-flex; }
    nav ul { display: none; } 
    .language-switch { display: none; } 

    .inici-content {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }
    .inici-text { max-width: 100%; }
    .inici-text h1 { font-size: 2.2rem; }
    .inici-galeria {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        aspect-ratio: auto;
        height: 220px;
    }
    .inici-galeria .slide { object-fit: cover; }

    .ruta-card {
        height: 55vh;
        min-width: 70vw;
        aspect-ratio: auto;
        border-radius: 16px;
    }

    .rutes-slider { gap: 14px; padding: 20px 12px; }

    .ruta-intro { padding: 3rem 1rem 2rem; gap: 1rem; min-height: auto; }
    .ruta-intro .ruta-text { max-width: 100%; }

    .ruta-detall { flex-direction: column; gap: 16px; padding: 0 1rem; margin: 20px auto; }
    .detall-mapa { height: 220px; }
    .detall-mapa iframe { height: 100%; }

    .study-container { flex-direction: column; padding: 1rem; }
    .study-image img { width: 100%; height: auto; max-width: 460px; }

    .educacio-grid { grid-template-columns: 1fr; padding: 0 1rem; }

    .calendar-overlay-box { width: calc(100% - 24px); padding: 18px; }

    .qui-foto .base { width: 100%; height: auto; display: block; }
}

@media (max-width: 480px) {
    .ruta-card { height: 48vh; min-width: 80vw; }
    .inici-text h1 { font-size: 1.8rem; }
    .inici-text p { font-size: 0.98rem; }
    .section-title { font-size: 1.6rem; }
    .coac-button { padding: 8px 12px; font-size: 0.92rem; }
}

@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: transparent;
        min-width: 0;
        padding: 0.25rem 0;
        white-space: normal;
    }
    .dropdown-menu li a {
        padding: 10px 14px;
        color: white;
        background: transparent;
    }
    .dropdown-menu li a:hover,
    .dropdown-menu li a:focus { background: rgba(255,255,255,0.08); color: white; transform: none; }
    .nav-rutes:hover .dropdown-menu { display: none; } 
}

@media (max-width: 768px) {
    .detall-fotos img, .detall-fotos2 img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }
}

@media (max-width: 768px) {
    nav.open a { font-size: 1.05rem; padding: 14px; }
}

.hamburger.is-open { transform: rotate(90deg); transition: transform 160ms ease; }

