:root {
    color-scheme: dark;
    --site-max-width: 1320px;
    --site-gutter: clamp(1rem, 3vw, 1.5rem);
    --site-shell-width: calc(var(--site-max-width) + (var(--site-gutter) * 2));
    --bg-primary: #050814;
    --bg-secondary: #0d1625;
    --bg-card: rgba(10, 18, 35, 0.95);
    --brand: #00d4ff;
    --brand-soft: rgba(0, 212, 255, 0.12);
    --brand-glow: rgba(0, 229, 255, 0.28);
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.06);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    background-color: var(--bg-primary);
    background-image:
        linear-gradient(rgba(5, 8, 20, 0.78), rgba(5, 8, 20, 0.88)),
        url('../images/hero_bg.png'),
        radial-gradient(circle at top left, rgba(0, 212, 255, 0.16), transparent 20%),
        radial-gradient(circle at 82% 18%, rgba(0, 152, 255, 0.12), transparent 18%),
        linear-gradient(180deg, #050814 0%, #070f1c 100%);
    background-attachment: fixed, fixed, fixed, fixed, fixed;
    background-position: center, center, top left, 82% 18%, center;
    background-size: cover, cover, auto, auto, auto;
}

.site-container {
    width: 100%;
    max-width: var(--site-shell-width);
    margin-inline: auto;
    padding-inline: var(--site-gutter);
    box-sizing: border-box;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 120px 120px;
    opacity: 0.12;
    pointer-events: none;
}

#home {
    position: relative;
    overflow: hidden;
    padding-block: 5rem;
}

.hero-media,
.hero-scrim {
    max-width: none;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    transform: none;
}

#home::before {
    content: '';
    position: absolute;
    left: -10%;
    top: -20%;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.28), transparent 55%);
    filter: blur(80px);
    opacity: 0.85;
    pointer-events: none;
}

#home::after {
    content: '';
    position: absolute;
    right: -5%;
    bottom: 0;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(0, 112, 255, 0.18), transparent 60%);
    filter: blur(100px);
    opacity: 0.8;
    pointer-events: none;
}

.bg-dark-bg {
    background: rgba(6, 11, 20, 0.78) !important;
}

body.bg-dark-bg {
    background-image:
        linear-gradient(rgba(5, 8, 20, 0.78), rgba(5, 8, 20, 0.88)),
        url('../images/hero_bg.png'),
        radial-gradient(circle at top left, rgba(0, 212, 255, 0.16), transparent 20%),
        radial-gradient(circle at 82% 18%, rgba(0, 152, 255, 0.12), transparent 18%),
        linear-gradient(180deg, #050814 0%, #070f1c 100%) !important;
    background-attachment: fixed, fixed, fixed, fixed, fixed !important;
    background-position: center, center, top left, 82% 18%, center !important;
    background-size: cover, cover, auto, auto, auto !important;
}

.site-logo-wrap {
    display: flex;
    align-items: center;
    height: 4.5rem;
    background: transparent !important;
}

.site-logo {
    display: block;
    width: 11rem;
    height: auto;
    max-width: none;
    object-fit: contain;
}

.footer-logo {
    width: 10rem;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 48%),
        linear-gradient(45deg, rgba(255,255,255,0.02) 0%, transparent 40%),
        radial-gradient(circle at 30% 20%, rgba(0, 212, 255, 0.1), transparent 12%),
        radial-gradient(circle at 80% 25%, rgba(0, 120, 255, 0.1), transparent 14%);
    opacity: 0.7;
    pointer-events: none;
}

.hero-overlay::before,
.hero-overlay::after {
    content: '';
    position: absolute;
    border-radius: 9999px;
    background: rgba(0, 212, 255, 0.08);
}

.hero-overlay::before {
    width: 220px;
    height: 220px;
    top: 15%;
    left: 8%;
}

.hero-overlay::after {
    width: 160px;
    height: 160px;
    bottom: 10%;
    right: 12%;
}

.section-bg,
.bg-dark-card,
.bg-dark-surface {
    background: rgba(8, 14, 30, 0.86);
}

.bg-dark-card {
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.18);
}

.border-dark-border,
.border-dark-card {
    border-color: var(--border) !important;
}

.text-slate-400,
.text-slate-300,
.text-slate-500 {
    color: var(--text-muted) !important;
}

a {
    color: var(--brand);
}

button,
a[class*='bg-brand'],
a[class*='bg-brand-DEFAULT'] {
    transition: all 0.25s ease;
}

button:hover,
a[class*='bg-brand']:hover,
a[class*='bg-brand-DEFAULT']:hover {
    filter: brightness(1.05);
}

.top-stats {
    position: relative;
    overflow: hidden;
    padding-block: 3.5rem;
    border-block: 1px solid var(--border);
    background-image:
        linear-gradient(rgba(5, 8, 20, 0.66), rgba(5, 8, 20, 0.82)),
        url('../images/hero_bg.png');
    background-position: center;
    background-size: cover;
}

.top-stats::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 45%, rgba(0, 212, 255, 0.2), transparent 24%),
        radial-gradient(circle at 78% 68%, rgba(0, 200, 140, 0.16), transparent 22%);
    filter: blur(10px);
    pointer-events: none;
}

.top-stats-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.top-stat-card {
    display: flex;
    min-height: 13.5rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 229, 255, 0.12);
    border-radius: 1.25rem;
    background: rgba(5, 13, 24, 0.82);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    padding: 2rem;
    text-align: center;
}

.top-stat-card strong {
    color: transparent;
    background: linear-gradient(135deg, #4da3ff 0%, #00e5ff 78%);
    background-clip: text;
    -webkit-background-clip: text;
    font-size: clamp(4rem, 7vw, 5.75rem);
    font-weight: 800;
    line-height: 0.95;
}

.top-stat-card span {
    margin-top: 1rem;
    color: #f8fafc;
    font-size: 1.1rem;
    font-weight: 800;
}

.top-stat-card p {
    max-width: 15rem;
    margin-top: 0.6rem;
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.45;
}

.service-card-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: rgba(13, 19, 34, 0.94);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.22);
}

.service-card__media {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: rgba(241, 245, 249, 0.96);
}

.service-card__media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
}

.service-card__icon {
    position: absolute;
    right: 1rem;
    bottom: -1.35rem;
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 229, 255, 0.24);
    border-radius: 0.8rem;
    background: rgba(5, 8, 20, 0.94);
    color: var(--brand);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.service-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 1.15rem;
    padding: 2rem 1.75rem 1.75rem;
}

.service-card__body h4 {
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
}

.service-card__body p {
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.7;
}

.service-card__body a {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.4rem;
    margin-top: auto;
    color: var(--brand);
    font-weight: 700;
}

.service-card__body a:hover {
    color: #fff;
}

.operations-card-grid {
    display: grid;
    gap: 1.5rem;
}

.operations-card {
    min-height: 240px;
}

.operations-sector-list {
    display: grid;
    gap: 0.85rem 1.25rem;
}

.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.contact-modal.hidden {
    display: none;
}

.contact-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 14, 0.78);
    backdrop-filter: blur(8px);
}

.contact-modal__dialog {
    position: relative;
    width: min(100%, 42rem);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: rgba(8, 14, 30, 0.96);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
    padding: 1.5rem;
}

.contact-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.04);
}

.contact-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.contact-form label,
.contact-form__full {
    display: grid;
    gap: 0.4rem;
}

.contact-form__full {
    grid-column: 1 / -1;
}

.contact-form span {
    color: #cbd5e1;
    font-size: 0.85rem;
    font-weight: 600;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 0.55rem;
    background: rgba(5, 8, 20, 0.86);
    color: #f8fafc;
    padding: 0.8rem 0.9rem;
    outline: none;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: rgba(0, 229, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12);
}

.contact-form__submit {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.65rem;
    background: #0050A0;
    color: #fff;
    font-weight: 700;
    padding: 0.9rem 1.1rem;
}

body.modal-open {
    overflow: hidden;
}

.whatsapp-float {
    position: fixed;
    right: max(1rem, calc((100vw - var(--site-shell-width)) / 2 + var(--site-gutter)));
    bottom: 1.25rem;
    z-index: 90;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.35rem;
    padding: 0.9rem 1.35rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: linear-gradient(135deg, #0050A0 0%, #00B4D8 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 18px 45px rgba(0, 80, 160, 0.34), 0 0 0 6px rgba(0, 229, 255, 0.08);
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.whatsapp-float:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #0064bc 0%, #00d4ff 100%);
    box-shadow: 0 22px 55px rgba(0, 80, 160, 0.42), 0 0 0 8px rgba(0, 229, 255, 0.1);
}

@media (min-width: 1024px) {
    .operations-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .operations-card {
        height: 240px;
        padding: 1.5rem !important;
    }

    .operations-sector-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .operations-card .space-y-3 > :not([hidden]) ~ :not([hidden]) {
        margin-top: 0.55rem;
    }
}

@media (max-width: 1023px) {
    .top-stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .top-stat-card {
        min-height: 11rem;
    }

    .service-card-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        max-width: 42rem;
        margin-inline: auto;
    }
}

@media (max-width: 640px) {
    .top-stats {
        padding-block: 2.25rem;
    }

    .top-stat-card {
        padding: 1.5rem;
    }

    .service-card__body {
        padding: 1.8rem 1.25rem 1.4rem;
    }

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

    .whatsapp-float {
        right: 1rem;
        bottom: 1rem;
        min-height: 3.1rem;
        padding: 0.82rem 1.15rem;
        font-size: 0.92rem;
    }
}

/* Custom Scrollbar for a premium look */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #070B14;
}

::-webkit-scrollbar-thumb {
    background: #1E293B;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0050A0;
}
