:root {
    /* --- LIGHT MODE (Default) --- */
    --primary-color: #f88e02;
    /* Solar Orange */
    --primary-hover: #e07d00;
    --secondary-color: #232448;
    /* Headings/Important */
    --accent-color: #F4D03F;

    --background-color: #FFFFFF;
    --surface-color: #86B3EE;
    /* Secondary Sections (Blue) */
    --surface-light: #f0f6ff;
    /* Softer alternative for subtle panels */
    --card-bg: #FFFFFF;

    --text-color: #475569;
    /* Body Text */
    --heading-color: #232448;
    --border-color: #e2e8f0;

    --footer-bg: #232448;
    /* Standard Navy Footer */

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(35, 36, 72, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(35, 36, 72, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(35, 36, 72, 0.1);

    /* System */
    --container-padding: 2rem;
    --radius: 1rem;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --transition-speed: 0.3s;
}

[data-theme="dark"] {
    /* --- DARK MODE (Premium Strict) --- */
    --background-color: #020617;
    /* Main Background */
    --surface-color: #0F172A;
    /* Secondary Sections */
    --surface-light: #0F172A;
    --card-bg: #0F172A;
    /* Cards */

    --text-color: #E2E8F0;
    /* Body Text */
    --heading-color: #F8FAFC;
    /* Headings */
    --secondary-color: #F8FAFC;
    /* Mapping secondary to heading color for contrast */

    --border-color: #334155;
    /* Subtle borders */

    --footer-bg: #0F172A;
    /* Dark Navy Footer */

    /* Shadows (Lighter/Colored for visibility on dark) */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7);
}

/* Dark Mode Class Support (for JavaScript toggle) */
body.dark-mode {
    /* --- DARK MODE CSS VARIABLES --- */
    --background-color: #020617;
    --surface-color: #0F172A;
    --surface-light: #0F172A;
    --card-bg: #0F172A;
    --text-color: #E2E8F0;
    --heading-color: #F8FAFC;
    --secondary-color: #F8FAFC;
    --border-color: #334155;
    --footer-bg: #0F172A;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7);
}

/* Global Transition for smooth mode switching */
body,
header,
section,
div,
span,
p,
h1,
h2,
h3,
h4,
h5,
h6,
input,
button,
a {
    transition: background-color var(--transition-speed), color var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--background-color);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: var(--background-color);
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--heading-color);
    letter-spacing: -0.02em;
    /* Tighter headings for modern look */
}

p {
    margin-bottom: 1rem;
    color: var(--text-color);
    line-height: 1.6;
    /* Increased for readability */
}

/* Layout Utilities */
.container {
    max-width: 1280px;
    /* Slightly wider for modern screens */
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

.section {
    padding-block: 3.5rem;
    /* Balanced spacing */
}

.bg-surface {
    background-color: var(--surface-light);
}

.grid {
    display: grid;
    gap: 2.5rem;
    /* Increased gap */
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.flex {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.flex-col {
    flex-direction: column;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    /* Larger touch targets */
    font-weight: 600;
    border-radius: 50px;
    /* Pill shape is more modern */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    letter-spacing: 0.02em;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(248, 142, 2, 0.3);
    /* Colored shadow */
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(248, 142, 2, 0.4);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Header */
/* Header - Minimal Floating Capsule */
header {
    position: sticky;
    top: 1.5rem;
    z-index: 1000;
    padding-inline: 1rem;
    pointer-events: none;
    margin-bottom: 2rem;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.85);
    /* Slightly more transparent */
    backdrop-filter: blur(16px);
    /* Stronger blur */
    -webkit-backdrop-filter: blur(16px);
    border-radius: 100px;
    padding: 0.75rem 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    pointer-events: auto;
    transition: all 0.3s ease;
}

[data-theme="dark"] .nav-wrapper {
    background-color: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--secondary-color);
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    /* More space between links */
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    position: relative;
    padding-block: 0.25rem;
}

/* Hover Underline Effect */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.icon-box {
    width: 3rem;
    height: 3rem;
    background-color: rgba(248, 142, 2, 0.1);
    /* Solar Orange 10% */
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
}

/* Theme Toggle Btn */
.theme-toggle-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
}

[dir="rtl"] .theme-toggle-btn {
    margin-left: 0;
    margin-right: 0.5rem;
}

.theme-toggle-btn:hover {
    background-color: var(--surface-color);
    transform: rotate(15deg);
}

/* Language Switcher */
.lang-switcher {
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    background: white;
    font-size: 0.875rem;
    cursor: pointer;
}

/* Hero Section - Redeveloped */
.hero {
    padding-block: 4rem 4rem;
    /* Reduced top padding as header is sticky */
    background: transparent;
    /* Removed bg image */
    overflow: hidden;
    /* For blobs extending out */
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    z-index: 2;
}

.hero h1 {
    color: var(--secondary-color);
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero p {
    color: var(--text-light);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* Organic Visuals */
.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blob-backdrop {
    position: absolute;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle at center, rgba(0, 140, 69, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.blob-image {
    position: absolute;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 4px solid white;
    transition: transform 0.5s ease;
}

.blob-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blob-image:hover {
    transform: scale(1.02);
}

.main-blob {
    width: 400px;
    height: 400px;
    top: 0;
    right: 0;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    z-index: 1;
    animation: morph 8s ease-in-out infinite;
}

.sec-blob {
    width: 220px;
    height: 220px;
    bottom: 20px;
    left: 20px;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    z-index: 2;
    animation: morph 10s ease-in-out infinite reverse;
}

.floating-badge {
    position: absolute;
    background: white;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 3;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.875rem;
    top: 15%;
    left: 0;
    animation: float 4s ease-in-out infinite;
}

.floating-badge i {
    color: var(--accent-color);
}

@keyframes morph {
    0% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }

    33% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    66% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Features/Services */
.service-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    border: 1px solid var(--border-color);
}

/* Project Showcase */
.project-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
}

.project-content {
    background: var(--card-bg);
    padding: 1.5rem;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input,
textarea,
select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: inherit;
    width: 100%;
}

input:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    border-color: transparent;
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: white;
    padding-block: 4rem 2rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-links a {
    display: block;
    color: #e2e8f0;
    margin-bottom: 0.75rem;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    color: #cbd5e1;
}

/* Responsive */
/* Responsive */
@media (max-width: 900px) {
    .nav-links {
        display: none;
        /* Hidden by default */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 2rem;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 20px 20px;
        gap: 1.5rem;
        text-align: center;
        border: 1px solid rgba(255, 255, 255, 0.2);
        animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
        /* Show on mobile */
        border: none;
        background: none;
        font-size: 1.5rem;
        color: var(--text-color);
        cursor: pointer;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-visual {
        height: 400px;
        margin-top: 2rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-text-content {
        order: 1;
    }

    .hero-visual-scene {
        order: 2;
    }

    .btn-glow {
        max-width: 100%;
        justify-content: center;
    }

    .main-blob {
        width: 300px;
        height: 300px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        top: 20px;
    }

    .sec-blob {
        width: 160px;
        height: 160px;
        left: 10%;
        bottom: 40px;
    }

    .flex {
        justify-content: center;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .services-layout-3col {
        grid-template-columns: 1fr;
    }

    .battery-center-wrapper {
        order: -1;
        /* Show battery first on mobile or hide it? */
        display: none;
        /* Hide sticky battery on mobile for simplicity, or keep if requested. Let's hide it to clean up UI */
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RTL Specific adjustments for blobs */
[dir="rtl"] .main-blob {
    left: 0;
    right: auto;
}

[dir="rtl"] .sec-blob {
    right: 20px;
    left: auto;
}

/* Milestones Section Styles */
.milestone-carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.milestone-viewport {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding-block: 1rem;
    /* Space for shadows */
}

.milestone-track {
    display: flex;
    gap: 2rem;
    transition: transform 0.5s ease-in-out;
    width: max-content;
    /* Important for flex items to sit side by side */
}

.milestone-card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    min-width: 250px;
    width: 250px;
    box-shadow: var(--shadow-md);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s;
    border: 1px solid var(--border-color);
}

.milestone-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.m-stat {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    -webkit-background-clip: text;
    background-clip: text;
    /* Fix lint error */
    -webkit-text-fill-color: transparent;
}

.m-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.m-nav-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    color: var(--text-color);
    flex-shrink: 0;
    z-index: 5;
}

.m-nav-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.m-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.m-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.m-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
    width: 24px;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .milestone-card {
        min-width: 100%;
        /* Full width on mobile */
        width: 100%;
    }

    .milestone-track {
        gap: 0;
        /* No gap logic for 100% width sliding usually simpler */
    }

    /* Adjust JS logic gap to 0 if needed, or keeping it and letting CSS handle spacing is fine. 
       The JS assumes 32px gap. If we want 1 slide mobile, let's keep gap but fit 1.
    */
}

@media (min-width: 901px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* RTL Support - Using Logic Properties largely handles this, but ensuring text direction */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

/* Process Styles Fixed */

/* Process Section */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.process-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.process-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.process-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-md);
}

/* FAQ Section */
.faq-grid {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
}

.faq-item details {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.faq-item summary {
    padding: 1rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--heading-color);
    list-style: none;
    position: relative;
    padding-right: 3rem;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 400;
}

.faq-item details[open] summary::after {
    content: '-';
}

.faq-item details[open] {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.faq-item p {
    padding: 0 1rem 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
    padding-top: 1rem;
    line-height: 1.6;
}

[dir="rtl"] .faq-item summary {
    padding-right: 1rem;
    padding-left: 3rem;
}

[dir="rtl"] .faq-item summary::after {
    right: auto;
    left: 1.5rem;
}


/* Partners Section */
.partners-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    align-items: center;
    opacity: 0.7;
}

/* =========================================
   ADVANCED HERO SECTION 
   ========================================= */
.advanced-hero {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    /* CHANGE #1: Light Gradient Background */
    background: linear-gradient(180deg, #F8FAFC 0%, #FFF9F0 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    padding-top: 4rem;
    /* Navigate spacing */
    color: white;
}

/* Soft Blobs Background */
.blob-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.6;
}

.blob-1 {
    top: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: #E3F2FD;
    /* Light Blue */
    animation: blob-float 20s infinite alternate;
}

.blob-2 {
    bottom: -10%;
    left: -10%;
    width: 700px;
    height: 500px;
    background: #E8F5E9;
    /* Pale Green */
    animation: blob-float 25s infinite alternate-reverse;
}

.blob-3 {
    top: 40%;
    left: 20%;
    width: 300px;
    height: 300px;
    background: #FFF3E0;
    /* Warm */
    opacity: 0.4;
    animation: blob-float 18s infinite alternate;
}

@keyframes blob-float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 40px);
    }
}

.hero-container-adv {
    /* Reference style: centered layout */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    width: 100%;
    padding-top: 3rem;
}

/* --- Centered Content (Reference Style) --- */
.hero-text-content {
    max-width: 800px;
    margin: 0 auto 3rem;
    position: relative;
    z-index: 10;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    color: #10B981;
    margin-bottom: 1.5rem;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.hero-text-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: #2C3E50;
}

.text-gradient {
    /* Reference style: Green gradient */
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text-content p {
    font-size: 1.1rem;
    color: #64748B;
    margin-bottom: 2.5rem;
    line-height: 1.7;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta-group {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 4rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-glow {
    /* Reference style: Green button */
    background: #10B981;
    color: white;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-glow:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-transparent {
    /* Reference style: Outlined button */
    background: transparent;
    color: #475569;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid #CBD5E1;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-transparent:hover {
    background: #F1F5F9;
    border-color: #94A3B8;
    color: #1E293B;
}

.hero-trust {
    display: none;
    /* Hidden in reference style - content moved to floating cards */
}

/* --- Visual Scene (Reference Style: Bottom Positioned) --- */
.hero-visual-scene {
    position: absolute;
    bottom: -100px;
    /* Pushed down plenty to avoid overlap */
    left: 50%;
    transform: translateX(-50%);
    height: 450px;
    width: 100%;
    max-width: 1200px;
    /* Ensure wide spread for cards */
    z-index: 1;
}

/* Sun Animation */
.sun-container {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    /* CHANGE #4: Sun Above Panels */
    z-index: 100;
}

.the-sun {
    width: 100%;
    height: 100%;
    position: relative;
    animation: sun-rise 3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.sun-core {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, #FDB913, #FF6B00);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 60px rgba(253, 185, 19, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.5);
    animation: sun-pulse 4s infinite ease-in-out;
}

.sun-rays {
    width: 100%;
    height: 100%;
    position: absolute;
    background: repeating-conic-gradient(from 0deg,
            rgba(255, 107, 0, 0) 0deg,
            rgba(255, 107, 0, 0.1) 10deg,
            rgba(255, 107, 0, 0) 20deg);
    animation: sun-spin 20s linear infinite;
    mask: radial-gradient(circle, transparent 30%, black 70%);
    pointer-events: none;
}

.sun-flare {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 400px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 223, 128, 0.2) 0%, transparent 60%);
    pointer-events: none;
}

/* Solar Panels */
.panels-container {
    position: absolute;
    bottom: 50px;
    left: 50%;
    /* CHANGE #3: Make Panels 40% Bigger */
    transform: translateX(-50%) perspective(800px) rotateX(10deg) scale(1.4);
    width: 500px;
    height: 250px;
    /* CHANGE #4: Panels Below Sun */
    z-index: 50;
    display: flex;
    justify-content: center;
    gap: 10px;
    transform-style: preserve-3d;
}

.solar-panel {
    width: 160px;
    height: 240px;
    background: linear-gradient(135deg, #092e50, #041424);
    border: 4px solid #334155;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    transform: rotateX(20deg);
    transition: transform 0.3s ease;
}

.solar-panel:hover {
    transform: rotateX(15deg) translateY(-10px);
    border-color: #3b82f6;
}

.panel-grid {
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
}

.panel-reflection {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: skewX(-20deg);
    animation: panel-shine 5s infinite;
}

/* Floating UI Card */
.hero-floating-card {
    position: absolute;
    bottom: 80px;
    right: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 3;
}

.fc-icon {
    width: 40px;
    height: 40px;
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.fc-content {
    display: flex;
    flex-direction: column;
}

.fc-label {
    font-size: 0.75rem;
    color: #94a3b8;
}

.fc-value {
    font-weight: 700;
    color: white;
}

/* Clouds */
.clouds-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.cloud {
    position: absolute;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0.4;
}

.c1 {
    width: 300px;
    height: 100px;
    top: 10%;
    right: -50px;
    animation: float-cloud 60s infinite linear;
}

.c2 {
    width: 400px;
    height: 120px;
    top: 20%;
    left: -100px;
    animation: float-cloud 80s infinite linear reverse;
}


/* Animations Keyframes */
@keyframes sun-rise {
    0% {
        top: 100%;
        opacity: 0;
        transform: scale(0.5);
    }

    100% {
        top: 10%;
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes sun-pulse {

    0%,
    100% {
        box-shadow: 0 0 60px rgba(253, 185, 19, 0.6);
    }

    50% {
        box-shadow: 0 0 80px rgba(253, 185, 19, 0.8), 0 0 120px rgba(255, 107, 0, 0.4);
    }
}

@keyframes sun-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes panel-shine {
    0% {
        transform: translateX(-100%) skewX(-20deg);
    }

    50%,
    100% {
        transform: translateX(100%) skewX(-20deg);
    }
}

@keyframes float-cloud {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(100px);
    }
}

@keyframes float-anim {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.float-anim {
    animation: float-anim 4s ease-in-out infinite;
}

/* On-Enter Animations */
.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    animation: fade-in-enter 0.8s forwards ease-out;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fade-in-enter 0.8s forwards ease-out;
}

@keyframes fade-in-enter {
    to {
        opacity: 1;
        transform: translate(0);
    }
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

/* Responsive - Tablet & Mobile (Reference Design) */
@media (max-width: 992px) {

    /* Hero Section - Dark Starry Background */
    .advanced-hero {
        min-height: 100vh;
        background: linear-gradient(180deg, #0a0e1a 0%, #1a1f2e 50%, #0a0e1a 100%);
        position: relative;
        overflow: hidden;
        padding: 2rem 0 3rem;
    }

    /* Starry Background Effect */
    .advanced-hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image:
            radial-gradient(2px 2px at 20% 30%, white, transparent),
            radial-gradient(2px 2px at 60% 70%, white, transparent),
            radial-gradient(1px 1px at 50% 50%, white, transparent),
            radial-gradient(1px 1px at 80% 10%, white, transparent),
            radial-gradient(2px 2px at 90% 60%, white, transparent),
            radial-gradient(1px 1px at 33% 80%, white, transparent),
            radial-gradient(1px 1px at 15% 90%, white, transparent);
        background-size: 200% 200%;
        background-position: 0% 0%;
        opacity: 0.5;
        z-index: 1;
        pointer-events: none;
    }

    /* Hide default background elements */
    .hero-bg-overlay,
    .sky-gradient {
        display: none;
    }

    /* Container - Centered Vertical Layout */
    .hero-container-adv {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        text-align: center;
        min-height: calc(100vh - 4rem);
        padding: 2rem 1rem;
        position: relative;
        z-index: 2;
    }

    /* Text Content - Top Section */
    .hero-text-content {
        max-width: 100%;
        padding: 0 1.5rem;
        margin-bottom: 2rem;
        position: relative;
        z-index: 10;
    }

    /* Badge - Compact with Icon */
    .hero-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        padding: 0.5rem 1rem;
        border-radius: 50px;
        font-size: 0.875rem;
        color: #ffffff;
        margin-bottom: 1.5rem;
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }

    .hero-badge i {
        color: #F59E0B;
        font-size: 1rem;
    }

    /* Headline - Bold White with Golden Accent */
    .hero-text-content h1 {
        font-size: 2.25rem;
        line-height: 1.2;
        margin-bottom: 1.5rem;
        font-weight: 700;
        color: #ffffff;
    }

    /* Golden Gradient Text */
    .text-gradient {
        background: linear-gradient(135deg, #F59E0B 0%, #D97706 50%, #F59E0B 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        display: block;
    }

    /* Supporting Text - White */
    .hero-text-content p {
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.9);
        margin-bottom: 2rem;
        line-height: 1.6;
        max-width: 100%;
    }

    /* Hide default CTA group */
    .hero-cta-group {
        display: none;
    }

    /* Visual Scene - Center with Sun and Panels */
    .hero-visual-scene {
        position: relative;
        width: 100%;
        max-width: 500px;
        height: 400px;
        margin: 2rem auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 5;
    }

    /* Sun - Large and Glowing */
    .sun-container {
        position: absolute;
        top: 20%;
        left: 50%;
        transform: translateX(-50%);
        width: 200px;
        height: 200px;
        z-index: 10;
    }

    .sun-core {
        width: 100%;
        height: 100%;
        background: radial-gradient(circle, #FDB813 0%, #F59E0B 40%, #D97706 70%, transparent 100%);
        border-radius: 50%;
        box-shadow:
            0 0 60px rgba(251, 191, 36, 0.8),
            0 0 100px rgba(251, 191, 36, 0.6),
            0 0 140px rgba(251, 191, 36, 0.4),
            inset 0 0 40px rgba(255, 255, 255, 0.3);
        animation: sun-pulse 3s ease-in-out infinite;
    }

    @keyframes sun-pulse {

        0%,
        100% {
            transform: scale(1);
            box-shadow:
                0 0 60px rgba(251, 191, 36, 0.8),
                0 0 100px rgba(251, 191, 36, 0.6),
                0 0 140px rgba(251, 191, 36, 0.4);
        }

        50% {
            transform: scale(1.05);
            box-shadow:
                0 0 80px rgba(251, 191, 36, 0.9),
                0 0 120px rgba(251, 191, 36, 0.7),
                0 0 160px rgba(251, 191, 36, 0.5);
        }
    }

    /* Sun Rays - Enhanced */
    .sun-rays {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 300px;
        height: 300px;
        background:
            linear-gradient(0deg, transparent 40%, rgba(251, 191, 36, 0.3) 50%, transparent 60%),
            linear-gradient(45deg, transparent 40%, rgba(251, 191, 36, 0.3) 50%, transparent 60%),
            linear-gradient(90deg, transparent 40%, rgba(251, 191, 36, 0.3) 50%, transparent 60%),
            linear-gradient(135deg, transparent 40%, rgba(251, 191, 36, 0.3) 50%, transparent 60%);
        animation: sun-rays-rotate 20s linear infinite;
    }

    @keyframes sun-rays-rotate {
        from {
            transform: translate(-50%, -50%) rotate(0deg);
        }

        to {
            transform: translate(-50%, -50%) rotate(360deg);
        }
    }

    .sun-flare {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 250px;
        height: 250px;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
        animation: flare-pulse 2s ease-in-out infinite alternate;
    }

    @keyframes flare-pulse {
        from {
            opacity: 0.3;
        }

        to {
            opacity: 0.6;
        }
    }

    /* Solar Panels - 3D Perspective */
    .panels-container {
        position: absolute;
        bottom: 10%;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-width: 380px;
        height: 180px;
        display: flex;
        justify-content: center;
        align-items: flex-end;
        gap: 12px;
        perspective: 1000px;
        z-index: 8;
    }

    .solar-panel {
        width: 110px;
        height: 170px;
        background: linear-gradient(135deg, #1e3a5f 0%, #0f1f3a 100%);
        border: 2px solid rgba(59, 130, 246, 0.3);
        border-radius: 8px;
        position: relative;
        transform-style: preserve-3d;
        box-shadow:
            0 20px 40px rgba(0, 0, 0, 0.5),
            inset 0 0 20px rgba(59, 130, 246, 0.1);
    }

    /* Panel positioning for 3D effect */
    .solar-panel.p1 {
        transform: rotateY(-15deg) rotateX(25deg);
    }

    .solar-panel.p2 {
        transform: rotateX(25deg) translateY(-10px);
        z-index: 2;
    }

    .solar-panel.p3 {
        transform: rotateY(15deg) rotateX(25deg);
    }

    /* Panel Grid */
    .panel-grid {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image:
            repeating-linear-gradient(0deg, transparent, transparent 18px, rgba(59, 130, 246, 0.2) 18px, rgba(59, 130, 246, 0.2) 20px),
            repeating-linear-gradient(90deg, transparent, transparent 18px, rgba(59, 130, 246, 0.2) 18px, rgba(59, 130, 246, 0.2) 20px);
        border-radius: 6px;
    }

    /* Panel Reflection/Glow */
    .panel-reflection {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg,
                rgba(251, 191, 36, 0.3) 0%,
                transparent 30%,
                transparent 70%,
                rgba(59, 130, 246, 0.2) 100%);
        border-radius: 6px;
        animation: panel-shimmer 3s ease-in-out infinite;
    }

    @keyframes panel-shimmer {

        0%,
        100% {
            opacity: 0.5;
        }

        50% {
            opacity: 0.8;
        }
    }

    /* Single CTA Button at Bottom */
    .advanced-hero::after {
        content: 'SAVE UP TO 40%';
        position: absolute;
        bottom: 3rem;
        left: 50%;
        transform: translateX(-50%);
        background: linear-gradient(135deg, #10B981 0%, #059669 100%);
        color: white;
        padding: 1rem 3rem;
        border-radius: 50px;
        font-weight: 700;
        font-size: 1rem;
        letter-spacing: 0.5px;
        box-shadow:
            0 10px 30px rgba(16, 185, 129, 0.4),
            0 0 40px rgba(16, 185, 129, 0.2);
        z-index: 20;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    /* Hide decorative elements */
    .hero-chip,
    .hero-floating-card,
    .hero-card {
        display: none;
    }

    /* Curved Divider */
    .hero-curved-divider {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 1;
    }

    .hero-curved-divider svg {
        display: block;
        width: 100%;
        height: 80px;
    }

    .shape-fill {
        fill: var(--background-color, #ffffff);
    }
}

/* Mobile Specific - Extra Refinements */
@media (max-width: 768px) {
    .advanced-hero {
        min-height: 100vh;
    }

    .hero-container-adv {
        padding: 1.5rem 1rem;
    }

    .hero-text-content {
        padding: 0 1rem;
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.9rem;
    }

    .hero-text-content h1 {
        font-size: 1.85rem;
    }

    .hero-text-content p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .hero-visual-scene {
        height: 350px;
        margin: 1.5rem auto;
    }

    .sun-container {
        width: 160px;
        height: 160px;
        top: 15%;
    }

    .sun-rays {
        width: 250px;
        height: 250px;
    }

    .sun-flare {
        width: 200px;
        height: 200px;
    }

    .panels-container {
        max-width: 320px;
        height: 150px;
        gap: 10px;
    }

    .solar-panel {
        width: 90px;
        height: 140px;
    }

    .advanced-hero::after {
        bottom: 2rem;
        padding: 0.9rem 2.5rem;
        font-size: 0.95rem;
    }
}


/* --- Floating Cards (Reference Style) --- */
.hero-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    z-index: 120;
    /* Above everything */
    display: flex;
    flex-direction: column;
    min-width: 150px;
    pointer-events: none;
}

.card-left {
    top: 50%;
    /* Moved down */
    left: 5%;
    /* Pushed outward */
    transform: translateY(-50%);
    align-items: center;
    text-align: center;
}

.card-right {
    top: 45%;
    /* Moved down */
    right: 5%;
    /* Pushed outward */
    transform: translateY(-50%);
    align-items: flex-start;
}

.card-big-num {
    font-size: 3rem;
    font-weight: 700;
    color: #1E293B;
    line-height: 1;
    position: relative;
    display: flex;
    align-items: flex-start;
}

.card-small-text {
    font-size: 0.8rem;
    color: #10B981;
    /* Green accent */
    margin-left: 2px;
    margin-top: 5px;
    font-weight: 600;
}

.card-desc {
    font-size: 0.8rem;
    color: #64748B;
    margin-top: 0.5rem;
    max-width: 100px;
    line-height: 1.3;
}

.card-label {
    font-size: 0.85rem;
    color: #64748B;
    margin-bottom: 0.5rem;
}

.card-avatars {
    display: flex;
    margin-bottom: 0.5rem;
}

.c-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -10px;
    background-size: cover;
}

.c-avatar:first-child {
    margin-left: 0;
}

.card-stat {
    font-size: 1.5rem;
    font-weight: 700;
    color: #10B981;
}

/* Floating Chips */
.hero-chip {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 110;
}

.hero-chip i {
    color: #10B981;
}

.chip-1 {
    bottom: 30%;
    /* Lowered */
    left: 20%;
    /* Adjusted */
}

.chip-2 {
    top: 10%;
    right: 20%;
    /* Adjusted */
}

/* Float Animations */
.float-anim-1 {
    animation: float-y 6s ease-in-out infinite;
}

.float-anim-2 {
    animation: float-y 7s ease-in-out infinite reverse;
}

.float-anim-3 {
    animation: float-y 5s ease-in-out infinite 1s;
}

.float-anim-4 {
    animation: float-y 8s ease-in-out infinite 0.5s;
}

@keyframes float-y {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@media (max-width: 1024px) {

    .card-left,
    .card-right,
    .hero-chip {
        display: none;
        /* Hide floating elements on smaller screens */
    }
}

/* Comparison List */
.comparison-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comparison-list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.comparison-list i {
    background: rgba(248, 142, 2, 0.1);
    padding: 0.5rem;
    border-radius: 50%;
    margin-top: 0.25rem;
}

/* Calculator Section Styles */
.result-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.result-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

.res-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--heading-color);
    margin-top: 0.5rem;
}

/* Custom Range Slider */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    margin-top: -8px;
    box-shadow: var(--shadow-sm);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: var(--border-color);
    border-radius: 2px;
}

/* Firefox support */
input[type=range]::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border: none;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

input[type=range]::-moz-range-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: var(--border-color);
    border-radius: 2px;
}

/* --- Navigation Gift Icon --- */
.nav-gift-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    background: rgba(248, 142, 2, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    margin-left: 1rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-gift-trigger:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.nav-gift-trigger:hover .gift-badge {
    color: white;
}

.gift-icon {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.nav-gift-trigger:hover .gift-icon {
    color: white;
}

.pulse-animation {
    animation: pulse-shake 5s infinite;
}

@keyframes pulse-shake {
    0% {
        transform: scale(1);
        rotate: 0deg;
    }

    2% {
        transform: scale(1.2) rotate(-10deg);
    }

    4% {
        transform: scale(1.2) rotate(10deg);
    }

    6% {
        transform: scale(1.2) rotate(-10deg);
    }

    8% {
        transform: scale(1);
        rotate: 0deg;
    }

    100% {
        transform: scale(1);
    }
}

.gift-badge {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--heading-color);
    text-transform: uppercase;
}

/* --- Resources Page Styles --- */
.resource-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.res-icon-box {
    width: 5rem;
    height: 5rem;
    background: rgba(248, 142, 2, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

/* --- Lead Magnet Modal (Glassmorphism) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* =========================================
   CHANGE #2: Transparent Navigation (Refined Light Theme)
   ========================================= */
header {
    background: rgba(255, 255, 255, 0.6) !important;
    /* Lighter transparency */
    backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    /* All sides border */
    border-radius: 50px;
    margin-top: 1rem;
    width: 90%;
    max-width: 1200px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, margin-top 0.3s ease;
    padding-block: 0.5rem;
}

header.hide-nav {
    transform: translate(-50%, -150%);
    margin-top: 0;
}

/* Ensure nav text is dark for light background */
nav ul li a {
    color: #334155 !important;
    font-weight: 600;
}

nav ul li a:hover {
    color: #10B981 !important;
}

.logo span {
    color: #1E293B !important;
}

/* Adjust contact button in nav */
.btn-primary {
    background: #1E293B !important;
    color: white !important;
    border-radius: 50px !important;
}

/* Make Free Solar Kit Badge Light Friendly */
.gift-icon {
    background: #FFF3E0 !important;
    color: #E65100 !important;
    border: 1px solid #FFCC80 !important;
}

.hero-bottom-slant svg {
    width: 100%;
    height: 100%;
    display: block;
}

.slant-line {
    stroke-linecap: round;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
    /* Glow effect */
    animation: pulse-line 3s infinite alternate;
}

@keyframes pulse-line {
    from {
        filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.4));
        opacity: 0.8;
    }

    to {
        filter: drop-shadow(0 0 12px rgba(14, 165, 233, 0.6));
        opacity: 1;
    }
}

/* Adjust Content Spacing */
.hero-container-adv {
    padding-bottom: 4rem;
    /* Lift content away from slant */
}

/* Responsive adjustments for slant */
@media (max-width: 768px) {
    .hero-bottom-slant {
        height: 10vw;
        /* Steeper/Taller on mobile to be visible */
    }
}


.modal-glass {
    background: rgba(255, 255, 255, 0.95);
    width: 90%;
    max-width: 900px;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] .modal-glass {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-overlay.active .modal-glass {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    z-index: 10;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
}

@media (max-width: 768px) {
    .modal-grid {
        grid-template-columns: 1fr;
    }

    .modal-visual {
        display: none;
        /* Hide visual on small mobile to save space, or reduce height */
    }
}

.modal-visual {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.modal-form-content {
    padding: 3rem;
}

/* CSS 3D Book Mockup */
.book-container {
    perspective: 1000px;
}

.book {
    width: 200px;
    height: 300px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateY(-25deg) rotateX(10deg);
    box-shadow: 20px 20px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.5s ease;
}

.book:hover {
    transform: rotateY(-15deg) rotateX(5deg);
}

.book-cover {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), #d35400);
    border-radius: 2px 5px 5px 2px;
    transform: translateZ(25px);
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.book-content {
    border: 2px solid white;
    height: 100%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.book-spine {
    position: absolute;
    width: 50px;
    height: 100%;
    background: #a04000;
    transform: rotateY(-90deg) translateZ(25px);
}

.book-pages {
    position: absolute;
    width: 48px;
    height: 96%;
    top: 2%;
    background: white;
    transform: rotateY(-90deg) translateZ(24px) translateX(2px);
    box-shadow: inset 5px 0 10px rgba(0, 0, 0, 0.1);
}

/* Form Styles Override */
.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.4rem;
    display: block;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--background-color);
    color: var(--text-color);
    margin-bottom: 1rem;
}

/* =========================================
   CHANGE #2: Transparent Navigation (Refined Light Theme - FORCE FIX)
   ========================================= */
header,
header.nav-transparent {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 50px !important;
    margin-top: 1.5rem !important;
    width: 90% !important;
    max-width: 1200px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05) !important;
    padding-block: 0.8rem !important;
}

header.hide-nav {
    transform: translate(-50%, -150%) !important;
}

/* Ensure ALL text in nav is dark */
nav ul li a,
header a,
.logo span {
    color: #1E293B !important;
    text-shadow: none !important;
    font-weight: 600 !important;
}

/* Specific fix for contact button inside nav */
header .btn-primary,
header .btn {
    background: #1E293B !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.2) !important;
}

/* Make Free Solar Kit Badge Light Friendly */
.gift-icon {
    background: #FFF3E0 !important;
    color: #E65100 !important;
    border: 1px solid #FFCC80 !important;
}

/* Floating Cards - Push to Edges (Force) */
.card-left {
    left: 2vw !important;
    top: 55% !important;
    transform: translateY(-50%);
}

.card-right {
    right: 2vw !important;
    top: 50% !important;
    transform: translateY(-50%);
}

/* Visual Scene Final Nudge */
.hero-visual-scene {
    bottom: -150px !important;
    /* Maximum clearance */
}

/* --- FINAL VISUAL FIXES --- */
body,
html {
    background: #F8FAFC !important;
    overflow-x: hidden;
}

.hero-bg-overlay,
.sky-gradient {
    display: none !important;
    background: none !important;
    opacity: 0 !important;
}

.advanced-hero {
    background: linear-gradient(180deg, #F8FAFC 0%, #FFF9F0 100%) !important;
}

/* REVERT TO ADVANCED HERO LAYOUT */
.hero-container-adv {
    display: grid !important;
    grid-template-columns: 1.2fr 1fr !important;
    text-align: left !important;
}

.hero-text-content {
    text-align: left !important;
    padding-right: 2rem !important;
    margin: 0 !important;
}

.hero-cta-group {
    justify-content: flex-start !important;
}

.hero-visual-scene {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    height: 500px !important;
    top: auto !important;
    right: auto !important;
    display: flex !important;
    justify-content: center !important;
}

.blob-shape {
    display: none !important;
}

.hero-trust {
    display: flex !important;
}

.btn-glow {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    box-shadow: 0 10px 30px rgba(234, 88, 12, 0.4) !important;
    color: white !important;
}

.btn-transparent {
    border: 1px solid #CBD5E1 !important;
    color: #475569 !important;
    background: transparent !important;
}

.text-gradient {
    background: linear-gradient(135deg, #FFD700 0%, #FF8C00 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.hero-badge {
    color: #FFD700 !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* FIX NAVIGATION BAR (Transparent, Full Width) */
header {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    transform: none !important;
    transition: transform 0.3s ease !important;
    margin-top: 0 !important;
    border-radius: 0 !important;
    padding-block: 1.5rem !important;
}

header.hide-nav {
    transform: translateY(-100%) !important;
}

nav ul li a,
.logo span,
.header-actions i {
    color: #1e293b !important;
}

.btn-primary {
    background: #f97316 !important;
    color: white !important;
}

/* FIX INNER NAV CONTAINER */
header .container,
header>div {
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    width: 100% !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 1rem 2rem !important;
    backdrop-filter: none !important;
    border: none !important;
}

/* FORCE HEADER BUTTON ORANGE */
header .btn-primary,
header .btn {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    border: none !important;
    color: white !important;
}

/* =========================================
   MODERN ABOUT SECTION
   ========================================= */
.about-modern {
    padding: 6rem 0;
    background: #FAFBFC;
    position: relative;
    overflow: hidden;
}

.about-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.3;
    z-index: 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.about-content {
    padding-right: 2rem;
}

.about-label {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #10B981;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s ease-out;
}

.about-headline {
    font-size: 3rem;
    line-height: 1.2;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out 0.2s;
}

.about-text {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out 0.4s;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out 0.6s;
}

.stat-item {
    position: relative;
    padding-left: 1rem;
    border-left: 3px solid #10B981;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #10B981;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.about-cta {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out 0.8s;
}

.about-visual {
    position: relative;
    opacity: 0;
    transform: translateX(50px);
    transition: all 1s ease-out 0.3s;
}

.visual-image-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s ease;
}

.visual-image-wrapper:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.02);
}

.visual-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.floating-card {
    position: absolute;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 2;
    animation: float-card 6s ease-in-out infinite;
}

.fc-1 {
    top: 10%;
    right: -20px;
    animation-delay: 0s;
}

.fc-2 {
    bottom: 15%;
    left: -30px;
    animation-delay: 2s;
}

.fc-icon {
    width: 40px;
    height: 40px;
    background: #ECFDF5;
    color: #10B981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.fc-text strong {
    display: block;
    font-size: 0.875rem;
    color: #1e293b;
}

.fc-text span {
    font-size: 0.75rem;
    color: #64748b;
}

/* Calculator Card Box */
.calc-form-card {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

[data-theme='dark'] .calc-form-card {
    background-color: var(--surface-color);
    /* Darker blue card in dark mode */
    border-color: rgba(255, 255, 255, 0.05);
}

@keyframes float-card {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.about-modern.animate-in .about-label,
.about-modern.animate-in .about-headline,
.about-modern.animate-in .about-text,
.about-modern.animate-in .about-stats,
.about-modern.animate-in .about-cta,
.about-modern.animate-in .about-visual {
    opacity: 1;
    transform: translate(0);
}

@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-content {
        padding-right: 0;
        text-align: center;
    }

    .about-stats {
        justify-content: center;
        text-align: left;
        max-width: 500px;
        margin: 0 auto 2.5rem;
    }

    .visual-image-wrapper {
        transform: none;
    }

    .floating-card {
        display: none;
    }
}

/* =========================================
   BILINGUAL & RTL SUPPORT
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&family=Tajawal:wght@400;500;700&display=swap');

[lang='ar'] body {
    font-family: 'Tajawal', 'Cairo', sans-serif;
}

[lang='ar'] h1,
[lang='ar'] h2,
[lang='ar'] h3,
[lang='ar'] .btn {
    font-family: 'Cairo', sans-serif;
}

/* RTL Base Overrides */
[dir='rtl'] {
    text-align: right;
    direction: rtl;
}

/* RTL Navigation */
[dir='rtl'] .logo {
    margin-right: 0;
    margin-left: auto;
}

[dir='rtl'] .nav-links {
    margin-right: auto;
    margin-left: 0;
}

[dir='rtl'] .nav-links a {
    margin-left: 1.5rem;
    margin-right: 0;
}

[dir='rtl'] .header-actions {
    margin-right: 1.5rem;
    margin-left: 0;
}

/* RTL Hero Section */
[dir='rtl'] .hero-text-content {
    text-align: right !important;
    padding-right: 0 !important;
    padding-left: 2rem !important;
}

[dir='rtl'] .hero-cta-group {
    justify-content: flex-start !important;
    flex-direction: row-reverse;
}

[dir='rtl'] .hero-badge {
    flex-direction: row-reverse;
}

/* RTL About Section */
[dir='rtl'] .about-grid {
    grid-template-columns: 1fr 1fr;
}

[dir='rtl'] .about-content {
    padding-right: 0;
    padding-left: 2rem;
    text-align: right;
}

[dir='rtl'] .stat-item {
    padding-left: 0;
    padding-right: 1rem;
    border-left: none;
    border-right: 3px solid #10B981;
}

[dir='rtl'] .about-label {
    transform: translateX(20px);
}

[dir='rtl'] .about-modern.animate-in .about-label {
    transform: translateX(0);
}

/* RTL Visuals */
[dir='rtl'] .visual-image-wrapper {
    transform: perspective(1000px) rotateY(5deg);
}

[dir='rtl'] .visual-image-wrapper:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.02);
}

[dir='rtl'] .floating-card {
    flex-direction: row-reverse;
}

[dir='rtl'] .fc-1 {
    right: auto;
    left: -20px;
}

[dir='rtl'] .fc-2 {
    left: auto;
    right: -30px;
}

/* RTL Icons */
[dir='rtl'] .fa-arrow-right:before {
    content: '\f060';
}

/* Flip arrow to point left */
[dir='rtl'] .btn i {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* Mobile RTL */
@media (max-width: 992px) {
    [dir='rtl'] .about-content {
        padding-left: 0;
        text-align: center;
    }

    [dir='rtl'] .about-stats {
        text-align: right;
    }

    [dir='rtl'] .mobile-menu-btn {
        margin-right: auto;
        margin-left: 0;
    }
}

/* RE-ADD FLOATING CARDS FOR HERO */
.hero-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    z-index: 10;
    display: flex;
    flex-direction: column;
    min-width: 160px;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.card-left {
    top: 20%;
    left: -50px;
}

.card-right {
    bottom: 20%;
    right: -30px;
}

.hero-chip {
    position: absolute;
    background: #10B981;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
    z-index: 9;
}

.chip-1 {
    top: 10%;
    right: 20%;
}

.chip-2 {
    bottom: 10%;
    left: 10%;
    background: #F59E0B;
}

.card-big-num {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
}

.card-small-text {
    font-size: 0.9rem;
    font-weight: normal;
    color: #64748b;
    margin-left: 5px;
}

.card-desc {
    font-size: 0.8rem;
    color: #64748b;
}

.card-label {
    font-size: 0.9rem;
    color: #64748b;
}

.card-stat {
    font-size: 1.8rem;
    font-weight: 800;
    color: #10B981;
}

/* RTL Adjustment for Cards */
[dir='rtl'] .card-left {
    left: auto;
    right: -50px;
}

[dir='rtl'] .card-right {
    right: auto;
    left: -30px;
}

[dir='rtl'] .chip-1 {
    right: auto;
    left: 20%;
}

[dir='rtl'] .chip-2 {
    left: auto;
    right: 10%;
}

/* URGENT HERO CLEANUP FIX */
.advanced-hero {
    background: linear-gradient(180deg, #F8FAFC 0%, #FFF9F0 100%) !important;
    position: relative;
    z-index: 1;
}

.hero-bg-overlay,
.sky-gradient,
.blob-shape,
.blob-1,
.blob-2,
.blob-3 {
    display: none !important;
    background: none !important;
    opacity: 0 !important;
}

.hero-visual-scene {
    background: transparent !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
}

.solar-panels,
.sun-container,
.the-sun {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 20 !important;
}

/* REMOVE INTERFERING BACKGROUND ELEMENTS */
.hero-chip {
    display: none !important;
}

.hero-card {
    z-index: 30 !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
}

/* MOVE FLOATING ELEMENTS TO FRONT */
.hero-chip {
    display: flex !important;
    z-index: 50 !important;
}

.hero-card {
    z-index: 50 !important;
}

/* Ensure they don't block interaction */
.hero-chip,
.hero-card {
    pointer-events: auto;
}

/* RESIZE HERO CHIP SMALL */
.hero-chip {
    width: max-content !important;
    padding: 0.3rem 0.8rem !important;
    font-size: 0.75rem !important;
    height: auto !important;
    border-radius: 50px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 700;
    top: 15% !important;
    right: 25% !important;
}

/* FIX HERO CHIP STRETCH */
.hero-chip,
.chip-1 {
    top: auto !important;
    bottom: 50% !important;
    right: 40% !important;
    left: auto !important;
    height: auto !important;
    min-height: 0 !important;
    width: max-content !important;
    padding: 6px 14px !important;
    font-size: 11px !important;
    border-radius: 99px !important;
    line-height: 1 !important;
    display: inline-flex !important;
}

[dir='rtl'] .hero-chip {
    right: auto !important;
    left: 40% !important;
}

/* SUN TO FRONT & CHIP POSITION */
.sun-container,
.the-sun {
    z-index: 25 !important;
}

.solar-panels {
    z-index: 20 !important;
}

.hero-chip,
.chip-1 {
    bottom: 5% !important;
    right: 50% !important;
    transform: translateX(50%) !important;
    left: auto !important;
    top: auto !important;
}

[dir='rtl'] .hero-chip {
    right: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

/* FIX SUN FRONT AND CHIP */
.sun-container,
.the-sun {
    z-index: 60 !important;
}

.hero-chip,
.chip-1 {
    z-index: 70 !important;
    bottom: 25% !important;
    right: 10% !important;
    left: auto !important;
    transform: none !important;
}

[dir='rtl'] .hero-chip {
    right: auto !important;
    left: 10% !important;
}

/* LANGUAGE FONTS */
body {
    font-family: 'Inter', system-ui, sans-serif !important;
}

html[lang='ar'] body {
    font-family: 'Tajawal', 'Inter', sans-serif !important;
}

/* CLEANUP FAINT TEXT */
.hero-trust {
    display: none !important;
}

/* ABOUT US - REFERENCE DESIGN */
.about-ref-section {
    padding: 6rem 0;
    background-color: #F8FAFC;
    overflow: hidden;
}

.about-ref-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

@media (max-width: 900px) {
    .about-ref-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

.about-ref-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-right: 2rem;
}

[dir='rtl'] .about-ref-content {
    padding-right: 0;
    padding-left: 2rem;
}

.ref-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #10B981;
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
}

.ref-headline {
    font-size: 3rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.ref-text {
    color: #64748b;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.ref-stats-row {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.ref-stat-item {
    flex: 1;
    min-width: 120px;
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: transform 0.3s ease;
}

.ref-stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.ref-stat-icon {
    font-size: 1.5rem;
    color: #10B981;
    margin-bottom: 0.5rem;
}

.ref-stat-num {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -1px;
}

.ref-stat-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.about-ref-images {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ref-img-large {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    transition: transform 0.5s ease;
}

.ref-img-large:hover {
    transform: scale(1.02);
}

.ref-img-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.ref-img-small {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    transition: transform 0.5s ease;
}

.ref-img-small:hover {
    transform: scale(1.03);
}

.ref-socials {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 2rem;
}

.ref-social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s;
}

.ref-social-link i {
    font-size: 1.25rem;
}

.ref-social-link:hover {
    color: #10B981;
    transform: translateX(5px);
}

[dir='rtl'] .ref-social-link:hover {
    transform: translateX(-5px);
}


/* HERO CURVED DIVIDER */
.hero-curved-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 25;
    pointer-events: none;
}

.hero-curved-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 4px);
    left: -2px;
    height: 80px;
}

.hero-curved-divider .shape-fill {
    fill: #F8FAFC;
}

[data-theme='dark'] .hero-curved-divider .shape-fill {
    fill: #020617;
}

.advanced-hero {
    border-bottom: none !important;
}


/* REDESIGNED ORGANIC CLUSTER */
.organic-cluster {
    position: relative;
    width: 100%;
    height: 500px;
    margin-top: 2rem;
}

.org-item {
    position: absolute;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    transition: all 0.5s ease-out;
    border: 8px solid #F8FAFC;
    /* Match About section bg for seamless cutout */
}

[data-theme='dark'] .org-item {
    border-color: #0f172a;
    /* Dark mode bg match */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.org-item:hover {
    transform: scale(1.03) translateY(-5px);
    z-index: 20;
    box-shadow: 0 35px 60px -15px rgba(0, 0, 0, 0.2);
}

.org-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.org-item:hover img {
    transform: scale(1.1);
}

/* Hand-crafted Organic Shapes */
.main-img {
    width: 58%;
    height: 80%;
    left: 4%;
    top: 8%;
    /* Soft vertical irregular pill */
    border-radius: 45% 55% 70% 30% / 30% 30% 70% 70%;
    z-index: 1;
    animation: float-main 7s ease-in-out infinite;
}

.sub-img-1 {
    /* Solar Panels - Floating Top Right */
    width: 36%;
    height: 36%;
    right: 2%;
    top: 0;
    /* Soft organic circle */
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    z-index: 2;
    animation: float-sub 8s ease-in-out infinite 1.5s;
}

.sub-img-2 {
    /* Inverter - Floating Bottom Right */
    width: 42%;
    height: 42%;
    right: 0;
    bottom: 2%;
    /* Wide blob */
    border-radius: 52% 48% 36% 64% / 61% 55% 45% 39%;
    z-index: 2;
    animation: float-sub 9s ease-in-out infinite 0.5s;
}

/* RTL Overrides for Arabic */
[dir='rtl'] .main-img {
    left: auto;
    right: 4%;
}

[dir='rtl'] .sub-img-1 {
    right: auto;
    left: 2%;
}

[dir='rtl'] .sub-img-2 {
    right: auto;
    left: 0;
}

/* Subtle Animations */
@keyframes float-main {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-12px) rotate(0.5deg);
    }
}

@keyframes float-sub {

    0%,
    100% {
        transform: translateY(0);
    }

}

/* Decorative Elements */
.org-decor {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.decor-star {
    top: -25px;
    left: -15px;
    font-size: 2.2rem;
    color: #F59E0B;
    /* Sun Yellow */
    opacity: 1;
    animation: spin-slow 12s linear infinite;
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.5));
}

[dir='rtl'] .decor-star {
    left: auto;
    right: -15px;
}

@keyframes spin-slow {
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Tweaks */
@media (max-width: 900px) {
    .organic-cluster {
        height: 420px;
    }

    .main-img {
        width: 65%;
        left: 0;
        border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;
    }

    .sub-img-1 {
        width: 40%;
        height: 40%;
        right: 0;
    }

    .sub-img-2 {
        width: 45%;
        height: 45%;
        right: 0;
        bottom: 0;
    }

    /* RTL Mobile */
    [dir='rtl'] .main-img {
        right: 0;
    }

    [dir='rtl'] .sub-img-1 {
        left: 0;
    }

    [dir='rtl'] .sub-img-2 {
        left: 0;
    }
}

/* ENERGY FLOW STORYTELLING */
.energy-flow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.energy-lines {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.energy-line {
    fill: none;
    stroke: #10B981;
    stroke-width: 2px;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 15;
    stroke-dashoffset: 300;
    opacity: 0;
    transition: opacity 1s;
}

.battery-icon {
    position: absolute;
    top: 50%;
    left: 60%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 15;
    color: #10B981;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme='dark'] .battery-icon {
    background: #1e293b;
    color: #34d399;
}

/* RTL Support */
[dir='rtl'] .energy-lines {
    transform: scaleX(-1);
}

[dir='rtl'] .battery-icon {
    left: 40%;
}

/* Animation State */
.organic-cluster.story-active .energy-line {
    animation: flowDash 2s linear infinite;
    opacity: 0.6;
}

.organic-cluster.story-active .battery-icon {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.5);
    animation: batteryPulse 3s infinite ease-in-out;
}

@keyframes flowDash {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes batteryPulse {

    0%,
    100% {
        box-shadow: 0 0 25px rgba(16, 185, 129, 0.5);
    }

    50% {
        box-shadow: 0 0 45px rgba(16, 185, 129, 0.8);
    }
}


/* ENERGY FLOW VISUALS */
.energy-flow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.energy-lines {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.energy-line {
    fill: none;
    stroke: #10B981;
    stroke-width: 3px;
    stroke-dasharray: 10, 10;
    stroke-dashoffset: 100;
    opacity: 0.3;
    transition: opacity 1s;
    filter: drop-shadow(0 0 2px #10B981);
}

.battery-icon {
    position: absolute;
    top: 50%;
    left: 60%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 15;
    color: #10B981;
    background: #ffffff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid #F8FAFC;
}

[data-theme='dark'] .battery-icon {
    background: #1e293b;
    color: #34d399;
    border-color: #0f172a;
}

[dir='rtl'] .energy-lines {
    transform: scaleX(-1);
}

[dir='rtl'] .battery-icon {
    left: 40%;
}

/* Active State */
.organic-cluster.story-active .energy-line {
    animation: flowDash 15s linear infinite;
    opacity: 0.8;
}

.organic-cluster.story-active .battery-icon {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
    animation: batteryPulse 3s infinite ease-in-out;
}

@keyframes flowDash {
    to {
        stroke-dashoffset: -1000;
    }
}

@keyframes batteryPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
    }

    50% {
        box-shadow: 0 0 40px rgba(16, 185, 129, 0.7);
    }
}

/* BATTERY SERVICES VISUALIZATION */
.services-battery-section {
    padding: 5rem 0;
    background: var(--surface-color);
    position: relative;
}

.services-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.battery-visual-sticky {
    position: sticky;
    top: 15vh;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: background 0.3s;
}

.battery-container {
    position: relative;
    width: 140px;
    height: 260px;
}

.battery-cap {
    width: 60px;
    height: 16px;
    background: var(--text-color);
    margin: 0 auto;
    border-radius: 6px 6px 0 0;
    opacity: 0.8;
}

.battery-body {
    width: 100%;
    height: 100%;
    border: 6px solid var(--text-color);
    border-radius: 24px;
    padding: 6px;
    position: relative;
    overflow: hidden;
    background: rgba(125, 125, 125, 0.1);
}

.battery-liquid {
    position: absolute;
    bottom: 6px;
    left: 6px;
    right: 6px;
    height: 5%;
    background: linear-gradient(to top, #059669, #10B981);
    border-radius: 16px;
    transition: height 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
}

.battery-readout {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
    color: var(--text-color);
    font-weight: 800;
    font-size: 2.5rem;
    text-shadow: 0 0 10px var(--surface-color);
    mix-blend-mode: normal;
}

.batt-status-icon {
    font-size: 2rem;
    margin-top: 0.2rem;
    color: #10B981;
    display: none;
}

.battery-caption {
    margin-top: 1.5rem;
    font-weight: 600;
    color: var(--text-light);
    text-align: center;
}

/* Service Cards */
.services-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.service-card {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    align-items: center;
}

.service-card:hover,
.service-card.active {
    transform: translateX(10px);
    border-color: #10B981;
    box-shadow: var(--shadow-md);
}

.service-card.active {
    background: rgba(16, 185, 129, 0.05);
}

.service-icon {
    font-size: 1.8rem;
    color: #10B981;
    width: 64px;
    height: 64px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.service-card:hover .service-icon {
    transform: rotate(10deg) scale(1.1);
}

@media (max-width: 900px) {
    .services-layout {
        grid-template-columns: 1fr;
    }

    .battery-visual-sticky {
        display: none;
    }

    /* Hide on mobile for simplicity per standard */
}

/* BALANCED 3-COL SERVICES LAYOUT */
.services-battery-section {
    background: linear-gradient(135deg, rgba(235, 248, 255, 0.5) 0%, rgba(255, 255, 255, 0.8) 100%);
}

[data-theme='dark'] .services-battery-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.services-layout-3col {
    display: grid;
    grid-template-columns: 1fr 240px 1fr;
    gap: 3rem;
    align-items: start;
    position: relative;
}

.svc-col {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.battery-center-wrapper {
    position: sticky;
    top: 20vh;
    height: fit-content;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    z-index: 10;
}

.battery-center-wrapper .battery-visual-sticky {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.7);
    width: 100%;
    top: 0;
}

[data-theme='dark'] .battery-center-wrapper .battery-visual-sticky {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.05);
}

@media (max-width: 1024px) {
    .services-layout-3col {
        grid-template-columns: 1fr;
    }

    .battery-center-wrapper {
        order: -1;
        position: relative;
        top: 0;
        margin-bottom: 3rem;
    }
}

/* --- FEATURED PROJECTS (MASONRY) --- */
.projects-section {
    background-color: #F8FAFC;
    padding: 60px 20px;
    position: relative;
}

[data-theme='dark'] .projects-section {
    background-color: var(--background-color);
}

.project-header {
    text-align: center;
    margin-bottom: 3rem;
}

.project-label {
    color: #10B981;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}

.project-title {
    font-size: 2.5rem;
    color: var(--heading-color);
    font-weight: 800;
    margin-bottom: 1rem;
}

.project-subtitle {
    font-size: 1.125rem;
    color: var(--text-color);
    max-width: 600px;
    margin: 0 auto;
}

/* FILTERS */
.filter-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: #10B981;
    color: #10B981;
    transform: translateY(-2px);
}

.filter-btn.active {
    background-color: #10B981;
    border-color: #10B981;
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* MASONRY GRID */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    grid-auto-rows: 24px;
}

/* CARD STYLES */
.project-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    z-index: 2;
}

.card-img-holder {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.project-card.h-tall .card-img-holder {
    height: 380px;
}

.project-card.h-medium .card-img-holder {
    height: 240px;
}

.project-card.h-short .card-img-holder {
    height: 160px;
}

.card-img-holder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .card-img-holder img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .card-overlay {
    opacity: 1;
}

.view-btn {
    background: white;
    color: #10B981;
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    font-weight: 600;
    text-decoration: none;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.project-card:hover .view-btn {
    transform: translateY(0);
}

.card-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-tag {
    display: inline-block;
    background: #ECFDF5;
    color: #059669;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 8px;
    align-self: flex-start;
}

[data-theme='dark'] .card-tag {
    background: rgba(16, 185, 129, 0.2);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.card-meta {
    font-size: 0.875rem;
    color: var(--text-color);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: auto;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.meta-item i {
    color: #10B981;
}

/* HEIGHT SPANS (based on 24px rows + 24px gaps approx) */
/* Tall ~580px -> span 20? 20*24=480 + gaps. Let's tune. */
.project-card.h-tall {
    grid-row: span 22;
}

.project-card.h-medium {
    grid-row: span 16;
}

.project-card.h-short {
    grid-row: span 12;
}

/* Load More */
.load-more-container {
    text-align: center;
    margin-top: 3rem;
}

.load-more-btn {
    background: transparent;
    border: 2px solid #10B981;
    color: #10B981;
    padding: 0.875rem 2.5rem;
    font-weight: 600;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background: #10B981;
    color: white;
}

/* ANIMATIONS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .masonry-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        grid-row: auto !important;
        height: auto !important;
    }

    .card-img-holder {
        height: 240px !important;
    }

    .project-title {
        font-size: 2rem;
    }
}

/* REFINED CARD STYLES */
.card-title {
    font-size: 1.35rem;
    margin-bottom: 8px;
    color: #1F2937;
}

.card-detail {
    font-size: 0.875rem;
    color: #6B7280;
    margin-bottom: 8px;
    font-weight: 500;
}

.card-specs {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    display: block;
}

.card-location {
    font-size: 0.8125rem;
    color: #9CA3AF;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
}

.card-location i {
    color: #9CA3AF;
    font-size: 0.75rem;
}

.card-content {
    justify-content: flex-start;
}

.masonry-grid {
    grid-template-rows: masonry;
    align-items: start;
}

/* Note: Firefox only, but fallback is standard grid */
/* --- TIMELINE SLIDER PROJECT SECTION --- */
/* --- TIMELINE SLIDER PROJECT SECTION --- */
.timeline-section {
    background-color: var(--surface-light);
    /* Light in Light Mode */
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
    color: var(--text-color);
}

.timeline-bg {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.timeline-wrapper {
    position: relative;
    z-index: 2;
}

.timeline-header {
    text-align: center;
    margin-bottom: 4rem;
}

.timeline-header h2 {
    font-size: 2.5rem;
    color: var(--heading-color);
    /* Dark in Light Mode */
    margin-bottom: 0.5rem;
}

.timeline-header p {
    color: var(--text-color);
    font-size: 1.1rem;
}

/* Dark Mode Override for Section Background */
[data-theme='dark'] .timeline-section {
    background-color: #0F172A !important;
}

[data-theme='dark'] .timeline-header h2 {
    color: #F8FAFC !important;
}

[data-theme='dark'] .timeline-header p {
    color: #94A3B8 !important;
}

.timeline-track-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-connector-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    /* Thinner line */
    background: linear-gradient(90deg, transparent, #10B981, transparent);
    z-index: 0;
    /* Behind cards */
    transform: translateY(-50%);
    opacity: 0.3;
    /* More subtle */
    pointer-events: none;
    /* Non-blocking */
}

/* Ensure cards are above the line */
.timeline-card {
    z-index: 10;
    background: var(--card-bg);
    /* Opaque background to cover line */
}

[data-theme='dark'] .timeline-card {
    background: #1e293b;
    /* Ensure dark opaque background */
}

.timeline-slider {
    display: flex;
    gap: 40px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 40px 20px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    z-index: 5;
    scrollbar-width: none;
}

.timeline-slider::-webkit-scrollbar {
    display: none;
}

.timeline-card {
    flex: 0 0 300px;
    /* Reduced width */
    scroll-snap-align: center;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    opacity: 0.8;
}

.timeline-card.active {
    transform: scale(1.05);
    opacity: 1;
    border-color: #10B981;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.2);
    z-index: 10;
}

.t-card-image {
    height: 250px;
    width: calc(100% - 1.5rem);
    margin: 0.75rem 0.75rem 0 0.75rem;
    overflow: hidden;
    position: relative;
    border-radius: 50% 50% 0 0 / 30px 30px 0 0;
    /* Arched Top */
}

.t-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.t-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0) 0%, rgba(15, 23, 42, 0.8) 100%);
}

.t-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.t-card-meta {
    color: #94A3B8;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.t-specs {
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: #D1FAE5;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.t-specs span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.t-specs i {
    color: #34D399;
}

.t-btn {
    margin-top: auto;
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    background: transparent;
    border: 1px solid #10B981;
    color: #10B981;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
}

.t-btn:hover {
    background: #10B981;
    color: white;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s;
}

.nav-arrow:hover {
    background: #10B981;
    border-color: #10B981;
}

.prev-arrow {
    left: -20px;
}

.next-arrow {
    right: -20px;
}

@media (max-width: 768px) {
    .nav-arrow {
        display: none;
    }

    .timeline-card {
        flex: 0 0 75%;
        /* Reduced from 85% */
    }
}

/* --- HOVER INTERACTION FOR TIMELINE --- */
.timeline-slider:hover .timeline-card {
    opacity: 0.4;
    transform: scale(0.9) !important;
    /* Override active state */
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
    filter: blur(1px);
    /* Subtle focus effect */
}

.timeline-slider .timeline-card:hover {
    opacity: 1;
    transform: scale(1.1) !important;
    border-color: #10B981 !important;
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.4) !important;
    z-index: 50;
    filter: blur(0);
    cursor: pointer;
}

/* --- TESTIMONIALS SECTION --- */
.testimonials-section {
    background-color: #0B1120;
    padding: 5rem 1rem;
    position: relative;
    overflow: hidden;
}

.testimonial-header {
    text-align: center;
    margin-bottom: 4rem;
    z-index: 2;
    position: relative;
}

.testimonial-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 16px;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.testimonial-stars {
    color: #F59E0B;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.testimonial-text {
    color: #CBD5E1;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.author-info h4 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.author-info span {
    color: #94A3B8;
    font-size: 0.8rem;
}

.quote-watermark {
    position: absolute;
    top: 1rem;
    right: 2rem;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.03);
    font-family: serif;
    pointer-events: none;
}

/* --- MOBILE BATTERY INDICATOR (TABLET & MOBILE ONLY) --- */
.mobile-battery-indicator {
    display: none;
    /* Hidden on Desktop */
}

@media (max-width: 1024px) {

    .service-card,
    .timeline-card {
        position: relative;
        overflow: visible !important;
        /* Allow badge to overlap top line */
    }

    .timeline-card .mobile-battery-indicator {
        display: none !important;
    }

    .mobile-battery-indicator {
        position: absolute;
        top: -10px;
        /* Inline with top border */
        left: 50%;
        /* Center Horizontal */
        transform: translateX(-50%);
        right: auto;
        display: flex;
        align-items: center;
        gap: 3px;
        z-index: 50;

        /* Flat Badge Design */
        background: #0B1120;
        /* Dark bg to mask card border */
        border: 1px solid rgba(16, 185, 129, 0.4);
        border-radius: 4px;
        padding: 2px;
        height: 20px;
        width: 38px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    }

    .mb-body {
        width: 100%;
        height: 100%;
        border: none;
        border-radius: 2px;
        position: relative;
        background: rgba(255, 255, 255, 0.05);
        /* Subtle track */
        display: flex;
        align-items: center;
        justify-content: flex-start;
        overflow: hidden;
    }

    .mb-liquid {
        height: 100%;
        width: var(--fill-level, 10%);
        /* Set via JS */
        background: linear-gradient(90deg, #10B981, #34D399, #10B981);
        background-size: 200% 100%;
        border-radius: 2px;
        transform-origin: left;
        transform: scaleX(0);
        /* Start empty */
        transition: transform 1.5s cubic-bezier(0.25, 1, 0.5, 1);
        /* Smooth Element Fill */
    }

    /* Continuous Flow Animation when Charging */
    .mobile-battery-indicator.charging .mb-liquid {
        transform: scaleX(1);
        animation: flowShimmer 2s linear infinite;
    }

    @keyframes flowShimmer {
        0% {
            background-position: 100% 0;
        }

        100% {
            background-position: -100% 0;
        }
    }

    .mb-tip {
        width: 2px;
        height: 8px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 0 1px 1px 0;
    }

    .mb-label {
        display: none;
    }
}

/* --- GALLERY PAGE STYLES (NEW MASONRY) --- */
.gallery-section {
    padding: 2rem 0 6rem;
    background: #FFFFFF;
    /* Pure white background */
}

.gallery-intro {
    text-align: center;
    margin-bottom: 4rem;
    padding-top: 6rem;
    /* Space for fixed nav */
}

.gallery-intro h1 {
    font-size: 2.5rem;
    color: #1F2937;
    margin-bottom: 1rem;
    font-weight: 600;
}

.gallery-intro p {
    color: #6B7280;
    max-width: 600px;
    margin: 0 auto;
    display: none;
    /* Hide description as per request for minimal look */
}

/* MASONRY GRID - CSS COLUMNS */
.gallery-grid {
    column-count: 3;
    column-gap: 16px;
    padding: 0 16px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: transparent;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

/* Staggered Animation Delay for up to 20 items */
.gallery-item:nth-child(1) {
    animation-delay: 0.1s;
}

.gallery-item:nth-child(2) {
    animation-delay: 0.15s;
}

.gallery-item:nth-child(3) {
    animation-delay: 0.2s;
}

.gallery-item:nth-child(4) {
    animation-delay: 0.25s;
}

.gallery-item:nth-child(5) {
    animation-delay: 0.3s;
}

.gallery-item:nth-child(6) {
    animation-delay: 0.35s;
}

.gallery-item:nth-child(7) {
    animation-delay: 0.4s;
}

.gallery-item:nth-child(8) {
    animation-delay: 0.45s;
}

.gallery-item:nth-child(9) {
    animation-delay: 0.5s;
}

.gallery-item:nth-child(10) {
    animation-delay: 0.55s;
}

.gallery-item:nth-child(11) {
    animation-delay: 0.6s;
}

/* ... continue if needed ... */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    /* Should be 'contain' or intrinsic, strictly width 100% preserves aspect ratio */
    border-radius: 8px;
}

/* REMOVE OVERLAYS */
.gallery-overlay {
    display: none !important;
}

/* LIGHTBOX (MINIMAL) */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.96);
    /* Darker */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: none;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 30px;
    color: white;
    font-size: 2.5rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
    opacity: 0.7;
    z-index: 10001;
}

.lightbox-close:hover {
    opacity: 1;
    color: white;
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 3rem;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 20px;
    opacity: 0.6;
    transition: opacity 0.2s, background 0.2s;
    z-index: 10001;
    border-radius: 50%;
}

.lightbox-arrow:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.05);
}

.lightbox-arrow.prev {
    left: 20px;
}

.lightbox-arrow.next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #9CA3AF;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    letter-spacing: 1px;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .gallery-grid {
        column-count: 3;
    }
}

@media (max-width: 900px) {
    .gallery-grid {
        column-count: 2;
    }

    .lightbox-arrow {
        font-size: 2rem;
        padding: 10px;
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        column-count: 1;
    }

    .lightbox-arrow {
        display: none;
        /* Swipe usually preferred, but we'll stick to tap zones or just small arrows */
        /* Keeping arrows visible but small triggers for now as swipe needs JS logic */
        display: block;
        font-size: 1.5rem;
        padding: 10px;
        background: rgba(0, 0, 0, 0.3);
    }

    .lightbox-arrow.prev {
        left: 10px;
    }

    .lightbox-arrow.next {
        right: 10px;
    }
}

/* =========================================
   AUDIT FIXES - RTL & DARK MODE
   ========================================= */

/* 1. RTL Font Support */
[lang='ar'] {
    font-family: 'Tajawal', 'Cairo', sans-serif;
}

[lang='ar'] h1,
[lang='ar'] h2,
[lang='ar'] h3,
[lang='ar'] h4 {
    font-family: 'Cairo', sans-serif;
}

/* 2. RTL Layout Fixes for Forced Hero */
[dir='rtl'] .hero-container-adv {
    text-align: right !important;
    direction: rtl;
}

[dir='rtl'] .hero-text-content {
    text-align: right !important;
    padding-right: 0 !important;
    padding-left: 2rem !important;
    margin-left: 2rem !important;
    margin-right: 0 !important;
}

[dir='rtl'] .hero-cta-group {
    justify-content: flex-start !important;
    flex-direction: row;
}

/* 3. Dark Mode Header Fix (Override Force Fix) */
[data-theme='dark'] header,
[data-theme='dark'] header.nav-transparent {
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3) !important;
}

[data-theme='dark'] nav ul li a,
[data-theme='dark'] header a,
[data-theme='dark'] .logo span {
    color: #F8FAFC !important;
}

[data-theme='dark'] header .btn-primary {
    background: var(--primary-color) !important;
    color: white !important;
}

/* 4. Global Dark Mode Fixes */
[data-theme='dark'] .gallery-section {
    background: #020617 !important;
}

[data-theme='dark'] .gallery-intro h1 {
    color: white !important;
}

/* 5. Process Section RTL */
[dir='rtl'] .process-icon {
    margin: 0 auto 1.5rem;
}

/* 6. Form elements in RTL */
[dir='rtl'] input,
[dir='rtl'] select,
[dir='rtl'] textarea {
    text-align: right;
}


/* 7. Lightbox RTL */
[dir='rtl'] .lightbox-arrow.prev {
    left: auto;
    right: 20px;
    transform: translateY(-50%) scaleX(-1);
}

[dir='rtl'] .lightbox-arrow.next {
    right: auto;
    left: 20px;
    transform: translateY(-50%) scaleX(-1);
}


/* 8. Mandatory Dark Mode Overrides */
[data-theme='dark'] body,
[data-theme='dark'] html,
[data-theme='dark'] .section,
[data-theme='dark'] .bg-surface,
[data-theme='dark'] .advanced-hero,
[data-theme='dark'] .services-battery-section,
[data-theme='dark'] .gallery-section {
    background: #020617 !important;
    background-color: #020617 !important;
}

[data-theme='dark'] .bg-surface {
    background: #0F172A !important;
    /* Slightly lighter for contrast in alternating sections */
}

/* Ensure Text Contrast in Dark Mode */
[data-theme='dark'] h1,
[data-theme='dark'] h2,
[data-theme='dark'] h3,
[data-theme='dark'] h4,
[data-theme='dark'] h5,
[data-theme='dark'] h6,
[data-theme='dark'] .card-title,
[data-theme='dark'] .service-content h3,
[data-theme='dark'] .t-card-title,
[data-theme='dark'] .gallery-intro h1 {
    color: #F8FAFC !important;
}

[data-theme='dark'] p,
[data-theme='dark'] li,
[data-theme='dark'] span,
[data-theme='dark'] .card-detail,
[data-theme='dark'] .card-specs,
[data-theme='dark'] .text-light,
[data-theme='dark'] .subtitle {
    color: #CBD5E1 !important;
    /* Light Slate */
}

/* Specific Card Backgrounds in Dark Mode */
[data-theme='dark'] .service-card,
[data-theme='dark'] .process-card,
[data-theme='dark'] .result-card,
[data-theme='dark'] .timeline-card,
[data-theme='dark'] .project-card,
[data-theme='dark'] .testimonial-card {
    background: #1E293B !important;
    border-color: #334155 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5) !important;
}

[data-theme='dark'] .service-card:hover,
[data-theme='dark'] .process-card:hover {
    background: #334155 !important;
    border-color: var(--primary-color) !important;
}

/* Input Fields in Dark Mode */
[data-theme='dark'] input,
[data-theme='dark'] select,
[data-theme='dark'] textarea {
    background: #0F172A !important;
    color: #F8FAFC !important;
    border-color: #334155 !important;
}


/* Additional Dark Mode Section Fixes */
[data-theme='dark'] .about-ref-section,
[data-theme='dark'] footer {
    background-color: #020617 !important;
    color: #CBD5E1 !important;
}

[data-theme='dark'] .ref-headline,
[data-theme='dark'] .ref-label,
[data-theme='dark'] .footer-col h4 {
    color: #F8FAFC !important;
}

[data-theme='dark'] .ref-text p {
    color: #CBD5E1 !important;
}

/* --- Mobile Menu Dark Mode Overrides (Appended) --- */
@media (max-width: 900px) {
    [data-theme='dark'] .nav-links {
        background-color: rgba(15, 23, 42, 0.95) !important;
        border-color: rgba(255, 255, 255, 0.05) !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5) !important;
    }

    [data-theme='dark'] .nav-links a {
        border-color: rgba(255, 255, 255, 0.05);
        color: #F8FAFC !important;
    }
}

/* --- Enhanced CTA Styles --- */
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(248, 142, 2, 0.4);
}

[data-theme='dark'] .btn-primary:hover {
    box-shadow: 0 0 20px rgba(248, 142, 2, 0.4);
}

/* --- Fix for Stats Cards in Dark Mode (Keep Text Dark on White Background) --- */
[data-theme='dark'] .ref-stat-item .ref-stat-num {
    color: #0f172a !important;
}

[data-theme='dark'] .ref-stat-item .ref-stat-label {
    color: #64748b !important;
}

/* --- Process Section Cards (Redesign) --- */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

@media (max-width: 1024px) {
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .process-grid {
        grid-template-columns: 1fr;
    }
}

.process-card {
    background: var(--card-bg);
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.process-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.process-icon {
    width: 5.5rem;
    height: 5.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    font-size: 2.2rem;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    box-shadow: 0 15px 30px -5px rgba(248, 142, 2, 0.3);
    position: relative;
    z-index: 2;
    border: 4px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.process-card:hover .process-icon {
    transform: scale(1.1) rotate(10deg);
}

.process-card h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.process-card p {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 0;
    font-size: 1rem;
}

/* Dark Mode Adjustments for Process Cards */
[data-theme='dark'] .process-card {
    background: #1E293B;
    /* Slate 800 */
    border-color: #334155;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

[data-theme='dark'] .process-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* --- UI/UX Refinements (Senior Auditor Fixes) --- */

/* 1. Professional Visual Separation */
.section-divider {
    height: 1px;
    width: 80%;
    max-width: 1200px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    opacity: 0.3;
    margin: 0 auto;
}

[data-theme='dark'] .section-divider {
    background: linear-gradient(90deg, transparent, #334155, transparent);
    /* Slate 700 */
    opacity: 0.4;
}

/* 2. Enhanced Typography & Spacing */
h1,
h2,
h3,
h4 {
    line-height: 1.2 !important;
    margin-bottom: 1rem !important;
}

p {
    line-height: 1.65 !important;
    margin-bottom: 1.25rem !important;
    opacity: 0.95;
    /* Slight reduce for hierarchy */
}

.section {
    padding-block: 4rem !important;
    /* Standardized optimal spacing */
}

/* 3. Dark Mode Text Polish */
[data-theme='dark'] p,
[data-theme='dark'] li,
[data-theme='dark'] span {
    color: #CBD5E1 !important;
    /* Slate 300 - Great readability */
}

[data-theme='dark'] h1,
[data-theme='dark'] h2,
[data-theme='dark'] h3 {
    color: #F8FAFC !important;
    /* Slate 50 - High contrast */
}

/* 4. Mobile Menu enhancements for RTL */
[dir='rtl'] .mobile-menu-btn {
    margin-right: auto;
    margin-left: 0;
}

/* This ensures if using flex row, it pushes to the far left (end) if strictly needed, 
   but justify-between usually handles it. Adding strictly just in case. */


/* --- CREATIVE SECTION SEPARATORS (Senior Designer Upgrade) --- */
.section-divider {
    height: 100px;
    /* Taller for effect */
    width: 100%;
    max-width: 100%;
    margin: -50px 0;
    /* Neg margin to overlap */
    background: radial-gradient(50% 100% at 50% 50%, rgba(248, 142, 2, 0.08) 0%, transparent 100%);
    border: none;
    opacity: 1;
    position: relative;
    z-index: 10;
    pointer-events: none;
}

[data-theme='dark'] .section-divider {
    background: radial-gradient(50% 100% at 50% 50%, rgba(248, 142, 2, 0.05) 0%, transparent 100%);
}

/* Add a subtle sun shape in the divider */
.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(248, 142, 2, 0.2) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

/* --- CREATIVE SECTION TITLES --- */
.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    border-radius: 2px;
}

/* Adjust specifically for existing headers that might not have this class yet */
section h2,
.timeline-header h2 {
    position: relative;
    display: inline-block;
}


/* --- CRITICAL LAYOUT FIXES --- */
/* Ensure header labels are always on their own line */
.section-header span,
.testimonial-header span.project-label,
.timeline-header span.project-label,
.ref-label {
    display: block !important;
    width: 100%;
    margin-bottom: 0.5rem;
}

/* Ensure H2s don't sit inline with spans */
.section-header h2,
.testimonial-header h2,
.timeline-header h2 {
    display: block !important;
    /* Override inline-block */
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
}


/* --- COMPACT LANGUAGE SWITCHER --- */
.lang-switcher {
    width: auto !important;
    min-width: unset !important;
    padding: 0.25rem 0.2rem !important;
    /* Tighter padding */
    text-align: center;
    font-weight: 600;
}


/* --- FLOAT MENU (No Box) --- */
/* Override existing nav-wrapper styles to remove the box look */
.nav-wrapper {
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 1rem 0 !important;
    /* Adjust padding to look natural */
    width: 100%;
}

/* Ensure background matches hero (transparent) but handles standard layout */
header {
    top: 0 !important;
    /* Sit at very top */
    padding-inline: 0 !important;
    margin-bottom: 0 !important;
    background: transparent !important;
}

/* Optional: If we want it to be readable on scroll, we might need a script to add bg on scroll, 
   but for now we strictly follow 'seamless, same background as hero' which implies transparency.
   The user explicitly asked to REMOVE background boxes. */


/* --- STRICT MENU OVERRIDES (Light & Dark Consistency) --- */
/* Force dark mode to behave exactly like light mode: Transparent, no box. */
[data-theme='dark'] .nav-wrapper,
[data-theme='dark'] header,
[data-theme='dark'] .header {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

/* Ensure Logo and Links are clearly visible on the dark hero background */
[data-theme='dark'] .nav-links a {
    color: var(--text-color) !important;
    /* Should be light in dark mode var */
}

/* --- Refactored Inline and Utility Styles --- */
.logo-img {
    height: 80px;
    width: auto;
}

.text-white {
    color: white !important;
}

.text-primary {
    color: var(--primary-color);
}

.text-light {
    color: var(--text-light);
}

.bg-primary {
    background: var(--primary-color);
}

.section-header-cnt {
    text-align: center;
    margin-bottom: 3rem;
}

.section-separator {
    width: 50px;
    height: 4px;
    background: var(--primary-color);
    margin: 1rem auto;
}

.why-row {
    align-items: center;
    gap: 4rem;
}

.card-box {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.stat-box {
    text-align: center;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.stat-val {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-lbl {
    font-size: 0.875rem;
    margin: 0;
}

.lbl-strong {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.inp-flex-1 {
    flex: 1;
    padding: 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background: var(--background-color);
    color: var(--text-color);
}

.sel-sm {
    width: 80px;
    padding: 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background: var(--background-color);
    color: var(--text-color);
}

.w-full-inp {
    width: 100%;
    margin-bottom: 0.5rem;
}

.sel-full {
    width: 100%;
    padding: 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background: var(--background-color);
    color: var(--text-color);
}

.val-highlight {
    color: var(--primary-color);
    font-weight: 700;
}

.calc-results-custom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    opacity: 0.6;
    transition: all 0.5s ease;
}

.icon-md {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.icon-md-green {
    color: #2ecc71;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.span-2-flex {
    grid-column: span 2;
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

.flex-1-center {
    flex: 1;
    text-align: center;
}

.cta-section {
    text-align: center;
    padding-block: 6rem;
}

.cta-text {
    max-width: 600px;
    margin: 0 auto 2.5rem;
    font-size: 1.125rem;
}

.cta-btn-lg {
    font-size: 1.125rem;
    padding: 1rem 2.5rem;
}

.footer-logo-text {
    color: white !important;
}

.footer-desc-text {
    color: #cbd5e1;
}

.modal-title-main {
    color: var(--primary-color);
    font-size: 2rem;
    line-height: 1.1;
}

.modal-icon-lg {
    font-size: 2rem;
    color: white;
}

.modal-sub-text {
    margin: 0.5rem 0 0;
    font-size: 0.8rem;
    color: white;
}

.modal-navy {
    color: var(--heading-color);
}

.btn-block-mt {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
    font-weight: 700;
    margin-top: 1rem;
}

.success-box {
    display: none;
    text-align: center;
    margin-top: 1rem;
    color: #2ecc71;
}

.mb-05 {
    margin-bottom: 0.5rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-15 {
    margin-bottom: 1.5rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mb-3 {
    margin-bottom: 3rem;
}

.mt-05 {
    margin-top: 0.5rem;
}

.ml-05 {
    margin-left: 0.5rem;
}

.gap-1 {
    gap: 1rem;
}

.fs-09 {
    font-size: 0.9rem;
}

.m-0 {
    margin: 0;
}

.check-icon {
    color: var(--primary-color);
}

.contact-icon {
    margin: 0;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
}

.btn-wa {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.pos-rel {
    position: relative;
}

.slider-inp {
    width: 100%;
    margin-bottom: 0.5rem;
}

/* --- Calculator Input Redesign --- */
.calc-input-group {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    /* Grey Lines */
    border-radius: var(--radius);
    background-color: var(--surface-light);
    /* Whole Box Blue (Light/Dark variant) */
    transition: all 0.3s ease;
    overflow: hidden;
}

.calc-input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(248, 142, 2, 0.15);
}

.calc-main-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding: 0.6rem 1rem !important;
    /* Smaller Padding */
    font-size: 1rem;
    color: var(--text-color);
    outline: none !important;
    box-shadow: none !important;
    min-width: 0;
}

/* Currency Wrapper (Side Badge) */
.calc-currency-wrapper {
    background-color: transparent;
    /* Seamless Blue Background */
    border-left: 1px solid var(--border-color);
    /* Grey Divider */
    display: flex;
    align-items: center;
    position: relative;
    transition: all 0.3s ease;
    min-width: 90px;
}

[dir="rtl"] .calc-currency-wrapper {
    border-left: none;
    border-right: 1px solid var(--border-color);
}

.calc-currency-select {
    appearance: none;
    -webkit-appearance: none;
    border: none !important;
    background: transparent !important;
    padding: 0.6rem 2.5rem 0.6rem 1rem !important;
    /* Smaller Padding */
    font-weight: 700;
    color: var(--heading-color) !important;
    cursor: pointer;
    outline: none !important;
    box-shadow: none !important;
    width: 100% !important;
    font-size: 0.9rem;
}

[dir="rtl"] .calc-currency-select {
    padding: 0.6rem 1rem 0.6rem 2.5rem !important;
}

/* Custom Arrow */
.calc-currency-wrapper::after {
    content: '\f078';
    /* FA Chevron Down */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 1rem;
    font-size: 0.7rem;
    color: var(--text-color);
    pointer-events: none;
    opacity: 0.7;
}

[dir="rtl"] .calc-currency-wrapper::after {
    right: auto;
    left: 1rem;
}

.calc-currency-wrapper:hover {
    background-color: #e2e8f0;
    /* Slight darken */
}

[data-theme="dark"] .calc-currency-wrapper:hover {
    background-color: #1e293b;
}

/* --- Mobile Hero Redesign (Max Width 768px) --- */
@media (max-width: 768px) {
    .advanced-hero {
        padding-top: 5rem;
        padding-bottom: 2rem;
        overflow: hidden;
    }

    .hero-container-adv {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        /* Full width for children */
        text-align: left;
        /* Left align text */
        gap: 1rem;
    }

    /* Unwrap text content to allow reordering */
    .hero-text-content {
        display: contents;
    }

    /* Order 1: Badge */
    .hero-badge {
        order: 1;
        align-self: flex-start;
        margin-bottom: 0.5rem;
    }

    /* Order 2: Headline */
    .hero-text-content h1 {
        order: 2;
        font-size: 2.5rem;
        line-height: 1.1;
        margin-bottom: 0.75rem;
        text-align: left;
    }

    /* Order 3: Subtext */
    .hero-text-content p {
        order: 3;
        font-size: 1rem;
        margin-bottom: 1rem;
        text-align: left;
        max-width: 100%;
        color: var(--text-color);
    }

    /* Order 4: Visual Scene (Inserted in middle) */
    .hero-visual-scene {
        order: 4;
        position: relative;
        /* Back in flow */
        bottom: auto;
        left: auto;
        transform: none;
        width: 100%;
        height: 280px;
        /* Fixed height for visual area */
        margin: 1rem 0;
        z-index: 1;
        overflow: visible;
        /* Allow glow to spill */
    }

    /* Order 5: CTA */
    .hero-cta-group {
        order: 5;
        flex-direction: column;
        width: 100%;
        gap: 1rem;
        margin-top: 0;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    /* --- Visual Focus Redesign --- */

    /* Sun: Soft Background Glow */
    .sun-container {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.6);
        width: 250px;
        height: 250px;
        z-index: 0;
        opacity: 0.5;
        /* Soften */
        filter: blur(8px);
        /* Blur edge */
    }

    /* Simplify Sun for Performance & Look */
    .sun-rays,
    .sun-flare {
        display: none;
        /* Remove complex rays */
    }

    .sun-core {
        box-shadow: 0 0 50px rgba(253, 185, 19, 0.4);
        /* Softer shadow */
        animation: none;
        /* No pulse */
        background: radial-gradient(circle, #FDB913, #f59e0b);
        /* Simple gradient */
    }

    /* Solar Panels: BIGGER & Main Focus */
    .panels-container {
        position: absolute;
        bottom: 20px;
        left: 50%;
        /* Increase scale significantly */
        transform: translateX(-50%) perspective(800px) rotateX(10deg) scale(1.6);
        z-index: 10;
        width: 100%;
        justify-content: center;
        gap: 8px;
    }

    /* Ensure panels look distinct */
    .solar-panel {
        border-width: 3px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    }

    /* Remove floating chips to reduce clutter */
    .hero-chip,
    .hero-floating-card {
        display: none;
    }
}

/* RTL Support for Mobile */
@media (max-width: 768px) {
    [dir="rtl"] .hero-container-adv {
        text-align: right;
    }

    [dir="rtl"] .hero-badge {
        align-self: flex-start;
        /* Matches text-align via flow */
    }

    [dir="rtl"] .hero-text-content h1,
    [dir="rtl"] .hero-text-content p {
        text-align: right;
    }
}

/* =========================================
   GALLERY PAGE STYLES
   ========================================= */
.gallery-section {
    padding: 4rem 2rem;
    background-color: var(--background-color);
    min-height: 100vh;
}

.gallery-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.gallery-intro h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--heading-color);
}

.gallery-intro p {
    font-size: 1.2rem;
    color: var(--text-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    cursor: pointer;
    aspect-ratio: 4/3;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: opacity 0.15s ease;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    line-height: 1;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.lightbox-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-arrow.prev {
    left: 2rem;
}

.lightbox-arrow.next {
    right: 2rem;
}

.lightbox-counter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.2rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
}

/* =========================================
   DARK MODE SUPPORT (.dark-mode class)
   ========================================= */

/* Apply dark background to html when body has dark-mode */
html:has(body.dark-mode) {
    background-color: #020617 !important;
}

body.dark-mode {
    background-color: #020617 !important;
    color: #E2E8F0;
}

body.dark-mode header {
    background-color: transparent !important;
}

body.dark-mode main {
    background-color: #020617 !important;
}

body.dark-mode .gallery-section {
    background-color: #020617 !important;
}

body.dark-mode .gallery-intro h1 {
    color: #F8FAFC;
}

body.dark-mode .gallery-intro p {
    color: #E2E8F0;
}

body.dark-mode .gallery-item {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.6);
    border: 1px solid #334155;
    background-color: #0F172A;
}

body.dark-mode .gallery-item:hover {
    box-shadow: 0 10px 15px -3px rgba(248, 142, 2, 0.3);
    border-color: var(--primary-color);
}

/* Lightbox Dark Mode Enhancements */
body.dark-mode .lightbox-modal {
    background-color: rgba(2, 6, 23, 0.98);
}

body.dark-mode .lightbox-close {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark-mode .lightbox-close:hover {
    background: rgba(248, 142, 2, 0.3);
    border-color: var(--primary-color);
}

body.dark-mode .lightbox-arrow {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark-mode .lightbox-arrow:hover {
    background: rgba(248, 142, 2, 0.3);
    border-color: var(--primary-color);
}

body.dark-mode .lightbox-counter {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #F8FAFC;
}

/* Navbar Dark Mode Styles */
body.dark-mode .nav-wrapper {
    background-color: #020617 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.dark-mode .logo {
    color: #F8FAFC !important;
}

body.dark-mode .logo-img {
    filter: brightness(1.2);
}

body.dark-mode .nav-links {
    background-color: #020617;
}

body.dark-mode .nav-links a {
    color: #E2E8F0 !important;
}

body.dark-mode .nav-links a::after {
    display: none !important;
}

body.dark-mode .nav-links a:hover,
body.dark-mode .nav-links a.active {
    color: var(--primary-color) !important;
}

body.dark-mode .theme-toggle-btn {
    border-color: #334155 !important;
    color: #E2E8F0 !important;
    background: transparent;
}

body.dark-mode .theme-toggle-btn:hover {
    background-color: #0F172A !important;
}

body.dark-mode .lang-switcher {
    background: #0F172A !important;
    border-color: #334155 !important;
    color: #E2E8F0 !important;
}

body.dark-mode .mobile-menu-btn {
    color: #E2E8F0 !important;
}

body.dark-mode .nav-gift-trigger {
    color: #E2E8F0;
}

body.dark-mode .gift-badge {
    color: #E2E8F0;
}

body.dark-mode .btn-primary {
    background-color: var(--primary-color);
    color: white;
}

/* Mobile Menu Dark Mode */
@media (max-width: 900px) {
    body.dark-mode .nav-links {
        background-color: #020617 !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .gallery-intro h1 {
        font-size: 2rem;
    }

    .gallery-intro p {
        font-size: 1rem;
    }

    .lightbox-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .lightbox-arrow.prev {
        left: 1rem;
    }

    .lightbox-arrow.next {
        right: 1rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }
}