/* ==========================================================================
   CSS Variables & Tokens
   ========================================================================== */
:root {
    /* Colors - Light Theme Default */
    --bg-main: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --bg-border: #e2e8f0;

    --primary-color: #14b8a6;
    /* Teal */
    --primary-hover: #0f9688;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --gradient-glow: radial-gradient(circle at center, rgba(20, 184, 166, 0.08) 0%, rgba(255, 255, 255, 0) 70%);

    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;

    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;

    /* Container */
    --max-width: 1280px;
    --spacing-section: 6rem;
}

/* ==========================================================================
   CSS Reset & Base
   ========================================================================== */
.dark-theme {
    --bg-main: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: rgba(20, 20, 20, 0.8);
    --bg-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --gradient-glow: radial-gradient(circle at center, rgba(20, 184, 166, 0.15) 0%, rgba(10, 10, 10, 0) 70%);
}

.dark-theme {
    background-color: var(--bg-main);
    color: var(--text-primary);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all var(--transition-base);
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(20, 184, 166, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--bg-border);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--transition-base);
    background: transparent;
    padding: 1.5rem 0;
}

/* On subpages (light body or sections), header needs a solid light background initially unless it's a dark hero */
body:not(.dark-mode) .header:not(.scrolled):not(.dark-theme) {
    background-color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
body:not(.dark-mode) .header:not(.scrolled):not(.dark-theme) .nav-link {
    color: var(--text-primary);
}
body:not(.dark-mode) .header:not(.scrolled):not(.dark-theme) .nav-link:hover {
    color: var(--teal);
}
body:not(.dark-mode) .header:not(.scrolled):not(.dark-theme) .logo-img {
    filter: brightness(0); /* Black logo */
}

/* Ensure dropdown arrows inherit the color properly on light backgrounds */
body:not(.dark-mode) .header:not(.scrolled):not(.dark-theme) .nav-link i {
    color: var(--text-primary);
}
body:not(.dark-mode) .header:not(.scrolled):not(.dark-theme) .nav-link:hover i {
    color: var(--teal);
}
body:not(.dark-mode) .header:not(.scrolled):not(.dark-theme) .mobile-menu-toggle {
    color: var(--text-primary);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
}

.animate-on-scroll.is-visible {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

.header.scrolled {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--bg-border);
    padding: 1rem 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 48px;
    transition: all var(--transition-fast);
}

.header.dark-theme .logo-img,
.header.scrolled .logo-img,
.footer.dark-theme .logo-img {
    /* Inverting the black logo to white for dark themes and scrolled headers */
    filter: brightness(0) invert(1);
}

.logo:hover .logo-img {
    opacity: 0.8;
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link:hover,
.nav-link.active,
.header.scrolled .nav-link {
    color: var(--text-primary); /* White when scrolled */
}

/* Adjust text-primary for light theme but keep it white for the dark header */
.header.scrolled .nav-link {
    color: #ffffff;
}

.icon-sm {
    width: 16px;
    height: 16px;
}

.mobile-menu-toggle {
    display: none;
    color: var(--text-primary);
    padding: 0.5rem;
}

/* ==========================================================================
   Dropdowns
   ========================================================================== */
.nav-item-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background-color: var(--bg-card);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    z-index: 100;
    border: 1px solid var(--bg-border);
}

.nav-item-dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.dropdown-item:hover {
    background-color: rgba(20, 184, 166, 0.1);
    color: var(--teal);
}

.dark-theme .dropdown-menu,
.header.scrolled .dropdown-menu {
    background-color: #0f172a;
    border-color: rgba(255,255,255,0.1);
}

.dark-theme .dropdown-item,
.header.scrolled .dropdown-item {
    color: #cbd5e1;
}

.dark-theme .dropdown-item:hover,
.header.scrolled .dropdown-item:hover {
    background-color: rgba(20, 184, 166, 0.15);
    color: var(--teal);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: transparent;
        padding-left: 1rem;
        display: block;
    }
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.text-teal {
    color: var(--primary-color);
}

.text-center {
    text-align: center;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991px) {
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-main);
        border-bottom: 1px solid var(--bg-border);
        padding: 1rem 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all var(--transition-base);
    }

    .main-nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-list {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1rem 0;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .d-none-mobile {
        display: none !important;
    }
}

/* ==========================================================================
   Layout Helpers
   ========================================================================== */
.section-padding {
    padding: var(--spacing-section) 0;
}

.bg-secondary {
    background-color: var(--bg-secondary);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.section-header {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--bg-border);
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    transition: transform var(--transition-base), border-color var(--transition-base);
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(20, 184, 166, 0.3);
}

/* 3D Hover Universal Class */
.hover-lift {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: transform, box-shadow;
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.01) !important;
    box-shadow: 0 20px 40px -10px rgba(20, 184, 166, 0.25), 0 10px 20px -5px rgba(0, 0, 0, 0.1) !important;
    z-index: 10;
    border-color: rgba(20, 184, 166, 0.4) !important;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    padding: 12rem 0 8rem;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-main);
    background-image: var(--gradient-glow);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.subtitle-badge {
    display: inline-block;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(20, 184, 166, 0.1);
    border-radius: 2rem;
    border: 1px solid rgba(20, 184, 166, 0.2);
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Dashboard Mockup */
.dashboard-mockup {
    background-color: var(--bg-card);
    border: 1px solid var(--bg-border);
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.mockup-header {
    background-color: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--bg-border);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dots {
    display: flex;
    gap: 6px;
}

.dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #4b5563;
}

.dots span:nth-child(1) {
    background-color: #ef4444;
}

.dots span:nth-child(2) {
    background-color: #f59e0b;
}

.dots span:nth-child(3) {
    background-color: #10b981;
}

.mockup-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.mockup-body {
    padding: 2rem;
}

.mockup-stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--bg-border);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.mockup-stat-card h4 {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-trend {
    font-size: 0.875rem;
    color: #10b981;
}

.mockup-chart {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    height: 150px;
    padding-top: 1rem;
    border-bottom: 1px solid var(--bg-border);
}

.chart-bar {
    flex: 1;
    background: linear-gradient(to top, var(--primary-color), rgba(20, 184, 166, 0.2));
    border-radius: 4px 4px 0 0;
    transition: height 1s ease;
}

/* ==========================================================================
   Stats Section
   ========================================================================== */
.stats-section {
    border-top: 1px solid var(--bg-border);
    border-bottom: 1px solid var(--bg-border);
    background: var(--bg-main);
    padding: 4rem 0;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
    gap: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, var(--text-primary), var(--primary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1.125rem;
}

/* ==========================================================================
   Problem Section
   ========================================================================== */
.card-icon {
    width: 48px;
    height: 48px;
    background: rgba(20, 184, 166, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.card-icon svg {
    width: 24px;
    height: 24px;
}

.problem-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.problem-card p {
    color: var(--text-secondary);
}

/* ==========================================================================
   System Section
   ========================================================================== */
.system-grid {
    position: relative;
}

.system-step {
    position: relative;
    padding: 2rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--bg-border);
    border-radius: 1rem;
    transition: transform 0.3s;
}

.system-step:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.step-number {
    font-size: 3rem;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.05);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    line-height: 1;
}

.system-step h3 {
    font-size: 1.25rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.system-step p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==========================================================================
   Responsive Updates
   ========================================================================== */
@media (max-width: 991px) {

    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-description {
        margin: 0 auto 2.5rem;
    }

    .hero-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {

    .grid-3,
    .grid-4,
    .stats-container {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* ==========================================================================
   Treatments Section
   ========================================================================== */
.treatment-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-border);
    border-radius: 1rem;
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.treatment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border-color: rgba(20, 184, 166, 0.3);
}

.treatment-img {
    height: 200px;
    overflow: hidden;
}

.treatment-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.treatment-card:hover .treatment-img img {
    transform: scale(1.05);
}

.treatment-content {
    padding: 2rem;
}

.treatment-content h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.treatment-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.treatment-content a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */
.cta-section {
    background: linear-gradient(to bottom, var(--bg-main), var(--bg-secondary));
    border-top: 1px solid var(--bg-border);
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
    background: rgba(20, 184, 166, 0.05);
    border-radius: 2rem;
    border: 1px solid rgba(20, 184, 166, 0.1);
}

.cta-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.cta-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

@media (max-width: 768px) {
    .cta-actions {
        flex-direction: column;
    }

    .cta-title {
        font-size: 2rem;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--bg-main);
    color: var(--text-primary);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--bg-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.footer-contact li svg {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

.footer-col h4 {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--bg-border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a:hover {
    color: #fff;
}

@media (max-width: 991px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* ==========================================================================
   Service Page Refinement Classes
   ========================================================================== */
.service-hero-h1 {
    font-size: 2.75rem !important;
    line-height: 1.15 !important;
}

.service-content-container {
    max-width: 1100px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.benefit-item-text {
    font-size: 1rem !important;
    line-height: 1.4 !important;
}

.service-section-spacing {
    padding: 80px 0 !important;
}