/* ============================================================
   Tatweer Holding Group — Unified Design System v2
   ============================================================ */

/* ---- 1. GLOBAL TOKENS ---- */
:root {
    --light-bg: #faf8ff;
    --dark-navy: #131b2e;
    --color-secondary: #4e5e81;
    --color-surface: #faf8ff;
    --color-on-surface: #131b2e;
    --color-on-surface-variant: #4d4639;
    --color-surface-container-lowest: #ffffff;

    /* Default = Gold (Home / Financial) */
    --color-primary: #bfa15f;
    --color-primary-container: #735b20;
    --color-on-primary: #ffffff;
    --color-on-primary-container: #ffffff;
    --color-primary-rgb: 191, 161, 95;

    /* Navbar & footer pick up these vars so theming "bleeds" correctly */
    --nav-accent: var(--color-primary);
    --nav-shadow: rgba(191, 161, 95, 0.15);
}

/* ---- 2. PER-COMPANY THEMES ---- */
/* These are applied to <body data-theme="…"> by JS  */
body[data-theme="home"],
body[data-theme="financial"] {
    --color-primary: #bfa15f;
    --color-primary-container: #735b20;
    --color-on-primary: #ffffff;
    --color-on-primary-container: #ffffff;
    --nav-shadow: rgba(191, 161, 95, 0.15);
    --glow-color: rgba(191, 161, 95, 0.04);
}

body[data-theme="trading"] {
    --color-primary: #0d9488;
    --color-primary-container: #ccfbf1;
    --color-on-primary: #ffffff;
    --color-on-primary-container: #115e59;
    --color-primary-rgb: 13, 148, 136;
    --nav-shadow: rgba(13, 148, 136, 0.15);
    --glow-color: rgba(13, 148, 136, 0.04);
}

body[data-theme="consultancy"] {
    --color-primary: #4f46e5;
    --color-primary-container: #e0e7ff;
    --color-on-primary: #ffffff;
    --color-on-primary-container: #3730a3;
    --color-primary-rgb: 79, 70, 229;
    --nav-shadow: rgba(79, 70, 229, 0.15);
    --glow-color: rgba(79, 70, 229, 0.04);
}

/* Keep view-level scoping as fallback for any element inside a view */
#home-view,
#financial-view {
    --color-primary: #bfa15f;
    --color-primary-container: #735b20;
    --color-on-primary: #ffffff;
    --color-on-primary-container: #ffffff;
}

#trading-view {
    --color-primary: #0d9488;
    --color-primary-container: #ccfbf1;
    --color-on-primary: #ffffff;
    --color-on-primary-container: #115e59;
}

#consultancy-view {
    --color-primary: #4f46e5;
    --color-primary-container: #e0e7ff;
    --color-on-primary: #ffffff;
    --color-on-primary-container: #3730a3;
}

/* ---- 3. BASE ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'IBM Plex Sans Arabic', 'IBM Plex Sans', sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-navy);
    overflow-x: hidden;
    scroll-behavior: smooth;
    transition: --color-primary 0.4s ease;
    /* smooth theme transition */
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ---- 3b. RESPONSIVE SECTION SPACING ---- */
/* Override the Tailwind spacing token so sections breathe on wider screens */
@media (min-width: 640px) {
    .px-section-padding-h {
        padding-inline: 2rem !important;
    }
}

@media (min-width: 768px) {
    .px-section-padding-h {
        padding-inline: 3rem !important;
    }
}

@media (min-width: 1024px) {
    .px-section-padding-h {
        padding-inline: 4rem !important;
    }
}

/* ---- 3c. COMPANY PAGE IMAGE CONTAINERS ---- */
/* Ensure hero images on company pages have proper aspect-ratio and sizing */
.page-view .aspect-square {
    aspect-ratio: 1 / 1;
}

.page-view .aspect-video {
    aspect-ratio: 16 / 9;
}

.page-view img {
    max-width: 100%;
    height: auto;
}

/* Hero side-image for company views */
.company-hero-img {
    width: 100%;
    max-height: 540px;
    object-fit: cover;
    border-radius: 1.5rem;
}

/* B2B banner images */
.b2b-banner {
    width: 100%;
    min-height: 320px;
    max-height: 480px;
    object-fit: cover;
    border-radius: 1rem;
}

/* ---- 4. PAGE VIEWS (SPA routing) ---- */
.page-view {
    display: block;
}

.page-view.hidden {
    display: none !important;
}

/* ---- 5. GLASSMORPHISM ---- */
.glass-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(191, 161, 95, 0.12);
    box-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.04);
    border-radius: 1rem;
}

.glass-nav {
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(191, 161, 95, 0.18);
    box-shadow: 0 10px 36px -10px var(--nav-shadow, rgba(191, 161, 95, 0.15));
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

/* ---- 6. AMBIENT GLOWS ---- */
.glow-spot {
    position: absolute;
    width: 640px;
    /* height: 640px; */
    border-radius: 50%;
    background: var(--glow-color, rgba(191, 161, 95, 0.04));
    filter: blur(130px);
    z-index: -1;
    pointer-events: none;
    transition: background 0.6s ease;
}

/* ---- 7. TYPOGRAPHY ACCENTS ---- */
.text-gradient-gold {
    background: linear-gradient(135deg, #e3c37d, #bfa15f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- 8. SHADOWS & ACCENTS ---- */
.executive-shadow {
    box-shadow:
        0 10px 30px rgba(26, 43, 75, 0.05),
        0 1px 3px rgba(26, 43, 75, 0.03);
}

.gold-accent-top {
    border-top: 3px solid var(--color-primary);
    transition: border-color 0.4s ease;
}

/* ---- 9. SCROLL ANIMATIONS ---- */
.animate-scroll {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.animate-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.animate-scroll:nth-child(2) {
    transition-delay: 0.07s;
}

.animate-scroll:nth-child(3) {
    transition-delay: 0.14s;
}

.animate-scroll:nth-child(4) {
    transition-delay: 0.21s;
}

.animate-subtle-float {
    animation: floatAnim 6s ease-in-out infinite;
}

@keyframes floatAnim {

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

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

.marker-pulse {
    animation: pulse 2.5s infinite;
}

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

    70% {
        transform: scale(2.2);
        opacity: 0;
    }

    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

/* Badge pill spin-in */
@keyframes badgeFadeIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-badge {
    animation: badgeFadeIn 0.5s ease both;
}

/* ---- 10. NAVBAR DROPDOWN ---- */
.dropdown-menu {
    visibility: hidden;
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.28s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none;
}

.dropdown-parent:hover .dropdown-menu,
.dropdown-parent:focus-within .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ---- 11. MOBILE MENU ---- */
.mobile-menu-enter {
    opacity: 0;
    transform: translateY(-16px);
}

.mobile-menu-exit {
    opacity: 0;
    transform: translateY(-16px);
}

/* ---- 12. CUSTOM SCROLLBAR ---- */
::-webkit-scrollbar {
    width: 7px;
}

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

::-webkit-scrollbar-thumb {
    background: #e2d9c5;
    border-radius: 4px;
    transition: background 0.2s;
}

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

/* ---- 13. HORIZONTAL SWIPE (mobile card carousels) ---- */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Trailing spacer inside swipe rows */
@media (max-width: 767px) {
    .snap-container-padding::after {
        content: '';
        display: block;
        min-width: 1.25rem;
        flex-shrink: 0;
    }
}

.slider-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.slider-dots-container {
    display: flex;
    justify-content: center;
    gap: 0.65rem;
    margin-top: 0.25rem;
    width: 100%;
}

.slider-dot {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 9999px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(var(--color-primary-rgb, 191, 161, 95), 0.18);
    transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.slider-dot:hover,
.slider-dot:focus-visible {
    transform: scale(1.15);
    outline: none;
}

.slider-dot.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: scale(1.2);
}

.slider-dots-container.hidden {
    display: none !important;
}

.slider-dot.active {
    width: 1rem;
    height: 1rem;
    background: rgb(var(--color-primary-rgb, 191, 161, 95));
    border-color: rgba(0, 0, 0, 0.2);
}

/* ---- 14. COMPANY BADGES in the hero sections ---- */
.company-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid rgba(0, 0, 0, 0.07);
}

.company-badge.gold {
    background: #fdf7e7;
    color: #735b20;
    border-color: #e8d5a0;
}

.company-badge.teal {
    background: #f0fdfb;
    color: #115e59;
    border-color: #99f6e4;
}

.company-badge.indigo {
    background: #eef2ff;
    color: #3730a3;
    border-color: #c7d2fe;
}

/* ---- 15. HERO SECTION ACCENTS ---- */
.hero-bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 80% 10%, var(--glow-color, rgba(191, 161, 95, 0.06)) 0%, transparent 60%),
        radial-gradient(circle at 10% 80%, var(--glow-color, rgba(191, 161, 95, 0.04)) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    transition: background-image 0.5s ease;
}

/* ---- 16. PROGRESS INDICATOR (active company nav stripe) ---- */
.nav-active-stripe {
    position: relative;
}

.nav-active-stripe::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: background 0.4s ease;
}

/* ---- 17. STAT COUNTER GLOW ---- */
.stat-number {
    color: var(--color-primary);
    transition: color 0.4s ease;
}

/* ---- 18. FOOTER ---- */
footer a:hover {
    color: var(--color-primary);
}

/* ---- 19. SMOOTH COLOR TRANSITIONS ---- */
/* Make primary-colored elements animate when theme changes */
.text-primary,
.bg-primary,
.border-primary,
[class*="text-primary"],
[class*="bg-primary"],
[class*="border-primary"] {
    transition: color 0.4s ease, background-color 0.4s ease, border-color 0.4s ease;
}

/* ---- 20. LEAFLET CUSTOM POPUP STYLING ---- */
.leaflet-popup-content-wrapper {
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(191, 161, 95, 0.15) !important;
    border-radius: 1rem !important;
    box-shadow: 0 10px 30px -10px rgba(26, 43, 75, 0.1) !important;
    padding: 4px;
}

.leaflet-popup-tip {
    background: rgba(255, 255, 255, 0.96) !important;
}

.leaflet-container a.leaflet-popup-close-button {
    color: var(--color-secondary) !important;
    font-size: 16px !important;
    padding: 8px 8px 0 0 !important;
}

.leaflet-container {
    font-family: 'IBM Plex Sans Arabic', 'IBM Plex Sans', sans-serif !important;
}

.custom-map-marker {
    outline: none !important;
}