:root {
    --gold: #d4af37;
    --gold-light: #f1d592;
    --bg-dark: #0a0a0a;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-heavy: rgba(0, 0, 0, 0.98);
    --transition-premium: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-dark);
    font-family: 'Montserrat', sans-serif;
    color: white;
    overflow-x: hidden;
    opacity: 0;
    animation: fadeInBody 1.5s ease forwards;
}

/* EFECTO LUZ */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(212, 175, 55, 0.07) 0%, transparent 40%);
    pointer-events: none;
    z-index: 1;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), url('grupo.webp') no-repeat center center;
    background-size: cover;
    z-index: -1;
    transform: scale(1.1);
    filter: blur(12px);
    transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* SECCIÓN DE BIENVENIDA CINEMATOGRÁFICA (FULLSCREEN) */
.welcome-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 40px 20px;
    box-sizing: border-box;
}

/* Ajuste del Header dentro del espacio exclusivo */
header.header-premium {
    text-align: center;
    margin: 0;
    z-index: 10;
    width: 100%;
    opacity: 0;
    animation: slideUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.3s;
}

/* CONTENEDOR OPTIMIZADO PARA IMAGEN WEBP */
.logo-wrapper {
    width: 100%;
    max-width: 880px; /* Mayor impacto visual */
    margin: 0 auto;
    position: relative;
    
    /* Sombra proyectada suave que simula flotación institucional */
    filter: drop-shadow(0px 15px 35px rgba(0, 0, 0, 0.7));
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}

/* Propiedades de la imagen WebP */
.logo-vectorial {
    width: 100%;
    height: auto;
    display: block;
}

/* Hover premium adaptado para WebP (Efecto de escala elegante) */
.logo-wrapper:hover {
    transform: scale(1.02);
    filter: drop-shadow(0px 25px 50px rgba(0, 0, 0, 0.9));
}

/* Indicador animado que invita a hacer scroll */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gold);
    font-size: 1.2rem;
    opacity: 0.4;
    animation: bounceScroll 2s infinite ease-in-out;
    z-index: 10;
}

/* KPIS */
.stats-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding-top: 60px;
    margin-bottom: 70px;
    z-index: 10;
    opacity: 0;
    animation: slideUp 1s ease forwards 0.6s;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.2rem;
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 2px;
}

.stat-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4);
}

.stat-divider {
    width: 1px;
    height: 35px;
    background: rgba(212, 175, 55, 0.15);
}

/* CARDS UNIDADES DE NEGOCIO */
.links-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
    width: 90%;
    max-width: 1100px;
    margin: 0 auto 120px;
    z-index: 10;
}

.card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.1);
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-premium);
}

.card:nth-child(1) {
    animation: cardReveal 0.8s ease forwards 0.8s;
}

.card:nth-child(2) {
    animation: cardReveal 0.8s ease forwards 1s;
}

.card:nth-child(3) {
    animation: cardReveal 0.8s ease forwards 1.2s;
}

.card:hover {
    border-color: var(--gold);
    transform: translateY(-10px);
    background: rgba(212, 175, 55, 0.05);
}

.card img {
    max-width: 60%;
    filter: grayscale(1) brightness(1.2);
    opacity: 0.7;
    transition: 0.5s;
}

.card.logo-grande img {
    max-width: 100%;
}

.card:hover img {
    filter: grayscale(0) brightness(1);
    opacity: 1;
}

/* NUEVA SECCIÓN INSTITUCIONAL (PREMIUM) */
.institutional-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 90%;
    max-width: 1100px;
    margin: 0 auto 80px;
    z-index: 10;
}

.inst-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.08);
    padding: 40px 35px;
    position: relative;
    transition: var(--transition-premium);
    display: flex;
    flex-direction: column;
}

.inst-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0;
    transition: var(--transition-premium);
}

.inst-card:hover {
    border-color: rgba(212, 175, 55, 0.3);
    background: rgba(212, 175, 55, 0.02);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.inst-card:hover::before {
    opacity: 1;
}

.inst-icon {
    color: var(--gold);
    font-size: 1.5rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.inst-card h2 {
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 400;
    margin-bottom: 15px;
    color: #ffffff;
}

.inst-highlight {
    color: var(--gold-light);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.inst-card p {
    font-size: 0.85rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
}

/* TÍTULO DE SEPARACIÓN DE SECCIONES */
.section-title {
    text-align: center;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 6px;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 40px;
    position: relative;
    font-weight: 700;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: var(--gold);
    margin: 15px auto 0;
    opacity: 0.5;
}

/* SECCIÓN MATRIZ INSTITUCIONAL - PREMIUM DE ALTO IMPACTO */
.institutional-matrix {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto 120px;
    z-index: 10;
    position: relative;
}

.matrix-header {
    text-align: center;
    margin-bottom: 60px;
    opacity: 0;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.4s;
}

.matrix-subtitle {
    color: var(--gold);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 5px;
    font-weight: 500;
    margin-bottom: 10px;
}

.matrix-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: #ffffff;
}

.matrix-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 20px auto 0;
}

.matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
}

.matrix-card {
    background: rgba(255, 255, 255, 0.01);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(212, 175, 55, 0.06);
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Desfases de carga controlados */
.matrix-grid .matrix-card:nth-child(1) { animation-delay: 0.6s; }
.matrix-grid .matrix-card:nth-child(2) { animation-delay: 0.8s; }
.matrix-grid .matrix-card:nth-child(3) { animation-delay: 1.0s; }

.matrix-card-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    transform: scaleX(0.3);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.matrix-card-body {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.matrix-icon-wrapper {
    width: 50px;
    height: 50px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 1.2rem;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.matrix-card h3 {
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 12px;
}

.matrix-highlight {
    color: var(--gold-light);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.matrix-description {
    font-size: 0.88rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
    margin-bottom: 35px;
}

.matrix-subcontent h4 {
    color: var(--gold);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.matrix-list {
    list-style: none;
}

.matrix-list li {
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 15px;
    padding-left: 15px;
    position: relative;
    font-weight: 300;
}

.matrix-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 4px;
    height: 4px;
    background-color: var(--gold);
}

.matrix-list li strong {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.matrix-card:hover {
    transform: translateY(-8px);
    border-color: rgba(212, 175, 55, 0.25);
    background: rgba(212, 175, 55, 0.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.matrix-card:hover .matrix-card-border {
    transform: scaleX(1);
    opacity: 1;
}

.matrix-card:hover .matrix-icon-wrapper {
    background: var(--gold);
    color: #000000;
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/* WHATSAPP FLOAT */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--gold);
    padding: 12px 15px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    z-index: 999;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    max-width: 50px;
}

.whatsapp-float span {
    white-space: nowrap;
    opacity: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: 0.3s;
    color: #fff;
}

.whatsapp-float:hover {
    max-width: 250px;
    background: var(--gold);
    color: black;
    border-color: var(--gold);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

.whatsapp-float:hover span {
    opacity: 1;
    color: black;
}

/* FOOTER */
footer {
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    width: 100%;
    padding: 90px 0 0;
    z-index: 10;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    width: 90%;
    max-width: 1100px;
    margin: 0 auto 60px;
}

.footer-col h4 {
    color: var(--gold);
    font-size: 0.9rem;
    margin-bottom: 25px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 700;
}

.footer-col a,
.footer-col p {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 2;
    display: block;
    transition: 0.3s;
    cursor: pointer;
}

.footer-col a:hover {
    color: var(--gold);
    padding-left: 8px;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.social-link {
    color: rgba(212, 175, 55, 0.5);
    font-size: 1.3rem;
    transition: 0.3s;
    text-decoration: none;
}

.social-link:hover {
    color: var(--gold);
    transform: translateY(-5px);
}

.legal-bar {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(212, 175, 55, 0.05);
    flex-wrap: wrap;
}

.legal-bar a {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    cursor: pointer;
}

.legal-bar a:hover {
    color: var(--gold);
}

.footer-bottom {
    text-align: center;
    padding: 30px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 2px;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
}

/* MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--glass-heavy);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.modal-content {
    background: #0f0f0f;
    border: 1px solid var(--gold);
    width: 100%;
    max-width: 800px;
    padding: 60px;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalIn 0.5s ease forwards;
}

.close-modal {
    position: absolute;
    top: 25px;
    right: 25px;
    color: var(--gold);
    font-size: 2rem;
    cursor: pointer;
}

.modal h2 {
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-bottom: 30px;
    font-weight: 300;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 15px;
}

.modal h3 {
    color: var(--gold-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-top: 25px;
    letter-spacing: 2px;
}

.modal p {
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin-top: 10px;
    font-weight: 300;
}

.modal ul {
    list-style: none;
    margin-top: 15px;
}

.modal li {
    margin-bottom: 15px;
    padding-left: 20px;
    border-left: 2px solid var(--gold);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* KEYFRAMES ANIMACIONES */
@keyframes fadeInBody {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes cardReveal {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Animación de flotación de la flecha */
@keyframes bounceScroll {
    0%, 100% { transform: translate(-50%, 0); opacity: 0.3; }
    50% { transform: translate(-50%, 10px); opacity: 0.8; }
}

/* RESPONSIVE Y ADAPTACIÓN MÓVIL */
@media (max-width: 768px) {
    .logo-wrapper {
        max-width: 92%; /* Se adapta automáticamente en móviles para no desbordar */
    }

    .footer-grid {
        text-align: center;
    }

    .stats-container {
        flex-direction: column;
        gap: 25px;
        padding-top: 40px;
    }

    .stat-divider {
        display: none;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }

    .institutional-section {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 50px;
    }

    .inst-card {
        padding: 30px 25px;
        text-align: center;
    }

    .inst-icon {
        margin-left: auto;
        margin-right: auto;
    }

    .institutional-matrix {
        margin: 20px auto 80px;
    }

    .matrix-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .matrix-card-body {
        padding: 40px 25px;
    }
}