:root {
    /* Day Theme - "Warm Sunrise" */
    /* Peach (#FFF0E6) & Coral (#FF7E5F) */

    --bg-body-day: #FFF0E6;
    --bg-card-day: rgba(255, 255, 255, 0.7);
    --text-main-day: #1a1a1a;
    /* Darker for better contrast */
    --text-muted-day: #4a4a4a;
    /* Much darker than #636e72 for better readability */

    --primary-day: #FF7E5F;
    /* Coral */
    --secondary-day: #FEB47B;
    /* Sunset Orange */
    --accent-day: #6C5CE7;
    /* Purple for contrast */

    --gradient-day: linear-gradient(135deg, #FFF0E6 0%, #FFE3D4 100%);

    --glass-bg-day: rgba(255, 255, 255, 0.6);
    --glass-border-day: rgba(255, 255, 255, 0.5);

    /* Night Theme - "Dark & Elegant" */
    /* #0A1A2F (Deep Navy) to #1F1F1F (Dark Grey) */
    --bg-body-night: #0A1A2F;
    --bg-card-night: #1F1F1F;
    --text-main-night: #F0F0F0;
    /* Brighter for better contrast */
    --text-muted-night: #BDBDBD;
    /* Brighter than #A0A0A0 for better readability */

    --primary-night: #Cdb4db;
    --secondary-night: #A2D2FF;
    --accent-night: #FFC8DD;

    --gradient-night: linear-gradient(180deg, #0A1A2F 0%, #1F1F1F 100%);

    --glass-bg-night: rgba(10, 26, 47, 0.85);
    --glass-border-night: rgba(255, 255, 255, 0.08);

    /* Defaults (Day Start) */
    --bg-body: var(--bg-body-day);
    --bg-card: var(--bg-card-day);
    --text-main: var(--text-main-day);
    --text-muted: var(--text-muted-day);
    --primary: var(--primary-day);
    --secondary: var(--secondary-day);
    --accent: var(--accent-day);
    --glass-bg: var(--glass-bg-day);
    --glass-border: var(--glass-border-day);

    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* Brand Colors (Consistent across modes) */
    --primary: #2563EB;     /* Royal Blue */
    --secondary: #10B981;   /* Emerald Green */

    /* Light Theme Backgrounds & Text */
    --bg-body: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-dark: #0F172A;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --text-heading: #1E293B;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);

    /* UI Elements */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-heading-dark: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Auth Backgrounds */
    --auth-bg: url('Assets/auth-bg-light.png');
}

/* Dark Theme Variables */
[data-theme="dark"] {
    /* We keep primary and secondary identical for brand consistency */
    --bg-body: #0B1120;
    --bg-card: #1E293B;
    --bg-dark: #020617;
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --text-heading: #F1F5F9;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);

    /* Switch Font in Dark Mode */
    --font-heading: var(--font-heading-dark);

    /* Auth Background Dark */
    --auth-bg: url('Assets/auth-bg-dark.png');
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    transition: background-color 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* === Typography === */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw + 1rem, 3.5rem);
}

h2 {
    font-size: clamp(1.8rem, 4vw + 0.5rem, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 2vw + 1rem, 1.75rem);
}

p {
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* === Layout & Containers === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

/* === Glassmorphism Components === */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    /* Alignment Fixes */
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: flex-start;
}

.glass-card>a:last-child {
    margin-top: auto;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

/* === Navigation === */
/* === Navigation Animations === */
/* Blending Interface: Transparent by default, Glass on Scroll */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;

    /* Transparent Default State */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid transparent;
    padding: 1.5rem 0; /* Restored and kept consistent */

    /* Subtle gradient to ensure font visibility if the background is slightly light */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, transparent 100%);

    animation: nav-slide-down 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure navbar content is visible at hero section (non-scrolled state over dark BG) */
.navbar:not(.scrolled):not(.nav-light-bg) .nav-link,
.navbar:not(.scrolled):not(.nav-light-bg) .btn-icon,
.navbar:not(.scrolled):not(.nav-light-bg) .mobile-toggle {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Ensure mobile menu links are visible even if unscrolled (overrides white color) */
@media (max-width: 992px) {
    .navbar:not(.scrolled):not(.nav-light-bg) .nav-link {
        color: var(--text-main) !important;
        text-shadow: none !important;
    }
}

.navbar:not(.scrolled):not(.nav-light-bg) .nav-link::after {
    background: #ffffff;
}

/* Scrolled State (Added via JS) */
.navbar.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.8rem 0;
    /* Shrink on scroll */
    background: rgba(var(--bg-card-rgb, 255, 255, 255), 0.7);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Page-specific start mode: If page starts light, use this class on <nav> */
.navbar.nav-light-bg {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8) 0%, transparent 100%);
}

/* Dark theme specific blending handling might be needed if var(--glass-bg) isn't sufficient */
[data-theme="dark"] .navbar.scrolled {
    background: rgba(0, 0, 0, 0.5);
}

@keyframes nav-slide-down {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px; /* Added more horizontal padding for premium feel */
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff !important;
    /* Force white on dark heroes */
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.navbar.scrolled .logo,
.navbar.nav-light-bg .logo {
    color: var(--primary) !important;
    text-shadow: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-item {
    position: relative;
    cursor: pointer;
}

.nav-link {
    font-weight: 500;
    cursor: pointer;
    font-size: 0.95rem;
    position: relative;
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
}

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

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

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

/* Dropdown Animation: 3D Flip */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    min-width: 200px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: perspective(600px) rotateX(-20deg) translateY(10px);
    transform-origin: top center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 1rem;
    z-index: 1001;
    border: 1px solid var(--glass-border);
}

.nav-item:hover .dropdown-menu,
.nav-item.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: perspective(600px) rotateX(0) translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
    border-left: 2px solid transparent;
}

.dropdown-item:hover,
.dropdown-item.active {
    background: rgba(37, 99, 235, 0.05);
    color: var(--primary);
    border-left: 2px solid var(--primary);
}

/* Controls (Theme/RTL) */
.nav-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: 50%;
}

.btn-icon:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary);
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    background: #1D4ED8;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* === Hero Section === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    color: var(--secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    display: block;
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    mask-image: linear-gradient(to left, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, black 60%, transparent 100%);
}

/* RTL Support for Hero Background */
[dir="rtl"] .hero-bg {
    left: 0;
    right: auto;
    mask-image: linear-gradient(to right, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 60%, transparent 100%);
}

/* === Animations === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(108, 92, 231, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(108, 92, 231, 0);
    }
}

.animate-up {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* === Footer === */
.footer {
    background: var(--bg-card);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer .logo {
    color: var(--text-main) !important;
    text-shadow: none;
    font-size: 1.8rem;
    font-weight: 800;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col li {
    margin-bottom: 1rem;
}

.footer-col a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    padding: 0.25rem 0;
}

.footer-col a:hover {
    color: var(--primary);
    transform: translateX(4px);
}

/* === Dashboard Specifics === */
.dashboard-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
    padding-top: 70px;
    /* Space for fixed navbar */
}

.sidebar {
    background: var(--bg-card);
    padding: 2rem;
    border-right: 1px solid var(--glass-border);
    height: calc(100vh - 70px);
    position: sticky;
    top: 70px;
    overflow-y: auto;
}

.main-content {
    padding: 2.5rem;
    background: var(--bg-body);
}

/* RTL Adjustments */
[dir="rtl"] .nav-link::after {
    right: 0;
    left: auto;
}

[dir="rtl"] .dropdown-menu {
    right: 0;
    left: auto;
}

[dir="rtl"] .sidebar {
    border-right: none;
    border-left: 1px solid var(--glass-border);
}

/* Circuit Loadout Animation */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0F172A;
    /* Deep Tech Blue/Black */
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.circuit-loader {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 2rem;
}

.circuit-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #FF7E5F;
    border-radius: 50%;
    box-shadow: 0 0 15px #FF7E5F;
    z-index: 10;
    animation: circuit-pulse 1.5s infinite ease-in-out;
}

.circuit-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(108, 92, 231, 0.2);
    border-top: 2px solid #6C5CE7;
    border-radius: 50%;
    animation: circuit-spin 2s linear infinite;
}

.circuit-ring:nth-child(2) {
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    width: auto;
    height: auto;
    border: 2px solid rgba(108, 92, 231, 0.2);
    border-left: 2px solid #A2D2FF;
    animation: circuit-spin-reverse 1.5s linear infinite;
}

.loader-text {
    font-family: var(--font-heading);
    color: #A2D2FF;
    font-size: 1.1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: text-flicker 2s infinite;
}

@keyframes circuit-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes circuit-spin-reverse {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(-360deg);
    }
}

@keyframes circuit-pulse {
    0% {
        box-shadow: 0 0 10px #FF7E5F;
        opacity: 1;
    }

    50% {
        box-shadow: 0 0 25px #FF7E5F;
        opacity: 0.7;
    }

    100% {
        box-shadow: 0 0 10px #FF7E5F;
        opacity: 1;
    }
}

@keyframes text-flicker {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    52% {
        opacity: 0.8;
    }

    54% {
        opacity: 0.5;
    }
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .nav-links {
        display: none;
    }

    /* Mobile Dropdown Fix */
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none !important;
        border: none !important;
        background: rgba(0, 0, 0, 0.05) !important;
        padding: 0 1rem !important;
        display: none;
        /* Hidden by default */
        transition: none !important;
    }

    .nav-item.active .dropdown-menu {
        display: block;
        /* Show when active */
    }

    .dropdown-item {
        padding: 10px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .hero-bg {
        width: 100%;
        opacity: 0.3;
        mask-image: none;
    }

    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
        /* Add toggle logic in JS */
    }

    h1 {
        font-size: 2.5rem;
    }
}

/* Exotic Cards */
.feature-card {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.feature-card>a:last-child {
    margin-top: auto;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0;
    z-index: -1;
    transition: var(--transition);
    border-radius: 20px;
}

.feature-card:hover::before {
    opacity: 0.1;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.icon-box {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: rgba(108, 92, 231, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 2rem;
    transition: var(--transition);
}

.feature-card:hover .icon-box {
    background: var(--primary);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

/* === Additional Content Styles (Expanded) === */

/* Testimonials */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    position: relative;
    box-shadow: var(--shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.testimonial-author {
    margin-top: auto;
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-content>a:last-child {
    margin-top: auto;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    background: #ccc;
}

/* Pricing/Plans */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.pricing-card {
    background: var(--glass-bg);
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    border: 2px solid transparent;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.pricing-card>*:last-child {
    margin-top: auto;
}

.pricing-card.popular {
    border-color: var(--primary);
    background: linear-gradient(to bottom, rgba(108, 92, 231, 0.05), var(--bg-card));
}

.price-tag {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 1rem 0;
}

.price-features {
    text-align: left;
    margin: 2rem 0;
}

.price-features li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.price-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-weight: bold;
}

/* Timeline (About Page) */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--glass-border);
    transform: translateX(-50%);
}

.timeline-item {
    padding: 2rem;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    top: 2.5rem;
    right: -10px;
    box-shadow: 0 0 0 5px var(--bg-body);
}

.timeline-item:nth-child(even) .timeline-dot {
    right: auto;
    left: -10px;
}

/* FAQ Accordion */
.faq-item {
    background: var(--bg-card);
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-top: 1px solid transparent;
}

.faq-item.active .faq-answer {
    padding-bottom: 1.5rem;
    max-height: 500px;
    /* Arbitrary large height */
    border-top-color: var(--glass-border);
}

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.team-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    text-align: center;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.team-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    background: #ccc;
    /* Placeholder color */
}

/* Stats Counter */
.counter-box {
    text-align: center;
    padding: 2rem;
}

.counter-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 2rem;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.data-table th {
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary);
    font-weight: 700;
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Responsive Adjustments for new elements */
@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 0;
        text-align: left !important;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-dot {
        left: 10px !important;
        right: auto !important;
    }
}

/* === Home 1 Hero Specific Overrides === */
#home-hero {
    background-color: #0c121c !important;
    color: #ffffff !important;
    position: relative;
    overflow: hidden;
}

#home-hero .hero-subtitle {
    color: #00cec9 !important;
}

#home-hero h1 {
    color: #ffffff !important;
}

#home-hero p {
    color: #b2bec3 !important;
}

#home-hero .hero-bg {
    mask-image: linear-gradient(to left, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, black 60%, transparent 100%);
}

#home-hero .btn-primary {
    background: linear-gradient(90deg, #0984e3, #00cec9) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(9, 132, 227, 0.4) !important;
}

#home-hero .btn-outline {
    border-color: #00cec9 !important;
    color: #00cec9 !important;
}

#home-hero .btn-outline:hover {
    background: #00cec9 !important;
    color: white !important;
    border-color: #00cec9 !important;
}

/* === Card Forming Animations (Option 1: Circuit Breaker) === */
@keyframes border-trace {
    0% {
        background-size: 0% 2px, 2px 0%, 0% 2px, 2px 0%;
    }

    50% {
        background-size: 100% 2px, 100% 0%, 100% 2px, 0% 0%;
    }

    100% {
        background-size: 100% 2px, 2px 100%, 100% 2px, 2px 100%;
    }
}

@keyframes glass-fill {
    0% {
        background-color: transparent;
        backdrop-filter: blur(0px);
    }

    100% {
        background-color: var(--glass-bg);
        backdrop-filter: blur(12px);
    }
}

@keyframes hologram-fade {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
        filter: blur(5px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.card-forming-circuit {
    background-repeat: no-repeat;
    background-image:
        linear-gradient(var(--primary), var(--primary)),
        linear-gradient(var(--primary), var(--primary)),
        linear-gradient(var(--primary), var(--primary)),
        linear-gradient(var(--primary), var(--primary));
    background-position: top left, top right, bottom right, bottom left;
    background-size: 0% 2px, 2px 0%, 0% 2px, 2px 0%;
    /* Start hidden */
    animation: border-trace 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.card-forming-circuit>* {
    opacity: 0;
    animation: hologram-fade 0.8s ease-out 0.8s forwards;
    /* Delay until border finishes */
}

/* Enhancing Hover Effects for Cards */
.glass-card:hover,
.feature-card:hover,
.project-card:hover,
.testimonial-card:hover,
.team-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15), 0 0 10px rgba(var(--primary), 0.3);
    border-color: var(--primary);
}

/* === Mobile Responsiveness Fixes === */
@media (max-width: 992px) {
    .container {
        padding: 0 15px;
        /* Reduce padding on small screens */
    }

    .nav-container {
        padding: 0 20px !important; /* Reduce navbar padding on mobile */
    }

    /* Typography Scaling */
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    /* Layout Adjustments */
    .hero {
        text-align: center;
        padding-top: 100px;
    }

    .hero-content {
        margin: 0 auto;
    }

    .pricing-grid,
    .service-grid,
    .project-grid,
    .testimonial-grid,
    .team-grid {
        grid-template-columns: 1fr;
        /* Stack vertically on mobile */
    }

    .navbar .nav-links {
        display: none;
        /* Hidden by default, requires JS logic for hamburger menu */
    }

    /* Fix Timeline on Mobile */
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 0;
        text-align: left;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-dot {
        left: 11px;
    }

    /* Fix Stats Counter Layout */
    .counter-box {
        padding: 1rem;
    }

    section[style*='grid-template-columns: repeat(4, 1fr)'] {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Fix Calculator Layout */
    .section .container>div[style*='grid-template-columns'] {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* Footer Stacking */
    .footer-grid {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 2rem;
    }

    /* Hide large images or adjustments if necessary */
    .glass-card img {
        height: auto;
    }
}

@media (max-width: 480px) {
    section[style*='grid-template-columns: repeat(4, 1fr)'] {
        grid-template-columns: 1fr !important;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        text-align: center;
    }

    .hero {
        padding-top: 80px;
    }

    h1 {
        font-size: 1.8rem !important;
        line-height: 1.2;
    }

    .container {
        padding: 0 12px;
    }

    .pricing-card,
    .glass-card {
        padding: 1.5rem;
    }
}


/* === Electrical Hero Animations === */
@keyframes electric-flicker {
    0% {
        opacity: 0;
        text-shadow: 0 0 0 transparent;
    }

    2% {
        opacity: 1;
        text-shadow: 0 0 10px var(--secondary);
    }

    4% {
        opacity: 0;
        text-shadow: none;
    }

    6% {
        opacity: 0;
    }

    8% {
        opacity: 1;
        text-shadow: 0 0 10px var(--secondary);
    }

    10% {
        opacity: 0;
    }

    12% {
        opacity: 1;
        text-shadow: 0 0 20px var(--secondary);
    }

    50% {
        opacity: 1;
        text-shadow: 0 0 5px var(--secondary);
    }

    100% {
        opacity: 1;
        text-shadow: 0 0 0 transparent;
    }
}

@keyframes power-surge {
    0% {
        transform: scale(1.1);
        opacity: 0;
        filter: blur(10px) brightness(2);
    }

    10% {
        opacity: 1;
        filter: blur(2px) brightness(1.5);
    }

    100% {
        transform: scale(1);
        opacity: 1;
        filter: blur(0) brightness(1);
    }
}

@keyframes zap-slide {
    0% {
        transform: translateX(-50px) skewX(-20deg);
        opacity: 0;
    }

    100% {
        transform: translateX(0) skewX(0);
        opacity: 1;
    }
}

.electric-subtitle {
    animation: electric-flicker 2s linear forwards;
    display: inline-block;
}

.electric-heading {
    opacity: 0;
    /* Start hidden */
    animation: power-surge 0.8s cubic-bezier(0.1, 0.9, 0.2, 1) 0.5s forwards;
    position: relative;
}

.electric-heading::before {
    /* Lightning Bolt Decoration */
    content: '';
    position: absolute;
    left: -40px;
    top: 10px;
    font-size: 2rem;
    color: #ffd700;
    opacity: 0;
    animation: electric-flicker 1s 1s forwards;
}

.electric-desc {
    opacity: 0;
    animation: zap-slide 0.6s ease-out 1s forwards;
}


/* === REDESIGNED HERO SECTION (Bio-Digital/Tech Look) === */
/* === REDESIGNED HERO SECTION (Bio-Digital/Tech Look) === */
#home-hero {
    background: #050505 !important;
    position: relative;
    overflow: hidden;
    /* Animated Perspective Grid */
    background-image:
        linear-gradient(rgba(0, 206, 201, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 206, 201, 0.15) 1px, transparent 1px) !important;
    background-size: 50px 50px !important;
    animation: perspective-grid 20s linear infinite;
    display: flex;
    align-items: center;
    min-height: 100vh;
    /* Full Screen */
}

@keyframes perspective-grid {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 50px 50px;
    }
}

#home-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(120deg, transparent 0%, rgba(9, 132, 227, 0.1) 50%, rgba(0, 206, 201, 0.2) 100%);
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
    z-index: 1;
}

/* Updated Text Animation for Variety */
.electric-heading {
    opacity: 0;
    animation: cyber-glitch-reveal 1s cubic-bezier(0.1, 0.9, 0.2, 1) 0.5s forwards;
    position: relative;
    text-shadow: 2px 0 var(--primary), -2px 0 var(--secondary);
}

@keyframes cyber-glitch-reveal {
    0% {
        opacity: 0;
        transform: translateX(-20px);
        clip-path: inset(0 100% 0 0);
    }

    50% {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }

    60% {
        transform: translateX(5px);
    }

    70% {
        transform: translateX(-5px);
    }

    80% {
        transform: translateX(2px);
    }

    100% {
        transform: translateX(0);
        opacity: 1;
        text-shadow: none;
        /* Stabilize */
    }
}

#home-hero .container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

#home-hero .hero-bg {
    position: relative !important;
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 0 50px rgba(0, 206, 201, 0.3);
    border: 1px solid rgba(0, 206, 201, 0.5);
    z-index: 2;
    mask-image: none !important;
    -webkit-mask-image: none !important;
    animation: float-hero 6s ease-in-out infinite;
    object-fit: cover;
}

@keyframes float-hero {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.hero-stats-container {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 992px) {
    #home-hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    #home-hero .hero-bg {
        display: none;
    }

    .hero-stats-container {
        justify-content: center;
    }
}

/* === New Section Styles for Content Expansion === */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #000;
    box-shadow: var(--shadow-lg);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.culture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.culture-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    transition: var(--transition);
}

.culture-img:hover {
    transform: scale(1.05);
}

.client-marquee {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    padding: 2rem 0;
}

.marquee-content {
    display: inline-block;
    animation: marquee 12s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.client-logo {
    height: 50px;
    margin: 0 40px;
    opacity: 0.5;
    filter: grayscale(100%);
    transition: var(--transition);
}

.client-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}


/* === Excellence Card Animations === */
.excellence-card {
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, var(--primary), var(--secondary), var(--accent), var(--primary));
    background-size: 400% 400%;
    animation: gradient-flow 15s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

@keyframes gradient-flow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.excellence-text {
    color: white;
    font-size: 3.5rem;
    transform: rotate(-5deg);
    z-index: 2;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    line-height: 1.2;
    animation: text-float 6s ease-in-out infinite;
}

@keyframes text-float {

    0%,
    100% {
        transform: rotate(-5deg) translateY(0);
    }

    50% {
        transform: rotate(-5deg) translateY(-10px);
    }
}

/* Floating Shapes */
.float-shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    animation: float-around 20s linear infinite;
}

.shape-1 {
    width: 150px;
    height: 150px;
    top: -20px;
    left: -20px;
}

.shape-2 {
    width: 100px;
    height: 100px;
    bottom: 10%;
    right: 10%;
    animation-delay: -5s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    top: 40%;
    left: 80%;
    animation-delay: -10s;
}

@keyframes float-around {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, 50px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }

    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

/* === Service Showcase Section (Canon-style) === */
.service-showcase {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: #f8f9fa;
    /* Light, clean background */
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    /* Navbar space */
}

/* Background Landscape */
.showcase-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('Assets/hero_landscape.png') no-repeat center bottom;
    background-size: cover;
    z-index: 0;
    opacity: 0.8;
    mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}

.showcase-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1400px;
    height: 80vh;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 500px), 1fr));
    gap: 2rem;
}

/* Text Content */
.showcase-text {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.showcase-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.showcase-brand span {
    color: var(--secondary);
}

.showcase-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    font-weight: 700;
    color: var(--bg-body);
    /* Dark text for contrast against light bg */
    mix-blend-mode: difference;
    /* Cool effect */
    margin-bottom: 2rem;
}

.showcase-desc {
    font-size: 1.1rem;
    color: #666;
    max-width: 400px;
    line-height: 1.6;
}

/* Visual Composition */
.showcase-visuals {
    position: relative;
    perspective: 1000px;
}

/* Floating Posters */
.poster-grid {
    display: flex;
    gap: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    width: 100%;
    justify-content: center;
}

.poster-card {
    width: 100%;
    max-width: 200px;
    height: 300px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform 0.5s ease;
    animation: float-poster 6s ease-in-out infinite;
}

.poster-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-card:nth-child(2) {
    transform: translateY(-30px);
    animation-delay: -2s;
    z-index: 2;
    scale: 1.1;
}

.poster-card:nth-child(3) {
    animation-delay: -4s;
    z-index: 1;
}

/* Floating Objects */
.float-obj {
    position: absolute;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.3));
    z-index: 10;
}

.turbine-lens {
    top: -50px;
    right: 50px;
    width: 100%;
    max-width: 250px;
    animation: float-rotate 20s linear infinite, float-bob 5s ease-in-out infinite;
}

.device-meter {
    bottom: -50px;
    right: 150px;
    width: 100%;
    max-width: 300px;
    transform: rotate(-15deg);
    animation: float-bob 7s ease-in-out infinite reverse;
}

@keyframes float-poster {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Override for the center poster to keep its scale/offset */
@keyframes float-poster-center {

    0%,
    100% {
        transform: translateY(-30px) scale(1.1);
    }

    50% {
        transform: translateY(-50px) scale(1.1);
    }
}

.poster-card:nth-child(2) {
    animation-name: float-poster-center;
}

@keyframes float-rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes float-bob {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

/* === Contact Page "Domio/Capsule" Style === */
.capsule-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: #0F172A;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 140px;
}

.capsule-visual-container {
    position: relative;
    width: 100%;
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.capsule-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    opacity: 0.9;
}

/* Floating Hotspots */
.hotspot {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
    animation: pulse-hotspot 3s infinite;
}

.hotspot:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.4);
}

.hotspot-inner {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

@keyframes pulse-hotspot {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Curved White Content Area */
.capsule-content {
    position: relative;
    background: var(--bg-body);
    margin-top: -10vh;
    border-radius: 40px 40px 0 0;
    padding: 3rem 2rem;
    z-index: 10;
    min-height: 50vh;
}

@media (max-width: 480px) {
    .capsule-content {
        padding: 2rem 1rem;
        border-radius: 30px 30px 0 0;
    }
}

/* Special Curve Effect using pseudo-element if needed, 
   but border-radius is usually cleaner for responsive */

.capsule-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.capsule-title-group {
    max-width: 500px;
}

.capsule-subtitle {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: block;
}

.capsule-title {
    font-size: clamp(1.75rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
}

/* The "Contact Us" Pill styling from reference */
.capsule-cta {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    color: black;
    padding: 0.5rem 0.5rem 0.5rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    border: 1px solid #eee;
    text-decoration: none;
    gap: 1rem;
}

/* Dark mode adjustment for the white pill */
[data-theme="dark"] .capsule-cta {
    background: #000;
    color: white;
    border-color: #333;
}

.capsule-cta:hover {
    transform: translateY(-3px);
}

.capsule-cta-icon {
    width: 40px;
    height: 40px;
    background: black;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

[data-theme="dark"] .capsule-cta-icon {
    background: white;
    color: black;
}

.capsule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 2rem;
}

.capsule-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--glass-border);
}

/* Case Study Hero Section - Canon Style */
.case-study-hero {
    position: relative;
    padding: 80px 0 100px;
    background: var(--bg-body);
    overflow: hidden;
}

/* Background Grid & Mountains (CSS Only) */
.cs-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    opacity: 0.05;
    background-image:
        linear-gradient(var(--text-main) 1px, transparent 1px),
        linear-gradient(90deg, var(--text-main) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Mountain Silhouette via CSS */
.case-study-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(to top, var(--bg-card) 0%, transparent 100%);
    z-index: 1;
    clip-path: polygon(0% 100%, 0% 80%, 15% 65%, 35% 85%, 50% 60%, 70% 90%, 85% 70%, 100% 95%, 100% 100%);
    opacity: 0.5;
    pointer-events: none;
}

.case-study-hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 400px;
    background: linear-gradient(to top, var(--bg-body) 0%, transparent 100%);
    z-index: 1;
    clip-path: polygon(0% 100%, 10% 90%, 25% 60%, 40% 95%, 60% 70%, 80% 90%, 100% 80%, 100% 100%);
    opacity: 0.3;
    pointer-events: none;
}

.cs-container {
    position: relative;
    z-index: 5;
}

/* Header Layout */
.cs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
}

.cs-brand-block small {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.cs-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.cs-slogan {
    display: block;
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    color: var(--text-muted);
    font-family: 'Playfair Display', serif;
    font-style: italic;
}

.cs-brand-block h1 {
    font-size: clamp(2rem, 8vw, 3.5rem);
    max-width: 600px;
    line-height: 1.1;
}

/* Visual Floating Element */
.cs-visual {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-visual img {
    width: 100%;
    animation: float-rotate 20s infinite linear;
    filter: drop-shadow(0 0 30px rgba(0, 0, 0, 0.5));
}

.cs-lens-ring {
    position: absolute;
    width: 120%;
    height: 120%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: rotate-reverse 30s infinite linear;
}

@keyframes rotate-reverse {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

/* Middle Content Grid */
.cs-content-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    margin-bottom: 6rem;
}

.cs-text-group {
    grid-column: span 5;
}

.cs-text-item {
    margin-bottom: 2rem;
}

.cs-text-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-weight: 700;
}

.cs-text-item p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.cs-summary {
    grid-column: 7 / span 6;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: right;
}

.cs-summary p {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.cs-summary-small {
    font-size: 0.9rem !important;
    color: var(--text-muted) !important;
}

/* Poster Row */
.cs-poster-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: end;
}

.cs-poster {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    aspect-ratio: 3/4;
}

.cs-poster:hover {
    transform: translateY(-10px);
    z-index: 10;
}

.cs-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cs-poster-content {
    padding: 1.5rem;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: white;
}

@media (max-width: 900px) {
    .cs-header {
        flex-direction: column-reverse;
        text-align: center;
    }

    .cs-logo {
        font-size: clamp(3rem, 10vw, 5rem);
    }

    .cs-slogan {
        font-size: 1.2rem;
    }

    .cs-visual {
        margin-bottom: 3rem;
        width: 100%;
        max-width: 300px;
        height: auto;
        aspect-ratio: 1;
    }

    .cs-content-grid {
        display: flex;
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }

    .cs-text-group {
        width: 100%;
    }

    .cs-summary {
        text-align: center;
        width: 100%;
    }

    .cs-poster-row {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .cs-brand-block h1 {
        font-size: 1.75rem;
    }

    .cs-logo {
        font-size: 2.5rem;
    }

    .cs-slogan {
        font-size: 1rem;
    }
}

/* -------------------------------------------
/* Dashboard Variables (Light Mode Default) */
:root {
    --dash-bg: #f5f7f9;
    --dash-bg-img: none;
    /* Removed background as requested */
    --dash-bg-size: cover;
    --dash-sidebar: #ffffff;
    --dash-card: #ffffff;
    --dash-text: #2d3436;
    --dash-text-muted: #636e72;
    --dash-border: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
    --dash-bg: #0a0f1a;
    --dash-bg-img: none;
    /* Removed background as requested */
    --dash-bg-size: cover;
    --dash-sidebar: #111827;
    --dash-card: #111827;
    --dash-text: #f0f0f0;
    --dash-text-muted: #BDBDBD;
    --dash-border: rgba(255, 255, 255, 0.08);
}

/* -------------------------------------------
   PREMIUM DASHBOARD STYLES (Glass & Neon)
   ------------------------------------------- */

/* Layout Override */
.dashboard-body {
    background-color: var(--dash-bg);
    background-image: var(--dash-bg-img);
    background-size: var(--dash-bg-size);
    background-attachment: fixed;
    font-family: 'Inter', sans-serif;
    color: var(--dash-text);
    transition: background 0.3s ease, color 0.3s ease;
}

.dash-container {
    display: block;
    /* Changed from grid to block for fixed sidebar */
    min-height: 100vh;
}

/* Sidebar Modern - Expanding */
.dash-sidebar {
    background: var(--dash-sidebar);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--dash-border);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    /* Fixed to allow overlay expansion */
    top: 0;
    left: 0;
    height: 100vh;
    width: 90px;
    /* Collapsed Width */
    z-index: 1000;
    overflow: hidden;
    /* Hide text in collapsed state */
    transform-origin: left center;
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    white-space: nowrap;
}

[dir="rtl"] .dash-sidebar {
    border-right: none;
    border-left: 1px solid var(--dash-border);
    left: auto;
    right: 0;
    transform-origin: right center;
}

.dash-sidebar:hover {
    width: 280px;
    /* Expanded Width */
    padding: 2rem;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.1);
    /* Popout shadow */
}

.dash-logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--dash-text);
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    justify-content: flex-start;
    padding: 0 0.5rem;
    color: var(--primary); /* Consistent brand color */
}

.dash-logo i {
    font-size: 1.5rem;
    min-width: 30px;
    text-align: center;
}

.dash-logo span {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dash-sidebar:hover .dash-logo {
    justify-content: flex-start;
}

/* Hide logo text in collapsed state */
.dash-logo span:not(:first-child) {
    display: none;
}

/* Hide admin badge in collapsed state */
.dash-sidebar .sidebar-admin-badge {
    display: none;
    overflow: hidden;
}

/* Show on hover */
.dash-sidebar:hover .sidebar-admin-badge {
    display: block;
}

/* Show logo text on hover */
.dash-sidebar:hover .dash-logo span:not(:first-child) {
    display: inline;
}


.dash-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0;
}

.dash-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 14px;
    border-radius: 12px;
    color: var(--dash-text-muted);
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    justify-content: flex-start;
    white-space: nowrap;
    max-width: 100%;
}

.dash-link:hover {
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary);
}

.dash-link.active {
    background: linear-gradient(90deg, rgba(108, 92, 231, 0.2), rgba(108, 92, 231, 0));
    border-left: 3px solid var(--primary);
    color: var(--primary);
}

[dir="rtl"] .dash-link.active {
    border-left: none;
    border-right: 3px solid var(--primary);
    background: linear-gradient(-90deg, rgba(108, 92, 231, 0.2), rgba(108, 92, 231, 0));
}

.dash-link-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    /* Ensure icon doesn't shrink */
}

/* Link Text Visibility - use width+overflow to prevent text bleeding out */
.dash-link span {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: opacity 0.2s ease, max-width 0.3s ease;
    display: inline-block;
    white-space: nowrap;
}

.dash-sidebar:hover .dash-link span {
    opacity: 1;
    max-width: 200px;
    transition-delay: 0.1s;
}

/* Upgrade Card in Sidebar */
.sidebar-promo {
    margin-top: auto;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(0, 206, 201, 0.1));
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--dash-border);
    text-align: center;
    opacity: 0;
    /* Hide by default */
    transition: opacity 0.3s;
    pointer-events: none;
}

.dash-sidebar:hover .sidebar-promo {
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0.2s;
}

/* Main & Header */
.dash-main {
    padding: 0;
    /* Remove padding to allow header to be full width */
    overflow-x: hidden;
    margin-left: 90px;
    /* Space for collapsed sidebar */
    transition: margin-left 0.4s;
    width: auto;
}

[dir="rtl"] .dash-main {
    margin-left: 0;
    margin-right: 90px;
}

[dir="rtl"] .dash-user-info {
    align-items: flex-start !important;
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
    text-align: right;
}

[dir="rtl"] .dash-sidebar:hover {
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
}

/* General RTL Fixes for Dashboard */
[dir="rtl"] .stat-card {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* flex-start in RTL is RIGHT */
}

[dir="rtl"] .stat-card h3 {
    direction: ltr;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

[dir="rtl"] .stat-icon {
    margin-right: 0;
    margin-left: auto;
    /* Not really needed if align-items is flex-start in RTL, but good for safety */
}

[dir="rtl"] .chart-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .dash-search-box {
    flex-direction: row-reverse;
}

[dir="rtl"] .data-table th,
[dir="rtl"] .data-table td {
    text-align: right;
}

.dash-content-inner {
    padding: 2rem;
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
    background: var(--dash-sidebar);
    border-bottom: 1px solid var(--dash-border);
    position: sticky;
    /* Stable top content */
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.dash-search-box {
    background: var(--dash-sidebar);
    border-radius: 50px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 300px;
    border: 1px solid var(--dash-border);
    transition: all 0.3s ease;
}

.dash-search-box:focus-within {
    background: var(--bg-card);
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.2);
}

.dash-search-box input {
    background: transparent;
    border: none;
    color: var(--dash-text);
    width: 100%;
    outline: none;
    font-family: inherit;
}

.dash-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notif-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--dash-border);
    color: var(--dash-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    /* Added shadow for lift */
}

/* Dark mode override for buttons */
[data-theme="dark"] .notif-btn {
    background: rgba(30, 30, 35, 0.8);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.notif-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.dashboard-hamburger {
    display: none !important;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--dash-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--dash-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dash-text);
    margin-bottom: 0.25rem;
}

.stat-card p {
    color: var(--dash-text-muted);
    font-size: 0.9rem;
}

/* Charts Grid */
.dash-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-container-modern {
    background: var(--dash-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--dash-border);
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 320px;
    overflow: hidden;
}

/* Ensure canvas fills the container */
.chart-container-modern canvas {
    flex: 1;
    min-height: 0;
    width: 100% !important;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-header h4 {
    font-size: 1.2rem;
    color: var(--dash-text);
    margin: 0;
}

.chart-actions {
    display: flex;
    gap: 0.5rem;
}

.chart-dot {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--dash-border);
    color: var(--dash-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}

@media (max-width: 1024px) {
    .stats-row {
        grid-template-columns: 1fr 1fr;
    }

    .dash-chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .dash-sidebar {
        width: 280px;
        /* Full width on mobile when open */
        transform: translateX(-100%);
        /* Hidden by default */
        display: flex;
        /* Override previous display:none if any */
        padding: 2rem;
    }

    [dir="rtl"] .dash-sidebar {
        transform: translateX(100%);
        right: 0;
        left: auto;
    }

    .dash-sidebar.active {
        transform: translateX(0);
        /* Slide in */
    }

    .dashboard-hamburger {
        display: flex !important;
    }

    .dash-sidebar .dash-link span,
    .dash-sidebar .sidebar-promo,
    .dash-sidebar .dash-logo span:not(:first-child) {
        opacity: 1;
        display: inline;
        pointer-events: auto;
    }

    .dash-main {
        margin-left: 0;
        /* Full width content */
    }

    [dir="rtl"] .dash-main {
        margin-right: 0;
    }

    .dash-logo {
        justify-content: flex-start;
    }
}

/* Mobile Specific Dashboard Refinements */
@media (max-width: 600px) {

    /* Header Layout Redesign */
    .dash-header {
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

    .dash-header-title {
        flex: 1;
        text-align: center;
        min-width: 0;
    }

    .dash-header-title h2 {
        font-size: 1.1rem !important;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .dashboard-hamburger {
        display: flex !important;
        flex-shrink: 0;
    }

    .dash-profile {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }


    /* RTL Alignment - Browser handles flip, just align text */
    [dir="rtl"] .dash-header-title {
        text-align: center;
    }

    /* Mobile Specific (360px) */
    @media (max-width: 600px) {
        .dash-header {
            padding: 0.75rem 1rem;
            gap: 0.5rem;
        }

        /* Hide user info on very small screens to save space */
        .dash-user-info {
            display: none !important;
        }

        .dash-profile .notif-btn {
            width: 32px;
            height: 32px;
            box-shadow: none;
            background: transparent;
        }

        .stats-row {
            grid-template-columns: 1fr !important;
            gap: 1.25rem;
        }

        .stat-card {
            text-align: center;
            align-items: center;
            display: flex;
            flex-direction: column;
        }

        [dir="rtl"] .stat-card {
            text-align: center;
            align-items: center;
        }
    }

    /* Fix for space on right side in RTL mobile */
    [dir="rtl"] .dash-main {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
}

/* -------------------------------------------
   SPLIT AUTH LAYOUT (Login/Register Ref)
   ------------------------------------------- */

.auth-body-split {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Use exactly the same background as the regular body pages for consistency */
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
}

.auth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(5, 5, 16, 0.4) 0%, rgba(5, 5, 16, 0.7) 100%);
    backdrop-filter: blur(2px);
    z-index: 1;
}

.split-container {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr 450px;
    height: 100vh;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

/* Left Content (Welcome) */
.split-intro {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--text-heading);
}

.split-intro h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.split-intro p {
    font-size: 1.1rem;
    max-width: 500px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.auth-social-links {
    display: flex;
    gap: 1rem;
}

.auth-social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-size: 1rem;
    transition: 0.3s;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.auth-social-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* Right Content (Form) */
.split-form-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    background: var(--bg-card);
    border-left: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
}

.split-form-container h2 {
    font-size: 2rem;
    color: var(--text-heading);
    margin-bottom: 2rem;
    font-weight: 700;
}

.modern-input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.modern-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
}

.modern-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--text-muted);
    padding: 10px 0;
    color: var(--text-main);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: 0.3s;
    outline: none;
}

.modern-input:focus {
    border-bottom-color: var(--primary);
}

.modern-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    cursor: pointer;
}

.auth-action-btn {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.auth-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    background: #1D4ED8;
}

.auth-footer-link {
    display: inline-block;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Responsive */
@media (max-width: 900px) {
    .auth-body-split {
        background-color: var(--bg-body);
    }

    .split-container {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
    }

    .split-intro {
        display: none;
        /* Hide intro on mobile to focus on login */
    }

    .split-form-container {
        width: 100%;
        border-left: none;
        background: var(--bg-card);
        box-shadow: none;
        min-height: 100vh;
        padding: 2rem 1.5rem;
        padding-top: 80px; /* Space for the absolute navbar */
        justify-content: center;
    }
}

/* === Utility Grids === */
.side-by-side-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 992px) {
    .side-by-side-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* === Modern FAQ (Accordion) === */
details.modern-faq {
    background: #ffffff;
    /* Explicitly white cards as per image, or usage key from image */
    background: var(--bg-card);
    /* Fallback */
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

details.modern-faq:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

details.modern-faq summary {
    font-weight: 600;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    outline: none;
    font-size: 1.1rem;
    color: var(--text-heading);
}

details.modern-faq summary::-webkit-details-marker {
    display: none;
}

details.modern-faq summary .loading-icon {
    /* Reuse existing or make new */
    color: var(--primary);
    font-size: 1.5rem;
    line-height: 1;
    font-weight: 300;
}

details.modern-faq p {
    margin-top: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 1rem;
}

/* Dark Mode Adjustment */
[data-theme="dark"] details.modern-faq {
    background: rgba(255, 255, 255, 0.05);
}

/* =========================================
   Service Showcase Hero (Re-implementation for Mobile Fix)
   ========================================= */

.service-showcase {
    position: relative;
    padding: 140px 0 100px;
    background: var(--bg-body);
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.showcase-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Using hero_landscape based on visual appearance */
    background: url('Assets/hero_landscape.png') no-repeat center bottom;
    background-size: cover;
    opacity: 0.15;
    z-index: 1;
    mix-blend-mode: luminosity;
}

[data-theme="dark"] .showcase-bg {
    opacity: 0.3;
    mix-blend-mode: overlay;
}

.showcase-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 5;
    width: 100%;
    align-items: center;
}

.showcase-text {
    position: relative;
    z-index: 10;
}

.showcase-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--text-main);
    display: inline-block;
}

.showcase-brand span {
    color: var(--primary);
}

.showcase-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 2rem;
    font-weight: 800;
    color: var(--text-main);
}

.showcase-desc {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 480px;
}

.showcase-visuals {
    position: relative;
    height: 600px;
    width: 100%;
    perspective: 1000px;
}

/* Floating Elements (Decorations) */
.float-obj {
    position: absolute;
    z-index: 2;
    animation: float-y 6s ease-in-out infinite;
    pointer-events: none;
}

.turbine-lens {
    top: 0;
    right: 0;
    width: 180px;
    opacity: 0.8;
}

.device-meter {
    bottom: 50px;
    right: 20px;
    width: 220px;
    animation-delay: 2s;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
}

@keyframes float-y {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Poster Grid Layout */
.poster-grid {
    display: flex;
    gap: 1.5rem;
    transform: rotate3d(1, 1, 0, 15deg) rotateZ(-10deg);
    position: absolute;
    top: 25%;
    left: 10%;
    z-index: 5;
}

.poster-card {
    width: 160px;
    aspect-ratio: 2/3;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: -20px 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.4s ease;
}

.poster-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Staggered vertical displacement */
.poster-card:nth-child(1) {
    transform: translateY(0);
}

.poster-card:nth-child(2) {
    transform: translateY(50px);
}

.poster-card:nth-child(3) {
    transform: translateY(100px);
}

/* Hover Effects Desktop */
.poster-card:hover {
    transform: translateY(-20px) scale(1.05) !important;
    z-index: 10;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

/* =========================================
   MOBILE RESPONSIVE FIXES
   ========================================= */
@media (max-width: 900px) {
    .service-showcase {
        padding: 120px 0 60px;
        min-height: auto;
        height: auto;
        display: block;
    }

    .showcase-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 0 1.5rem;
    }

    .showcase-text {
        text-align: center;
    }

    .showcase-text br {
        display: none;
        /* remove hard breaks on mobile */
    }

    .showcase-brand {
        display: block;
        margin-bottom: 1.5rem;
        font-size: 1.25rem;
    }

    .showcase-title {
        font-size: clamp(2.25rem, 10vw, 3rem);
        margin-bottom: 1.5rem;
    }

    .showcase-desc {
        margin: 0 auto;
        font-size: 1rem;
        max-width: 100%;
    }

    .showcase-visuals {
        height: auto;
        min-height: 350px;
        margin-top: 1rem;
        display: flex;
        justify-content: center;
        align-items: center;
        perspective: none;
    }

    .poster-grid {
        position: relative;
        transform: none;
        top: 0;
        left: 0;
        margin: 0 auto;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
        width: 100%;
    }

    .poster-card {
        width: 140px;
        min-width: 120px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        transform: none !important;
        margin: 0 !important;
    }

    .float-obj {
        display: none;
    }

    .showcase-bg {
        opacity: 0.1;
    }
}

@media (max-width: 480px) {
    .showcase-title {
        font-size: 2.25rem;
    }

    .poster-card {
        width: 45%;
    }

    .poster-card:last-child {
        display: none;
        /* Hide 3rd image on very small screens to save space */
    }
}

/* =========================================
   Responsive Utility Classes & Component Fixes
   ========================================= */

/* Grid Helpers */
.responsive-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 1024px) {
    .responsive-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .responsive-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Table Wrapper for horizontal scroll */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 2rem;
    border-radius: 12px;
}

/* Fixing background attachment on mobile (standard behavior for better perf) */
@media (max-width: 768px) {
    .section[style*="background-attachment: fixed"] {
        background-attachment: scroll !important;
    }

    .section[style*="font-size: 3rem"] {
        font-size: 2rem !important;
    }

    .service-detail-row h3 {
        font-size: 1.75rem !important;
    }
}

/* Correcting overlapping issues in Service Detail images */
@media (max-width: 768px) {
    .service-detail-row .glass-card {
        height: 250px !important;
    }
}

/* Final Mobile Refinements for Service Page Components */

@media (max-width: 768px) {

    /* Case Study Hero Title Fix */
    .cs-brand-block h1 {
        font-size: 2.25rem !important;
        max-width: 100%;
        margin: 0 auto;
    }

    .cs-logo {
        font-size: 3rem !important;
    }

    .cs-slogan {
        font-size: 1.1rem !important;
    }

    /* Summary stacking */
    .cs-summary {
        padding: 2rem 0;
        text-align: center !important;
    }

    .cs-summary p {
        font-size: 1.1rem !important;
    }

    /* Prevent text overflow in News Content */
    .news-content h4 {
        font-size: 1.1rem !important;
    }
}

/* Ensure navbar transition is smooth */
.navbar {
    transition: all 0.3s ease-in-out;
}

/* Mobile menu link spacing & Dashboard Fixes */
@media (max-width: 992px) {
    .nav-links {
        padding: 1.5rem;
        flex-direction: column;
        align-items: center;
        gap: 1.2rem;
    }
}

/* DASHBOARD MOBILE RESPONSIVE FIXES */
@media (max-width: 768px) {
    .dash-header { padding: 0.8rem 1rem !important; gap: 0.5rem; }
    .dash-user-info { display: none !important; }
}
@media (max-width: 480px) {
    .dash-header { padding: 0.6rem 0.5rem !important; }
    #rtl-btn, .fa-cog, .dash-header div[style*="width: 1px"] { display: none !important; }
    .notif-btn { width: 32px; height: 32px; min-width: 32px; }
    .dash-profile div[style*="width: 45px"] { width: 35px !important; height: 35px !important; }
}

/* === 360px Screen Layout Fixes === */
@media (max-width: 360px) {
    /* Prevent side-by-side buttons from overflowing */
    .hero-btns, 
    div[style*="display: inline-flex"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        align-items: center !important;
        width: 100%;
    }

    /* Adjust large buttons to fit small screens */
    .btn {
        width: 100%;
        max-width: 260px;
        text-align: center;
        padding: 12px 20px !important;
        font-size: 0.95rem !important;
    }

    /* Core container breathing room */
    .container {
        padding: 0 15px !important;
    }

    .section {
        padding: 40px 0 !important;
    }

    /* Hero adjustments */
    .electric-heading {
        font-size: 1.8rem !important;
    }

    .electric-desc {
        font-size: 0.9rem !important;
    }

    /* Prevent dashboard clipping if user goes to dash on 360px */
    .dash-main {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .dash-content-inner {
        padding: 1rem !important;
    }
}