:root {
    --brand-blue: #00A9B5;
    --brand-blue-dark: #004B5D;
    --brand-orange: #FF7B00;
    --brand-orange-soft: #FFAA64;
    --bg-light: #F9FCFD; /* Un blanco más frío y moderno */
    --bg-body: #002D37; /* Fondo global oscuro y profundo */
    --white: #ffffff;
    --text-primary: #0a2540;
    --text-secondary: #5c7073;
    --gradient-main: linear-gradient(135deg, var(--brand-orange-soft) 0%, var(--brand-orange) 100%);
    --shadow-soft: 0 4px 15px rgba(0, 169, 181, 0.08);
    --shadow-medium: 0 8px 30px rgba(0, 169, 181, 0.1);
    --shadow-strong: 0 15px 45px rgba(0, 169, 181, 0.15);
    --radius-md: 20px;
    --radius-lg: 30px;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --font-main: 'Nunito Sans', sans-serif;
    --header-height: 80px;

    --hero-grad-1: #61c682;
    --hero-grad-2: #ff8e00;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { 
    scroll-behavior: smooth; 
    scroll-padding-top: calc(var(--header-height) + 20px); 
}

html, body {
    width: 100%;
}
html.menu-open, body.menu-open {
    overflow: hidden;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body); 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23ffffff' fill-opacity='0.02' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
main {
    overflow-x: hidden;
    background-color: var(--white);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 2; }
.section { padding: 6rem 0; position: relative; overflow: hidden; }
h1, h2, h3 { font-weight: 900; line-height: 1.2; color: var(--brand-blue); }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 5vw, 3.2rem); text-align: center; margin-bottom: 1rem; }
h3 { font-size: 1.6rem; }
.section-header { text-align: center; max-width: 800px; margin: 0 auto 4rem; margin-top: -4rem;}
.section-header p { color: var(--text-secondary); font-size: 1.15rem; }
.gradient-text { background: var(--gradient-main); -webkit-background-clip: text; background-clip: text; color: transparent; }

.btn {
    display: inline-block; padding: 1rem 2.5rem; border-radius: 50px; text-decoration: none;
    font-weight: 800; color: var(--brand-blue-dark); background: var(--gradient-main);
    border: none; box-shadow: 0 5px 25px rgba(255, 123, 0, 0.3); 
    transition: all 0.3s ease; position: relative; overflow: hidden; z-index: 1;
}
.btn::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-soft) 100%);
    transition: opacity 0.3s ease; z-index: -1; opacity: 0;
}
.btn:hover { transform: translateY(-5px) scale(1.05); box-shadow: 0 12px 35px rgba(255, 123, 0, 0.4); }
.btn:hover::before { opacity: 1; }
.btn:active { transform: translateY(-2px) scale(1.02); box-shadow: 0 8px 20px rgba(255, 123, 0, 0.3); }

#main-header {
    position: fixed; width: 100%; top: 0; z-index: 1001;
    height: var(--header-height);
    display: flex; align-items: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 169, 181, 0.08);
    box-shadow: var(--shadow-soft);
}
#main-header .container { display: flex; justify-content: space-between; align-items: center; width: 100%; }

.logo a {
    font-size: 1.6rem; font-weight: 900; color: var(--brand-blue); text-decoration: none;
    display: flex; align-items: center; letter-spacing: -1px; transition: transform 0.3s ease;
}
.logo-image { height: 1.4em; margin-right: 0.7rem; object-fit: contain; }
.logo a:hover { transform: scale(1.05); }

.desktop-nav { display: none; }

/* Contenedor para nav y switcher en escritorio */
.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* Espacio entre nav y switcher */
}

.mobile-menu-toggle {
    display: block; position: relative; z-index: 1002; width: 44px; height: 44px;
    background: none; border: none; cursor: pointer; padding: 0;
}
.mobile-menu-toggle span {
    display: block; position: absolute; height: 3px; width: 28px; background: var(--brand-blue); border-radius: 3px;
    opacity: 1; left: 8px; transform: rotate(0deg); transition: all .3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
body.menu-open .mobile-menu-toggle span { background: var(--brand-blue); }
.mobile-menu-toggle span:nth-child(1) { top: 11px; }
.mobile-menu-toggle span:nth-child(2) { top: 20px; transition-duration: .15s; }
.mobile-menu-toggle span:nth-child(3) { top: 29px; }
body.menu-open .mobile-menu-toggle span:nth-child(1) { top: 20px; transform: rotate(135deg); }
body.menu-open .mobile-menu-toggle span:nth-child(2) { opacity: 0; transform: translateX(-20px); }
body.menu-open .mobile-menu-toggle span:nth-child(3) { top: 20px; transform: rotate(-135deg); }

.mobile-nav {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: var(--brand-blue-dark); z-index: 1000;
    display: flex; flex-direction: column; justify-content: space-between; padding: calc(var(--header-height) + 2rem) 1.5rem 3rem;
    opacity: 0; visibility: hidden; transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.5s ease, visibility 0.5s;
}
.mobile-nav.active { opacity: 1; visibility: visible; transform: translateX(0); }
.mobile-nav .nav-menu { list-style: none; text-align: center; display: flex; flex-direction: column; gap: 1rem; }
.mobile-nav .nav-link {
    display: block; font-size: clamp(1.6rem, 6vw, 2.2rem); font-weight: 700; color: rgba(255,255,255,0.85);
    text-decoration: none; padding: 0.75rem; transition: color 0.3s ease, transform 0.2s ease;
}
.mobile-nav .nav-link:hover, .mobile-nav .nav-link:active {
    background: var(--gradient-main); -webkit-background-clip: text; background-clip: text;
    color: transparent; transform: scale(1.05);
}
.mobile-nav .nav-link:active { transform: scale(1.02); }
.mobile-nav-footer { text-align: center; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); }
.mobile-nav-footer .btn { width: 100%; max-width: 400px; margin: 0 auto 1.5rem; font-size: 1.2rem; padding: 1.2rem; }
.mobile-nav-footer .social-links { list-style: none; display: flex; justify-content: center; gap: 1.5rem; margin: 0; }
.mobile-nav-footer .social-links a { color: rgba(255,255,255,0.6); font-size: 1.3rem; transition: color 0.3s ease, transform 0.3s ease; }
.mobile-nav-footer .social-links a:hover { color: var(--brand-orange); transform: scale(1.2); }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
.mobile-nav.active .nav-menu li { animation: fadeInDown 0.5s ease-out both; }
.mobile-nav.active .nav-menu li:nth-child(1) { animation-delay: 0.20s; } .mobile-nav.active .nav-menu li:nth-child(2) { animation-delay: 0.25s; }
.mobile-nav.active .nav-menu li:nth-child(3) { animation-delay: 0.30s; } .mobile-nav.active .nav-menu li:nth-child(4) { animation-delay: 0.35s; }
.mobile-nav.active .nav-menu li:nth-child(5) { animation-delay: 0.40s; }
@keyframes animateGradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* --- HERO SECTION --- */
/* #inicio -> .section-hero */
.section-hero {
    padding-top: calc(var(--header-height) + 4rem); padding-bottom: 5rem; min-height: 100vh;
    display: flex; align-items: center; position: relative;
    background: url('/media/imagen_fondo1.webp') no-repeat center center/cover; color: var(--white);
}
.section-hero::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(120deg, var(--hero-grad-2), var(--brand-blue-dark), var(--hero-grad-1));
    opacity: 0.85; z-index: 1; background-size: 400% 400%; animation: animateGradient 15s ease infinite;
}
.section-hero .container { z-index: 2; }
.section-hero .hero-content { display: grid; grid-template-columns: 1fr; align-items: center; gap: 3rem; text-align: center; }
.section-hero .hero-text { order: 2; }
.section-hero .hero-image { order: 1; margin-top: -2.75rem; }
.section-hero h1 { color: var(--white); text-shadow: 0 3px 15px rgba(0, 0, 0, 0.4); }
.section-hero p { color: rgba(255, 255, 255, 0.9); font-size: 1.2rem; max-width: 55ch; margin: 1.5rem auto 2.5rem; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
.hero-image { position: relative; transition: var(--transition); }
.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: 500px;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: rotate(3deg);
    transition: var(--transition);
}
.hero-image::before {
    content: ''; position: absolute; width: 100%; height: 100%; max-width: 500px;
    border: 3px solid var(--brand-orange); border-radius: var(--radius-lg); top: 20px;
    left: 50%; transform: translateX(-50%) rotate(-6deg); z-index: -1; transition: var(--transition);
}
.hero-image:hover img { transform: rotate(1deg) scale(1.03); }
.hero-image:hover::before { transform: translateX(-50%) rotate(-3deg) scale(1.02); }

/* --- CARD STYLING --- */
.card { background: var(--white); border-radius: var(--radius-lg); padding: 2.5rem; box-shadow: var(--shadow-medium); transition: var(--transition); height: 100%; }
.card:hover { transform: translateY(-10px); box-shadow: var(--shadow-strong); }

/* ===== NUEVO SISTEMA DE FONDOS Y DIVISORES ===== */
.section-light {
    background-color: var(--bg-light);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill-rule='evenodd'%3E%3Cg id='hexagons' fill='%2300a9b5' fill-opacity='0.05' fill-rule='nonzero'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.99-7.5L26 15v18.5l-13 7.5L0 33.5V15z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.section-dark {
    color: var(--white);
    background: url('/media/imagen_fondo3.webp') no-repeat center center / cover;
}
.section-dark::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(120deg, var(--hero-grad-2), var(--brand-blue-dark), var(--hero-grad-1));
    background-size: 400% 400%; animation: animateGradient 15s ease infinite; opacity: 0.85; z-index: 1;
}
.section-dark .container { position: relative; z-index: 2; }
.section-dark .section-header h2, .section-dark .section-header p { color: var(--white); }
.section-dark .section-header p { color: rgba(255,255,255,0.8); }

.shape-divider { 
    position: absolute; 
    left: 0; 
    width: 100%; 
    overflow: hidden; 
    line-height: 0;
}
.shape-divider svg { position: relative; display: block; width: calc(100% + 1.3px); height: 80px; }
.top-divider { top: -1px; z-index: 2; }
.bottom-divider { 
    bottom: -1px; 
    transform: rotateY(180deg); 
    z-index: 2;
}
.bottom-divider-hero { 
    bottom: -1px; 
    transform: rotateY(180deg); 
    z-index: 1;
}
.shape-fill-light { fill: var(--bg-light); }
.shape-fill-dark { fill: var(--bg-body); }

/* --- QUIÉNES SOMOS --- (#quienes-somos -> .section-about) - No se necesitan cambios aquí, ya usa clases */
.creators-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; margin-bottom: 5rem; }
.creator-profile-new {
    background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-medium); transition: var(--transition);
    text-align: center; padding: 2.5rem 2rem; position: relative; margin-top: 80px; 
}
.creator-profile-new:hover { transform: translateY(-12px); box-shadow: var(--shadow-strong); }

.creator-image-new {
    width: 160px; /* Tamaño base del contenedor */
    height: 160px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: var(--transition);
}
.creator-image-new img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg); /* Cambio de 50% a --radius-lg */
    object-fit: cover;
    box-shadow: var(--shadow-strong);
    transition: var(--transition);
    transform: rotate(4deg); /* Rotación de la imagen */
    position: relative; /* Para que esté sobre el ::before */
    z-index: 1;
}
.creator-image-new::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-radius: var(--radius-lg);
    transform: rotate(-6deg); /* Rotación del borde */
    z-index: 0;
    transition: var(--transition);
}
.creator-profile-new:hover .creator-image-new img {
    transform: rotate(2deg) scale(1.03); /* Hover similar al hero */
}
.creator-profile-new:hover .creator-image-new::before {
    transform: rotate(-3deg) scale(1.03); /* Hover similar al hero */
}
.creator-profile-new.ivan .creator-image-new::before {
    border: 6px solid var(--brand-orange);
}
.creator-profile-new.miki .creator-image-new::before {
    border: 6px solid var(--brand-blue);
}

.creator-role { font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem; margin-bottom: 0.5rem; }
.creator-profile-new.ivan .creator-role { color: var(--brand-orange); }
.creator-profile-new.miki .creator-role { color: var(--brand-blue); }

.creator-info-new { padding-top: 80px; }
.creator-name { font-size: 2rem; font-weight: 900; margin-bottom: 1rem; color: var(--brand-blue-dark); display: flex; align-items: center; justify-content: center; gap: 0.8rem; }
.creator-name i { transition: transform 0.3s ease; }
.creator-profile-new.ivan .creator-name i { color: var(--brand-orange); }
.creator-profile-new.miki .creator-name i { color: var(--brand-blue); }
.creator-profile-new:hover .creator-name i { transform: rotate(-15deg) scale(1.1); }
.creator-bio { color: var(--text-secondary); font-size: 1.05rem; max-width: 45ch; margin: 0 auto; line-height: 1.6; }
.team-mission-statement {
    background-color: rgba(255, 255, 255, 0.85); backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 169, 181, 0.1); border-radius: var(--radius-lg);
    padding: 2.5rem; text-align: center; max-width: 900px; margin: 2rem auto 0;
}
.team-mission-statement h3 { font-size: 1.7rem; color: var(--brand-blue-dark); margin-bottom: 1rem; }
.team-mission-statement p { color: var(--text-primary); font-size: 1.1rem; line-height: 1.7; }

/* --- OBRAS --- (#obras -> .section-works) - No se necesitan cambios aquí, ya usa clases */
.obras-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: stretch; }
.obra-card { background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1); padding: 2.5rem; border-radius: var(--radius-lg); display: flex; flex-direction: column; }
.obra-card h3 { color: var(--white); }
.obra-card p, .obra-card li { color: rgba(255,255,255,0.8); }
.obra-card .tag { display: inline-block; padding: 0.4rem 1.2rem; border-radius: 20px; font-weight: 700; font-size: 0.8rem; margin-bottom: 1.5rem; text-transform: uppercase; background: var(--gradient-main); color: var(--brand-blue-dark); align-self: flex-start; }
.obra-card ul { list-style: none; padding-left: 0; margin-top: 1rem; }
.obra-card ul li::before { content: '✓'; color: var(--brand-orange); font-weight: bold; margin-right: 0.8rem; }
.obra-card.dev-card { background: rgba(0,0,0,0.2); }

/* --- OBJETIVOS y PARA QUIÉN --- (#objetivos, #para-quien -> .section-goals, .section-audience) - No se necesitan cambios aquí, ya usa clases */
.objetivos-grid, .audiencia-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }
.objetivo-card {
    text-align: center;
    border: 1px solid rgba(0, 169, 181, 0.1);
    display: flex;
    flex-direction: column;
}
.objetivo-card i {
    font-size: 2.8rem;
    color: var(--white);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: var(--radius-md);
    background: var(--gradient-main);
    margin: 0 auto 1.5rem; /* Centrado y con margen inferior */
    display: inline-block;
    transition: var(--transition);
}
.objetivo-card:hover i {
    transform: rotate(-12deg) scale(1.1);
    box-shadow: 0 10px 30px rgba(255, 123, 0, 0.5);
}
.objetivo-card h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--brand-blue-dark);
    margin-bottom: 0.75rem;
}
.objetivo-card h3 span {
    display: block;
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 0.25rem;
}
.objetivo-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    flex-grow: 1; /* Para alinear los botones si los hubiera */
}

.audiencia-card h3 { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; font-size: 1.3rem; }
.audiencia-card .icon-wrapper { width: 100px; height: 100px; border-radius: 50%; background: var(--brand-blue); color: var(--white); font-size: 2.5rem; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.audiencia-card:hover .icon-wrapper { background: var(--gradient-main); transform: scale(1.1); color: var(--brand-blue-dark); }
.audiencia-card span { font-size: 1rem; color: var(--text-secondary); font-weight: 400; }

/* --- CONTRÁTANOS --- */
/* #contratanos -> .section-contact */
.section-contact h2 { color: var(--white); }
.section-contact p { color: rgba(255,255,255,0.8); }
.contact-wrapper { display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: center; background-color: rgba(0, 101, 115, 0.6); backdrop-filter: blur(8px); padding: 2.5rem 1.5rem; border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,0.1); }
.contact-text h2 { text-align: center; }
.contact-form { background: rgba(255,255,255,0.1); padding: 1.5rem; border-radius: var(--radius-lg); }
.form-control { width: 100%; background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1); padding: 1.1rem; border-radius: 12px; color: var(--white); margin-bottom: 1.5rem; font-family: var(--font-main); font-size: 1rem; transition: var(--transition); }
.form-control::placeholder { color: rgba(255,255,255,0.6); }
.form-control:focus { background: rgba(0,0,0,0.3); border-color: var(--brand-orange); outline: none; box-shadow: 0 0 0 3px rgba(255, 123, 0, 0.3); }
textarea.form-control { resize: vertical; } /* Permite redimensionar verticalmente el textarea */
#form-status { margin-top: 1rem; text-align: center; font-weight: 600; min-height: 24px; color: var(--white); }
.btn[type="submit"] { width: 100%; }
.btn[type="submit"]:disabled { cursor: not-allowed; opacity: 0.7; }

/* --- FOOTER --- */
footer { background: var(--bg-body); padding: 5rem 0 3rem; text-align: center; color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.footer-contact { margin-bottom: 2rem; color: rgba(255,255,255,0.8); }
.social-links { list-style: none; display: flex; justify-content: center; gap: 1rem; margin-bottom: 2rem; }
.social-links a { color: rgba(255,255,255,0.8); font-size: 1.5rem; width: 50px; height: 50px; line-height: 50px; display: inline-block; border: 1px solid rgba(255,255,255,0.2); border-radius: 50%; transition: var(--transition); }
.social-links a:hover { color: var(--brand-orange); background-color: rgba(255,255,255,0.1); transform: translateY(-5px); border-color: var(--brand-orange); }
footer .logo a { justify-content: center; font-size: 2rem; color: var(--white); margin-bottom: 1rem; }

@media (min-width: 768px) {
    .section { padding: 8rem 0; }
    /* #inicio -> .section-hero */
    .section-hero { padding-top: calc(var(--header-height) + 2rem); min-height: auto; }
    .creators-grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
    .creator-profile-new { margin-top: 90px; }
    .creator-image-new { width: 180px; height: 180px; }
    .creator-info-new { padding-top: 90px; }
    .obras-grid { grid-template-columns: 1.2fr 1fr; margin-top: -1.5rem;}
    .contact-wrapper { grid-template-columns: 1fr 1.2fr; gap: 4rem; padding: 4rem;}
    .contact-text h2 { text-align: left; }
    .btn[type="submit"] { width: auto; }
    .shape-divider svg { height: 120px; }
}

@media (min-width: 992px) {
    .logo a { font-size: 1.8rem; }
    .mobile-menu-toggle { display: none; }
    .desktop-nav { display: block; }
    .nav-menu { display: flex; align-items: center; list-style: none; gap: 2rem; }
    .nav-menu a { font-weight: 700; text-decoration: none; color: var(--brand-blue); padding: 0.5rem 0.2rem; position: relative; }
    .nav-menu a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 3px; background: var(--gradient-main); border-radius: 2px; transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1); }
    .nav-menu a:hover, .nav-menu a.active { color: var(--brand-orange); }
    .nav-menu a:hover::after, .nav-menu a.active::after { width: 100%; }
    .nav-link.btn-nav { padding: 0.6rem 1.5rem; border: 2px solid var(--brand-orange); border-radius: 50px; color: var(--brand-blue); transition: var(--transition); }
    .nav-link.btn-nav::after { display: none; }
    .nav-link.btn-nav:hover { background: var(--gradient-main); border-color: transparent; color: var(--brand-blue-dark); transform: scale(1.05); }
    
    /* #inicio -> .section-hero */
    .section-hero .hero-content { grid-template-columns: 1fr 1fr; text-align: left; }
    .section-hero .hero-text { order: 1; }
    .section-hero .hero-image { order: 2; margin-top: 0; }
    .section-hero p { margin-left: 0; margin-right: 0; }
    .hero-image::before { left: -20px; transform: rotate(-6deg); }
    .hero-image:hover::before { transform: rotate(-3deg) scale(1.02) translate(10px, -10px); }
    .shape-divider svg { height: 150px; }
}

/* ===== INICIO ESTILOS AÑADIDOS ===== */

/* --- LANGUAGE SWITCHER --- */
.language-switcher {
    position: relative;
    z-index: 10;
}
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    background: none;
    border: none;
    font-family: var(--font-main);
    font-weight: 700;
    color: var(--brand-blue);
    transition: background-color 0.3s ease;
}
.lang-toggle:hover {
    background-color: rgba(0, 169, 181, 0.1);
}
.flag-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.lang-toggle span {
    font-size: 0.9rem;
}
.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    list-style: none;
    padding: 0.5rem;
    margin: 0;
    width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.lang-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: var(--brand-blue-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.lang-dropdown a:hover {
    background-color: var(--bg-light);
    color: var(--brand-orange);
}

/* Language switcher en el menú móvil */
.mobile-nav .language-switcher {
    margin: 2rem auto 0;
    display: inline-block;
}
.mobile-nav .lang-toggle {
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.75rem 1.2rem;
    border-radius: 50px;
}
 .mobile-nav .lang-toggle:hover {
    background-color: rgba(255,255,255,0.1);
}
.mobile-nav .lang-dropdown {
    background: #003F4B; /* Un poco más claro que el fondo del menú */
    border: 1px solid rgba(255,255,255,0.1);
}
.mobile-nav .lang-dropdown a {
    color: rgba(255,255,255,0.8);
}
.mobile-nav .lang-dropdown a:hover {
    background-color: rgba(255,255,255,0.05);
    color: var(--brand-orange-soft);
}

/* --- FOOTER LEGAL LINKS --- */
.footer-legal-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem 1.5rem;
    margin-top: 2.5rem;
    padding: 0;
}
.footer-legal-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-legal-links a:hover {
    color: var(--brand-orange);
    text-decoration: underline;
}

/* Estilo para los créditos del footer */
.footer-credit {
    margin-top: 3rem;
    padding-top: 1.5rem; /* Añadimos espacio arriba para la barra */
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    position: relative; /* Necesario para posicionar la barra */
}
.footer-credit::before {
    content: ''; /* Imprescindible para que el pseudo-elemento aparezca */
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%); /* Truco para centrar perfectamente */
    width: 50%; /* Ancho de la barra */
    height: 1px; /* Grosor de la barra */
    background-color: rgba(255, 255, 255, 0.2); /* Un color sutil que encaja */
}
.footer-credit a {
    color: rgba(255, 255, 255, 0.7);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-credit a:hover {
    color: var(--brand-orange);
}
.footer-credit .fa-heart {
    color: #e74c3c;
    margin: 0 0.25rem;
    font-size: 0.9em;
}

/* ===== INICIO ESTILOS BANNER DE COOKIES ===== */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--brand-blue-dark);
    color: rgba(255, 255, 255, 0.85);
    padding: 1.5rem 0;
    z-index: 1010; /* Superior al header, pero puede ajustarse si es necesario */
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    visibility: hidden;
}

#cookie-banner.active {
    transform: translateY(0);
    visibility: visible;
}

.cookie-banner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

.cookie-text {
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

.cookie-text a {
    color: var(--brand-orange-soft);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s ease;
}

.cookie-text a:hover {
    color: var(--brand-orange);
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.btn-cookie-primary, .btn-cookie-secondary {
    border: none;
    padding: 0.7rem 1.5rem;
    font-family: var(--font-main);
    font-weight: 800;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-cookie-primary {
    background: var(--gradient-main);
    color: var(--brand-blue-dark);
    box-shadow: 0 4px 15px rgba(255, 123, 0, 0.2);
}

.btn-cookie-primary:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 25px rgba(255, 123, 0, 0.3);
}

.btn-cookie-secondary {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-cookie-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-color: var(--white);
    transform: translateY(-3px);
}

/* --- Media Query para pantallas más grandes --- */
@media (min-width: 768px) {
    .cookie-banner-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    .cookie-text {
        font-size: 1rem;
    }
    .cookie-buttons {
        margin-left: 2rem;
    }
}
/* ===== FIN ESTILOS BANNER DE COOKIES ===== */


/* =================================================================
==== **** ESTILS NOVA SECCIÓ: MICRO OBERT **** ====================
================================================================== */

/* Estil per al nou enllaç del menú */
.nav-link-special {
    position: relative;
    color: var(--brand-orange) !important;
    font-weight: 900 !important;
}

/* 1. ESTILOS COMUNES PARA LA ETIQUETA (SIN EL TEXTO) */
.nav-link-special::before {
    /* Estilos de posición, color, animación, etc. */
    position: absolute;
    top: -10px;
    right: -15px;
    background: var(--brand-orange);
    color: white;
    font-size: 0.55rem;
    font-weight: 900;
    padding: 2px 5px;
    border-radius: 5px;
    transform: rotate(15deg);
    animation: pulse 2s infinite;
}

/* 2. TEXTO ESPECÍFICO PARA CADA IDIOMA */
/* El CSS detectará el atributo 'lang' de la etiqueta <html> y aplicará el texto correcto */

html[lang="ca"] .nav-link-special::before {
    content: 'NOU';
}

html[lang="es"] .nav-link-special::before {
    content: 'NUEVO';
}

html[lang="fr"] .nav-link-special::before {
    content: 'NOUVEAU'; /* "Nuevo" en francés es "Nouveau" */
}


@keyframes pulse {
    0% {
        transform: rotate(15deg) scale(1);
        box-shadow: 0 0 0 0 rgba(255, 123, 0, 0.7);
    }
    70% {
        transform: rotate(15deg) scale(1);
        box-shadow: 0 0 0 8px rgba(255, 123, 0, 0);
    }
    100% {
        transform: rotate(15deg) scale(1);
        box-shadow: 0 0 0 0 rgba(255, 123, 0, 0);
    }
}

/* Estructura de la secció Micro Obert */
.micro-obert-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.micro-obert-col {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.micro-obert-card {
    height: 100%;
}

.micro-obert-card h3 {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--brand-blue-dark);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

.micro-obert-card h3 i {
    color: var(--brand-orange);
}

.micro-obert-card ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.micro-obert-card ul li {
    position: relative;
    padding-left: 1.8rem;
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}

.micro-obert-card ul li::before {
    content: '\f058'; /* Icono de check de Font Awesome */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--brand-blue);
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 1.1rem;
}

.micro-obert-card p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.micro-obert-card .activities-title {
    font-weight: 800;
    color: var(--brand-blue-dark);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

/* Adaptacions per a pantalles més grans */
@media (min-width: 992px) {
    .micro-obert-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
    
    .nav-link-special::before {
       top: -5px;
       right: -20px;
    }
}

/* =================================================================
==== CSS CORREGIDO PARA NAVEGACIÓN DE ESCRITORIO ==================
================================================================== */

@media (min-width: 992px) {
    .logo a { font-size: 1.8rem; }
    .mobile-menu-toggle { display: none; }
    .desktop-nav { display: block; }
    
    .nav-menu {
        display: flex;
        align-items: center;
        list-style: none;
        gap: 1.2rem; /* 1. Reducimos el espacio inicial entre elementos */
    }
    
    .nav-menu a {
        font-weight: 700;
        text-decoration: none;
        color: var(--brand-blue);
        padding: 0.5rem 0.2rem;
        position: relative;
        white-space: nowrap; /* 2. Evitamos que el texto de un enlace se parta en dos líneas */
        font-size: 0.94rem;   /* 3. Reducimos ligeramente la fuente en pantallas más justas */
    }
    
    .nav-menu a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 3px;
        background: var(--gradient-main);
        border-radius: 2px;
        transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    }
    
    .nav-menu a:hover, .nav-menu a.active { color: var(--brand-orange); }
    .nav-menu a:hover::after, .nav-menu a.active::after { width: 100%; }
    
    .nav-link.btn-nav {
        padding: 0.6rem 1.2rem; /* 4. Hacemos el botón un poco más compacto */
        border: 2px solid var(--brand-orange);
        border-radius: 50px;
        color: var(--brand-blue);
        transition: var(--transition);
    }
    
    .nav-link.btn-nav::after { display: none; }
    
    .nav-link.btn-nav:hover {
        background: var(--gradient-main);
        border-color: transparent;
        color: var(--brand-blue-dark);
        transform: scale(1.05);
    }

    /* El resto de tus estilos para esta resolución (hero, etc.) van aquí */
    .section-hero .hero-content { grid-template-columns: 1fr 1fr; text-align: left; }
    .section-hero .hero-text { order: 1; }
    .section-hero .hero-image { order: 2; margin-top: 0; }
    .section-hero p { margin-left: 0; margin-right: 0; }
    .hero-image::before { left: -20px; transform: rotate(-6deg); }
    .hero-image:hover::before { transform: rotate(-3deg) scale(1.02) translate(10px, -10px); }
    .shape-divider svg { height: 150px; }
    
    .micro-obert-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
    
    .nav-link-special::before {
       top: -5px;
       right: -20px;
    }
}

/* 5. AÑADIMOS REGLAS PARA PANTALLAS MÁS ANCHAS PARA DEVOLVER EL ESPACIO */

/* Para pantallas de escritorio medianas */
@media (min-width: 1180px) {
    .nav-menu {
        gap: 1.6rem; /* Aumentamos el espacio de nuevo */
    }
    .nav-menu a {
        font-size: 1rem; /* Devolvemos el tamaño original a la fuente */
    }
    .nav-link.btn-nav {
        padding: 0.6rem 1.5rem; /* Devolvemos el padding original al botón */
    }
}

/* Para pantallas de escritorio grandes (restauramos el diseño original) */
@media (min-width: 1280px) {
     .nav-menu {
        gap: 2rem;
    }
}