/* =============================================
   ServiceNeeds — Global Design System
   ============================================= */

/* Fonts loaded via <link> tags in HTML for faster loading */

/* ---- CSS Custom Properties (Theme) ---- */
:root {
    /* Primary Palette */
    --clr-primary: #2563eb;
    --clr-primary-dark: #1d4ed8;
    --clr-primary-light: #bfdbfe;
    --clr-primary-glow: rgba(37, 99, 235, 0.25);

    /* Dark Palette */
    --clr-dark: #f8fafc;
    --clr-dark-2: #ffffff;
    --clr-dark-3: #334155;
    --clr-dark-card: #ffffff;

    /* Light Palette */
    --clr-light: #f8fafc;
    --clr-light-2: #e2e8f0;
    --clr-light-3: #cbd5e1;

    /* Text */
    --clr-text-primary: #0f172a;
    --clr-text-secondary: #475569;
    --clr-text-muted: #64748b;

    /* Accent */
    --clr-accent: #38bdf8;
    --clr-accent-dark: #0284c7;
    --clr-success: #22c55e;
    --clr-warning: #eab308;

    /* Gradients */
    --grad-primary: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --grad-dark: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    --grad-hero: linear-gradient(135deg, rgba(248, 250, 252, 0.92) 0%, rgba(241, 245, 249, 0.75) 60%, rgba(37, 99, 235, 0.15) 100%);
    --grad-card: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%);
    --grad-accent: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    --shadow-primary: 0 4px 20px rgba(37, 99, 235, 0.35);
    --shadow-glow: 0 0 30px rgba(37, 99, 235, 0.2);

    /* Typography */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --section-padding: 90px 0;
    --container-max: 1200px;
    --container-padding: 0 24px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.35s ease;
    --transition-slow: 0.6s ease;

    /* Navbar height */
    --navbar-h: 72px;
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--clr-dark);
    color: var(--clr-text-primary);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

ul {
    list-style: none;
}

input,
textarea,
select {
    font-family: inherit;
}

/* ---- Utility: Container ---- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--container-padding);
}

/* ---- Utility: Btn ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: var(--grad-primary);
    color: #fff;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--clr-primary);
    border: 2px solid var(--clr-primary);
}

.btn-outline:hover {
    background: var(--grad-primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-primary);
}

.btn-ghost {
    background: rgba(0, 0, 0, 0.08);
    color: var(--clr-text-primary);
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
}

.btn-ghost:hover {
    background: rgba(0, 0, 0, 0.14);
    transform: translateY(-2px);
}

/* ---- Utility: Badge/Tag ---- */
.tag {
    display: inline-block;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tag-primary {
    background: var(--clr-primary-glow);
    color: var(--clr-primary);
    border: 1px solid rgba(37, 99, 235, 0.3);
}

/* ---- Utility: Section Title ---- */
.section-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.section-eyebrow .line {
    width: 36px;
    height: 3px;
    background: var(--grad-primary);
    border-radius: var(--radius-full);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.section-title span {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    color: var(--clr-text-secondary);
    font-size: 1.05rem;
    max-width: 560px;
    margin-top: 12px;
}

/* ---- NAVBAR ---- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--navbar-h);
    display: flex;
    align-items: center;
    transition: background var(--transition-base), box-shadow var(--transition-base);
}

.navbar.scrolled {
    background: rgba(248, 250, 252, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), var(--shadow-md);
}

.navbar .container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
}

.nav-logo .logo-icon {
    width: 42px;
    height: 42px;
    background: var(--grad-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-primary);
}

.logo-icon-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.nav-logo span {
    color: var(--clr-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--clr-text-secondary);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--clr-text-primary);
    background: rgba(0, 0, 0, 0.07);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: var(--radius-full);
    background: var(--clr-primary);
}

.nav-cta {
    margin-left: 12px;
}

/* ---- Hamburger ---- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.07);
    gap: 5px;
    cursor: pointer;
    transition: background var(--transition-fast);
    z-index: 1100;
}

.hamburger:hover {
    background: rgba(0, 0, 0, 0.12);
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--clr-text-primary);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---- Drawer (Mobile Nav) ---- */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1050;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
    backdrop-filter: blur(4px);
}

.drawer-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: min(320px, 85vw);
    background: var(--clr-dark-2);
    z-index: 1100;
    transform: translateX(100%);
    transition: transform var(--transition-slow) cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5);
}

.drawer.open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.drawer-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--clr-text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.drawer-close:hover {
    background: rgba(37, 99, 235, 0.15);
    color: var(--clr-primary);
}

.drawer-nav {
    flex: 1;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.drawer-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-weight: 500;
    color: var(--clr-text-secondary);
    transition: all var(--transition-fast);
    font-size: 0.95rem;
}

.drawer-nav a .nav-icon {
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.drawer-nav a:hover,
.drawer-nav a.active {
    color: var(--clr-text-primary);
    background: rgba(37, 99, 235, 0.08);
}

.drawer-nav a:hover .nav-icon,
.drawer-nav a.active .nav-icon {
    background: rgba(37, 99, 235, 0.15);
}

.drawer-footer {
    padding: 20px 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.drawer-footer .btn {
    width: 100%;
    justify-content: center;
}

/* ---- FOOTER ---- */
.footer {
    background: var(--clr-dark-2);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 50px;
}

.footer-brand .nav-logo {
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--clr-text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-link {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--clr-text-secondary);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--clr-primary-glow);
    border-color: rgba(37, 99, 235, 0.4);
    color: var(--clr-primary);
    transform: translateY(-2px);
}

.footer-col h4 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 18px;
    color: var(--clr-text-primary);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col ul a {
    color: var(--clr-text-secondary);
    font-size: 0.88rem;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-col ul a:hover {
    color: var(--clr-primary);
}

.footer-col ul a::before {
    content: '›';
    color: var(--clr-primary);
    font-size: 1rem;
}

.footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom p {
    color: var(--clr-text-muted);
    font-size: 0.83rem;
}

.footer-bottom span {
    color: var(--clr-primary);
}

/* ---- Scroll-to-top ---- */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-full);
    background: var(--grad-primary);
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-primary);
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
    transition: all var(--transition-base);
    z-index: 900;
    cursor: pointer;
}

.scroll-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.scroll-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.5);
}

/* ---- WhatsApp Button ---- */
.whatsapp-btn {
    position: fixed;
    bottom: 95px;
    right: 30px;
    width: 90px;
    height: 90px;
    display: block;
    background: transparent;
    transition: all var(--transition-base);
    z-index: 900;
    text-decoration: none;
}

.whatsapp-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform var(--transition-base), filter var(--transition-base);
}

.whatsapp-btn:hover {
    transform: translateY(-4px) scale(1.05);
}

.whatsapp-btn:hover img {
    filter: brightness(1.1);
}


/* ---- Reveal animation ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ---- Stats strip ---- */
.stat-item {
    text-align: center;
}

.stat-item .stat-number {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 800;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-item .stat-label {
    color: var(--clr-text-secondary);
    font-size: 0.88rem;
    margin-top: 6px;
}

/* ---- Card ---- */
.card {
    background: var(--grad-card);
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: var(--radius-lg);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(37, 99, 235, 0.2);
}

/* ---- Divider ---- */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.08), transparent);
    margin: 0;
}

/* ---- Page Hero (shared) ---- */
.page-hero {
    min-height: 420px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin-top: var(--navbar-h);
    background: var(--grad-dark);
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(37, 99, 235, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.page-hero-content {
    position: relative;
    z-index: 2;
    padding: 70px 0;
}

.page-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.page-hero h1 span {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-hero p {
    color: var(--clr-text-secondary);
    font-size: 1.1rem;
    max-width: 540px;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 0.85rem;
    color: var(--clr-text-muted);
}

.breadcrumb a {
    color: var(--clr-primary);
    transition: opacity var(--transition-fast);
}

.breadcrumb a:hover {
    opacity: 0.75;
}

.breadcrumb .sep {
    color: var(--clr-text-muted);
}

/* ---- Loader ---- */
.page-loader {
    position: fixed;
    inset: 0;
    background: var(--clr-dark);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    /* CSS fallback: auto-dismiss after 2.5s even if JS fails */
    animation: loaderDismiss 0.5s ease 2.5s forwards;
}

@keyframes loaderDismiss {
    to {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    animation: none;
}

.loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader-logo {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
}

.loader-logo span {
    color: var(--clr-primary);
}

.loader-bar {
    width: 180px;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.loader-bar-fill {
    height: 100%;
    background: var(--grad-primary);
    border-radius: var(--radius-full);
    animation: loaderAnim 1.4s ease forwards;
}

@keyframes loaderAnim {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
    }

    .nav-links {
        display: none;
    }

    .nav-cta {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .scroll-top {
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-btn {
        bottom: 85px;
        right: 20px;
        width: 80px;
        height: 80px;
    }
}