/* 
    Sistema de Diseño - La Unión Musical
    Estética: Premium, Glassmorphism, Dark Mode
*/

* {
    box-sizing: border-box;
}

@font-face {
    font-family: 'ClarendonLTStd';
    src: url('fonts/ClarendonLTStd.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'PRISTINA';
    src: url('fonts/PRISTINA.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'ITCFranklinGothicStd';
    src: url('fonts/ITCFranklinGothicStd-Med.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'ITCFranklinGothicStd';
    src: url('fonts/ITCFranklinGothicStd-Demi.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

:root {
    --primary: #1a2a5a;
    --primary-light: #2a3a7a;
    --accent-yellow: #fecb00;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --text-dark: #333333;
    --text-muted: #666666;
    --text-white: #ffffff;
    --border-color: #eeeeee;
    --font-main: 'Inter', 'ITCFranklinGothicStd', sans-serif;
    --font-display: 'ITCFranklinGothicStd', 'Old Standard TT', serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Parches para Google Translate --- */
iframe[id*=':1.container'],
.goog-te-banner-frame.skiptranslate,
.goog-te-banner-frame,
#goog-gt-tt,
.goog-te-balloon-frame,
.skiptranslate[style*="visibility:visible"] {
    display: none !important;
    visibility: hidden !important;
}

body {
    top: 0px !important;
}

.goog-tooltip,
.goog-tooltip:hover {
    display: none !important;
}

.goog-text-highlight {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Forzar no traducción en CSS */
.notranslate {
    unicode-bidi: bidi-override;
}

/* Banderas Locales */
.fi {
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    width: 1.333em;
    height: 1em;
    display: inline-block;
    vertical-align: middle;
}

.fi-es {
    background-image: url('../img/flags/espana.svg') !important;
}

.fi-es-vc {
    background-image: url('../img/flags/valencia.svg') !important;
}

.fi-gb {
    background-image: url('../img/flags/reino-unido.svg') !important;
}

.fi-fr {
    background-image: url('../img/flags/francia.svg') !important;
}

.fi-de {
    background-image: url('../img/flags/alemania.svg') !important;
}

.fi-ru {
    background-image: url('../img/flags/rusia.svg') !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    width: 100%;
    background-color: var(--bg-white);
    color: var(--text-dark);
    font-family: var(--font-main);
    line-height: 1.6;
    padding-top: 180px;
    /* Altura para la nueva cabecera de tres niveles */
}

h1,
h2,
h3,
h4,
.font-display {
    font-family: var(--font-display);
    font-weight: 700;
}

/* --- Top Bar --- */
.top-bar {
    background: #ffffff;
    padding: 0.3rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    font-size: 0.8rem;
    color: var(--primary);
}

.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.social-label {
    font-weight: bold;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    color: #333;
    font-size: 1rem;
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--primary);
}

.contact-info {
    display: flex;
    gap: 1rem;
}

.contact-info a {
    color: #555;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.contact-info i {
    color: var(--primary);
}

.language-selector {
    display: flex;
    gap: 0.8rem;
    position: relative;
}

.current-lang-mobile {
    display: none;
    background: none;
    border: 1px solid #eee;
    padding: 2px 5px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--primary);
}

.lang-options {
    display: flex;
    gap: 0.8rem;
}

.lang-options button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    line-height: 0;
    transition: var(--transition);
}

.lang-options button:hover {
    transform: scale(1.2);
}

@media (max-width: 992px) {
    .contact-info {
        display: none;
    }
}

@media (max-width: 768px) {
    .top-bar {
        padding: 0.2rem 3%;
    }

    .social-label,
    .social-icons {
        display: none !important;
    }

    .contact-info {
        display: flex !important;
        flex-direction: row;
        gap: 0.8rem;
        flex-wrap: wrap;
    }

    .contact-info a {
        font-size: 0.75rem;
        gap: 0.3rem;
    }

    .contact-info i {
        font-size: 0.8rem;
    }

    .top-bar-left {
        gap: 0.5rem;
    }

    .top-bar-right {
        gap: 0.5rem;
    }

    .current-lang-mobile {
        display: flex;
        align-items: center;
        gap: 0.3rem;
    }

    .lang-options {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background: white;
        flex-direction: column;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        z-index: 1001;
        padding: 0.5rem;
        border-radius: 4px;
        gap: 0.8rem;
        min-width: 40px;
        border: 1px solid #eee;
    }

    .lang-options.active {
        display: flex;
    }

    .lang-options button {
        font-size: 1.2rem;
    }
}

/* --- Navegación --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--bg-white);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.header-top {
    background: var(--primary);
    color: var(--text-white);
    padding: 0.8rem 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-title-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-title-text {
    display: flex;
    flex-direction: column;
}

.header-title-text h1 {
    font-family: 'ClarendonLTStd', serif;
    font-size: 2.2rem;
    margin: 0;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-title-text span {
    font-family: 'PRISTINA', cursive;
    font-size: 1.6rem;
    font-style: italic;
    opacity: 0.9;
}

.header-logo {
    height: 70px;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

.header-bottom {
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 0.3rem 5%;
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    list-style: none;
    flex-wrap: wrap;
}

.mobile-only-header {
    display: none !important;
}

.mobile-only-item,
.dropdown-menu li.mobile-only-item {
    display: none !important;
}

.nav-links>li {
    display: flex;
    align-items: center;
}

.nav-links>li:not(:last-child)::after {
    content: "|";
    margin-left: 1rem;
    color: var(--border-color);
    font-size: 0.8rem;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .nav-links>li:not(:last-child)::after {
        content: none;
    }

    .header-bottom {
        padding: 0;
    }
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: normal;
    text-transform: uppercase;
    transition: var(--transition);
    padding: 0.5rem 0.2rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-links .dropdown {
    position: relative;
    cursor: pointer;
}

.nav-links .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0.2rem;
    padding: 0.5rem 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    list-style: none;
}

.nav-links .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
    display: block !important;
    width: 100% !important;
}

.dropdown-menu li::after {
    display: none !important;
}

.dropdown-menu li a {
    padding: 0.6rem 1.2rem;
    display: block;
    font-size: 0.8rem;
    text-align: left;
    width: 100%;
}

.dropdown-menu li a:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.btn-socio {
    background: var(--accent-yellow);
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: normal;
    text-decoration: none;
    text-align: center;
    line-height: 1.2;
    font-size: 0.8rem;
    transition: var(--transition);
}

.btn-socio .mobile-br {
    display: none;
}

.btn-socio:hover {
    background: #e5b800;
    transform: scale(1.05);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 550px;
    display: flex;
    align-items: center;
    padding: 7.5rem 5% 7.5rem;
    overflow: hidden;
    background-image: url('../img/hero.jpg');
    background-size: cover;
    background-position: center;
}

.hero-overlay-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    width: 100%;
    z-index: 2;
}

.hero-text-box {
    background: rgba(26, 42, 90, 0.9);
    padding: 3rem 2rem;
    color: var(--text-white);
    max-width: 720px;
}

.hero-text-box h2 {
    font-size: 4rem;
    color: var(--accent-yellow);
    line-height: 1.1;
    margin-bottom: 2rem;
    font-family: var(--font-main);
    /* Usamos sans-serif para este título según la imagen */
    font-weight: 900;
}

.hero-text-box p {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 0;
    color: #e0e0e0;
}

.hero-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.hero-gallery img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 992px) {
    .hero {
        padding: 4rem 5% 3rem;
        min-height: auto;
    }

    .hero-overlay-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .hero-text-box h2 {
        font-size: 3rem;
    }

    .hero-gallery {
        display: none;
    }
}

/* --- Botones --- */
.btn {
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-weight: normal;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary-light);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.btn-yellow {
    background: var(--accent-yellow);
    color: #000;
    border: none;
}

.btn-yellow:hover {
    background: #e5b800;
    transform: translateY(-2px);
}

.mobile-only-header {
    display: none;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-white);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    color: var(--primary-light);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(13, 89, 242, 0.3);
    border: none;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.btn-outline {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    backdrop-filter: blur(5px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* --- Cards Grid --- */
.container {
    max-width: 1200px;
    margin: 4rem auto 0;
    padding: 0 2rem 4rem !important;
}

.section-header {
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.stats-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 900px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(26, 42, 90, 0.1);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
}

.card-icon .material-symbols-outlined {
    font-size: 30px;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
    text-align: center;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.card-link {
    display: flex;
    align-items: center;
    margin-top: 2rem;
    color: var(--primary);
    font-weight: normal;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    transition: var(--transition);
    text-decoration: none;
}

.card-link:hover {
    color: var(--primary-light);
    gap: 0.8rem;
}


/* --- Parallax y Efectos Visuales --- */
.parallax-section {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    overflow: hidden;
}

.parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.parallax-content {
    position: relative;
    z-index: 2;
}

/* --- Footer --- */
footer {
    background: var(--primary);
    color: var(--text-white);
    padding: 1rem 10% 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 4rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--accent-yellow);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-col ul a:hover {
    color: var(--accent-yellow);
}

.footer-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 2.5rem 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0;
}

.footer-logos img {
    height: 45px;
    width: auto;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-logos img:hover {
    opacity: 1;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .footer-logos {
        gap: 2rem;
        padding: 2rem 0;
    }

    .footer-logos img {
        height: 35px;
    }
}

.copy {
    text-align: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    body {
        padding-top: 125px;
    }

    .navbar {
        padding: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        width: 80% !important;
        max-width: 400px !important;
        height: 100vh !important;
        background: #ffffff !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
        padding: 1.5rem !important;
        gap: 0 !important;
        transition: transform 0.3s ease !important;
        z-index: 10000 !important;
        border-left: 1px solid #eee !important;
        display: block !important;
        /* Cambiado de flex a block para evitar columnas */
        transform: translateX(100%) !important;
        visibility: hidden !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        /* Evitar scroll horizontal */
    }

    .mobile-only-header {
        display: flex !important;
        justify-content: flex-end;
        width: 100%;
        padding: 0.5rem 0 1rem 0;
    }

    .close-menu-btn {
        background: #f1f1f1 !important;
        border: 1px solid #ddd !important;
        color: #333 !important;
        cursor: pointer !important;
        width: 44px !important;
        height: 44px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }

    .close-menu-btn .material-symbols-outlined {
        font-size: 2.2rem !important;
        color: #333 !important;
        display: block !important;
    }

    .nav-links.active {
        transform: translateX(0) !important;
        visibility: visible !important;
    }

    .nav-links li {
        width: 100% !important;
        display: block !important;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .nav-links .dropdown:hover .dropdown-menu {
        opacity: 0;
        visibility: hidden;
        transform: none;
    }

    .nav-links a {
        font-size: 1.05rem !important;
        color: #333 !important;
        width: 100% !important;
        display: flex !important;
        /* El contenido del enlace sí puede ser flex */
        align-items: center !important;
        justify-content: space-between !important;
        padding: 1rem 0 !important;
        border-bottom: 1px solid #eee !important;
        text-decoration: none !important;
    }

    .nav-links a .material-symbols-outlined {
        font-size: 1.8rem !important;
        color: var(--primary) !important;
        pointer-events: none !important;
        /* El clic atraviesa el icono y va al enlace <a> */
    }

    .dropdown-menu {
        position: static !important;
        display: none !important;
        background: #f8f8f8 !important;
        border-left: 4px solid var(--primary) !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        z-index: auto !important;
        overflow: hidden !important;
        /* Asegurar que nada sobresalga */
    }

    .dropdown-menu.active {
        display: block !important;
        height: auto !important;
        /* Asegurar que crezca verticalmente */
    }

    .dropdown-menu li {
        width: 100% !important;
        display: block !important;
    }

    .dropdown-menu li a {
        padding: 0.8rem 1.5rem !important;
        font-size: 0.95rem !important;
        border-bottom: 1px solid #eee !important;
        display: block !important;
        width: 100% !important;
        white-space: normal !important;
        /* Permitir que el texto largo envuelva si es necesario */
    }

    .dropdown-menu li:last-child a {
        border-bottom: none !important;
    }

    .navbar {
        padding: 0;
    }

    .header-top {
        padding: 1.1rem 3% 0.5rem;
        gap: 0.5rem;
    }

    .header-logo {
        height: 75px;
    }

    .header-title-text h1 {
        font-size: 1.1rem;
        letter-spacing: 0;
        line-height: 1.25;
    }

    .header-title-text span {
        font-size: 1.15rem;
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 0.2rem;
    }

    .btn-socio {
        padding: 0.3rem 0.5rem;
        font-size: 0.65rem;
        white-space: normal;
        border-radius: 3px;
        line-height: 1.1;
        text-align: center;
        margin-right: 8px;
    }

    .btn-socio .mobile-br {
        display: inline;
    }

    .mobile-menu-btn {
        margin-left: 0 !important;
        padding: 0.2rem;
    }

    .mobile-menu-btn .material-symbols-outlined {
        font-size: 24px;
    }

    .logo img {
        height: 50px;
    }

    .hero h1 {
        font-size: 2.1rem;
    }

    .mobile-only-item,
    .dropdown-menu li.mobile-only-item {
        display: block !important;
    }
}

/* --- Landing Specific Utilities & Animations --- */
.parallax-section {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.parallax-overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 14, 20, 0.88);
    /* Fondo oscuro semitransparente para legibilidad */
    z-index: 1;
}

.parallax-content {
    position: relative;
    z-index: 2;
}

.py-24 {
    padding: 1rem 0;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mt-12 {
    margin-top: 3rem;
}

.p-0 {
    padding: 0 !important;
}

.p-8 {
    padding: 2rem !important;
}

.text-center {
    text-align: center;
}

.uppercase {
    text-transform: uppercase;
}

.italic {
    font-style: italic;
}

/* Reveal Scroll Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-400 {
    transition-delay: 400ms;
}

/* Timeline Component */
.timeline-item {
    text-align: center;
    position: relative;
    padding: 1rem;
}

.timeline-circle {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.timeline-item:hover .timeline-circle {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
    transform: scale(1.1);
}

.timeline-item h3 {
    margin-bottom: 0.8rem;
}

/* Cards (Agrupaciones Image Header) */
.flex-card {
    display: flex;
    flex-direction: column;
}

.img-header {
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 1rem 1rem 0 0;
}

.insignia-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.card-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-footer-tag {
    margin-top: auto;
    padding-top: 1.5rem;
    color: var(--accent-gold);
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* --- Botón Volver Arriba --- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 45px;
    height: 45px;
    background: rgba(13, 89, 242, 0.3);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}


.back-to-top:hover {
    background: rgba(13, 89, 242, 0.6);
    transform: translateY(-5px);
    border-color: var(--primary-light);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .navbar.scrolled .logo img {
        height: 50px;
    }
}

/* ==========================================================================
   NUEVA SECCIÓN: OFERTA ACADÉMICA (ESTILO CLIENTE)
   ========================================================================== */
.oferta-academica-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 4rem;
}

.edu-row {
    display: grid;
    gap: 10px;
}

.top-row {
    grid-template-columns: repeat(5, 1fr);
}

.bottom-row {
    grid-template-columns: repeat(3, 1fr);
}

.edu-card,
a.edu-card {
    display: flex;
    min-height: 220px;
    padding: 15px;
    border-radius: 4px;
    position: relative;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.edu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.vertical-tag {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 1.1rem;
    color: rgba(0, 0, 0, 0.7);
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    padding-bottom: 35px;
    /* Espacio para el icono de PDF en la esquina inferior izquierda */
}

.card-content h3 {
    /*font-family: 'ClarendonLTStd', serif;*/
    font-size: 1.1rem;
    color: #222;
    margin: 0;
    line-height: 1.3;
    text-align: center;
}

.card-content-full {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
}

.card-content-full h3 {
    /*font-family: 'ClarendonLTStd', serif;*/
    font-size: 1.6rem;
    color: #222;
    margin-bottom: 5px;
}

.card-content-full p {
    font-size: 0.95rem;
    color: #444;
}

/* Estilo para el Icono PDF en las Tarjetas */
.pdf-card-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    font-size: 1.5rem;
    color: rgba(0, 0, 0, 0.35);
    /* Tono sutil e integrado */
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    z-index: 5;
}

/* Micro-animación y cambio de color a rojo PDF corporativo al hacer hover sobre la tarjeta */
.edu-card:hover .pdf-card-icon {
    color: #c62828;
    /* Rojo PDF elegante */
    transform: scale(1.2);
}

/* Para botones con icono PDF */
.btn .pdf-card-icon {
    position: static;
    font-size: 1.2rem;
    color: inherit;
}

.btn:hover .pdf-card-icon {
    color: #c62828;
    transform: scale(1.2);
}


/* Colores Pastel */
.bg-pastel-red {
    background-color: #dab5b1;
}

.bg-pastel-orange {
    background-color: #f2d5ae;
}

.bg-pastel-yellow {
    background-color: #f3eeb5;
}

.bg-pastel-green {
    background-color: #c1e1c1;
}

.bg-pastel-blue {
    background-color: #b6d7e4;
}

/* Responsive para las tarjetas */
@media (max-width: 1024px) {
    .top-row {
        grid-template-columns: repeat(3, 1fr);
    }

    .bottom-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .top-row,
    .bottom-row {
        grid-template-columns: 1fr;
    }

    .edu-card {
        min-height: auto;
    }

    .vertical-tag {
        writing-mode: horizontal-tb;
        transform: none;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .edu-card {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .mobile-title-margin {
        margin-left: 1rem !important;
    }
}

.bg-light {
    background-color: var(--bg-light) !important;
}

/* ==========================================================================
   COOKIE BANNER Y MODAL
   ========================================================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #001242; /* Azul marino profundo similar a la captura */
    color: white;
    padding: 15px 20px;
    z-index: 9999;
    display: none;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    align-items: center;
    justify-content: center;
}

.cookie-content {
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-size: 0.85rem;
    text-align: left;
}

.cookie-content p {
    margin: 0;
    line-height: 1.5;
}

.cookie-content a {
    color: var(--accent-yellow);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cookie {
    background-color: white;
    color: #001242;
    border: none;
    padding: 8px 15px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
}

.btn-cookie:hover {
    background-color: #e0e0e0;
}

/* Modal Cookies */
.cookie-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.cookie-modal-content {
    background-color: white;
    color: #333;
    padding: 20px;
    border-radius: 5px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.cookie-modal-header h2 {
    font-size: 1.3rem;
    margin: 0;
    color: var(--primary);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
}

.close-modal:hover {
    color: #000;
}

.cookie-modal-body p {
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cookie-option-text h3 {
    font-size: 1rem;
    margin: 0 0 5px 0;
    color: var(--primary);
}

.cookie-option-text p {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
}

.cookie-modal-footer {
    margin-top: 20px;
    text-align: right;
}

.btn-cookie-save {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
}

.btn-cookie-save:hover {
    background-color: var(--primary-light);
}

/* Switch UI */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  flex-shrink: 0;
  margin-left: 15px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:disabled + .slider {
  background-color: #a0a0a0 !important;
  cursor: not-allowed;
  opacity: 0.6;
}

input:disabled + .slider:before {
  background-color: #e0e0e0 !important;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Botón flotante de cookies */
.cookie-floating-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cookie-floating-btn:hover {
    background-color: var(--accent-yellow);
    color: black;
    transform: scale(1.1);
}

.cookie-floating-btn span {
    font-size: 28px;
}