html,
body {
    overflow-x: hidden;
    /* Stops horizontal scrolling */
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Ensure padding doesn't make elements wider than 100% */
*,
*::before,
*::after {
    box-sizing: border-box;
}


/* --- CSS VARIABLES & RESET --- */
:root {
    /* PRIMARY BRAND COLORS */
    --primary: #059669;
    /* Emerald Green (Main) */
    --primary-dark: #064e3b;
    /* Dark Green (Hover/Text) */
    --primary-light: #34d399;
    /* Bright Green (Accents) */

    /* NEW SOFT SHADES (For Backgrounds/Gradients) */
    --primary-soft: #a7f3d0;
    /* Soft Mint */
    --primary-ultralight: #ecfdf5;
    /* Very Pale Green (Backgrounds) */
    --primary-glow: rgba(5, 150, 105, 0.15);
    /* Soft Glow */

    /* SECONDARY & ACCENTS */
    --secondary: #1e40af;
    /* Royal Blue (Retained for contrast/Tech feel) */
    --accent: #f59e0b;
    /* Amber (Badges) */

    /* NEUTRALS */
    --bg-white: #ffffff;
    --bg-light: #f0fdf4;
    /* Changed from Gray to very subtle Green Tint */
    --text-main: #111827;
    --text-muted: #64748b;

    --container-width: 1280px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Text Selection Highlight */
::selection {
    background-color: var(--primary-soft);
    color: var(--primary-dark);
}

/* English Font Default */
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Arabic Font Override */
html[lang="ar"] body {
    font-family: 'Tajawal', sans-serif;
}

/* --- UTILITIES --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.container-fluid {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
}

.section-center {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    margin-top: 0;
    line-height: 1.2;
}

.section-subtitle {
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    margin-bottom: 6px;
    display: block;
}


/* Gradient Text Effect */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-secondary {
    color: var(--secondary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 30px;
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    border-radius: 6px;
    border: 2px solid var(--primary);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn:hover {
    background-color: transparent;
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--primary-glow);
}

.btn-outline {
    background-color: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

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

/* =========================================
   HEADER & NAVIGATION
   ========================================= */

/* --- 1. Base Header Styles --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(5, 150, 105, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    padding: 15px 0;
    transition: all 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 5%;
    width: 100%;
}

/* --- 2. Logo (Fixed Width Constraints) --- */
.logo {
    display: flex;
    align-items: center;
    height: 50px;
    max-width: 180px;
    transition: all 0.3s ease;
}

.logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* --- 3. Desktop Navigation --- */
.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links {
    display: flex;
    gap: 35px;
    align-items: center;
    list-style: none;
    /* Removes bullet points */
    margin: 0;
    padding: 0;
}

.nav-links a {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

/* Hover Animation */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* --- 4. Mobile Controls --- */
.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
    padding: 5px;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.mobile-toggle:hover {
    color: var(--primary);
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-ultralight);
    border: 1px solid var(--primary-soft);
    padding: 8px 18px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary-dark);
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.lang-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* =========================================
   5. RESPONSIVE MEDIA QUERIES
   ========================================= */

/* --- Tablet (Max Width: 1024px) --- */
@media (max-width: 1024px) {
    nav {
        padding: 0 30px;
    }

    .nav-links {
        gap: 20px;
    }

    .nav-links a {
        font-size: 0.9rem;
    }
}

/* --- Mobile Landscape & Tablets (Max Width: 860px) --- */
@media (max-width: 860px) {

    /* Enable Mobile Toggle */
    .mobile-toggle {
        display: block;
    }

    .logo {
        height: 40px;
    }

    /* Mobile Menu Logic (Slide Down) */
    .nav-links {
        /* CRITICAL FIX: Forces menu to exist so it can be animated */
        display: flex !important;

        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 20px;

        /* Hidden State */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
    }

    /* Visible State (Added via JS) */
    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 10px 0;
        width: 100%;
        text-align: center;
    }

    .nav-links a::after {
        display: none;
    }

    .nav-wrapper {
        gap: 15px;
    }
}

/* --- Small Phones (Max Width: 480px) --- */
@media (max-width: 480px) {
    header {
        padding: 12px 0;
    }

    nav {
        padding: 0 15px;
    }

    .logo {
        height: 32px;
        max-width: 120px;
        margin-right: auto;
    }

    .nav-wrapper {
        gap: 10px;
    }

    .lang-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
        height: 32px;
    }

    .mobile-toggle {
        font-size: 1.4rem;
    }
}

/* =========================================
   HERO SECTION (Fully Responsive)
   ========================================= */

/* --- 1. Main Container & Layout --- */
.hero {
    /* Dimensions */
    width: 100%;
    /* Fallback for older browsers */
    min-height: 100vh;
    /* Modern Fix: Dynamic Viewport Height (ignores mobile URL bars) */
    min-height: 100dvh;

    padding-top: 150px;
    padding-bottom: 100px;

    /* Positioning */
    position: relative;
    overflow: hidden;
    background: #000;

    /* Flexbox centering */
    display: flex;
    align-items: center;
    justify-content: center;
    /* Added for extra safety */
}

/* --- 2. Video Background Logic --- */
.video-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.video-foreground video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    /* Ensure it covers the screen at all times */
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;

    /* Keeps aspect ratio correct while filling screen */
    object-fit: cover;
}

/* Dark Overlay */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1;
}

/* --- 3. Content Layering --- */
.hero-content-layer {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 0 20px;
    /* Added side padding for safety on mobile */
}

.hero-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-content {
    margin-bottom: 40px;
}

/* --- 4. Typography --- */
.hero .section-subtitle {
    color: var(--primary-light);
    font-weight: 600;
    display: block;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    /* Increased slightly for better readability */
    font-size: 0.9rem;
    /* Base size */
}

.hero h1 {
    /* Fluid Typography: Scales smoothly between 2.5rem and 4.5rem */
    font-size: clamp(2.2rem, 5vw + 1rem, 4.5rem);
    line-height: 1.1;
    margin-bottom: 25px;
    color: #ffffff;
}

.hero p {
    font-size: 1.2rem;
    color: #e2e8f0;
    margin-bottom: 35px;
    margin-left: auto;
    margin-right: auto;
    max-width: 700px;
    line-height: 1.6;
    /* Better readability */
    font-weight: 400;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    /* Allows buttons to stack on very small screens */
}

/* --- 5. Button Style: Arrow Reveal --- */
.btn-hero {
    text-decoration: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background-color: var(--primary);
    color: #ffffff;
    border-radius: 8px;
    font-weight: 600;
    overflow: hidden;
    transition: all 0.3s ease;
    gap: 10px;
    white-space: nowrap;
    /* Prevents text from breaking */
}

/* Hidden Arrow */
.btn-hero::after {
    content: "→";
    position: absolute;
    right: -20px;
    opacity: 0;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.btn-hero span {
    transition: all 0.3s ease;
    display: inline-block;
}

.hero-line {
    display: block;
    overflow: hidden;
}

.type-text {
    display: inline-block;
    white-space: nowrap;
}

.type-cursor::after {
    content: "|";
    margin-left: 4px;
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    50%,
    100% {
        opacity: 1;
    }

    25%,
    75% {
        opacity: 0;
    }
}

.about-image {
    perspective: 1200px;
    /* allows 3D rotation to be visible */
}

.map-container {
    transform-style: preserve-3d;
    /* ensures child rotates in 3D space */
}

.line {
    display: block;
    transform: none;
}

.about-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* HOVER EFFECT: Only apply on devices that have a mouse (prevents sticky hover on mobile) */
@media (hover: hover) {
    .btn-hero:hover {
        background-color: var(--primary-dark);
        padding-right: 45px;
        padding-left: 20px;
    }

    .btn-hero:hover::after {
        right: 20px;
        opacity: 1;
    }
}

/* =========================================
   6. RESPONSIVE MEDIA QUERIES
   ========================================= */

/* --- Laptops & Tablets (Max Width: 1024px) --- */
@media (max-width: 1024px) {
    .hero {
        padding-top: 130px;
        /* Reduced top padding */
    }

    .hero h1 {
        margin-bottom: 20px;
    }
}

/* --- Mobile Landscape & Tablets (Max Width: 768px) --- */
@media (max-width: 768px) {
    .hero {
        padding-top: 100px;
        /* Tighter padding for mobile */
        padding-bottom: 60px;
        min-height: auto;
        /* Allow content to dictate height if needed */
        height: 100dvh;
        /* Force full height */
    }

    .hero .section-subtitle {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }

    .hero p {
        font-size: 1rem;
        /* Smaller body text */
        max-width: 90%;
        /* Allow text to take up more width */
        margin-bottom: 30px;
    }

    .hero-content {
        margin-bottom: 30px;
    }
}

/* --- Small Phones (Max Width: 480px) --- */
@media (max-width: 480px) {
    .hero h1 {
        /* Force smaller font on tiny screens so words don't break */
        font-size: 2.2rem;
    }

    .btn-hero {
        width: 100%;
        /* Make button full width for easier tapping */
        max-width: 300px;
        padding: 12px 24px;
    }

    .hero-actions {
        width: 100%;
        flex-direction: column;
        align-items: center;
    }
}

/* --- Landscape Orientation Fix (Short Screens) --- */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        /* Disable full height constraint */
        height: auto;
        padding-top: 100px;
        padding-bottom: 50px;
    }

    .hero h1 {
        font-size: 2.5rem;
        /* prevent title from taking up whole screen */
    }
}

/* --- ABOUT SECTION (Fixed Side-by-Side Layout) --- */
.about {
    padding: 100px 0;
    position: relative;
    background: linear-gradient(135deg, var(--primary-ultralight) 0%, #cbfbf2bd 100%);
}

.about .section-subtitle {
    font-size: 3rem;
    font-weight: 800;
    display: block;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--primary-dark);
}

.about-subtitle {
    color: var(--primary);
    font-size: 3rem;
    font-weight: 800;
    display: block;
    margin-bottom: 20px;
    line-height: 1.2;
}

/* This forces the layout: [Map 450px] --- [Text fills rest] */
.about-grid {
    display: flex;
    /* Use Flexbox for reliable side-by-side */
    align-items: center;
    /* Vertically center the map relative to text */
    gap: 60px;
    /* Space between Map and Text */
    flex-wrap: nowrap;
    /* Prevent wrapping on Desktop */
}

/* LEFT SIDE: The Map Container Wrapper */
.about-image {
    /* UPDATED WIDTH: 450px to fit the new map size */
    flex: 0 0 450px;
    width: 450px;
}

/* RIGHT SIDE: The Text Content */
.about-content {
    /* Allow text to fill all remaining space */
    flex: 1;
}

/* --- THE MAP STYLE (Bigger & Slightly Rectangular) --- */
.map-container {
    position: relative;

    /* UPDATED DIMENSIONS */
    width: 450px;
    /* 300 + 100 + 50 */
    height: 400px;
    /* 300 + 100 */

    border-radius: 24px;
    overflow: hidden;
    background: #e5e7eb;
    border: 4px solid white;
    box-shadow: 0 15px 30px rgba(5, 150, 105, 0.15);
    /* Soft Green Shadow */
    transition: transform 0.3s ease;
}

.map-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(5, 150, 105, 0.25);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    filter: saturate(0.8);
    transition: filter 0.3s ease;
}

.map-container:hover iframe {
    filter: saturate(1.2);
}

/* Overlay Button Logic */
.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.map-btn {
    background: white;
    color: var(--primary);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    display: flex;
    gap: 8px;
    align-items: center;
}

.map-container:hover .map-btn {
    opacity: 1;
    transform: translateY(0);
}

/* --- MISSION CARDS --- */
.mv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.mv-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-light);
    box-shadow: 0 15px 30px var(--primary-glow);
}

.mv-card h4 {
    margin-bottom: 15px;
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mv-card .card-title i {
    color: var(--primary);
    background: var(--primary-ultralight);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* --- RESPONSIVE: Stack on Mobile Only --- */
@media (max-width: 968px) {
    .about-grid {
        flex-direction: column;
        /* Stack vertically on small screens */
        text-align: center;
        gap: 40px;
    }

    .about-image {
        width: 100%;
        flex: auto;
        /* Allow it to resize on mobile */
        display: flex;
        justify-content: center;
    }

    .map-container {
        /* On mobile, limit width so it doesn't overflow screen */
        width: 100%;
        max-width: 450px;
    }

    .mv-grid {
        text-align: left;
    }

    .map-btn {
        opacity: 1;
        transform: translateY(0);
        background: rgba(255, 255, 255, 0.9);
    }
}

/* =========================================
   SERVICES SECTION (Fully Responsive Fix)
   ========================================= */

.services {
    position: relative;
    /* Reduced top/bottom padding for mobile, increases on desktop via media query */
    padding: 60px 0;
    overflow: hidden;
    background: #000;
}

/* --- VIDEO BACKGROUND (Stays the same) --- */
.video-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.video-foreground video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    /* Darker overlay (80%) for better text contrast */
    z-index: 1;
}

/* --- CONTENT LAYER --- */
.services .content-layer {
    position: relative;
    z-index: 2;
    /* Safety padding for small screens */
    padding-left: 15px;
    padding-right: 15px;
}

/* --- TEXT STYLES (Fluid Typography) --- */
.services-header {
    text-align: center;
    margin-bottom: 40px;
}

.services .section-subtitle {
    /* CLAMP: Minimum 1.5rem, Preferred 5vw, Maximum 3rem */
    /* This automatically scales text size based on screen width */
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 800;
    display: block;
    margin-bottom: 10px;
    line-height: 1.2;
    color: #ffffff;
}

.services .section-title {
    color: #ffffff;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

/* --- CARD GRID (The Fix) --- */
.services-grid {
    display: grid;
    /* Default for Desktop: Fit as many as possible, min width 300px */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    width: 100%;
    perspective: 1200px;
    /* Ensure grid takes full width */
}

/* --- CARD STYLES --- */
.service-card {
    background: white;
    border-radius: 12px;
    /* Slightly smaller radius for mobile feel */
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    /* Fix for Safari/iOS overflow issues */
    transform: translateZ(0);
    opacity: 0;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.service-img-header {
    height: 160px;
    /* Reduced height slightly */
    width: 100%;
    position: relative;
}

.service-img-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.service-icon {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 15px;
    background: var(--primary-ultralight);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.service-card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: var(--text-main);
    font-weight: 700;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.5;
}

/* =========================================
   MEDIA QUERIES (The "Nuclear" Options)
   ========================================= */

/* --- Desktop (Large Screens) --- */
@media (min-width: 1025px) {
    .services {
        padding: 100px 0;
        /* Restore large padding on desktop */
    }

    .service-card {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .service-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px var(--primary-glow);
        border-color: var(--primary);
    }

    .service-img-header img {
        transition: transform 0.5s ease;
    }

    .service-card:hover .service-img-header img {
        transform: scale(1.1);
    }
}

/* --- Mobile & Small Tablets (Max Width: 768px) --- */
@media (max-width: 768px) {
    .services-grid {
        /* FORCE 1 COLUMN */
        /* This prevents any horizontal calculation errors */
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        /* Remove hover effects on touch devices to prevent "sticky" hover states */
        transform: none !important;
    }

    .service-img-header {
        height: 180px;
        /* Give image slightly more height on stacked cards */
    }
}

/* --- Tiny Phones (iPhone SE / Galaxy Fold - Max Width 380px) --- */
@media (max-width: 380px) {
    .services .content-layer {
        padding-left: 10px;
        padding-right: 10px;
    }

    .service-body {
        padding: 20px 15px;
        /* Tighter internal padding */
    }

    .services-header {
        margin-bottom: 30px;
    }
}

/* --- PARTNERS SECTION --- */
.partners {
    padding: 60px 0;
    background: white;
    border-top: 1px solid var(--primary-ultralight);
    overflow: hidden;
}

.partners-wrapper {
    margin-top: 40px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* Gradient fade on edges */
.partners-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(to right, white, transparent);
    z-index: 2;
}

.partners-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(to left, white, transparent);
    z-index: 2;
}

.partners-track {
    display: flex;
    width: max-content;
}

.partners-track:hover {
    animation-play-state: paused;
}

.partner-logo {
    /* Increased container width to accommodate bigger logos */
    width: 250px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;

    /* REMOVED grayscale and opacity so they are always colored */
    transition: transform 0.3s ease;
}

.partner-logo:hover {
    /* Only Zoom effect on hover */
    transform: scale(1.15);
}

.partner-logo img {
    max-width: 100%;
    height: auto;
    /* Increased max-height from 80px to 120px */
    max-height: 120px;
}

/*@keyframes scrollPartners {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}*/

/* --- TEAM SECTION --- */
.section-description {
    max-width: 700px;
    margin: 0 auto 40px;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

.team {
    padding: 100px 0;
    background: white;
    overflow: hidden;
    position: relative;
}

.team-slider {
    width: 100%;
    padding: 50px 0;
    overflow: hidden;
}

.team-track {
    display: flex;
    gap: 40px;
    /* space between team cards */
    will-change: transform;
    /* smooth scrolling */
    cursor: grab;
}

.team-track:active {
    cursor: grabbing;
}

.team-card {
    width: 350px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 24px;
    padding: 50px 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--primary-soft);
    transition: all 0.3s ease;
    position: relative;
    user-select: none;
}

.team-card:hover {
    transform: scale(1.05) translateY(-10px);
    box-shadow: 0 25px 60px var(--primary-glow);
    border-color: var(--primary);
    background: white;
    z-index: 10;
}

.team-card:active {
    transform: scale(0.98);
}

.team-img {
    width: 180px;
    height: 180px;
    margin: 0 auto 25px;
    border-radius: 50%;
    padding: 6px;
    background: white;
    border: 4px solid var(--primary-ultralight);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.team-card:hover .team-img {
    border-color: var(--primary);
}

.team-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 50%;
    transition: transform 0.5s ease;
}

.team-card:hover .team-img img {
    transform: scale(1.15);
}

.team-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
}

.team-card .role {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* =========================================
   LEGAL SECTION (Fully Responsive)
   ========================================= */

.legal {
    padding: 80px 0;
    background: #1e293b;
    color: white;
    position: relative;
    overflow: hidden;
    /* Prevents the glow from causing scrollbars */
}

/* Green Glow Effect */
.legal::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: radial-gradient(circle, rgba(5, 150, 105, 0.2) 0%, transparent 70%);
    z-index: 1;
}

/* Main Box Container */
.legal-box {
    margin: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px;
}

/* Left Content */
.legal-info h3 {
    color: var(--primary-light);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.legal-info p {
    color: #cbd5e1;
    margin-bottom: 5px;
    font-size: 1rem;
}

/* Right Content (Verification Badge/QR) */
.legal-verify {
    text-align: center;
    flex-shrink: 0;
    /* Prevents image from shrinking */
}

.legal-verify img {
    /* Optional: Ensure QR/Badge doesn't get huge */
    max-width: 120px;
    height: auto;
}

.legal-verify p {
    color: #94a3b8;
    margin-top: 10px;
    font-size: 0.85rem;
}

.legal-row {
    max-width: 1500px;
    margin: 0 auto;
    min-height: 400px;
    align-items: stretch;
}


.legal-left,
.legal-middle,
.legal-right {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.legal-left {
    min-width: 300px;
    height: 100%;
    position: relative;
    border-radius: 12px 0 0 12px;
    overflow: hidden;
}

.legal-left iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.map-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    text-decoration: none;
    z-index: 10;
}

.map-btn {
    background: var(--primary);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* RIGHT CARD */
.legal-right {
    flex: 1;
    min-width: 300px;
    border-radius: 0 12px 12px 0;
}

.legal-left,
.legal-middle,
.legal-right {
    height: 100%;
}

/* middle image styling */
.legal-middle {
    overflow: hidden;

}

.legal-image {
    max-height: 380px;
    width: 100%;
    object-fit: contain;
    margin: auto;
    display: block;
}


/* Responsive */
@media (max-width: 768px) {
    .legal-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .legal-left,
    .legal-middle,
    .legal-right {
        width: 100%;
    }

    .legal-left {
        height: 300px;
        margin-bottom: 20px;
    }
}

/* =========================================
   RESPONSIVE MEDIA QUERIES
   ========================================= */

/* --- Mobile & Tablets (Max Width: 768px) --- */
@media (max-width: 768px) {
    .legal {
        padding: 60px 0;
        /* Less padding on mobile */
    }

    .legal-box {
        flex-direction: column;
        /* Stack vertically */
        text-align: center;
        /* Center align text */
        padding: 30px 20px;
        /* Reduce box padding */
        gap: 30px;
        /* Add space between text and verify badge */
    }

    .legal-info {
        width: 100%;
    }

    .legal-info h3 {
        font-size: 1.35rem;
        /* Slightly smaller title */
    }

    .legal-verify {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

/* =========================================
   FOOTER SECTION (Fully Responsive)
   ========================================= */

footer {
    background-color: #0f172a;
    color: #e2e8f0;
    padding: 60px 0 20px;
    border-top: 1px solid #1e293b;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

/* Enhanced Green Glow */
footer::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(5, 150, 105, 0.15) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

/* --- MAIN GRID LAYOUT --- */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(30px, 5vw, 80px);
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
    padding: 0;
}

/* --- COLUMN STYLES --- */
.footer-col h4 {
    margin-bottom: 25px;
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.footer-col h4::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--primary);
    margin-top: 8px;
    border-radius: 2px;
}

.footer-desc {
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 100%;
}

.office-map-embed iframe {
    width: 100%;
    height: 180px;
    border-radius: 10px;
}

/* --- CONTACT LIST --- */
.contact-list li {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    color: #cbd5e1;
    width: 100%;
}

.contact-list {
    padding: 0;
    margin: 0;
}

.contact-list .office-map {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.icon-box {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
    transition: 0.3s;
}

.contact-list li:hover .icon-box {
    background: var(--primary);
    color: white;
}

/* --- FOOTER LINKS --- */
.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #94a3b8;
    transition: 0.3s ease;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.footer-links a::before {
    content: '›';
    margin-right: 8px;
    color: var(--primary);
    font-weight: 800;
    transition: 0.3s;
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

/* --- CONTACT FORM --- */
.footer-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    position: relative;
}

.footer-form input,
.footer-form textarea {
    width: 100%;
    padding: 15px;
    background: transparent;
    border: 1px solid #334155;
    color: white;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: 0.3s ease;
}

.footer-form input:focus,
.footer-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(5, 150, 105, 0.1);
}

.input-group label {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
    transition: 0.3s ease;
    background: #0f172a;
    padding: 0 5px;
}

.input-group textarea+label {
    top: 20px;
}

/* Floating Label Logic */
.footer-form input:focus+label,
.footer-form input:not(:placeholder-shown)+label,
.footer-form textarea:focus+label,
.footer-form textarea:not(:placeholder-shown)+label {
    top: 0;
    font-size: 0.8rem;
    color: var(--primary);
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.5);
}

/* --- BOTTOM BAR --- */
.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    color: #64748b;
    padding-left: 15px;
    padding-right: 15px;
}

.socials {
    display: flex;
    gap: 10px;
}

.socials a {
    color: #94a3b8;
    font-size: 1.2rem;
    transition: 0.3s;
    background: rgba(255, 255, 255, 0.05);
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
}

.socials a:hover {
    color: white;
    background: var(--primary);
    transform: translateY(-3px);
}

/* =========================================
   RESPONSIVE MEDIA QUERIES
   ========================================= */

/* --- Tablet (Max Width: 968px) --- */
@media (max-width: 968px) {
    footer {
        padding: 60px 0 30px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

/* --- Mobile Landscape (Max Width: 768px) --- */
@media (max-width: 768px) {
    .footer-grid {
        /* On smaller tablets, force 2 columns max, but allow wrapping */
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .socials {
        justify-content: center;
    }

    .socials a {
        margin-left: 5px;
        margin-right: 5px;
    }
}

/* --- Small Phones (Max Width: 480px) --- */
@media (max-width: 480px) {
    footer {
        padding: 50px 0 20px;
    }

    /* Force Single Column for very small screens to avoid squishing */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-desc {
        max-width: 100%;
        /* Let text fill width */
    }

    /* Fix input zoom on iOS by ensuring font size is 16px */
    .footer-form input,
    .footer-form textarea {
        font-size: 16px;
    }

    .footer-col h4 {
        margin-bottom: 20px;
    }
}

/* --- About us page --- */

.about-slider {
    height: 70vh;
    /* 70% of viewport height */
    position: relative;
    /* needed for absolute positioning of text */
    overflow: hidden;
}

.about-slider .carousel-inner,
.about-slider .carousel-item {
    height: 100%;
}

.about-slider .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Dark overlay */
.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

/* Centered text */
.carousel-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    padding: 0 20px;
}

.back-arrow {
    color: #fff;
    /* white arrow/text */
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    /* makes sure it’s above slider/images */
    background: rgba(0, 0, 0, 0.3);
    /* optional background */
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.3s;
}

.back-arrow:hover {
    background: rgba(0, 0, 0, 0.6);
    text-decoration: none;
}

h3.line.from-left {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary)
}

.about-content p.line {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-main);
}

.about-content ul.line {
    font-size: 15px;
    line-height: 1.75;
    padding-left: 1.2rem;
}

.about-content ul.line li {
    margin-bottom: 0.4rem;
}

.mv-card {
    opacity: 1 !important;
    transform: none !important;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--primary-ultralight);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    transform: translateY(40px);
}

.about-mv .row {
    perspective: 1200px;
}

.about-mv .col-12.col-lg-6 {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mv-card {
    flex: 1;
}

.mv-card.show {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: all 0.6s ease-out;
}

.office-map {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    flex-wrap: nowrap;
}

.office-info {
    display: flex;
    gap: 10px;
    flex: 1;
}

.office-map-embed {
    flex: 1;
    min-width: 200px;
}

.office-map-embed iframe {
    width: 100%;
    height: 130px;
    border: 0;
    border-radius: 8px;
}

.why-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.why-card i {
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 15px;
}

.why-card h5 {
    font-weight: 600;
    margin-bottom: 10px;
}

.why-card p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}

.why-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.section-intro h2 {
    font-weight: 800;
    color: var(--primary);
    font-size: 2.5rem;
    line-height: 1.2;
}

.row h3,
.why-choose h3 {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.75rem;
    line-height: 1.3;
}

.mv-card .card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 40px;
    gap: 40px;
}

.mv-content {
    flex: 0 0 50%;
}

.mv-image {
    flex-shrink: 0;
    width: 220px;
    aspect-ratio: 1 / 1;
    /* 🔥 guarantees square */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 37px;
}

.mv-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid #e5e7eb;
}

@media (max-width: 992px) {
    .mv-card .card-body {
        justify-content: center; /* center row content */
    }

    .mv-image {
        width: 180px;
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .mv-card .card-body {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .mv-image {
        width: 150px;
        margin: 16px auto 0;
    }

    .mv-content {
        flex: unset;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .mv-image {
        width: 130px;
    }
}

.card-title {
    font-weight: 700;         
    color: var(--primary);       
    font-size: 1.25rem;      
    margin-bottom: 15px;       
}
