/* Base Styles & Variables */
:root {
    --bg-dark: #FFFFFF;
    --bg-darker: #F8FAFC;
    --bg-panel: rgba(255, 255, 255, 0.92);
    
    --primary: #1E40AF;
    --primary-light: #3B82F6;
    --secondary: #7C3AED;
    --accent: #6366F1;
    
    --text-main: #0F172A;
    --text-muted: #475569;
    --text-light: #64748B;
    
    --danger: #DC2626;
    --warning: #D97706;
    --success: #16A34A;
    --whatsapp: #25D366;
    
    --glass-border: rgba(15, 23, 42, 0.08);
    --glass-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --nav-height: 90px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .fade-in, .fade-in-up {
        opacity: 1;
        transform: none;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

:focus:not(:focus-visible) {
    outline: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: clamp(1rem, 4vw, 1.5rem);
    padding-right: clamp(1rem, 4vw, 1.5rem);
}

.section {
    padding: clamp(3.5rem, 8vw, 6rem) 0;
}

/* Utilities */
.text-center { text-align: center; }
.text-gray { color: var(--text-muted); }
.text-white { color: white; }
.text-accent { color: var(--accent); }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.fw-bold { font-weight: 700; }
.text-lg { font-size: 1.125rem; }
.d-inline-block { display: inline-block; }

.gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Gradients */
.gradient-blue, .gradient-purple, .bg-orange, .bg-blue {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}
.bg-red {
    background: linear-gradient(135deg, var(--danger), #f87171);
}
.bg-darker { background-color: var(--bg-darker); }

/* Glow Effects */
.relative { position: relative; }
.z-10 { position: relative; z-index: 10; }
.glow-bg {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}
.blue-glow { background: var(--primary-light); }
.purple-glow { background: var(--secondary); }
.pos-left { top: 20%; left: -200px; }
.pos-right { bottom: 10%; right: -200px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}
.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}
.btn-block {
    width: 100%;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}
.btn-primary:hover {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}
.btn-danger {
    background: linear-gradient(135deg, var(--danger), #ef4444);
    color: white;
}
.btn-danger:hover {
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.35);
    transform: translateY(-2px);
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}
.btn-outline:hover {
    background: rgba(96, 165, 250, 0.1);
}
.btn-outline-light {
    background: transparent;
    border: 1px solid white;
    color: white;
}
.btn-outline-light:hover {
    background: white;
    color: var(--bg-dark);
}

/* Animations */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(139, 92, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}
@keyframes pulseDanger {
    0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.55); }
    70% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}
@keyframes pulseGreen {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
    70% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
.pulse-btn { animation: pulse 2s infinite; }
.pulse-danger { animation: pulseDanger 2s infinite; }
.pulse-green { animation: pulseGreen 2.5s infinite; }

.btn-whatsapp {
    background: var(--whatsapp) !important;
    color: #fff !important;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}
.btn-whatsapp:hover {
    background: #1ebe57 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
}

.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in-up { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in-up.visible, .fade-in.visible { opacity: 1; transform: translateY(0); }

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Navbar */
.navbar {
    --nav-height: 100px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.25rem 0;
    background: rgba(7, 11, 20, 0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-top: none;
    border-left: none;
    border-right: none;
    border-radius: 0;
    transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.navbar.scrolled {
    --nav-height: 85px;
    padding: 0.8rem 0;
    background: rgba(4, 6, 9, 0.96) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}
.logo-icon {
    color: var(--accent);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.nav-links a:not(.btn) {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.4rem 0;
    transition: var(--transition);
}
.nav-links a:not(.btn):hover {
    color: var(--accent);
}
.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--secondary));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-links a:not(.btn):hover::after {
    transform: scaleX(1);
    transform-origin: left;
}
.nav-links a:not(.btn)[style*="color:var(--accent)"]::after,
.nav-links a:not(.btn)[style*="color: var(--accent)"]::after {
    transform: scaleX(1);
    transform-origin: left;
    background: var(--accent);
}
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
}
.mobile-menu {
    display: none;
    flex-direction: column;
    padding: 1rem;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(7, 11, 20, 0.98) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8) !important;
    z-index: 999;
    max-height: calc(100vh - var(--nav-height, 100px));
    max-height: calc(100dvh - var(--nav-height, 100px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.mobile-menu::-webkit-scrollbar {
    width: 4px;
}
.mobile-menu::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}
.mobile-menu::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}
.mobile-menu.active {
    display: flex;
}
.mobile-link {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 500;
    transition: var(--transition);
}
.mobile-link:last-child {
    border-bottom: none;
}
.mobile-link:hover, .mobile-link:active {
    color: var(--accent);
    background: rgba(0, 0, 0, 0.03);
    padding-left: 1.25rem;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding-top: calc(var(--nav-height, 90px) + 1.5rem);
    padding-bottom: 2rem;
}
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
.hero-bg img, .hero-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(7, 11, 20, 0.95) 0%, rgba(7, 11, 20, 0.7) 50%, rgba(7, 11, 20, 0.4) 100%);
}
@media (max-width: 768px) {
    .hero .overlay {
        background: linear-gradient(
            180deg,
            rgba(7, 11, 20, 0.55) 0%,
            rgba(7, 11, 20, 0.85) 45%,
            rgba(7, 11, 20, 0.95) 100%
        );
    }
}
.hero-content {
    max-width: 800px;
}
.hero-content h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    margin-bottom: 1.25rem;
    line-height: 1.08;
}
.hero-content p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-muted);
    margin-bottom: 1.75rem;
    max-width: 600px;
}
.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}
.badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(30, 64, 175, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}
.badge i { width: 16px; height: 16px; color: var(--accent); }
.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 1.5rem;
}
.hero-tag {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 0.35rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.82rem;
    font-weight: 500;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-accent {
    color: #C4B5FD;
    text-shadow: 0 1px 12px rgba(99, 102, 241, 0.45);
}

/* Emergencies / Diferencial */
.dashboard-card {
    padding: 3rem;
    border-radius: 1rem;
}
.status-card {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 0.75rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}
.status-card:hover {
    transform: translateY(-5px);
    background: rgba(0, 0, 0, 0.05);
}
.status-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
}
.status-card.urgent::before { background: var(--danger); }
.status-card.warning::before { background: var(--warning); }
.status-card.info::before { background: var(--accent); }

.icon-wrapper {
    width: 48px; height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.icon-wrapper i { color: white; }
.status-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.status-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
}
.status-badge.red { background: rgba(139, 92, 246, 0.1); color: var(--secondary); border: 1px solid rgba(139, 92, 246, 0.2); }
.status-badge.orange { background: rgba(139, 92, 246, 0.1); color: var(--secondary); border: 1px solid rgba(139, 92, 246, 0.2); }
.status-badge.blue { background: rgba(139, 92, 246, 0.1); color: var(--secondary); border: 1px solid rgba(139, 92, 246, 0.2); }

/* Layout Grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.gap-4 { gap: 2rem; }
.align-center { align-items: center; }

/* Services */
.section-title { margin-bottom: 4rem; }
.section-title h2 { font-size: clamp(1.65rem, 4.5vw, 2.5rem); margin-bottom: 1rem; }
.section-title p { color: var(--text-muted); max-width: 600px; margin: 0 auto; }
.service-card {
    padding: 2.5rem 2rem;
    border-radius: 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}
.service-card:hover::before {
    opacity: 1;
}
.hover-up:hover {
    transform: translateY(-10px);
    border-color: rgba(139, 92, 246, 0.3) !important;
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.15) !important;
}
.service-card h3, .service-card p, .service-card .btn {
    position: relative;
    z-index: 1;
}
.service-card h3 { font-size: 1.2rem; margin-bottom: 0.75rem; }
.service-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.service-card .icon-wrapper {
    transition: transform 0.3s ease;
}
.service-card:hover .icon-wrapper {
    transform: scale(1.05);
}

/* About Section */
.about-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-weight: 500;
}
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.stat-card {
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    transition: var(--transition);
}
.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(139, 92, 246, 0.2);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.1);
}
.stat-number { font-size: 3rem; font-weight: 800; line-height: 1; margin-bottom: 0.5rem; }
.stat-card p { font-size: 0.9rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }

/* Projects */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.gallery-item {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    aspect-ratio: 4/5;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.item-overlay {
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(4,6,9,0.9) 0%, rgba(4,6,9,0) 60%);
    display: flex;
    align-items: flex-end;
    padding: 2rem;
}
.overlay-content h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #fff;
}
.overlay-content p { color: var(--accent); font-size: 0.9rem; margin-bottom: 0.5rem; }
.gallery-item:hover img { transform: scale(1.05); }

/* Contact Section */
.info-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 0.75rem;
}
.info-item .icon-wrapper { margin-bottom: 0; width: 40px; height: 40px; flex-shrink: 0; }
.info-item h4 { font-size: 1rem; margin-bottom: 0.25rem; }
.info-item p { font-size: 0.9rem; }

.map-container {
    height: 200px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.map-placeholder {
    text-align: center;
    color: var(--text-muted);
}
.map-icon { width: 32px; height: 32px; margin-bottom: 0.5rem; opacity: 0.7; }

.contact-form-container {
    padding: 3rem;
    border-radius: 1rem;
}
.form-group { margin-bottom: 1.5rem; }
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}
.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    background: #fff;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}
.form-control::placeholder {
    color: var(--text-light);
}
.form-control:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.select-wrapper { position: relative; }
.select-wrapper select { appearance: none; cursor: pointer; }
.select-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}
textarea.form-control { resize: vertical; }

/* Footer */
.footer {
    background-color: var(--primary);
    border-top: none;
    padding: 4rem 0 2rem;
    color: rgba(255, 255, 255, 0.85);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-col h4 { font-size: 1.1rem; margin-bottom: 1.5rem; color: #FFFFFF !important; }
.footer-links li, .footer-contact li { margin-bottom: 0.75rem; }
.footer-links a {
    color: rgba(255, 255, 255, 0.85);
    display: inline-block;
    transition: transform 0.2s ease, color 0.2s ease;
}
.footer-links a:hover {
    color: #FFFFFF;
    transform: translateX(4px);
}
.footer-contact li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
}
.sm-icon { width: 16px; height: 16px; }
.icon-btn { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    margin-right: 0.5rem;
    color: white;
}
.icon-btn:hover { background: var(--primary); transform: translateY(-3px); border-color: transparent; }
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* WhatsApp FAB */
.whatsapp-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--whatsapp);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
    z-index: 999;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.whatsapp-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.5);
}
.whatsapp-fab svg {
    width: 28px;
    height: 28px;
}

/* =============================================
   MEGA MENU & DROPDOWN NAVIGATION
   ============================================= */

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 0;
    white-space: nowrap;
}
.nav-link:hover { color: var(--accent); }

.nav-group {
    position: static;
    display: flex;
    align-items: center;
}

.caret {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}
.nav-group:hover .caret { transform: rotate(180deg); }

/* Standard Dropdown */
.has-dropdown {
    position: relative;
}
.has-dropdown .dropdown {
    position: absolute;
    top: calc(100% + 1rem);
    left: 0;
    min-width: 230px;
    border-radius: 0.85rem;
    padding: 0.6rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
    background: rgba(7, 11, 20, 0.97) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.6);
    border: 1px solid rgba(0, 0, 0, 0.08);
}
.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    color: var(--text-muted);
}
.dropdown-link:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--accent);
}
.dropdown-link i { width: 16px; height: 16px; flex-shrink: 0; color: var(--accent); }

/* Mega Menu */
.has-mega {
    position: static;
}
.mega-panel {
    position: fixed;
    top: 76px;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 199;
    border-radius: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    background: rgba(7, 11, 20, 0.97) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.has-mega:hover .mega-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.mega-inner {
    display: grid;
    grid-template-columns: 1fr 1fr 280px;
    gap: 2.5rem;
    padding: 2.5rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}
.mega-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
}
.mega-link {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.15rem;
    transition: var(--transition);
}
.mega-link:hover { background: rgba(0, 0, 0, 0.05); }
.mega-link:hover strong { color: var(--accent); }
.mega-icon {
    width: 36px;
    height: 36px;
    border-radius: 0.4rem;
    background: rgba(139,92,246,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mega-icon i { width: 18px; height: 18px; color: var(--accent); }

.mega-text strong {
    display: block;
    color: var(--text-main);
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}
.mega-link {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.15rem;
    transition: var(--transition);
    color: var(--text-main);
}
.mega-link:hover {
    background: #f1f5f9;
    color: var(--text-main);
}
.mega-text small { display: block; font-size: 0.78rem; color: var(--text-muted); }

.mega-featured { display: flex; align-items: center; }
.mega-cta {
    padding: 1.75rem;
    border-radius: 1rem;
    text-align: center;
    width: 100%;
    background: rgba(30,64,175,0.15);
    border-color: rgba(139,92,246,0.25);
}
.mega-cta-icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
}
.mega-cta-icon i { width: 24px; height: 24px; color: white; }
.mega-cta h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.mega-cta p { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1.25rem; }

/* Mobile nav groups */
.mobile-group-title {
    display: block;
    padding: 0.85rem 1rem 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
}
.mobile-sub {
    padding-left: 2rem !important;
    font-size: 0.9rem;
    color: var(--text-muted) !important;
}
.mobile-cta {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    border-radius: 0.5rem !important;
    color: white !important;
    text-align: center !important;
    margin: 0.5rem 1rem !important;
    padding: 0.9rem 1rem !important;
    border-bottom: none !important;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* =============================================
   PAGE HERO (Subpages)
   ============================================= */
.page-hero {
    padding-top: calc(var(--nav-height, 90px) + 2.5rem);
    padding-bottom: clamp(2.5rem, 6vw, 5rem);
    position: relative;
    overflow: hidden;
    background: var(--bg-darker);
}
.page-hero::before {
    content: '';
    position: absolute;
    top: -150px; left: -150px;
    width: 500px; height: 500px;
    background: var(--primary);
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.12;
}
.page-hero::after {
    content: '';
    position: absolute;
    bottom: -150px; right: -150px;
    width: 450px; height: 450px;
    background: var(--secondary);
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.12;
}
.page-hero-content { position: relative; z-index: 1; }
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.breadcrumb a { color: var(--accent); }
.breadcrumb-sep { opacity: 0.4; }
.page-hero h1 { font-size: clamp(1.85rem, 5vw, 3.5rem); margin-bottom: 1.25rem; }
.page-hero .subtitle {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: var(--text-muted);
    max-width: 620px;
    line-height: 1.7;
}

/* =============================================
   SERVICE DETAIL SECTIONS
   ============================================= */
.service-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    padding: 5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.service-detail:last-of-type { border-bottom: none; }
.service-detail.reverse { direction: rtl; }
.service-detail.reverse > * { direction: ltr; }
.service-detail-visual {
    border-radius: 1.25rem;
    overflow: hidden;
    aspect-ratio: 4/3;
    position: relative;
}
.service-detail-visual img {
    width: 100%; height: 100%; object-fit: cover;
}
.service-detail-placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(30,64,175,0.2), rgba(139,92,246,0.2));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 3rem;
    text-align: center;
    min-height: 300px;
}
.service-detail-placeholder .big-icon {
    width: 80px; height: 80px;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center;
}

.service-detail-placeholder .big-icon i {
    width: 64px;
    height: 64px;
    color: white; /* Ensure the stroke is white */
}

.service-detail-content h2 { font-size: 2rem; margin-bottom: 1rem; }
.service-detail-content > p { color: var(--text-muted); margin-bottom: 1.75rem; line-height: 1.75; }
.service-feature-list { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 2rem; }
.service-feature {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
}
.service-feature i { color: var(--accent); width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }

/* =============================================
   FAQ
   ============================================= */
.faq-item {
    border: 1px solid var(--glass-border);
    border-radius: 0.85rem;
    margin-bottom: 0.75rem;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.02);
}
.faq-question {
    padding: 1.4rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    user-select: none;
}
.faq-question:hover { color: var(--accent); }
.faq-icon { width: 20px; height: 20px; flex-shrink: 0; transition: transform 0.35s ease; color: var(--accent); }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}
.faq-answer-inner { padding: 0 1.5rem 1.5rem; }
.faq-item.open .faq-answer { max-height: 400px; }

/* =============================================
   SOLUTIONS / SECTORS
   ============================================= */
.sector-hero-card {
    padding: 4rem 3rem;
    border-radius: 1.25rem;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 3rem;
    margin-bottom: 1.5rem;
}
.sector-hero-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}
.sector-big-icon {
    width: 100px; height: 100px;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, rgba(30,64,175,0.3), rgba(139,92,246,0.3));
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.sector-big-icon i { width: 50px; height: 50px; color: var(--accent); }
.sector-hero-card h2 { font-size: 2rem; margin-bottom: 0.75rem; }
.sector-hero-card p { color: var(--text-muted); max-width: 550px; line-height: 1.7; margin-bottom: 1.25rem; }
.sector-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sector-tag {
    padding: 0.3rem 0.85rem;
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.03);
}

/* =============================================
   PROJECTS / PORTFOLIO
   ============================================= */
.filter-tabs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 3rem;
}
.filter-tab {
    padding: 0.55rem 1.5rem;
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}
.filter-tab.active, .filter-tab:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
}
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}
.project-card {
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    cursor: pointer;
    transition: transform 0.4s ease;
}
.project-card:hover { transform: translateY(-6px); }
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.project-card:hover img { transform: scale(1.06); }
.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(4,6,9,0.92) 0%, rgba(4,6,9,0) 55%);
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.35s ease;
}
.project-card:hover .project-overlay { opacity: 1; }
.project-overlay h4 {
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
    color: #fff;
}
.project-overlay p { color: var(--accent); font-size: 0.85rem; margin-bottom: 0.5rem; }
.project-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: rgba(139,92,246,0.2);
    border: 1px solid rgba(139,92,246,0.3);
    border-radius: 1rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
}

/* =============================================
   TEAM & ABOUT
   ============================================= */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.team-card {
    padding: 2.5rem 2rem;
    border-radius: 1rem;
    text-align: center;
    transition: var(--transition);
}
.team-card:hover { transform: translateY(-6px); }
.team-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.75rem;
}
.team-card h3 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.team-role { color: var(--accent); font-size: 0.85rem; font-weight: 600; margin-bottom: 0.75rem; }
.team-card > p { color: var(--text-muted); font-size: 0.875rem; line-height: 1.6; }

.cert-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.cert-card { padding: 2rem 1.5rem; border-radius: 1rem; text-align: center; transition: var(--transition); }
.cert-card:hover {
    transform: translateY(-5px);
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(139, 92, 246, 0.2);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.1);
}
.cert-icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
}
.cert-icon i { color: white; width: 24px; height: 24px; }
.cert-card h4 { font-size: 0.95rem; margin-bottom: 0.4rem; }
.cert-card p { font-size: 0.8rem; color: var(--text-muted); }

.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.value-card {
    padding: 2.5rem 2rem;
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}
.value-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}
.value-card:hover {
    transform: translateY(-5px);
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(139, 92, 246, 0.25);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.15);
}
.value-icon {
    width: 48px; height: 48px;
    border-radius: 0.6rem;
    background: rgba(139,92,246,0.12);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.25rem;
}
.value-icon i { color: var(--accent); width: 24px; height: 24px; }
.value-card h3 { font-size: 1.15rem; margin-bottom: 0.75rem; }
.value-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.65; }

/* =============================================
   TESTIMONIALS
   ============================================= */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.testimonial-card {
    padding: 2.5rem;
    border-radius: 1rem;
    position: relative;
    transition: var(--transition);
}
.testimonial-card:hover { transform: translateY(-4px); }
.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 1.5rem; right: 2rem;
    font-size: 5rem;
    font-family: Georgia, serif;
    line-height: 1;
    color: var(--accent);
    opacity: 0.18;
}
.stars { display: flex; gap: 0.2rem; margin-bottom: 1rem; }
.stars i, .stars svg { width: 16px; height: 16px; color: #FBBF24; fill: #FBBF24; stroke: #FBBF24; }
.testimonial-text { font-size: 0.92rem; color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.75; }
.testimonial-author { display: flex; align-items: center; gap: 0.75rem; }
.author-avatar {
    color: white !important;
    width: 42px; height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.875rem; flex-shrink: 0;
}
.author-name { font-weight: 600; font-size: 0.9rem; }
.author-role { font-size: 0.78rem; color: var(--text-muted); }

/* =============================================
   CTA BANNER
   ============================================= */
.cta-banner {
    background: linear-gradient(135deg, rgba(30,64,175,0.22), rgba(139,92,246,0.22));
    border: 1px solid rgba(139,92,246,0.22);
    border-radius: 1.5rem;
    padding: 4rem;
    text-align: center;
}
.cta-banner h2 { font-size: 2.5rem; margin-bottom: 1rem; }
.cta-banner p { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 2rem; max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-banner .btn-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* =============================================
   STATS BAR
   ============================================= */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    overflow: hidden;
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
}
.stats-bar-item {
    padding: 2rem;
    text-align: center;
    border-right: 1px solid var(--glass-border);
}
.stats-bar-item:last-child { border-right: none; }
.stats-bar-number { font-size: 2.5rem; font-weight: 800; line-height: 1; margin-bottom: 0.4rem; }
.stats-bar-label { font-size: 0.82rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
    .mega-inner { grid-template-columns: 1fr 1fr; }
    .mega-featured { display: none; }
    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .cert-grid { grid-template-columns: repeat(2, 1fr); }
    .values-grid { grid-template-columns: repeat(2, 1fr); }
    .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
    .stats-bar-item:nth-child(2) { border-right: none; }
    .stats-bar-item:nth-child(3) { border-right: 1px solid var(--glass-border); border-top: 1px solid var(--glass-border); }
    .stats-bar-item:nth-child(4) { border-top: 1px solid var(--glass-border); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .has-mega .mega-panel,
    .has-dropdown .dropdown { display: none !important; }

    .grid-3, .grid-2, .stats-grid, .gallery-grid, .footer-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-card, .contact-form-container { padding: 2rem; }
    .hero { text-align: center; }
    .hero-content p { margin: 0 auto 2rem; }
    .badges { justify-content: center; }
    .hero-buttons { justify-content: center; }
    .pos-left, .pos-right { display: none; }
    .footer-grid { gap: 2rem; }

    .service-detail, .service-detail.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
        gap: 2rem;
        padding: 3rem 0;
    }
    .team-grid, .values-grid, .testimonials-grid { grid-template-columns: 1fr; }
    .cert-grid { grid-template-columns: repeat(2, 1fr); }
    .cta-banner { padding: 2.5rem 1.5rem; }
    .cta-banner h2 { font-size: 2rem; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
    .sector-hero-card { grid-template-columns: 1fr; }
    .sector-big-icon { display: none; }
    .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .hero-buttons .btn { width: 100%; }
    .cert-grid { grid-template-columns: 1fr; }
    .stats-bar { grid-template-columns: 1fr; }
    .stats-bar-item { border-right: none !important; border-top: 1px solid var(--glass-border); }
    .stats-bar-item:first-child { border-top: none; }
}

/* --- New Custom Styles for Redesign --- */

.navbar.light-theme {
    background: rgba(255, 255, 255, 0.92) !important;
    border-bottom: 1px solid var(--glass-border) !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.navbar.light-theme.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
}
.navbar.light-theme .nav-link,
.navbar.light-theme .mobile-menu-btn {
    color: var(--text-main) !important;
    font-weight: 600;
}
.navbar.light-theme .nav-link:hover,
.navbar.light-theme .nav-link.is-active {
    color: var(--accent) !important;
}
.navbar.light-theme .nav-link.is-active::after {
    transform: scaleX(1);
    transform-origin: left;
}
.navbar.light-theme .mobile-menu {
    background: #fff !important;
    border-bottom: 1px solid var(--glass-border) !important;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12) !important;
}
.navbar.light-theme .mobile-link {
    color: var(--text-main);
    border-bottom-color: var(--glass-border);
}
.navbar.light-theme .mobile-link:hover {
    background: var(--bg-darker);
    color: var(--accent);
}
.navbar.light-theme .logo img {
    height: 72px !important;
    width: auto;
    transition: height 0.3s ease;
}
.navbar.light-theme.scrolled .logo img {
    height: 58px !important;
}
.btn-call-now {
    background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
    color: #fff !important;
    border-radius: var(--radius-sm);
    font-weight: 600;
    padding: 0.65rem 1.15rem !important;
    font-size: 0.9rem !important;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 10;
}

.badge-location {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(8px);
}

.hero-side-image {
    width: 100%;
    height: auto;
    border-radius: 1.5rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    object-fit: cover;
    transform: scale(1.1);
    transform-origin: center;
}

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .hero-image-wrapper {
        margin-top: 2rem;
    }
}

/* --- Features Bar --- */
.features-bar-section {
    padding: 0;
    background: transparent;
    position: relative;
    z-index: 20;
    margin-top: -3rem;
}
.features-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    text-align: center;
}
.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.feature-icon i {
    width: 28px;
    height: 28px;
}
.feature-item:hover .feature-icon {
    background: var(--accent);
    color: white;
    transform: translateY(-5px);
}
.feature-item p {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    color: #333333;
}
@media (max-width: 992px) {
    .features-bar-section { margin-top: -2rem; padding: 0 1rem; }
    .features-bar { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
    .hero-side-image { transform: scale(1); margin-top: 1rem; }
}
@media (max-width: 768px) {
    .navbar .btn-call-now { display: none !important; }
    .hero-grid { gap: 2rem; }
    .hero-image-wrapper { display: none; }
    .hero-content { max-width: 100%; text-align: center; }
    .hero-tags { justify-content: center; }
    .hero-buttons { justify-content: center; }
    .badge-location { margin-left: auto; margin-right: auto; }
}
@media (max-width: 576px) {
    .features-bar { grid-template-columns: repeat(2, 1fr); padding: 1.5rem 1rem; gap: 1rem; }
    .feature-icon { width: 50px; height: 50px; }
    .feature-icon i { width: 24px; height: 24px; }
    .feature-item p { font-size: 0.85rem; }
}

.service-card .icon-wrapper i { color: white; }

/* Light Theme Card Overrides */
.glass-effect {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.dashboard-card, .service-card, .gallery-item {
    background: #FFFFFF !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Megamenu & Dropdown — light theme (navbar claro) */
.navbar.light-theme .mega-panel,
.navbar.light-theme .has-dropdown .dropdown {
    background: #fff !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12) !important;
}
.navbar.light-theme .mega-text strong,
.navbar.light-theme .dropdown-link,
.navbar.light-theme .mega-link {
    color: var(--text-main) !important;
}
.navbar.light-theme .mega-label,
.navbar.light-theme .mega-text small {
    color: var(--text-muted) !important;
}
.navbar.light-theme .mega-link:hover,
.navbar.light-theme .dropdown-link:hover {
    background: var(--bg-darker) !important;
    color: var(--accent) !important;
}
.navbar.light-theme .mega-cta {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.08), rgba(99, 102, 241, 0.12)) !important;
    border-color: rgba(99, 102, 241, 0.2) !important;
}
.navbar.light-theme .mega-cta h4 {
    color: var(--text-main) !important;
}
.navbar.light-theme .mega-cta p {
    color: var(--text-muted) !important;
}

/* Fix Hero text color for light theme */
.hero-content p, .hero-content .badge-location { color: rgba(255, 255, 255, 0.9) !important; }

.btn-outline-light { color: white !important; }

/* Fix icon colors inside wrappers to always be white */
.icon-wrapper i, .icon-wrapper svg { color: #FFFFFF !important; stroke: #FFFFFF !important; }

/* Bridge gap for Megamenu and Dropdown so it doesnt disappear */
.mega-panel::before, .dropdown::before { content: ''; position: absolute; top: -60px; left: 0; right: 0; height: 60px; background: transparent; }

/* Fix hover hitbox gap for navbar items */
.nav-group { padding-bottom: 25px; margin-bottom: -25px; }

/* Force Hero Headings to be White on video bg */
.hero-content h1, .hero-content h2 { color: #FFFFFF !important; }

/* Force grid gap for testimonials */
.testimonials-grid { display: grid !important; gap: 2rem !important; }

/* Emergency List (flat, no individual cards) */
.emergency-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 860px;
    margin: 0 auto;
}
.emergency-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--glass-border);
}
.emergency-item:last-child { border-bottom: none; }
.emergency-item .icon-wrapper { flex-shrink: 0; width: 44px; height: 44px; }
.emergency-item h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.emergency-item p { font-size: 0.875rem; color: var(--text-muted); margin: 0; }
.emergency-item > div { flex: 1; }
.emergency-item .status-badge { flex-shrink: 0; }

/* Footer WhatsApp Button */
.footer-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #25D366;
    color: #fff !important;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    margin-top: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}
.footer-wa-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* Trust Bar */
.trust-bar-section {
    background: var(--primary);
    padding: 1.25rem 0;
}
.trust-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #fff;
}
.trust-item strong {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
}
.trust-item span {
    font-size: 0.78rem;
    opacity: 0.85;
    margin-top: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Problems Grid */
.problems-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.problem-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid var(--glass-border);
    background: var(--bg-panel);
    transition: var(--transition);
}
.problem-item:hover {
    transform: translateY(-3px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.1);
}
.problem-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.problem-icon i, .problem-icon svg {
    width: 18px;
    height: 18px;
    color: #fff;
    stroke: #fff;
}
.problem-item h4 { font-size: 0.95rem; margin-bottom: 0.3rem; }
.problem-item p { font-size: 0.82rem; color: var(--text-muted); margin: 0; line-height: 1.5; }

@media (max-width: 768px) {
    .trust-bar { gap: 0.75rem; }
    .trust-item strong { font-size: 1.1rem; }
}

/* About section — legible en tema claro */
.about .text-white,
.about strong.text-white {
    color: var(--text-main) !important;
}

/* Section titles */
.section-title h2 {
    letter-spacing: -0.02em;
}
.section-title p {
    font-size: 1.05rem;
    line-height: 1.7;
}

/* CTA banner */
.cta-banner {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.06), rgba(99, 102, 241, 0.1));
    box-shadow: var(--glass-shadow);
}

/* Testimonial hover */
.testimonial-card:hover {
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.1);
    border-color: rgba(99, 102, 241, 0.2) !important;
}

/* Gallery overlay legibility */
.gallery-item .item-overlay {
    opacity: 0.85;
    transition: opacity 0.35s ease;
}
.gallery-item:hover .item-overlay {
    opacity: 1;
}

/* Banner de emergencia (contacto) */
.emergency-banner {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.08), rgba(30, 64, 175, 0.08));
    border-top: 1px solid rgba(220, 38, 38, 0.15);
    border-bottom: 1px solid rgba(220, 38, 38, 0.15);
}
.emergency-banner-inner {
    padding: 1.25rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.emergency-banner-text {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.emergency-banner-text strong {
    font-size: 1.05rem;
    display: block;
}
.emergency-banner-text p {
    font-size: 0.9rem;
    margin: 0;
    color: var(--text-muted);
}

.text-sm { font-size: 0.875rem; }

/* Skip link (inyectado por JS) */
.skip-link {
    position: fixed;
    top: -100%;
    left: 1rem;
    z-index: 10001;
    padding: 0.75rem 1.25rem;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 1rem;
}

/* Barra de confianza bajo hero (opcional) */
.hero + .trust-strip,
.trust-strip {
    background: var(--primary);
    color: #fff;
    padding: 0.85rem 0;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
}
.trust-strip strong {
    font-weight: 800;
}

/* Mejor contraste en stat cards */
.stat-card {
    border: 1px solid var(--glass-border);
}

/* Icon wrapper emergencia */
.icon-wrapper.pulse-danger,
.bg-red.pulse-danger {
    background: linear-gradient(135deg, var(--danger), #f87171) !important;
}

/* Mobile menu button */
.mobile-menu-btn {
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}
.mobile-menu-btn:hover {
    background: var(--bg-darker);
}
.mobile-menu-btn[aria-expanded="true"] {
    background: var(--bg-darker);
}

/* Grid de features en tarjetas de sector (soluciones) */
.sector-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    max-width: 550px;
}

/* =============================================
   RESPONSIVE UX — mejoras móvil / tablet
   ============================================= */
@media (max-width: 992px) {
    .section-title { margin-bottom: 2.5rem; }
    .service-card { padding: 2rem 1.5rem; }
    .sector-hero-card { padding: 2.5rem 2rem; gap: 2rem; }
    .testimonial-card { padding: 2rem 1.5rem; }
    .stat-number { font-size: 2.5rem; }
    .about-features li { font-size: 0.95rem; }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 72px;
    }

    body {
        padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
    }

    .navbar {
        padding: 0.65rem 0;
    }

    .navbar.light-theme .logo img {
        height: 52px !important;
    }
    .navbar.light-theme.scrolled .logo img {
        height: 46px !important;
    }

    .mobile-menu-btn {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .mobile-menu-btn i,
    .mobile-menu-btn svg {
        width: 26px;
        height: 26px;
    }

    .mobile-link {
        min-height: 48px;
        display: flex;
        align-items: center;
        padding: 0.85rem 1rem;
    }
    .mobile-cta {
        min-height: 48px !important;
    }

    .hero {
        min-height: 100svh;
        min-height: 100dvh;
        padding-top: calc(var(--nav-height) + 1.5rem);
        padding-bottom: 2rem;
        align-items: center;
        justify-content: center;
    }

    .hero .container.hero-grid {
        width: 100%;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .hero-content h1 br {
        display: none;
    }

    .hero-content h1 {
        margin-bottom: 1rem;
        max-width: 22rem;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-accent {
        color: #E0E7FF;
        display: block;
        margin-top: 0.15rem;
        text-shadow: 0 2px 16px rgba(99, 102, 241, 0.5);
    }

    .badge-location {
        margin-bottom: 1.25rem;
        font-size: 0.8rem;
        padding: 0.35rem 0.85rem;
    }

    .hero-content p {
        margin-bottom: 0;
        line-height: 1.65;
        padding: 0 0.25rem;
    }

    /* En móvil: solo CTA de WhatsApp, sin tags secundarios */
    .hero-tags {
        display: none;
    }

    .hero-buttons {
        width: 100%;
        margin-top: 1.75rem;
        justify-content: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: none;
        min-height: 52px;
        font-size: 1.05rem;
        border-radius: 0.75rem;
    }

    .problems-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        padding: 0 0.25rem;
    }

    .bg-darker + .section .section-title,
    .hero + .section .section-title {
        margin-top: 0.25rem;
    }

    .btn, .btn-lg {
        min-height: 44px;
    }

    .grid-2.gap-4,
    .about .grid-2 {
        gap: 2rem !important;
    }

    .contact-form-container {
        padding: 1.5rem 1.25rem;
        border-radius: var(--radius-lg);
    }
    .contact-form-container .grid-2 {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    .emergency-banner-inner {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }
    .emergency-banner-inner .btn {
        width: 100%;
        justify-content: center;
    }

    .service-detail-content h2 {
        font-size: clamp(1.5rem, 4vw, 2rem);
    }
    .service-detail-visual {
        aspect-ratio: 16 / 10;
    }

    .sector-hero-card {
        padding: 1.75rem 1.25rem;
    }
    .sector-hero-card h2 {
        font-size: clamp(1.4rem, 4vw, 2rem);
    }
    .sector-tags {
        gap: 0.4rem;
    }
    .sector-tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.65rem;
    }

    .sector-features-grid {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .problems-grid {
        gap: 1rem;
    }
    .problem-item {
        padding: 1rem;
    }

    .gallery-item {
        aspect-ratio: 16 / 11;
    }
    .gallery-item .item-overlay {
        padding: 1.25rem;
        opacity: 1;
    }

    .testimonial-card::before {
        font-size: 3.5rem;
        top: 1rem;
        right: 1rem;
    }

    .cta-banner {
        padding: 2rem 1.25rem;
        border-radius: var(--radius-lg);
    }
    .cta-banner h2 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }
    .cta-banner .btn-row {
        flex-direction: column;
        align-items: stretch;
    }
    .cta-banner .btn-row .btn {
        width: 100%;
    }

    .footer {
        padding: 3rem 0 1.5rem;
    }
    .footer-col h4 {
        margin-bottom: 1rem;
    }
    .footer-wa-btn {
        width: 100%;
        justify-content: center;
    }

    .whatsapp-fab {
        width: 52px;
        height: 52px;
        bottom: max(1rem, env(safe-area-inset-bottom, 0px));
        right: max(1rem, env(safe-area-inset-right, 0px));
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    .whatsapp-fab.fab-hidden {
        opacity: 0;
        pointer-events: none;
        transform: scale(0.85) translateY(8px);
    }

    .faq-question {
        padding: 1.1rem 1rem;
        font-size: 0.95rem;
        gap: 0.75rem;
    }
    .faq-answer-inner {
        padding: 0 1rem 1.25rem;
    }

    .filter-tabs {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.5rem;
        margin-left: -0.25rem;
        margin-right: -0.25rem;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    .filter-tabs::-webkit-scrollbar {
        display: none;
    }
    .filter-tab {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .breadcrumb {
        flex-wrap: wrap;
        font-size: 0.8rem;
    }

    .stat-card {
        padding: 1.5rem 1rem;
    }
    .stat-number {
        font-size: 2.25rem;
    }

    .page-hero {
        padding-top: calc(var(--nav-height) + 1.5rem);
    }
}

@media (max-width: 576px) {
    .section {
        padding: clamp(2.5rem, 8vw, 3.5rem) 0;
    }

    .section-title {
        margin-bottom: 2rem;
    }
    .section-title p {
        font-size: 0.95rem;
    }

    .navbar.light-theme .logo img {
        height: 46px !important;
    }

    .problem-item {
        padding: 1.15rem;
    }
    .problem-item h4 {
        font-size: 1rem;
    }

    .service-card {
        padding: 1.5rem 1.25rem;
    }
    .service-card h3 {
        font-size: 1.1rem;
    }

    .problem-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .about-features li {
        margin-bottom: 0.75rem;
    }

    .emergency-banner-text {
        flex-direction: column;
        align-items: flex-start;
    }

    .trust-bar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .footer-grid {
        text-align: center;
    }
    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .footer-contact li {
        justify-content: center;
        text-align: left;
    }
    .social-links {
        justify-content: center;
        display: flex;
        flex-wrap: wrap;
    }

    .sector-hero-card {
        margin-bottom: 1.25rem !important;
    }

    .service-detail {
        padding: 2rem 0 !important;
    }

    .dashboard-card {
        padding: 1.5rem 1.25rem;
    }
}

@media (max-width: 380px) {
    .hero-tag {
        font-size: 0.72rem;
    }
    .btn-lg {
        font-size: 1rem;
        padding: 0.9rem 1.25rem;
    }
}