/* ===== Typography (Local Fonts) ===== */
@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir.woff2') format('woff2'),
        url('../fonts/Vazir.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir-Bold.woff2') format('woff2'),
        url('../fonts/Vazir-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir-Medium.woff2') format('woff2'),
        url('../fonts/Vazir-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir-Light.woff2') format('woff2'),
        url('../fonts/Vazir-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir-Thin.woff2') format('woff2'),
        url('../fonts/Vazir-Thin.woff') format('woff');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Premium Light Navy Palette */
    --primary: #1B2735;         /* Light Navy */
    --primary-dark: #0F1720;
    --primary-light: #2C3E50;
    --secondary: #1B2735;
    --accent: #1B2735;          /* Replacing Gold with Light Navy */
    --accent-hover: #243447;
    --accent-light: rgba(27, 39, 53, 0.1);
    
    /* Backgrounds & Text */
    --bg-light: #F4F8FB;
    --bg-white: #FFFFFF;
    --bg-gradient: linear-gradient(135deg, #F4F8FB 0%, #E8F1F7 100%);
    
    --text-main: #1B2735;
    --text-muted: #5A6A85;
    --success: #1B2735;
    
    --glass: rgba(255, 255, 255, 0.9);
    --glass-dark: rgba(27, 39, 53, 0.95);
    
    --header-height: 85px;

    /* Modern Spacing & Premium Borders */
    --radius-sm: 8px;
    --radius: 16px;
    --radius-lg: 24px;
    
    /* Premium Soft Shadows */
    --shadow-sm: 0 4px 12px rgba(27, 39, 53, 0.03);
    --shadow-md: 0 15px 35px -10px rgba(27, 39, 53, 0.08);
    --shadow-lg: 0 30px 60px -15px rgba(27, 39, 53, 0.12);
    --shadow-accent: 0 12px 24px -6px rgba(27, 39, 53, 0.3);

    /* Transitions */
    --transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazir', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body.has-custom-cursor,
body.has-custom-cursor * {
    cursor: none !important;
}

/* ===== Custom Cursor (Branding Navy Blue Theme) ===== */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    margin-left: -4px;
    margin-top: -4px;
    background: #ffffff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000000;
    will-change: transform;
    transition: width 0.3s ease, height 0.3s ease, margin 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    box-shadow: 0 0 12px rgba(27, 39, 53, 0.8);
}

.custom-cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    width: 80px;
    height: 80px;
    margin-left: -40px;
    margin-top: -40px;
    background: radial-gradient(circle, rgba(27, 39, 53, 0.25) 0%, rgba(255, 255, 255, 0) 75%);
    border: none;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999999;
    will-change: transform;
    transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        height 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        margin 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        opacity 0.3s ease,
        background 0.3s ease;
    opacity: 0;
}

.custom-cursor.cursor-visible,
.custom-cursor-outline.cursor-visible {
    opacity: 1;
}

.custom-cursor.cursor-hover {
    width: 12px;
    height: 12px;
    margin-left: -6px;
    margin-top: -6px;
    opacity: 1;
}

.custom-cursor-outline.cursor-hover {
    width: 100px;
    height: 100px;
    margin-left: -50px;
    margin-top: -50px;
    background: radial-gradient(circle, rgba(27, 39, 53, 0.4) 0%, rgba(255, 255, 255, 0) 75%);
}

.custom-cursor.cursor-click {
    transform: scale(0.6);
}

.custom-cursor-outline.cursor-click {
    transform: scale(0.85);
    background: rgba(27, 39, 53, 0.3);
}


body,
input,
button,
select,
textarea {
    font-family: 'Vazir', sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 10px;
    border: 3px solid var(--bg-light);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    /* Offset for sticky header */
}


body {
    background: var(--bg-gradient);
    color: var(--text-main);
    line-height: 1.8;
    overflow-x: hidden;
    direction: rtl;
}

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

ul {
    list-style: none;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 400px) {
    .container {
        padding: 0 16px;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 0 12px;
    }
}

h1,
h2,
h3,
h4 {
    color: var(--primary);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-title {
    text-align: center;
    margin-bottom: 5rem;
    font-size: clamp(2rem, 5vw, 3.25rem);
    position: relative;
    padding-bottom: 2rem;
    font-weight: 800;
    color: var(--primary);
}

@media (max-width: 768px) {
    .section-title {
        margin-bottom: 3rem;
    }
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 10px;
}

.section-title-right {
    text-align: right;
}

.section-title-right::after {
    left: auto;
    right: 0;
    transform: none;
    background: linear-gradient(90deg, var(--accent), transparent);
}

.services-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.title-logo {
    width: 45px;
    height: 45px;
    transition: transform 0.1s ease-out;
    will-change: transform;
}


/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    gap: 10px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--secondary);
    color: white;
    box-shadow: 0 8px 20px -6px rgba(27, 39, 53, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-primary::before {
    display: none;
    /* Simplify button effects */
}

.btn-primary:hover {
    background: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 15px 30px -8px rgba(10, 26, 47, 0.3);
}

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

.btn-outline:hover {
    background-color: var(--accent);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-accent);
}

.btn-header {
    padding: 10px 24px;
    font-size: 0.9rem;
}


/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
    transition: var(--transition);
    border-bottom: 1px solid rgba(10, 25, 47, 0.05);
}

header.scrolled {
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 60px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 2;
}

.logo img {
    height: 45px;
    filter: none;
    transition: var(--transition);
}

.logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: var(--primary-dark);
}

.logo-text {
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.15em;
    font-family: serif;
}

.logo-subtext {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.6em;
    margin-top: 2px;
    opacity: 0.9;
}

.main-menu {
    display: flex;
    align-items: center;
    gap: 45px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.main-menu>a,
.main-menu>.dropdown>.dropdown-trigger {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary);
    position: relative;
    white-space: nowrap;
}

.main-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.main-menu a:hover::after {
    width: 100%;
}

.main-menu a:hover,
.main-menu .dropdown:hover .dropdown-trigger {
    color: var(--accent);
}

.header-left,
.header-btns-container {
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 2;
}

.hamburger-btn {
    background-color: transparent;
    border: 1px solid var(--primary-dark);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.hamburger-btn span {
    width: 20px;
    height: 2px;
    background-color: var(--primary-dark);
    transition: var(--transition);
}

.phone-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--primary-dark);
    background-color: transparent;
    border-radius: 8px;
    color: var(--primary-dark);
    font-size: 1.1rem;
    transition: var(--transition);
}

.phone-icon-btn:hover {
    color: var(--accent);
    transform: scale(1.1);
}

.btn-consultation {
    background: white;
    color: var(--primary-dark);
    padding: 0 20px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    border-radius: 50px;
    border: 1px solid var(--primary-dark);
    font-weight: 700;
}

.btn-consultation .dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    margin-left: 8px;
    display: inline-block;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.6;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: -20px;
    background-color: var(--bg-white);
    min-width: 260px;
    border-radius: 8px;
    /* User requested 8px specifically */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    /* User requested specific shadow */
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.2s;
    /* Delayed visibility hidden */
    z-index: 1001;
    border: 1px solid rgba(0, 0, 0, 0.05);
    list-style: none;
    pointer-events: none; /* Fix: prevent interaction during fade-out */
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0s;
    /* Instant visibility visible */
    pointer-events: auto; /* Fix: allow interaction when hovered */
}

/* Pseudo-element to bridge the gap for hover */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
}

.dropdown-menu li {
    position: relative;
    list-style: none;
}

.dropdown-menu a {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px !important;
    color: var(--text-main) !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    transition: var(--transition) !important;
    width: 100%;
    text-decoration: none;
}

.dropdown-menu a i {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.dropdown-menu li:hover>a {
    background-color: #f1f5f9 !important;
    color: var(--accent) !important;
}

.dropdown-menu li:first-child>a,
.submenu li:first-child>a {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.dropdown-menu li:last-child>a,
.submenu li:last-child>a {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Submenu Styles */
.submenu {
    position: absolute;
    top: 0;
    right: 100%;
    /* Position to the left of main menu in RTL */
    margin-right: 2px;
    background-color: var(--bg-white);
    min-width: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.2s;
    z-index: 1002;
    border: 1px solid rgba(0, 0, 0, 0.05);
    list-style: none;
}

.has-submenu:hover>.submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0s;
}

/* Bridge for Submenu hover */
.submenu::before {
    content: '';
    position: absolute;
    top: 0;
    right: -10px;
    width: 10px;
    height: 100%;
}

.submenu a {
    padding: 10px 24px !important;
    font-size: 0.9rem !important;
}

.submenu a:hover {
    padding-right: 30px !important;
    /* Subtle slide effect on hover */
}

@media (max-width: 992px) {
    .main-menu {
        display: none;
        /* Mobile menu is handled by sidebar */
    }
    
    .hamburger-btn {
        display: flex;
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #F4F8FB 0%, #E8F1F7 100%);
    padding: var(--header-height) 0 80px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.hero-bg-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/Rafa-Background.webp') center/cover no-repeat;
    opacity: 0.04;
    z-index: 1;
    pointer-events: none;
    display: none;
    /* Removed as requested */
}

.hero .container {
    display: flex;
    justify-content: center;
    z-index: 2;
}

.hero-content {
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero h1 {
    color: var(--primary);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 2rem;
    font-weight: 800;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    margin-bottom: 4rem;
    color: var(--secondary);
    opacity: 0.95;
    max-width: 800px;
    font-weight: 400;
}

.hero-brand-name {
    font-size: clamp(1rem, 6vw, 6rem);
    font-weight: 700;
    color: var(--secondary);
    opacity: 0.5;
    letter-spacing: 0.5em;
    margin-right: -0.5em;
    text-align: center;
    text-transform: uppercase;
    margin-top: 3rem;
    user-select: none;
    line-height: 1;
    white-space: nowrap;
    position: relative;
    z-index: 2;
}

/* Premium Parallax Background Divider */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background-image: 
        linear-gradient(rgba(10, 26, 47, 0.15) 2px, transparent 2px),
        linear-gradient(to top, rgba(10, 26, 47, 0.15) 2px, transparent 2px),
        url('../img/Rafa-Background.webp');
    background-attachment: scroll, scroll, fixed;
    background-size: 100% 100%, 100% 100%, cover;
    background-position: center top, center bottom, center;
    background-repeat: no-repeat;
    z-index: 1;
    pointer-events: none;
    opacity: 0.8; /* Subtle blending */
}

.hero-btns {
    display: flex;
    gap: 20px;
}


/* Services Grid — Mobile First */
/* Mobile: clean compact 1-column vertical layout (NO stack logic) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

/* Desktop: restore the premium 6-column deck layout */
@media (min-width: 768px) {
    #services .container {
        max-width: 1600px; /* Even wider for larger cards */
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 20px;
    }

    .services-grid .service-card {
        grid-column: auto !important;
        padding: 30px 20px; /* Increased padding for larger cards */
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        aspect-ratio: 1 / 1; /* Force square shape */
    }

    /* Adjust sizes for even larger square cards */
    .services-grid .service-card i {
        font-size: 2.2rem !important;
        margin-bottom: 12px !important;
    }

    .services-grid .service-card h3 {
        font-size: 1.1rem !important;
        margin-bottom: 10px !important;
        min-height: 2.8rem !important; /* Align descriptions */
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .services-grid .service-card p {
        font-size: 0.85rem !important;
        line-height: 1.6 !important;
        margin-bottom: 12px !important;
        color: var(--text-muted);
        min-height: 3.2rem !important; /* Align case count */
    }

    .services-grid .service-card .case-count {
        font-size: 0.8rem !important;
        padding: 6px 14px !important;
        margin-top: auto !important; /* Push to bottom */
    }
}

/* Infinite Scroll Ticker */
.countries-ticker {
    overflow: hidden;
    padding: 20px 0;
    white-space: nowrap;
    position: relative;
    direction: ltr;
    /* Animation is smoother in LTR */
}

.ticker-content {
    display: inline-flex;
    animation: ticker-scroll 30s linear infinite;
    will-change: transform; /* GPU acceleration for smooth animation */
}

.countries-ticker:hover .ticker-content {
    animation-play-state: paused;
}

/* ── Flag Capsule Ticker Items ───────────────────────────────────── */
.ticker-item {
    display: inline-flex;
    align-items: center;
    justify-content: center; /* Center content */
    gap: 10px;
    padding: 12px 28px;
    min-width: 160px; /* Make all capsules uniform in size like UK */
    margin: 0 12px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.92rem;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); /* Premium gradient background */
    /* Premium shadow: lifts the capsule off the white page background */
    box-shadow:
        0 4px 14px rgba(10, 20, 35, 0.18),
        0 1px 4px  rgba(10, 20, 35, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    position: relative; /* For absolute child */
}

/* ── Flag Background Image (Real DOM Element) ── */
.ticker-item .flag-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45; /* Lower opacity for better text readability */
    z-index: 1;
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none; /* Don't interfere with clicks */
    border-radius: 50px;
    transform: scale(1);
}

/* Ensure content stays above flag */
.ticker-item > i,
.ticker-item > span {
    position: relative;
    z-index: 2;
}

/* Pin icon — white to match text */
.ticker-item i {
    color: #ffffff;
    opacity: 0.9;
    font-size: 0.85rem;
}

/* Hover: lift + brighter flag */
.ticker-item:hover {
    color: #ffffff;
    transform: translateY(-4px);
    box-shadow:
        0 10px 28px rgba(10, 20, 35, 0.28),
        0 3px  8px  rgba(10, 20, 35, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
}

.ticker-item:hover .flag-bg {
    opacity: 0.75; /* Flag becomes visible on hover */
    transform: scale(1.15); /* Zoom effect for premium feel */
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }

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

.country-modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
}

.country-modal-overlay.open {
    display: flex;
}

.country-modal {
    width: min(1120px, 100%);
    max-height: min(92vh, 820px);
    background: #ffffff;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
    position: relative;
}

.country-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    z-index: 10;
}

.country-modal-close:hover {
    transform: scale(1.05);
}

.country-modal-body {
    display: grid;
    grid-template-columns: 1.1fr 1.3fr;
    min-height: 440px;
}

.country-modal-image {
    overflow: hidden;
}

.country-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.country-modal-info {
    padding: 42px 48px;
    overflow-y: auto;
}

.country-modal-headline {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 22px;
}

.country-modal-headline span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    font-size: 1.9rem;
    border-radius: 18px;
    background: rgba(249, 208, 18, 0.16);
    color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(249, 208, 18, 0.18);
}

.country-modal-headline h2 {
    font-size: clamp(1.9rem, 2.4vw, 2.6rem);
    margin-bottom: 12px;
}

.country-modal-headline p {
    color: var(--text-muted);
    line-height: 1.85;
}

.country-modal-section {
    margin-top: 28px;
}

.country-modal-section h3 {
    font-size: 1.05rem;
    margin-bottom: 14px;
    color: #111827;
}

.country-modal-section p {
    color: var(--text-muted);
    line-height: 1.8;
}

.country-modal-section ul {
    display: grid;
    gap: 12px;
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.country-modal-section ul li {
    padding: 14px 18px;
    background: #f8fafc;
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, 1);
    color: #111827;
    font-weight: 600;
}

@media (max-width: 960px) {
    .country-modal-body {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .country-modal-info {
        padding: 30px 30px 34px;
    }
}

@media (max-width: 640px) {
    .country-modal-close {
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
    }

    .country-modal-info {
        padding: 22px 20px;
    }

    .country-modal-headline {
        flex-direction: column;
        gap: 14px;
    }
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ===================================================
   SERVICE CARD — Base (shared mobile + desktop)
=================================================== */
.service-card {
    background: var(--bg-white);
    padding: 50px 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    display: block;
    color: inherit;
    text-decoration: none;
    border: 1px solid rgba(10, 26, 47, 0.04);
    position: relative;
    overflow: hidden;
    /* Deck Spread: deliberate 1.4s unfold — grand but not sluggish */
    transition: transform 1.4s cubic-bezier(0.19, 1, 0.22, 1),
                opacity 1.4s ease,
                box-shadow 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    transform-origin: center center;
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--bg-light), transparent);
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: -1;
}

/* ===================================================
   MOBILE (<767px): Subtle Fade-In Reveal
   NO stack logic — keep it pristine and performant
=================================================== */
@media (max-width: 767px) {
    .service-card {
        padding: 12px 8px;
        /* Mobile initial state for scroll-reveal */
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease, transform 0.6s ease;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        min-height: 180px;
        will-change: transform, opacity;
    }

    /* JS adds this class when card enters viewport on mobile */
    .service-card.is-visible {
        opacity: 1;
        transform: translateY(0) !important;
    }

    .service-card i {
        font-size: 1.6rem;
        margin-bottom: 0.6rem;
    }

    .service-card h3 {
        font-size: 0.85rem;
        margin-bottom: 4px;
        text-align: center;
    }

    .service-card p {
        font-size: 0.7rem;
        line-height: 1.4;
        margin-bottom: 8px;
        color: var(--text-muted);
        text-align: center;
    }

    .service-card .case-count {
        font-size: 0.65rem;
        padding: 2px 8px;
        margin-top: auto;
    }

    /* Make the last card span full width if it's an odd item */
    .services-grid .service-card:last-child:nth-child(odd) {
        grid-column: span 2;
    }

    /* Disable hover float on mobile (touch) */
    .service-card:hover {
        transform: translateY(0);
    }
}

/* ===================================================
   DESKTOP / TABLET (≥768px): Card Stack Unfold
=================================================== */
@media (min-width: 768px) {
    .services-grid .service-card {
        opacity: 0;
        will-change: transform, opacity;
        transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease;
    }

    /* Odd cards enter from top */
    .services-grid .service-card:nth-child(odd) {
        transform: translateY(-60px);
    }

    /* Even cards enter from bottom */
    .services-grid .service-card:nth-child(even) {
        transform: translateY(60px);
    }

    /* Visible state */
    .services-grid .service-card.is-visible {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggered delays */
    .services-grid .service-card.is-visible:nth-child(1) { transition-delay: 0.1s; }
    .services-grid .service-card.is-visible:nth-child(2) { transition-delay: 0.2s; }
    .services-grid .service-card.is-visible:nth-child(3) { transition-delay: 0.3s; }
    .services-grid .service-card.is-visible:nth-child(4) { transition-delay: 0.4s; }
    .services-grid .service-card.is-visible:nth-child(5) { transition-delay: 0.5s; }

    /* Hover float */
    .services-grid .service-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 24px 60px -12px rgba(27, 39, 53, 0.18),
                    0 8px 20px -4px rgba(27, 39, 53, 0.08);
        border-color: var(--accent);
    }

    .services-grid .service-card:hover::before {
        opacity: 1;
    }

    .services-grid .service-card:hover i {
        transform: scale(1.1) translateY(-5px);
        color: var(--primary);
    }
}

/* Icon base styles (shared) */
.service-card i {
    font-size: 3.5rem;
    color: var(--accent);
    margin-bottom: 2.5rem;
    display: block;
    transition: transform 1.4s cubic-bezier(0.19, 1, 0.22, 1),
                color 0.5s ease;
}

/* Countries Section */
.countries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.country-item {
    background: var(--bg-white);
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 600;
    border: 1px solid rgba(10, 26, 47, 0.05);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.country-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
    color: var(--secondary);
}

.case-count {
    display: inline-block;
    margin-top: 15px;
    padding: 4px 12px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

/* Steps Section */
/* Steps Section */
.steps-container {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    position: relative;
    padding: 80px 0 40px; /* More top padding for negative margin of numbers */
}

/* Connecting Line */
.steps-container::before {
    content: '';
    position: absolute;
    top: 114px; /* Exactly in the middle between number and title */
    left: 50px;
    right: 50px;
    height: 1px;
    background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.2) 20%, rgba(255,255,255,0.2) 80%, rgba(255,255,255,0));
    z-index: 0;
}

.step-card {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
    background: transparent; /* Ultra minimal base state */
    padding: 40px 20px 30px;
    border-radius: 16px;
    border: 1px solid transparent;
    opacity: 0; /* For animation */
    will-change: transform, opacity;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), 
                opacity 0.8s ease,
                background-color 0.4s ease,
                border-color 0.4s ease,
                box-shadow 0.4s ease;
}

/* Odd cards enter from top */
.steps-container .step-card:nth-child(odd) {
    transform: translateY(-40px);
}

/* Even cards enter from bottom */
.steps-container .step-card:nth-child(even) {
    transform: translateY(40px);
}

/* Visible state */
.steps-container .step-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays */
.steps-container .step-card.is-visible:nth-child(1) { transition-delay: 0.1s; }
.steps-container .step-card.is-visible:nth-child(2) { transition-delay: 0.2s; }
.steps-container .step-card.is-visible:nth-child(3) { transition-delay: 0.3s; }
.steps-container .step-card.is-visible:nth-child(4) { transition-delay: 0.4s; }
.steps-container .step-card.is-visible:nth-child(5) { transition-delay: 0.5s; }

/* Hover effect: Minimal glassmorphism reveal */
.step-card:hover {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateY(-5px) !important;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.step-card h3 {
    color: white;
    margin-bottom: 12px;
    font-size: 1.25rem;
    font-weight: 700;
}

.step-number {
    width: 56px; /* Slightly smaller for minimal look */
    height: 56px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
    color: #1a202c;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    margin: -74px auto 1.5rem; /* Moved up a tiny bit so it's not on the line */
    position: relative;
    z-index: 2;
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.9),
        inset 0 -2px 2px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: transform 0.3s ease;
}

.step-card:hover .step-number {
    transform: scale(1.05);
}

/* Form Styles */
.form-container {
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius-lg);
    max-width: 700px; /* Made smaller and more focused */
    margin: 0 auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05); /* Softer shadow */
    border: 1px solid rgba(10, 26, 47, 0.05);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px; /* Reduced gap */
}

.form-group {
    margin-bottom: 20px; /* Reduced margin */
}

.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin-bottom: 8px; /* Reduced margin */
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem; /* Slightly smaller */
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 16px; /* Made smaller */
    border: 1.5px solid #E2E8F0;
    border-radius: var(--radius-sm);
    font-size: 0.95rem; /* Slightly smaller */
    transition: var(--transition);
    background: #F9FBFC;
    color: var(--primary);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: white;
    box-shadow: 0 0 0 4px rgba(197, 160, 40, 0.1);
}


/* Sidebar / Hamburger */
.hamburger-btn {
    display: none; /* Hide by default on desktop */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    background: var(--secondary);
    border: none;
    padding: 0;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.hamburger-btn:hover {
    background: var(--accent);
    transform: scale(1.05);
}

.hamburger-btn span {
    width: 22px;
    height: 2px;
    background: white;
    transition: var(--transition);
    border-radius: 2px;
}

.hamburger-btn:hover span {
    background: var(--primary);
}


.services-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    right: auto;
    width: min(420px, 100%);
    height: 100vh;
    background: var(--glass-dark);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    color: white;
    z-index: 1100;
    padding: 40px 24px; /* Reduced padding for better mobile fit and less top space */
    transition: all 0.6s cubic-bezier(0.77, 0, 0.175, 1);
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-left: none;
}

.services-sidebar.active {
    left: 0;
}

.services-sidebar .sidebar-title {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 25px;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
}

.services-sidebar .sidebar-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

.sidebar-close {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2.5rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    z-index: 10; /* Ensure it is clickable and above other elements */
}

.sidebar-close:hover {
    transform: rotate(90deg) scale(1.1);
    color: white;
}

.category-list h4 {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.95); /* Light color for contrast */
    margin: 20px 0 10px;
    font-size: 1.1rem;
    font-weight: 700;
}

.category-list h4 i {
    color: rgba(255, 255, 255, 0.7); /* Light icon color */
}

.category-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list ul li {
    margin-bottom: 8px;
}

.category-list ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: 12px; /* Smoother border radius */
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-list ul li a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateX(-5px); /* Slide slightly in RTL */
}

.category-list ul li a i {
    transition: transform 0.3s ease;
    color: rgba(255, 255, 255, 0.6); /* Light arrow color */
}

/* Submenu Styles with Smooth Transition */
.mobile-submenu {
    list-style: none;
    padding: 0 15px 0 0 !important; /* Indent in RTL */
    margin-top: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.05); /* Subtler border */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin-top 0.3s ease;
}

.mobile-submenu.active {
    max-height: 500px; /* Arbitrary large height for transition */
    opacity: 1;
    margin-top: 8px;
    padding-bottom: 8px !important;
}

.mobile-submenu li {
    margin-bottom: 6px; /* Slightly more space for breathing room */
}

.mobile-submenu li a {
    padding: 6px 12px !important; /* Balanced padding */
    font-size: 0.85rem !important;
    background: transparent !important;
    color: rgba(255, 255, 255, 0.6) !important;
    border: none !important;
    box-shadow: none !important;
    transition: all 0.3s ease;
}

.mobile-submenu li a:hover {
    color: #ffffff !important;
    background: transparent !important;
    transform: translateX(-2px) !important; /* Subtler shift */
}



/* Minimal Footer */
.footer-minimal {
    background: var(--bg-white);
    padding: 60px 0;
    border-top: 1px solid rgba(10, 26, 47, 0.05);
}

.footer-minimal-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-minimal-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.footer-logo-img {
    filter: none;
    height: 45px;
}

.footer-separator {
    width: 1px;
    height: 35px;
    background: rgba(1, 42, 32, 0.1);
}

.footer-copyright-text {
    color: var(--primary-dark);
    opacity: 0.7;
    font-size: 0.85rem;
}

.footer-minimal-center {
    display: flex;
    align-items: center;
    gap: 35px;
}

.footer-minimal-center a {
    color: var(--primary-dark);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.footer-minimal-center a:hover {
    color: var(--accent);
}

.footer-minimal-left {
    display: flex;
    gap: 20px;
    font-size: 1.3rem;
}

.footer-minimal-left a {
    color: var(--primary-dark);
    transition: var(--transition);
}

.footer-minimal-left a:hover {
    color: var(--accent);
}

@media (max-width: 992px) {
    .footer-minimal-content {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 30px;
    }

    .footer-minimal-right {
        flex-direction: column;
        gap: 15px;
    }

    .footer-separator {
        width: 50px;
        height: 1px;
    }
}

/* Floating WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background-color: #ffffff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* Utilities */
/* About Section Refinements */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-content {
    opacity: 0;
    transform: translateX(40px); /* Slide in from right in RTL */
    will-change: transform, opacity;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease;
}

.about-image-wrapper {
    position: relative;
    opacity: 0;
    transform: translateX(-40px); /* Slide in from left in RTL */
    will-change: transform, opacity;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease;
}

.about-grid.is-visible .about-content,
.about-grid.is-visible .about-image-wrapper {
    opacity: 1;
    transform: translateX(0);
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: var(--primary);
    font-weight: 600;
}

.feature-item i {
    color: var(--accent);
    font-size: 1.2rem;
}

.floating-badge {
    position: absolute;
    bottom: 30px;
    right: -30px; /* Overlap slightly out of the image to the right in RTL */
    background: white;
    padding: 15px 25px;
    border-radius: 16px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 2;
    transition: transform 0.3s ease;
}

.floating-badge:hover {
    transform: translateY(-5px);
}

.badge-icon {
    width: 45px;
    height: 45px;
    background: rgba(212, 175, 55, 0.1); /* Accent color with opacity */
    color: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.badge-content {
    display: flex;
    flex-direction: column;
}

.badge-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.badge-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.about-img {
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: transform 0.5s ease;
    display: block;
    margin: 0 auto;
}

.about-img:hover {
    transform: scale(1.02);
}

.section-padding {
    padding: clamp(60px, 8vw, 100px) 0;
}

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

    .main-menu {
        display: none;
    }

    header {
        height: 80px;
    }

    .hero h1 {
        font-size: 2.75rem;
        line-height: 1.2;
    }

    .steps-container {
        flex-direction: column;
        gap: 50px;
        padding-top: 60px;
    }

    .steps-container::before {
        display: none;
    }

    .step-card {
        padding: 50px 30px 30px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .why-us-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Removed legacy services-grid rules */

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .section-padding {
        padding: 80px 0;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.25rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    header {
        height: 75px;
    }

    .logo {
        font-size: 1.25rem;
    }

    .btn-header {
        display: none;
        /* Hide button on small mobile to save space */
    }

    .nav-content {
        padding: 0 20px;
    }

    .container {
        padding: 0 20px;
    }

    .floating-badge {
        right: 10px;
        bottom: 10px;
        padding: 10px 15px;
        gap: 10px;
    }

    .badge-number {
        font-size: 1.5rem;
    }

    .badge-text {
        font-size: 0.65rem;
    }

    .admission-item {
        width: 160px;
        height: 220px;
        margin: 0 10px;
    }

    .ticker-item {
        padding: 10px 20px;
        font-size: 0.9rem;
        min-width: unset;
    }

    .whatsapp-float {
        width: 45px;
        height: 45px;
        bottom: 20px;
        left: 20px;
    }

    .section-title {
        font-size: 1.85rem;
    }

    .form-container {
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .why-us-grid {
        grid-template-columns: 1fr;
    }

    /* Removed legacy mobile services-grid rules */

    .section-title {
        font-size: 1.65rem;
    }
}


@media (max-width: 600px) {
    .hero-btns {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-btns .btn {
        text-align: center;
        justify-content: center;
    }

    .services-sidebar {
        width: 100%;
    }
}

/* ===== Scroll Reveal Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Page Load Fade-in */
@keyframes pageIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

body {
    animation: pageIn 0.5s ease both;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .reveal,
    .reveal-left,
    .reveal-scale {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Admission Letters Ticker */
.admission-ticker {
    overflow: hidden;
    padding: 30px 0;
    white-space: nowrap;
    position: relative;
    direction: ltr; /* Animation is smoother in LTR */
    background: #f8fafc; /* Light gray background to match screenshot */
}

.admission-ticker-content {
    display: inline-flex;
    animation: admission-scroll 25s linear infinite;
    will-change: transform;
}

.admission-item {
    width: 220px; /* Size of the document thumbnail */
    height: 300px;
    margin: 0 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admission-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Or contain depending on how the images look */
}

@keyframes admission-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-33.333%); /* Move by the width of 6 items (1/3 of total) */
    }
}

/* Why Us Section */
.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 2rem;
}

.why-us-grid .service-card {
    background: var(--bg-light) !important; /* Force light background as requested in inline styles */
    border: none !important;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    will-change: transform, opacity;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease;
}

.why-us-grid .service-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.why-us-grid .service-card:nth-child(1) { transition-delay: 0.1s; }
.why-us-grid .service-card:nth-child(2) { transition-delay: 0.2s; }
.why-us-grid .service-card:nth-child(3) { transition-delay: 0.3s; }
.why-us-grid .service-card:nth-child(4) { transition-delay: 0.4s; }

/* Services Section Dark Mode (matching Process Section) */
#services {
    background: var(--primary);
    color: white;
    overflow: hidden;
}

#services .section-title {
    color: white;
}

#services .service-card {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    box-shadow: none;
}

#services .service-card h3 {
    color: white;
}

#services .service-card p {
    color: rgba(255, 255, 255, 0.7);
}

#services .service-card i {
    color: white;
}

#services .service-card:hover {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.2);
}

#services .service-card:hover i {
    color: white;
}

#services .service-card::before {
    display: none;
}

#services .case-count {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-color: rgba(255, 255, 255, 0.1);
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .contact-grid > div {
        padding: 15px;
        background: white;
        border-radius: 16px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        aspect-ratio: 1 / 1; /* Perfect Square */
    }
    
    .contact-grid > div i {
        font-size: 1.8rem !important;
        margin-bottom: 10px !important;
    }
    
    .contact-grid > div h4 {
        font-size: 0.95rem !important;
        margin-bottom: 5px !important;
    }
    
    .contact-grid > div p {
        font-size: 0.8rem;
        line-height: 1.4;
        margin: 0;
    }
}

/* Why Us Section - Mobile Square Grid */
@media (max-width: 768px) {
    .why-us-grid {
        grid-template-columns: 1fr 1fr !important; /* Force 2x2 grid */
        gap: 15px !important;
    }
    
    .why-us-grid .service-card {
        padding: 15px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        aspect-ratio: 1 / 1 !important; /* Perfect Square */
        background: white !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
    }
    
    .why-us-grid .service-card i {
        font-size: 1.8rem !important;
        margin-bottom: 8px !important;
    }
    
    .why-us-grid .service-card h3 {
        font-size: 0.9rem !important;
        margin-bottom: 5px !important;
    }
    
    .why-us-grid .service-card p {
        font-size: 0.75rem !important;
        line-height: 1.3 !important;
        margin: 0 !important;
    }
}

/* Success Path Section - Mobile Grid */
@media (max-width: 768px) {
    .steps-container {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 15px !important;
        padding-top: 30px !important;
    }
    
    .step-card {
        padding: 20px 15px !important;
        background: rgba(255, 255, 255, 0.03) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        border-radius: 12px !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .step-card:nth-child(5) {
        grid-column: span 2 !important; /* Full width for the last step */
        background: rgba(255, 255, 255, 0.08) !important;
        border-color: rgba(255, 255, 255, 0.15) !important;
    }
    
    .step-card h3 {
        font-size: 0.95rem !important;
        margin-bottom: 8px !important;
        color: white !important;
    }
    
    .step-card p {
        font-size: 0.75rem !important;
        line-height: 1.4 !important;
        margin: 0 !important;
        color: rgba(255, 255, 255, 0.7) !important;
    }
    
    .step-number {
        margin: 0 auto 10px !important;
        width: 35px !important;
        height: 35px !important;
        font-size: 1rem !important;
        border-radius: 8px !important;
    }
}

/* Safety for very small screens (<380px) */
@media (max-width: 380px) {
    .contact-grid > div,
    .why-us-grid .service-card {
        padding: 10px !important;
    }
    
    .contact-grid > div p,
    .why-us-grid .service-card p {
        font-size: 0.7rem !important;
    }
    
    .contact-grid > div h4,
    .why-us-grid .service-card h3 {
        font-size: 0.85rem !important;
    }
    
    .contact-grid > div i,
    .why-us-grid .service-card i {
        font-size: 1.5rem !important;
    }
}

/* ===== Ultra-Small Screens (350px - 400px) ===== */
@media (max-width: 400px) {
    /* Header */
    header {
        height: 65px !important;
    }
    
    .logo-text {
        font-size: 1.9rem !important;
    }
    
    .logo img {
        height: 36px !important;
    }
    
    .hamburger-btn, .phone-icon-btn, .evaluation-btn {
        width: 36px !important;
        height: 36px !important;
    }
    
    /* Hero */
    .hero h1 {
        font-size: 1.8rem !important;
    }
    
    .hero p {
        font-size: 0.95rem !important;
    }
    
    .section-title {
        font-size: 1.5rem !important;
        margin-bottom: 2rem !important;
    }

    /* Service Cards */
    .service-card {
        padding: 10px 6px !important;
        min-height: 160px !important;
    }
    
    .service-card i {
        font-size: 1.4rem !important;
        margin-bottom: 0.4rem !important;
    }
    
    .service-card h3 {
        font-size: 0.75rem !important;
    }
    
    .service-card p {
        font-size: 0.65rem !important;
    }
    
    /* Steps */
    .step-card h3 {
        font-size: 0.85rem !important;
    }
    
    .step-card p {
        font-size: 0.7rem !important;
    }
    
    .step-number {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.85rem !important;
    }
    
    /* Why Us */
    .why-us-grid .service-card {
        padding: 8px !important;
    }
    
    .why-us-grid .service-card i {
        font-size: 1.5rem !important;
        margin-bottom: 6px !important;
    }
    
    .why-us-grid .service-card h3 {
        font-size: 0.8rem !important;
    }
    
    .why-us-grid .service-card p {
        font-size: 0.65rem !important;
        line-height: 1.3 !important;
    }
    
    /* Contact Grid */
    .contact-grid > div {
        padding: 8px !important;
    }
    
    .contact-grid > div i {
        font-size: 1.5rem !important;
        margin-bottom: 6px !important;
    }
    
    .contact-grid > div h4 {
        font-size: 0.8rem !important;
    }
    
    .contact-grid > div p {
        font-size: 0.65rem !important;
    }
    
    /* Ticker */
    .ticker-item {
        padding: 8px 14px !important;
        font-size: 0.8rem !important;
        min-width: unset !important;
        margin: 0 8px !important;
    }
    
    /* WhatsApp Float */
    .whatsapp-float {
        width: 40px !important;
        height: 40px !important;
        bottom: 15px !important;
        left: 15px !important;
    }
    
    /* Form */
    .form-container {
        padding: 24px 16px !important;
    }
    
    /* Footer */
    .footer-minimal {
        padding: 40px 0 !important;
    }
    
    .footer-minimal-center {
        gap: 20px !important;
    }
    
    .footer-minimal-center a {
        font-size: 0.85rem !important;
    }
}

/* Absolute minimum — 350px phones */
@media (max-width: 360px) {
    .logo-text {
        font-size: 1.7rem !important;
    }
    
    .logo-subtext {
        font-size: 0.45rem !important;
        letter-spacing: 0.4em !important;
    }
    
    .header-left {
        gap: 8px !important;
    }
    
    .hero h1 {
        font-size: 1.6rem !important;
    }
    
    .section-title {
        font-size: 1.35rem !important;
    }
    
    .service-card {
        min-height: 145px !important;
    }
    
    .service-card h3 {
        font-size: 0.7rem !important;
    }
    
    .service-card p {
        font-size: 0.6rem !important;
    }
    
    .ticker-item {
        padding: 6px 12px !important;
        font-size: 0.75rem !important;
    }
    
    .step-number {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.75rem !important;
        border-radius: 6px !important;
    }
    
    .step-card h3 {
        font-size: 0.8rem !important;
    }
    
    .why-us-grid .service-card h3 {
        font-size: 0.75rem !important;
    }
    
    .why-us-grid .service-card p {
        font-size: 0.6rem !important;
    }
    
    .contact-grid > div h4 {
        font-size: 0.75rem !important;
    }
    
    .contact-grid > div p {
        font-size: 0.6rem !important;
    }
}

/* Specialized Services - Mobile Grid */
@media (max-width: 768px) {
    .services-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 15px !important;
    }
    
    .services-grid .service-card {
        padding: 20px 15px !important;
        border-radius: 12px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }
    
    .services-grid .service-card:nth-child(5) {
        grid-column: span 2 !important; /* Full width for the 5th item */
    }
    
    .services-grid .service-card i {
        font-size: 1.8rem !important;
        margin-bottom: 10px !important;
    }
    
    .services-grid .service-card h3 {
        font-size: 0.95rem !important;
        margin-bottom: 8px !important;
    }
    
    .services-grid .service-card p {
        font-size: 0.75rem !important;
        line-height: 1.4 !important;
        margin: 0 !important;
    }
}

/* Header Tweaks for medium desktops (1000px - 1250px) */
@media (max-width: 1250px) {
    .main-menu {
        gap: 20px !important;
    }
    
    .main-menu>a,
    .main-menu>.dropdown>.dropdown-trigger {
        font-size: 0.9rem;
    }
}

/* Force Hamburger Menu Visibility on Mobile */
@media (max-width: 992px) {
    .hamburger-btn {
        display: flex !important;
        background: var(--secondary) !important;
        z-index: 1001; /* Ensure it's above other elements */
    }
    .hamburger-btn span {
        background: white !important;
    }
}

/* Evaluation Button Style */
.evaluation-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    font-size: 0.85rem;
    border-radius: 12px;
    white-space: nowrap;
    background-color: #FFFFFF;
    color: #1B2735;
    border: 2px solid #1B2735;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    height: 44px;
}

.evaluation-btn i {
    display: none;
}

.evaluation-btn:hover {
    background-color: #1B2735;
    color: #FFFFFF;
}

@media (max-width: 768px) {
    .evaluation-btn span {
        display: none;
    }
    .evaluation-btn i {
        display: inline-block;
        font-size: 1.2rem;
    }
    .evaluation-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 8px;
        border-width: 1px;
    }
}

/* Premium Hero Title One Line Fix */
body .premium-hero .hero-content h1 {
    white-space: nowrap;
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
}

@media (max-width: 768px) {
    body .premium-hero .hero-content h1 {
        white-space: normal;
        font-size: 1.8rem;
    }
}

@media (max-width: 400px) {
    body .premium-hero .hero-content h1 {
        font-size: 1.5rem !important;
    }
    body .premium-hero .hero-content p {
        font-size: 0.9rem !important;
    }
}

@media (max-width: 360px) {
    body .premium-hero .hero-content h1 {
        font-size: 1.3rem !important;
    }
    body .premium-hero .hero-content p {
        font-size: 0.85rem !important;
    }
}