/* 
    Sistema de Diseño - La Unión Musical
    Estética: Premium, Glassmorphism, Dark Mode
*/

:root {
    --primary: #0d59f2;
    --primary-light: #4b88ff;
    --accent-gold: #D4AF37;
    --bg-dark: #0B0E14;
    --bg-card: #151A23;
    --text-white: #ffffff;
    --text-slate: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
    --font-display: 'Montserrat', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: var(--font-main);
    line-height: 1.6;
    padding-top: 115px;
    /* Altura aproximada del navbar */
}

h1,
h2,
h3,
h4,
.font-display {
    font-family: var(--font-display);
    font-weight: 700;
}

/* --- Navegación --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11, 14, 20, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: padding 0.4s ease, background 0.4s ease;
}

.navbar.scrolled {
    padding: 0.5rem 5%;
    background: rgba(11, 14, 20, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.navbar.scrolled .logo img {
    height: 60px;
}

.logo img {
    height: 80px;
    border-radius: 5px;
    transition: var(--transition);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-slate);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-white);
}

.nav-links .dropdown {
    position: relative;
    cursor: pointer;
}

.nav-links .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    list-style: none;
}

.nav-links .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    padding: 0.75rem 1.5rem;
    display: block;
}

.dropdown-menu li a:hover {
    background: var(--glass-bg);
    color: var(--primary-light);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 80vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    padding: 0 10%;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero {
        height: auto;
        min-height: 500px;
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to right, var(--bg-dark) 30%, transparent), url('../img/hero.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.hero-content {
    max-width: 900px;
}

.hero-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--accent-gold);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-title-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.hero-inline-logo {
    height: 200px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .hero-title-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .hero-inline-logo {
        height: 90px;
    }
}

.grad-text {
    background: linear-gradient(45deg, #4855ff 0%, var(--accent-gold) 60%, #B8860B 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-slate);
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
}

/* --- Botones --- */
.btn {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.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;
    padding: 0 2rem;
}

.section-header {
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(13, 89, 242, 0.1);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-slate);
    font-size: 0.95rem;
}

.card-link {
    display: flex;
    align-items: center;
    margin-top: 2rem;
    color: var(--text-slate);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    transition: var(--transition);
}

.card:hover .card-link {
    color: var(--text-white);
}

/* --- Footer --- */
footer {
    background: #000;
    padding: 5rem 10% 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul a {
    color: var(--text-slate);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-col ul a:hover {
    color: var(--primary-light);
}

.copy {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    body {
        padding-top: 90px;
        /* Menor altura en móvil debido al logo más pequeño */
    }

    .navbar {
        padding: 1rem 5%;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 85%;
        height: 100vh;
        background: rgba(11, 14, 20, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 4rem 2rem;
        gap: 0.5rem;
        transition: transform 0.4s ease, visibility 0.4s;
        z-index: 999;
        border-left: 1px solid var(--glass-border);
        visibility: visible;
        display: none;
        transform: translateX(100%);
        visibility: hidden;
    }

    .mobile-only-header {
        display: flex;
        justify-content: flex-end;
        width: 100%;
        padding-bottom: 1rem;
    }

    /* Mostrar botón de cierre dentro del nav cuando está activo */
    .close-menu-btn {
        background: none;
        border: none;
        color: var(--text-white);
        cursor: pointer;
        padding: 0.5rem;
        display: block;
    }

    .nav-links.active {
        transform: translateX(0);
        visibility: visible;
    }

    .nav-links li {
        width: 100%;
        list-style: none;
    }

    .nav-links a {
        font-size: 1.1rem;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.6rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links a .material-symbols-outlined {
        font-size: 2.2rem !important;
        /* Visualmente más grande */
        padding: 0.8rem;
        /* Mucha más área táctil */
        margin-right: -0.8rem;
        display: inline-block;
        color: var(--primary-light);
    }

    .dropdown-menu {
        position: relative;
        /* Cambiado de static para mejor control de z-index */
        opacity: 1;
        visibility: visible;
        display: none;
        transform: none;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.05);
        border: none;
        width: 100%;
        padding-left: 1rem;
        z-index: 5;
    }

    .dropdown-menu.active {
        display: block;
    }

    .dropdown-menu li a {
        padding: 0.75rem 0;
        font-size: 1rem;
        border: none;
    }

    .nav-actions .btn-primary {
        display: none;
    }

    .logo img {
        height: 60px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

/* --- 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: 6rem 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;
    }
}