/* ==========================================================================
   VARIABLES GLOBALES
   ========================================================================== */
:root {
    --dorado: #d4af37;
    --dorado-light: #f1e4a1;
    --negro: #050505;
    --glass: rgba(255, 255, 255, 0.03);
    --border: rgba(212, 175, 55, 0.15);
    --transicion: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --gold-gradient: linear-gradient(45deg, #af8e33, #f1e4a1, #d4af37, #af8e33);
}

* { 
    box-sizing: border-box; 
    scroll-behavior: smooth; 
}

body {
    margin: 0; 
    padding: 0;
    background: var(--negro);
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.8;
    overflow-x: hidden;
}

h1, h2, h3, h4 { 
    font-family: 'Playfair Display', serif; 
    font-weight: 400; 
}

/* ==========================================================================
   EFECTOS Y TEXTOS
   ========================================================================== */
.gold-text {
    background: var(--gold-gradient);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 4s linear infinite;
}

@keyframes shine { 
    to { background-position: 200% center; } 
}

/* Fondo editado desde Joomla: la composición se dibuja sobre body y nunca queda
   oculta detrás del fondo opaco por un z-index negativo. */
body {
    background-image: linear-gradient(rgba(0,0,0,.89),rgba(0,0,0,.92)), var(--site-bg-image, none);
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
}

/* ==========================================================================
   NAVEGACIÓN Y CABECERA (HERO)
   ========================================================================== */
.site-navigation {
    padding: 15px 5%;
    display: flex; justify-content: space-between; align-items: center;
    backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid var(--border);
    position: fixed; width: 100%; top: 0; z-index: 1000;
    background: rgba(0,0,0,0.8);
}

/* Logotipo del menú: regla dañada en la conversión 2.0.0, reparada. */
.logo-nav {
    display: block;
    height: var(--nav-mark-height, 52px);
    width: auto;
    max-width: 100%;
    max-height: 72px;
    object-fit: contain;
}


.nav-links a {
    color: #fff; text-decoration: none; margin-left: 25px;
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 2px;
    transition: var(--transicion); opacity: 0.6;
}

.nav-links a:hover { 
    color: var(--dorado); 
    opacity: 1; 
    text-shadow: 0 0 10px rgba(212,175,55,0.3); 
}

.site-header {
    height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
}

.hero-logo { 
    width: 300px; 
    margin-bottom: 20px; 
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.3)); 
}

.site-header h1 { font-size: clamp(2rem, 6vw, 4rem); letter-spacing: 12px; text-transform: uppercase; margin: 0; }
.site-header p { letter-spacing: 8px; color: rgba(255,255,255,0.5); text-transform: uppercase; font-size: 0.9rem; }

.home-section, .social-section, .contact-section { padding: 120px 10%; }
.home-section > h2, .contact-section > h2 { text-align: center; font-size: 2.8rem; margin-bottom: 70px; letter-spacing: 3px; }

/* ==========================================================================
   TARJETAS GLASS-CARD
   ========================================================================== */
.glass-card {
    background: var(--glass); 
    border: 1px solid var(--border);
    padding: 30px; 
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); 
    height: 100%;
    position: relative; 
    overflow: hidden;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-align: center;
    min-height: 260px;
    justify-content: center;
}

.glass-card::after {
    content: ''; 
    position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    transition: left 0.7s ease;
}

.glass-card:hover::after { left: 100%; }

.glass-card:hover {
    border-color: var(--dorado); 
    background: rgba(212, 175, 55, 0.05);
    transform: translateY(-8px); 
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4); 
}

/* ==========================================================================
   GRID DE SERVICIOS
   ========================================================================== */
.services-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px; 
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 20px;
}

.services-grid .glass-card h3 { 
    font-size: 0.85rem; 
    letter-spacing: 2px; 
    margin: 15px 0; 
    line-height: 1.3;
    color: var(--dorado);
    text-transform: uppercase;
    font-weight: 500;
}

/* ICONOS DE SERVICIOS */
.glass-card .service-icon.fa-solid { 
    font-size: 1.8rem !important; 
    color: var(--dorado) !important; 
    margin-bottom: 20px; 
    display: block !important; 
    opacity: 0.9;
    transition: all 0.4s ease;
}

.glass-card:hover .service-icon.fa-solid {
    transform: translateY(-5px);
    opacity: 1;
}

@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .services-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   TESTIMONIOS, EQUIPO Y FAQ
   ========================================================================== */
.testimonial-quote { font-style: italic; font-size: 0.95rem; opacity: 0.8; margin-bottom: 20px; }
.testimonial-author { color: var(--dorado); font-family: 'Playfair Display', serif; font-size: 1.1rem; letter-spacing: 1px; }

.member-premium { background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(0,0,0,0.9) 100%); border: 1px solid var(--border); overflow: hidden; transition: var(--transicion); }
.member-premium:hover { border-color: var(--dorado); transform: translateY(-10px); }
.member-premium img { width: 100%; height: 320px; object-fit: cover; filter: grayscale(1) brightness(0.7); transition: 0.6s; object-position: top center; }
.member-premium:hover img { filter: grayscale(0) brightness(1); }

.faq-container { max-width: 900px; margin: 0 auto; }

.faq-item { 
    border-bottom: 1px solid var(--border); 
    margin-bottom: 10px; 
    transition: var(--transicion); 
}

.faq-question { 
    background: transparent; border: 0; color: inherit; text-align: left; width: 100%;
    padding: 25px; 
    cursor: pointer; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-family: 'Playfair Display', serif; 
    font-size: 1.2rem; 
}

.faq-item i { 
    transition: transform 0.4s ease; 
    font-size: 0.8rem; 
    opacity: 0.5; 
    color: var(--dorado); 
}

.faq-item.active i { 
    transform: rotate(180deg); 
    opacity: 1; 
}

.faq-answer { 
    max-height: 0; 
    overflow: hidden; 
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); 
    padding: 0 25px; 
    color: rgba(255,255,255,0.6); 
    font-size: 0.95rem; 
}

.faq-item.active .faq-answer { 
    max-height: 1500px; 
    padding-bottom: 25px; 
}

.btn-elite { padding: 15px 35px; border: 1px solid var(--dorado); color: var(--dorado); text-transform: uppercase; letter-spacing: 3px; font-size: 0.75rem; text-decoration: none; transition: 0.4s; display: inline-block; margin-top: 20px; }
.btn-elite:hover { background: var(--dorado); color: #000; box-shadow: 0 0 20px rgba(212, 175, 55, 0.4); }

/* ==========================================================================
   BOTÓN WHATSAPP DINÁMICO
   ========================================================================== */
.whatsapp-premium {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(0,0,0,0.95);
    border: 1px solid var(--dorado);
    width: 60px;
    height: 60px;
    border-radius: 50px;
    text-decoration: none;
    z-index: 2000;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.whatsapp-premium i {
    color: var(--dorado);
    font-size: 2rem;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.4s;
}

.whatsapp-premium span {
    color: #000;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.3s ease;
    padding-right: 25px;
}

.whatsapp-premium:hover {
    width: 300px;
    background: var(--dorado);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
}

.whatsapp-premium:hover i { color: #000; }
.whatsapp-premium:hover span { opacity: 1; }

@media (max-width: 768px) {
    .whatsapp-premium { width: 60px !important; }
    .whatsapp-premium span { display: none; }
}

/* ==========================================================================
   VENTANAS MODALES LEGALES
   ========================================================================== */
.modal-legal {
    display: none; position: fixed; z-index: 3000; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.95); backdrop-filter: blur(10px);
}

.legal-modal-content {
    background: #0a0a0a;
    margin: 5% auto;
    padding: 60px;
    border: 1px solid var(--dorado);
    outline: 15px solid #0a0a0a;
    box-shadow: 0 0 0 16px var(--dorado);
    width: 85%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    color: #a0a0a0;
}

.modal-text h2 {
    color: var(--dorado);
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 5px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 20px;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.modal-text h3 {
    color: var(--dorado);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1rem;
    margin-top: 35px;
    margin-bottom: 10px;
}

.modal-text p {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 20px;
    font-weight: 300;
}

.close-modal {
    color: var(--dorado);
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover {
    transform: scale(1.2);
    filter: brightness(1.5);
}

/* ==========================================================================
   FOOTER Y COMPONENTES ADICIONALES
   ========================================================================== */
.footer-pro { background: #000; padding: 100px 10% 40px; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 50px; }
.footer-col h4 { color: var(--dorado); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 25px; font-size: 0.85rem; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { color: rgba(255,255,255,0.5); text-decoration: none; font-size: 0.85rem; transition: 0.3s; }
.footer-col ul li a:hover { color: var(--dorado); padding-left: 5px; }

.stat-item { min-height: 120px; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.stat-item h3 { font-size: 3rem; margin: 0; min-width: 110px; }

/* ========================================================================== 
   INTEGRACIÓN JOOMLA Y CORRECCIONES RESPONSIVAS 2.1.0
   ========================================================================== */
.site-navigation {
    gap: clamp(14px, 2.5vw, 36px);
    min-height: 78px;
    padding: 10px clamp(16px, 4%, 80px);
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
}
.site-brand {
    flex: 0 1 auto;
    display: inline-flex;
    min-width: 0;
    max-width: 170px;
    align-items: center;
    justify-content: flex-start;
    z-index: 2200;
    color: var(--dorado);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.25;
}
.logo-nav { max-width: min(170px, 100%); }
.nav-links {
    display: flex;
    flex: 0 1 auto;
    min-width: 0;
    flex-direction: row;
    align-items: center;
    gap: clamp(12px, 1.5vw, 26px);
    justify-content: flex-end;
    position: static;
    background: transparent;
    height: auto;
    width: auto;
}
.nav-links > ul, .nav-links ul.mod-menu {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(10px, 1.3vw, 24px);
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-links ul li { margin: 0; padding: 0; list-style: none; }
.nav-links a {
    display: inline-block;
    margin: 0;
    white-space: nowrap;
    font-size: clamp(.6rem, .69vw, .72rem);
    letter-spacing: clamp(.6px, .1vw, 1.7px);
    line-height: 1.5;
}
.nav-links .active > a, .nav-links .current > a { color: var(--dorado); opacity: 1; }
/* Los submenús de Joomla no pueden usar el flex horizontal del nivel superior. */
.nav-links li { position: relative; }
.nav-links li > ul { display: none; position: absolute; left: 0; top: 100%; width: max-content; min-width: 200px; padding: 12px; background: rgba(10,10,10,.98); border: 1px solid var(--border); z-index: 1600; }
.nav-links li:hover > ul, .nav-links li:focus-within > ul { display: flex; flex-direction: column; align-items: stretch; }
.nav-links li > ul li a { display: block; padding: 8px; }
.menu-toggle {
    display: none;
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--dorado);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 2201;
    padding: 6px 10px;
    line-height: 1.2;
}
.menu-toggle:focus-visible, .faq-question:focus-visible, .footer-legal-open:focus-visible, .close-modal:focus-visible {
    outline: 2px solid var(--dorado); outline-offset: 4px;
}
.site-header {
    height: auto;
    min-height: 100svh;
    padding: 130px 5% 75px;
    gap: 14px;
}
.hero-logo {
    display: block;
    width: min(var(--hero-mark-width, 265px), 68vw);
    max-width: 380px;
    max-height: 320px;
    height: auto;
    object-fit: contain;
    margin-bottom: 14px;
}
.site-header h1 { max-width: 100%; overflow-wrap: anywhere; }
.site-header p { max-width: 100%; line-height: 1.8; }
.home-section, .social-section, .contact-section, .site-header { scroll-margin-top: 82px; }
.section-intro { text-align: center; max-width: 950px; margin: 0 auto 70px; font-weight: 300; opacity: .8; font-size: 1.15rem; line-height: 1.8; }
.kpis-section { background: rgba(212, 175, 55, .02); padding: 80px 10%; }
.kpis-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; text-align: center; }
.stat-item p { text-transform: uppercase; font-size: .7rem; letter-spacing: 2px; }
.content-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; max-width: 1200px; margin: 0 auto; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; }
.glass-card h3, .contact-grid .glass-card h3 { color: var(--dorado); }
.glass-card p { font-size: .9rem; opacity: .75; }
.about-icon { color: var(--dorado); font-size: 1.5rem; margin-bottom: 15px; }
.quote-icon { color: var(--dorado); margin-bottom: 20px; font-size: 1.5rem; }
.member-content { padding: 25px; text-align: center; }
.member-content h4 { color: var(--dorado); font-size: 1.3rem; margin: 0; }
.member-role { font-size: .7rem; letter-spacing: 2px; text-transform: uppercase; opacity: .7; }
.member-bio { font-size: .8rem; border-top: 1px solid var(--border); margin-top: 15px; padding-top: 15px; opacity: .6; }
.testimonials-section { background: rgba(212, 175, 55, .01); }
.social-section { text-align: center; background: rgba(0,0,0,.5); }
.social-section h3 { letter-spacing: 5px; text-transform: uppercase; }
.social-section > p { opacity: .5; margin-bottom: 40px; }
.social-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 40px; }
.social-links a, .social-unlinked { font-size: 3.5rem; }
.social-unlinked { opacity: .5; cursor: default; }
.contact-section { padding-bottom: 0 !important; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 60px; }
.map-container { height: 450px; filter: grayscale(1) invert(.9) contrast(1.2) brightness(.8); border: 1px solid var(--border); }
.map-container iframe { border: 0; width: 100%; height: 100%; }
.footer-logo { height: 80px; max-width: 100%; object-fit: contain; object-position: left center; margin-bottom: 20px; }
.footer-description { font-size: .8rem; opacity: .5; }
.copyright { text-align: center; margin-top: 80px; font-size: .7rem; opacity: .3; letter-spacing: 2px; }
.footer-legal-open { appearance: none; background: transparent; border: 0; padding: 0; color: rgba(255,255,255,.5); font: inherit; font-size: .85rem; text-align: left; cursor: pointer; }
.footer-legal-open:hover { color: var(--dorado); }
.modal-legal[hidden], .legal-panel[hidden] { display: none !important; }
.modal-legal.is-open { display: block; }
.close-modal { background: transparent; border: 0; padding: 0; }
.main-content-holder { padding: 125px 10% 65px; min-height: 45vh; background: rgba(0,0,0,.3); }
/* Animación local: el contenido permanece visible aunque JavaScript esté desactivado. */
@media (prefers-reduced-motion: no-preference) {
    .motion-ready [data-aos] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
    .motion-ready [data-aos="zoom-in"] { transform: scale(.92); }
    .motion-ready [data-aos="flip-left"] { transform: translateY(22px) scale(.98); }
    .motion-ready [data-aos].in-view { opacity: 1; transform: none; }
}
@media (max-width: 1180px) {
    .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .nav-links {
        position: fixed; top: 0; right: 0; left: auto;
        width: min(420px, 100vw); height: 100svh;
        display: flex; flex-direction: column;
        align-items: center; justify-content: center;
        padding: 100px 20px 70px;
        background: rgba(5,5,5,.98);
        border-left: 1px solid var(--border);
        transform: translateX(105%); visibility: hidden;
        pointer-events: none;
        opacity: 0;
        transition: transform .3s ease, visibility .3s ease, opacity .3s ease;
        z-index: 2100;
        overflow-y: auto;
    }
    .nav-links.active { transform: translateX(0); visibility: visible; pointer-events: auto; opacity: 1; }
    .nav-links > ul, .nav-links ul.mod-menu { flex-direction: column; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 12px; }
    .nav-links a { font-size: 1rem; letter-spacing: 2px; margin: 5px 0; white-space: normal; text-align: center; }
    .nav-links li > ul { position: static; width: auto; min-width: 0; margin-top: 5px; }
    .nav-links li:hover > ul, .nav-links li:focus-within > ul { align-items: center; }
}
@media (max-width: 900px) {
    .home-section, .social-section, .contact-section { padding: 75px 6%; }
    .kpis-section { padding: 65px 6%; }
    .services-grid { grid-template-columns: repeat(2, minmax(0,1fr)); padding: 0; }
    .legal-modal-content { width: 92%; padding: 30px; margin: 8svh auto; max-height: 82svh; outline-width: 4px; box-shadow: 0 0 0 5px var(--dorado); }
    .main-content-holder { padding: 105px 6% 50px; }
    .footer-pro { padding: 75px 6% 35px; }
    .footer-grid { gap: 28px; }
}
@media (max-width: 600px) {
    .site-navigation { min-height: 70px; padding: 10px 5%; }
    .site-brand { max-width: 150px; }
    .logo-nav { height: min(var(--nav-mark-height, 52px), 50px); max-width: 140px; }
    .site-header { min-height: 90svh; padding: 105px 7% 65px; }
    .hero-logo { width: min(var(--hero-mark-width, 265px), 57vw); max-height: 240px; }
    .site-header h1 { font-size: clamp(1.55rem, 7vw, 2.35rem); letter-spacing: clamp(1px, 1.7vw, 5px); }
    .site-header p { font-size: .69rem; letter-spacing: clamp(1px, 1.05vw, 3px); }
    .home-section > h2, .contact-section > h2 { font-size: clamp(1.65rem, 7.3vw, 2.2rem); margin-bottom: 35px; }
    .section-intro { font-size: .98rem; margin-bottom: 40px; }
    .services-grid, .content-grid, .team-grid, .contact-grid { grid-template-columns: minmax(0,1fr); }
    .glass-card { padding: 24px; }
    .faq-question { padding: 20px 10px; font-size: 1rem; }
    .faq-answer { padding-left: 10px; padding-right: 10px; }
    .footer-pro { padding: 60px 6% 30px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
    .footer-logo { max-width: 100%; }
    .map-container { height: 330px; }
    .social-links { gap: 20px; }
    .social-links a, .social-unlinked { font-size: 2.4rem; }
    .whatsapp-premium { width: 56px !important; height: 56px; bottom: 18px; right: 18px; }
    .whatsapp-premium span { display: none; }
    .close-modal { right: 16px; top: 10px; }
}
@media (max-width: 380px) {
    .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media (max-width: 1180px) { body.mobile-menu-open { overflow: hidden; } }

/* Iconos básicos autocontenidos: funcionan aunque un CDN esté bloqueado. */
.whatsapp-premium .whatsapp-icon { color: var(--dorado); min-width: 60px; width: 60px; height: 30px; flex-shrink: 0; transition: color .35s ease; }
.whatsapp-premium:hover .whatsapp-icon { color: #000; }
.menu-toggle > i { display: none; }
.menu-toggle::before { content: "☰"; display: block; color: var(--dorado); font-family: Arial, sans-serif; font-weight: 400; font-size: 1.55rem; line-height: 1; }
.menu-toggle[aria-expanded="true"]::before { content: "×"; font-size: 2rem; }
