/* ============================================================
   MODERN DESIGN SYSTEM OVERRIDES
   FranchiseME - Modern UI Enhancement
   ============================================================ */

/* -------------------- EXTENDED DESIGN TOKENS -------------------- */
:root {
    /* Shadows */
    --shadow-xs:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-sm:  0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);
    --shadow-md:  0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);
    --shadow-lg:  0 20px 25px -5px rgba(0,0,0,.10), 0 10px 10px -5px rgba(0,0,0,.04);
    --shadow-xl:  0 25px 50px -12px rgba(0,0,0,.18);

    /* Brand gradient */
    --gradient-primary: linear-gradient(135deg, #085570 0%, #0c7fa9 100%);
    --gradient-hero:    linear-gradient(160deg, rgba(8,85,112,.85) 0%, rgba(3,47,62,.92) 100%);

    /* Transitions */
    --transition-fast:   150ms ease;
    --transition-base:   300ms ease;
    --transition-slow:   500ms ease;

    /* Border radii */
    --radius-sm:  8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* Z-index layers */
    --z-header:     1000;
    --z-overlay:    1100;
    --z-mobile-menu:1200;
    --z-fab:        1300;
    --z-progress:   9999;
}

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: var(--gradient-primary);
    z-index: var(--z-progress);
    transition: width 80ms linear;
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

/* ============================================================
   HEADER — GLASSMORPHISM ON SCROLL
   ============================================================ */
header {
    transition: background-color var(--transition-base),
                box-shadow var(--transition-base),
                backdrop-filter var(--transition-base);
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    box-shadow: var(--shadow-md);
    border-bottom-color: rgba(0,0,0,.08) !important;
}

/* ============================================================
   HEADER FLEXBOX LAYOUT — guaranteed no overflow
   ============================================================ */

/* Let header control its own height; nav + inner follow it */
#siteHeader { display: flex; flex-direction: column; }
#siteHeader nav.container { height: 100%; flex: 1; }

.site-nav-inner {
    display: flex;
    align-items: center;
    height: 100%;           /* inherits header height — responsive.css controls it per breakpoint */
    gap: 0;
}
.site-nav-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-inline-end: 16px;
}
.site-nav-links {
    flex: 1 1 0;
    min-width: 0;
    display: none;          /* hidden on mobile/tablet */
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    overflow: visible;
}
@media (min-width: 1025px) {
    .site-nav-links { display: flex; align-items: center; }
}
.site-nav-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-inline-start: auto; /* pushes to right corner on all screen sizes */
}

/* Language switcher — compact on mobile so it fits in the smaller header */
.site-nav-lang {
    display: inline-block;
    padding: 8px 14px !important;   /* override button_outline's 15px 28px */
    font-size: 0.8rem !important;
    line-height: 1.2;
    white-space: nowrap;
}
@media (min-width: 1025px) {
    .site-nav-lang {
        padding: 10px 22px !important;
        font-size: 0.875rem !important;
    }
}

/* Hamburger: show on mobile/tablet only */
.site-nav-hamburger {
    display: flex;
    flex-shrink: 0;
}
@media (min-width: 1025px) {
    #menu-btn { display: none !important; }
}

/* Hamburger size: slightly smaller on very small screens */
@media (max-width: 400px) {
    #menu-btn { width: 36px !important; height: 36px !important; }
    #menu-btn .bar { width: 18px; }
}

/* RTL: mirror the layout */
/* NOTE: DO NOT add flex-direction: row-reverse here.
   When dir="rtl" is on <html>, the browser already flows flex row RTL.
   row-reverse would cancel that out (double reversal = LTR). */
html[dir="rtl"] .site-nav-links { flex-direction: row; } /* override any blanket .nav rule */

/* Nav link — no underline, just color change on active/hover */
.nav-item-link {
    position: relative;
    transition: color var(--transition-base);
}

/* Compact nav links so 7 items fit without crowding */
@media (min-width: 1025px) {
    #siteHeader .nav-item-link,
    #siteHeader .nav-link {
        font-size: 0.875rem !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        white-space: nowrap;
    }
}

/* ── NUCLEAR: Kill every box/outline/border/marker on nav — all screens ── */
#siteHeader .nav-item,
#siteHeader .nav-item *,
#siteHeader .nav-link,
#siteHeader .nav-item-link,
#mobile-menu .nav-item,
#mobile-menu .nav-item *,
#mobile-menu .nav-link,
#mobile-menu .nav-item-link {
    outline: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

#siteHeader .nav-item,
#siteHeader .nav-link,
#siteHeader .nav-item-link,
#mobile-menu .nav-item,
#mobile-menu .nav-link,
#mobile-menu .nav-item-link,
.nav-item-link.active,
.nav-link.active {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Active state — color only, no box */
.nav-item-link.active,
#siteHeader .nav-link.active,
#mobile-menu .nav-item-link.active {
    color: var(--primary-color) !important;
}

/* Kill list markers and pseudo-elements */
#siteHeader .nav li,
#mobile-menu .nav li {
    list-style: none !important;
}
#siteHeader .nav li::marker,
#mobile-menu .nav li::marker {
    content: '' !important;
    display: none !important;
}
#siteHeader .nav-item::before,
#siteHeader .nav-item::after,
#mobile-menu .nav-item::before,
#mobile-menu .nav-item::after {
    display: none !important;
}

/* ── Hero Banner CTA Button ─────────────────────────────────────────── */
.pagetitle .container_box { position: relative; z-index: 2; }

.hero-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 26px;
    padding: 13px 30px;
    background: transparent;
    color: #fff !important;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
    border: 1.5px solid rgba(255,255,255,0.55);
    backdrop-filter: blur(4px);
    transition: background 0.28s ease, border-color 0.28s ease,
                color 0.28s ease, gap 0.28s ease, box-shadow 0.28s ease;
}
.hero-cta-btn:hover {
    background: var(--secondary-color, #b8952a);
    border-color: var(--secondary-color, #b8952a);
    color: #fff !important;
    gap: 16px;
    box-shadow: 0 8px 28px rgba(184,149,42,0.40);
}
.hero-cta-btn svg {
    flex-shrink: 0;
    transition: transform 0.28s ease;
}
.hero-cta-btn:hover svg { transform: translateX(4px); }

/* Language toggle pill */
.button.button_outline {
    border-radius: var(--radius-full) !important;
    font-size: 14px !important;
    padding: 10px 20px !important;
    transition: all var(--transition-base);
}

/* ============================================================
   ANIMATED HAMBURGER BUTTON
   ============================================================ */
#menu-btn {
    width: 42px;
    height: 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1.5px solid rgba(0,0,0,.18) !important;
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 8px;
    transition: border-color var(--transition-base), background var(--transition-base);
}
#menu-btn .bar {
    display: block;
    width: 22px;
    height: 2.5px;
    background: var(--primary-color);
    border-radius: var(--radius-full);
    transition: transform var(--transition-base), opacity var(--transition-base), width var(--transition-base);
    transform-origin: center;
    flex-shrink: 0;
}
#menu-btn.open .bar:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
#menu-btn.open .bar:nth-child(2) { opacity: 0; width: 0; }
#menu-btn.open .bar:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }
#menu-btn:hover { border-color: var(--primary-color); background: rgba(8,85,112,.05); }

/* ============================================================
   MOBILE MENU — FULL SCREEN OVERLAY
   ============================================================ */
#mobile-menu-overlay { display: none !important; }

#mobile-menu {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100dvh !important;
    background: #0c2d45 !important;
    z-index: var(--z-mobile-menu) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    padding: 80px 24px 48px !important;
    overflow-y: auto !important;
    opacity: 0;
    pointer-events: none;
    transform: none !important;
    transition: opacity 0.28s ease !important;
    box-shadow: none !important;
    border: none !important;
    right: auto !important;
    left: auto !important;
}
#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}
html[dir="rtl"] #mobile-menu {
    border: none !important;
    right: auto !important;
    left: auto !important;
}
html[dir="rtl"] #mobile-menu.active {
    right: auto !important;
    left: auto !important;
}

/* Close button */
#mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
    z-index: 1;
}
#mobile-menu-close:hover { color: #fff; background: rgba(255,255,255,0.1); }
html[dir="rtl"] #mobile-menu-close { right: auto; left: 20px; }

/* Nav links */
.mm-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
    max-width: 320px;
}
.mm-link {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 20px;
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255,255,255,0.82) !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    letter-spacing: 0.01em;
    transition: color 0.18s;
    position: relative;
}
.mm-link:first-child { border-top: 1px solid rgba(255,255,255,0.08); }
.mm-link::before,
.mm-link::after { display: none !important; content: none !important; }
.mm-link:hover,
.mm-link--active {
    color: var(--secondary-color, #b8952a) !important;
}

/* Language switcher */
.mm-lang {
    margin-top: 28px;
    display: inline-block;
    padding: 10px 32px;
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff !important;
    text-decoration: none !important;
    transition: border-color 0.2s, background 0.2s;
}
.mm-lang:hover { border-color: var(--secondary-color, #b8952a); background: rgba(255,255,255,0.06); }

/* ============================================================
   BUTTONS — ENHANCED
   ============================================================ */
.button {
    transition: all var(--transition-base) !important;
    box-shadow: var(--shadow-sm);
}
.button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-xs);
}
.button.button_secoundary,
.button.button_secoundary:hover {
    transition: all var(--transition-base) !important;
}

/* ============================================================
   HOME HERO — dark teal uniform overlay (matches reference)
   Text sits directly on overlay, centered, no card box
   ============================================================ */
.hero_section_main::before {
    background: linear-gradient(180deg,
        rgba(6, 42, 56, 0.78) 0%,
        rgba(6, 42, 56, 0.88) 100%) !important;
    opacity: 1 !important;
}

/* ============================================================
   HERO SECTION — SCROLL HINT
   ============================================================ */

.hero-scroll-hint {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,.7);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    animation: bounce-scroll 2s ease-in-out infinite;
    cursor: pointer;
}
.hero-scroll-hint i {
    font-size: 20px;
}
@keyframes bounce-scroll {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(8px); }
}

/* Hero stats bar */
.hero-stats-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: rgba(255,255,255,.10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,255,255,.15);
    padding: 20px 0;
    display: none; /* shown via JS when stats data exists */
}
.hero-stats-bar .stat-item {
    text-align: center;
    color: #fff;
    border-right: 1px solid rgba(255,255,255,.2);
    padding: 0 24px;
}
.hero-stats-bar .stat-item:last-child { border-right: none; }
.hero-stats-bar .stat-number {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}
.hero-stats-bar .stat-label {
    font-size: 13px;
    opacity: .8;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* ============================================================
   FRANCHISE LISTING — MODERN CARDS
   ============================================================ */

/* Filter bar redesign */
.filter_box {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 14px 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,.07);
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-bottom: 24px !important;
    align-items: center;
}

.filter_box .form-control,
.filter_box .form-select {
    border-radius: var(--radius-md) !important;
    border: 1.5px solid rgba(0,0,0,.10) !important;
    height: 44px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    background-color: #f8f9fb !important;
    color: #374151 !important;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast) !important;
    cursor: pointer;
    flex: 1 1 160px;
    min-width: 0;
}
.filter_box .form-control:focus,
.filter_box .form-select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(8,85,112,.12) !important;
    background-color: #fff !important;
    outline: none;
}
.filter_box .form-select:hover,
.filter_box .form-control:hover {
    border-color: rgba(8,85,112,.35) !important;
    background-color: #fff !important;
}

.filter_box .search_input {
    flex: 2 1 220px !important;
    min-width: 0 !important;
}

/* Active filters chip row */
#active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    min-height: 0;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(8,85,112,.09);
    color: var(--primary-color);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
    border: 1px solid rgba(8,85,112,.20);
}
.filter-chip:hover { background: rgba(8,85,112,.16); }
.filter-chip .chip-remove {
    font-size: 15px;
    line-height: 1;
    opacity: .6;
    display: flex;
    align-items: center;
}

/* Results count + view toggle */
.results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 8px;
}
.results-count {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}
.results-count span { color: var(--primary-color); font-weight: 700; }

/* Franchise card — fix hover underline on title */
.franchise_list .fl_item a {
    text-decoration: none !important;
    color: inherit !important;
}
.franchise_list .fl_item a:hover,
.franchise_list .fl_item a:focus {
    text-decoration: none !important;
}
.franchise_list .fl_item a:hover .sub_title {
    text-decoration: none !important;
    color: var(--primary-color) !important;
}

/* Franchise card hover effect */
.franchise_list .fanchise_item {
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
    transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base) !important;
    box-shadow: var(--shadow-sm);
    background: #fff;
    border: 1px solid rgba(0,0,0,.07);
}
.franchise_list .fanchise_item:hover {
    box-shadow: var(--shadow-lg) !important;
    transform: translateY(-4px);
    border-color: rgba(8,85,112,.18) !important;
}

/* Sector tag modernized */
.franchise_list .fanchise_item .sector_tag {
    background: var(--gradient-primary) !important;
    border-radius: 0 0 var(--radius-sm) 0 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 5px 10px !important;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Franchise meta bar modernized */
.franchise_list .fanchise_item .franchise_content .fc_meta {
    border-top: 1px solid rgba(0,0,0,.07) !important;
    background: #f8fafc;
    padding: 12px 20px !important;
}
.franchise_list .fanchise_item .franchise_content .fc_meta p {
    font-size: 13px !important;
    font-weight: 500;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Franchise card view-more arrow */
.franchise_list .fanchise_item .fc_arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--primary-color);
    color: #fff;
    font-size: 14px;
    transition: background var(--transition-fast), transform var(--transition-fast);
    flex-shrink: 0;
}
.franchise_list .fanchise_item:hover .fc_arrow {
    background: var(--secondary-color);
    transform: translateX(3px);
}
html[dir="rtl"] .franchise_list .fanchise_item:hover .fc_arrow {
    transform: translateX(-3px);
}

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s infinite;
    border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.07);
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.skeleton-img { height: 180px; }
.skeleton-line { height: 14px; margin-bottom: 8px; border-radius: 4px; }
.skeleton-line.w-75 { width: 75%; }
.skeleton-line.w-50 { width: 50%; }
.skeleton-line.w-90 { width: 90%; }

/* Empty state */
.franchise-empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #9ca3af;
}
.franchise-empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: .4;
}
.franchise-empty-state h4 {
    font-size: 20px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}
.franchise-empty-state p { font-size: 15px; }

/* Load more button redesign */
#load-more-btn {
    min-width: 180px;
    position: relative;
    overflow: hidden;
}
#load-more-btn.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.3);
}
.load-more-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 8px;
}
#load-more-btn.loading .load-more-spinner { display: inline-block; }
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   BACK-TO-TOP BUTTON
   ============================================================ */
#back-to-top {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    z-index: var(--z-fab);
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity var(--transition-base), transform var(--transition-base);
    pointer-events: none;
}
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}
#back-to-top:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
html[dir="rtl"] #back-to-top { right: auto; left: 24px; }

/* ============================================================
   FLOATING CONSULTATION CTA
   ============================================================ */
#floating-cta {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: var(--z-fab);
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    padding: 13px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    transition: box-shadow var(--transition-base), transform var(--transition-base);
    white-space: nowrap;
}
#floating-cta:hover {
    color: #fff;
    box-shadow: var(--shadow-xl);
    transform: translateY(-3px);
}
#floating-cta i { font-size: 16px; }
#floating-cta .cta-label {
    max-width: 160px;
    overflow: hidden;
    transition: max-width var(--transition-slow), opacity var(--transition-slow);
}

/* Pulse ring on the CTA */
#floating-cta::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: var(--radius-full);
    border: 2px solid rgba(8,85,112,.4);
    animation: pulse-ring 2.5s ease-out infinite;
}
@keyframes pulse-ring {
    0%   { transform: scale(1); opacity: .6; }
    70%  { transform: scale(1.12); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

html[dir="rtl"] #floating-cta { right: auto; left: 24px; }

/* ============================================================
   HERO BREADCRUMB — hidden
   ============================================================ */
.pagetitle .breadcrumbs { display: none !important; }
.breadcrumbs a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs::before {
    content: '\f015';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary-color);
    margin-right: 4px;
}
.breadcrumbs p { color: #6b7280; }

/* ============================================================
   FOOTER — MODERNIZED
   ============================================================ */
footer {
    background: linear-gradient(180deg, #f8fafc 0%, #f0f4f7 100%) !important;
    border-top: 1px solid rgba(8,85,112,.10) !important;
}

footer h3.sub_title {
    font-size: 18px !important;
    color: var(--primary-color);
    margin-bottom: 20px !important;
    position: relative;
    padding-bottom: 12px;
}
footer h3.sub_title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 32px;
    height: 2px;
    background: var(--secondary-color);
    border-radius: var(--radius-full);
}
html[dir="rtl"] footer h3.sub_title::after { left: auto; right: 0; }

footer ul li { margin-bottom: 10px !important; }
footer .link {
    font-size: 15px !important;
    color: #6b7280 !important;
    transition: color var(--transition-fast);
    display: inline-block;
}
footer .link::before {
    display: none !important;
    content: '' !important;
}
footer .link:hover,
footer .active {
    color: var(--primary-color) !important;
}
footer .active {
    font-weight: 600 !important;
}

.footer-copyright {
    background: rgba(8,85,112,.04);
    margin: 20px -12px -30px !important;
    padding: 16px 12px !important;
    border-top: 1px solid rgba(8,85,112,.08) !important;
    border-radius: 0 0 0 0;
}

/* ============================================================
   MISSION / VISION CARDS — MODERNIZED
   ============================================================ */
.mission_vision_container .mv_box {
    border-radius: var(--radius-xl) !important;
    border: 1px solid rgba(8,85,112,.12) !important;
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.mission_vision_container .mv_box:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

/* ============================================================
   TEAM CARDS — MODERNIZED
   ============================================================ */
.team-card {
    border-radius: var(--radius-xl) !important;
    border: 1px solid rgba(0,0,0,.07) !important;
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.team-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

/* ============================================================
   ACHIEVEMENT SECTION — COUNTER ENHANCEMENT
   ============================================================ */
.achievement-title {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   INNER PAGE HERO BANNERS — matches reference site exactly
   - Light gray topbar wrapper
   - Rounded banner card with background image
   - Dark teal gradient overlay: dark on text side, transparent on image side
   - Text sits DIRECTLY on overlay — no card/box around it
   ============================================================ */
.topbar {
    background: #f1f2f4 !important;
    padding: 20px !important;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl) !important;
}
.pagetitle {
    border-radius: 20px !important;
    min-height: 420px !important;
    display: flex !important;
    align-items: center !important;
}
/* LTR: dark teal on left (text side), fades to transparent on right so photo shows */
.pagetitle::before {
    background: linear-gradient(90deg,
        rgba(6, 42, 56, 0.95) 0%,
        rgba(8, 55, 72, 0.88) 35%,
        rgba(8, 70, 95, 0.50) 60%,
        rgba(8, 85, 112, 0.12) 100%) !important;
    opacity: 1 !important;
}
/* RTL: mirror — dark teal on right (text side), fades to transparent on left */
html[dir="rtl"] .pagetitle::before {
    background: linear-gradient(270deg,
        rgba(6, 42, 56, 0.95) 0%,
        rgba(8, 55, 72, 0.88) 35%,
        rgba(8, 70, 95, 0.50) 60%,
        rgba(8, 85, 112, 0.12) 100%) !important;
    opacity: 1 !important;
}
/* Text container — positioned at left with padding, no card box */
.pagetitle .container_box {
    padding: 60px 0 !important;
    position: relative;
    z-index: 2;
}
.pagetitle .hero-title {
    font-size: 42px !important;
    font-weight: 700 !important;
    color: #fff !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    max-width: 700px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.pagetitle .back_btn {
    color: rgba(255,255,255,0.85) !important;
    font-size: 14px !important;
    margin-bottom: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    text-decoration: none !important;
    transition: color 200ms;
}
.pagetitle .back_btn:hover {
    color: #fff !important;
}

/* ============================================================
   BLOG / SERVICE CARDS — HOVER LIFT
   ============================================================ */
.blog_card,
.service_card,
.blog-card {
    transition: box-shadow var(--transition-base), transform var(--transition-base) !important;
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
}
.blog_card:hover,
.service_card:hover,
.blog-card:hover {
    box-shadow: var(--shadow-lg) !important;
    transform: translateY(-4px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
    #floating-cta .cta-label {
        display: none;
    }
    #floating-cta {
        width: 52px;
        height: 52px;
        padding: 0;
        justify-content: center;
    }

    #back-to-top {
        bottom: 88px;
        right: 16px;
    }
    html[dir="rtl"] #back-to-top { left: 16px; right: auto; }

    #floating-cta {
        bottom: 20px;
        right: 16px;
    }
    html[dir="rtl"] #floating-cta { right: auto; left: 16px; }
}

@media (max-width: 768px) {
    /* Inner page banner: reduce height and font on mobile */
    .pagetitle {
        min-height: 280px !important;
    }
    .pagetitle .hero-title {
        font-size: 28px !important;
    }
    /* On mobile: full dark overlay since image doesn't show well at small widths */
    .pagetitle::before,
    html[dir="rtl"] .pagetitle::before {
        background: rgba(6, 42, 56, 0.88) !important;
    }
    .pagetitle .container_box {
        padding: 40px 0 !important;
    }
}

@media (max-width: 576px) {
    .filter_box {
        padding: 12px 14px !important;
    }
    .filter_box .form-control,
    .filter_box .form-select {
        flex: 1 1 100% !important;
    }
    .filter_box .search_input {
        flex: 1 1 100% !important;
    }
    .filter_box .button {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   RTL / ARABIC OVERRIDES
   ============================================================ */
html[dir="rtl"] {

    /* --- Navigation --- */
    /* .nav flex-direction: DO NOT add row-reverse — dir=rtl already reverses flex row */
    .col-md-3.col-6 { justify-content: flex-end; }

    /* --- Footer quick links --- */
    footer .list-unstyled li a { text-align: right; display: block; }

    /* --- Breadcrumbs --- */
    /* No flex-direction: row-reverse needed — dir=rtl naturally flows RTL */
    .breadcrumbs a::after { content: '\\'; margin: 0 4px; }

    /* --- Hero section text --- */
    .hero_section_main .hero-content,
    .pagetitle .hero-title,
    .pagetitle .breadcrumbs { text-align: right; }

    /* --- Section headings & text --- */
    .title, .sub_title, .decription, .decription p { text-align: right; }
    .content-header { text-align: right; }

    /* --- Cards --- */
    .card-body { text-align: right; }

    /* --- Blog cards --- */
    .blog-card-content, .blog-detail-container { text-align: right; }
    .latest-blog-card { text-align: right; }

    /* --- Franchise listing --- */
    .franchise_content { text-align: right; }
    .fanchise_item .fc_info { text-align: right; }

    /* --- FAQ accordion --- */
    .accordion-body { text-align: right; }

    /* --- Contact page --- */
    .contact_page_form.form_box { text-align: right; }
    .contact_page_form { text-align: right; }

    /* --- Form inputs placeholder alignment --- */
    .form-control::placeholder { text-align: right; }
    select.form-control, select.form-select { text-align: right; }

    /* --- Buttons row --- */
    /* No row-reverse — dir=rtl naturally reverses flex rows */

    /* --- Section containers with left-aligned items --- */
    /* Bootstrap .row already respects dir=rtl; no row-reverse override needed */

    /* --- Service packages slider item --- */
    .sl_item { text-align: right; }

    /* --- Blog detail --- */
    .blog-detail-content { text-align: right; direction: rtl; }

    /* --- Team section --- */
    .team-card { text-align: right; }

    /* --- Stats / achievements --- */
    .achievement-box, .count-box { text-align: center; }

    /* --- Back button on service detail --- */
    .back_btn { float: left; flex-direction: row-reverse; }
    .back_btn i { transform: rotate(180deg); }
}
