/* ==========================================================================
   CSS Variables & Global Reset
   ========================================================================== */
:root {
    --navy: #1C3766;
    --navy-dark: #0F2347;
    --navy-deeper: #0A1A38;
    --gold: #C4973A;
    --gold-light: #D4AB56;
    --gold-glow: rgba(196, 151, 58, 0.35);
    --green: #2E6B45;
    --green-light: #3A8556;

    --bg-dark: #0A1A38;
    --bg-card: rgba(15, 35, 71, 0.6);
    --primary: #C4973A;
    --primary-glow: rgba(196, 151, 58, 0.4);
    --secondary: #2E6B45;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(196, 151, 58, 0.18);
    --glass-blur: blur(16px);

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

/* ==========================================================================
   Canvas Background (Futuristic HSEQ Systems)
   ========================================================================== */
#hseq-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: all;
    background: radial-gradient(ellipse at 40% 20%, #0d2252 0%, #0A1A38 60%, #060f20 100%);
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

.highlight {
    color: var(--primary);
}

.highlight-gradient {
    background: linear-gradient(135deg, var(--primary), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
}

.label-hex {
    width: 12px;
    height: 12px;
    background: var(--primary);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--gold-light) 100%);
    color: #ffffff;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(196, 151, 58, 0.6);
}

.btn-gold {
    background: linear-gradient(135deg, var(--primary) 0%, var(--gold-light) 100%);
    color: #fff;
    box-shadow: 0 4px 20px var(--primary-glow);
    border-radius: 30px;
}

.btn-gold:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 35px rgba(196, 151, 58, 0.65);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: rgba(196, 151, 58, 0.1);
    color: var(--primary);
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.05rem;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    transition: var(--transition);
    margin-top: 15px;
    font-family: var(--font-body);
}

.btn-text:hover {
    color: var(--gold-light);
    gap: 14px;
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: var(--transition);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Navigation — Scroll to White
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 5%;
    z-index: 1000;
    transition: background 0.45s ease, padding 0.35s ease, box-shadow 0.35s ease;
}

/* Estado inicial: transparente */
.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Cuando el usuario hace scroll → fondo blanco */
.navbar.scrolled {
    background: #ffffff;
    padding: 13px 5%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
    border-bottom: 2px solid var(--gold);
}

.navbar.scrolled .nav-brand-text {
    color: var(--navy-dark);
}

.navbar.scrolled .nav-link {
    color: var(--navy-dark);
}

.navbar.scrolled .nav-link:hover {
    color: var(--gold);
}

.navbar.scrolled .nav-link::after {
    background: var(--gold);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-logo {
    height: 52px;
    width: auto;
}

.nav-brand-text {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    white-space: nowrap;
    text-transform: uppercase;
    font-family: var(--font-body);
    transition: color 0.35s ease;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* ---- Language Toggle Button ---- */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.navbar.scrolled .lang-switcher {
    border-left-color: rgba(28, 55, 102, 0.1);
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-body);
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
    opacity: 0.8;
}

.navbar.scrolled .lang-btn {
    color: var(--navy);
}

.lang-btn i {
    font-size: 0.9rem;
    color: var(--gold-light);
}

.navbar.scrolled .lang-btn i {
    color: var(--gold);
}

.lang-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.05);
}

.navbar.scrolled .lang-btn:hover {
    background: rgba(196, 151, 58, 0.05);
}

.lang-btn.active {
    opacity: 1;
    color: var(--gold);
    background: rgba(196, 151, 58, 0.1);
}

.lang-divider {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
}

.navbar.scrolled .lang-divider {
    color: rgba(28, 55, 102, 0.2);
}

@media (max-width: 992px) {
    .lang-switcher {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        margin-top: 1.5rem;
        justify-content: center;
    }
    .lang-btn {
        font-size: 1.1rem;
        padding: 0.6rem 1rem;
    }
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    transition: color 0.35s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 60vh;
    padding: 120px 5% 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.badge-line {
    width: 40px;
    height: 1px;
    background: var(--primary);
}

.hero-badge span {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--gold-light);
    text-shadow: 0 0 10px rgba(212, 171, 86, 0.6);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.15;
    margin-bottom: 24px;
    font-weight: 800;
    color: #ffffff;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-muted);
    margin-bottom: 40px;
    font-weight: 300;
}

/* ==========================================================================
   Services Section — High Contrast Cards
   ========================================================================== */
.services-section {
    padding: 40px 5%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    color: #ffffff;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-family: var(--font-body);
}

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

.service-card {
    background: linear-gradient(135deg, rgba(15, 35, 71, 0.45), rgba(8, 18, 42, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 40px 30px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(196, 151, 58, 0.15);
}

/* Brillo de esquina superior */
.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(196, 151, 58, 0.1) 0%, transparent 55%);
    z-index: -1;
    opacity: 1;
    transition: var(--transition);
}

/* Línea decorativa superior */
.service-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent);
    border-radius: 2px 0 0 0;
    transition: width 0.5s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(196, 151, 58, 0.7);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.6),
        0 0 25px rgba(196, 151, 58, 0.35),
        0 0 60px rgba(196, 151, 58, 0.12),
        inset 0 0 20px rgba(196, 151, 58, 0.05);
}

.service-card:hover::before {
    background: linear-gradient(135deg, rgba(196, 151, 58, 0.18) 0%, transparent 60%);
}

.service-card:hover::after {
    width: 100%;
    background: linear-gradient(90deg, var(--gold), rgba(255, 255, 255, 0.6), var(--gold));
}

.service-tag {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gold-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    font-family: var(--font-body);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #ffffff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.service-card p {
    color: #b8c8e0;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
    font-family: var(--font-body);
}

/* ==========================================================================
   Contact Form Section — White Background
   ========================================================================== */
.contact-form-section {
    padding: 40px 0;
    position: relative;
    z-index: 2;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 26, 56, 0.5) 100%);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 40px;
    align-items: start;
}

/* Panel izquierdo — Navy */
.contact-info-card {
    background: linear-gradient(135deg, rgba(12, 28, 64, 0.45), rgba(6, 14, 32, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 24px;
    padding: 48px 36px;
    color: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    height: 100%;
}

.contact-info-card h3 {
    font-size: 1.9rem;
    margin-bottom: 12px;
    color: #fff;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.contact-method-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.method-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(196, 151, 58, 0.15);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.method-icon.wa-icon {
    background: rgba(37, 211, 102, 0.15);
    border-color: rgba(37, 211, 102, 0.3);
    color: #25D366;
}

.method-text h4 {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gold-light);
    margin-bottom: 3px;
}

.method-text p,
.method-text a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-family: var(--font-body);
    transition: color 0.3s;
}

.method-text a:hover {
    color: var(--gold-light);
}

/* Panel derecho — Blanco */
.contact-form-wrapper {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    padding: 48px 44px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(196, 151, 58, 0.12);
}

.contact-form-wrapper .section-label {
    color: var(--navy);
    margin-bottom: 28px;
}

.contact-form-wrapper .label-hex {
    background: var(--navy);
}

.contact-form-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-group-white {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group-white.full-width {
    grid-column: 1 / -1;
}

.form-group-white label {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--navy-dark);
}

.form-control-white {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #1e293b;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
    outline: none;
}

.form-control-white:focus {
    border-color: var(--gold);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(196, 151, 58, 0.15);
}

.form-control-white::placeholder {
    color: #94a3b8;
}

.select-white {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%231C3766' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 42px;
    cursor: pointer;
}

.select-white option {
    background: #ffffff;
    color: #1e293b;
}

.submit-btn {
    padding: 16px 36px;
    font-size: 1rem;
    align-self: flex-start;
    margin-top: 8px;
}

/* ==========================================================================
   Footer — Idéntico al portal principal (columnas + redes + legales)
   ========================================================================== */
.footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid rgba(196, 151, 58, 0.2);
}

.footer-top {
    background: #0b1d3a;
    padding: 80px 0 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.4fr;
    gap: 50px;
}

/* Columna Marca */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.footer-logo {
    height: 62px;
    width: auto;
    align-self: flex-start;
}

.footer-tagline {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.footer-desc {
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 340px;
    font-family: var(--font-body);
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(196, 151, 58, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--gold);
    color: #fff;
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(196, 151, 58, 0.4);
}

/* Columnas de Navegación */
.footer-nav h4 {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold-light);
    text-shadow: 0 0 8px rgba(212, 171, 86, 0.5);
    margin-bottom: 20px;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav ul li a {
    color: #e2e8f0;
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.88rem;
    transition: color 0.3s, padding-left 0.3s;
    display: block;
}

.footer-nav ul li a:hover {
    color: var(--gold-light);
    padding-left: 6px;
}

/* Columna Contacto */
.footer-contact h4 {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold-light);
    text-shadow: 0 0 8px rgba(212, 171, 86, 0.5);
    margin-bottom: 20px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #e2e8f0;
    font-size: 0.88rem;
    font-family: var(--font-body);
    margin-bottom: 12px;
}

.contact-item i {
    color: var(--gold);
    font-size: 1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.contact-item a {
    color: #e2e8f0;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: var(--gold-light);
}

/* Footer Bottom */
.footer-bottom {
    background: rgba(11, 29, 58, 0.85);
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom .container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    text-align: center;
}

.footer-bottom p {
    color: #ffffff;
    font-size: 0.82rem;
    font-family: var(--font-body);
}

.footer-legal {
    color: var(--gold) !important;
    font-weight: 600 !important;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.72rem !important;
}

/* ==========================================================================
   WhatsApp Floating Button (Idéntico al original)
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 62px;
    height: 62px;
    background-color: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    text-decoration: none;
    z-index: 9999;
    box-shadow:
        0 4px 15px rgba(37, 211, 102, 0.5),
        0 0 0 0 rgba(37, 211, 102, 0.5);
    animation: wa-pulse 2.5s ease-out infinite;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.12);
    background-color: #20ba5c;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.65);
    animation: none;
}

.wa-tooltip {
    position: absolute;
    right: 74px;
    background: var(--navy-dark);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-family: var(--font-body);
    font-weight: 600;
    transform: translateX(8px);
}

.whatsapp-float:hover .wa-tooltip {
    opacity: 1;
    transform: translateX(0);
}

@keyframes wa-pulse {
    0%   { box-shadow: 0 4px 15px rgba(37,211,102,0.5), 0 0 0 0 rgba(37,211,102,0.4); }
    70%  { box-shadow: 0 4px 15px rgba(37,211,102,0.5), 0 0 0 18px rgba(37,211,102,0); }
    100% { box-shadow: 0 4px 15px rgba(37,211,102,0.5), 0 0 0 0 rgba(37,211,102,0); }
}

/* ==========================================================================
   Modals — Con efecto de línea dorada/blanca que recorre el borde
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(8, 18, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -42%) scale(0.96);
    background: linear-gradient(135deg, rgba(12, 28, 64, 0.35), rgba(6, 14, 32, 0.15));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    padding: 48px 42px;
    border-radius: 22px;
    width: 92%;
    max-width: 560px;
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 35px rgba(212, 171, 86, 0.35),
        0 0 15px rgba(255, 255, 255, 0.15);
    overflow: hidden;
}

/* Efecto de línea brillante dorada-blanca que recorre el modal */
.modal::before {
    content: '';
    position: absolute;
    top: -2px; left: -100%;
    width: 70%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold-light), #fff, var(--gold-light), transparent);
    border-radius: 2px;
    transition: none;
}

.modal.active::before {
    animation: border-sweep-top 2.5s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

.modal::after {
    content: '';
    position: absolute;
    bottom: -2px; right: -100%;
    width: 70%;
    height: 3px;
    background: linear-gradient(270deg, transparent, var(--gold-light), #fff, var(--gold-light), transparent);
    border-radius: 2px;
}

.modal.active::after {
    animation: border-sweep-bottom 2.5s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards;
}

@keyframes border-sweep-top {
    0%   { left: -100%; opacity: 0; }
    10%  { opacity: 1; }
    100% { left: 130%; opacity: 0.5; }
}

@keyframes border-sweep-bottom {
    0%   { right: -100%; opacity: 0; }
    10%  { opacity: 1; }
    100% { right: 130%; opacity: 0.5; }
}

.modal.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.close-modal {
    position: absolute;
    top: 20px; right: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-modal:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: rotate(90deg);
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 18px;
    background: linear-gradient(135deg, var(--primary), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.modal h2 {
    margin-bottom: 14px;
    font-size: 1.9rem;
    color: #ffffff;
}

.modal > div > p,
.modal-content > p {
    color: #ffffff;
    margin-bottom: 22px;
    font-family: var(--font-body);
    line-height: 1.7;
    font-size: 0.95rem;
}

.modal-features {
    list-style: none;
    margin-bottom: 30px;
}

.modal-features li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.modal-features li i {
    color: var(--gold-light);
    flex-shrink: 0;
}

.close-modal-btn {
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom .container {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .contact-form-wrapper {
        padding: 32px 24px;
    }

    .form-group-row {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 2.2rem;
    }

    .modal {
        padding: 36px 24px;
    }
}
