/* ==========================================================================
   1. PERSIAN FONT INJECTION (YEKAN) & BRAND VARIABLES
   ========================================================================== */
@font-face {
    font-family: 'Yekan';
    src: url('font/Yekan.eot'); 
    src: url('font/Yekan.eot?#iefix') format('embedded-opentype'),
         url('font/Yekan.woff2') format('woff2'),
         url('font/Yekan.woff') format('woff'),
         url('font/Yekan.otf') format('opentype'),
         url('font/Yekan.ttf') format('truetype');
    font-weight: normal; 
    font-style: normal; 
    font-display: swap;
}

:root {
    /* Brand Core */
    --apple-blue: #0071e3;
    --apple-blue-hover: #0077ED;
    --apple-dark: #1d1d1f;
    --apple-gray: #f5f5f7;
    
    /* Background Base */
    --bg-site-color: rgb(11, 1, 150);
    --bg-slider-top: rgb(15, 30, 80);
    --bg-slider-bottom: rgb(30, 60, 130);

    /* Glass Panels */
    --glass-light-bg: rgba(251, 251, 253, 0.75);
    --glass-light-border: rgba(0, 0, 0, 0.08);
    --glass-dark-bg: rgba(29, 29, 31, 0.75);
    --glass-dark-border: rgba(255, 255, 255, 0.15);
    
    /* Motion Physics */
    --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    
    /* Dimensional Depth */
    --shadow-float: 0 24px 48px rgba(0, 0, 0, 0.4), 0 12px 24px rgba(0, 0, 0, 0.3);
    --shadow-btn: 0 4px 14px rgba(0, 0, 0, 0.15);
    --shadow-btn-hover: 0 6px 20px rgba(0, 0, 0, 0.25);
    --shadow-text: 0 1px 4px rgba(0,0,0,0.5), 0 2px 12px rgba(0,0,0,0.25);
}

/* ==========================================================================
   2. TYPOGRAPHY & NAMESPACE OVERRIDES
   ========================================================================== */
.apple-font {
    font-family: 'Yekan', "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased; 
    text-rendering: optimizeLegibility;
    -webkit-tap-highlight-color: transparent;
}

body.apple-lang-en .apple-font {
    font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Reset Elementor Default Section Gaps */
.elementor-top-section .apple-hero-container { margin-top: 0 !important; padding-top: 0 !important; }

/* Purge Aggressive Theme Styling on Action Buttons */
html body .apple-font nav button, 
html body .apple-font nav button:hover, 
html body .apple-font nav button:focus {
    background: transparent !important; border: none !important; box-shadow: none !important;
    outline: none !important; padding: 0 !important; margin: 0 !important;
    cursor: pointer; min-width: auto !important; height: auto !important;
    display: inline-flex; align-items: center; justify-content: center;
}
html body .apple-font nav .mx-2 { margin-left: 0.5rem !important; margin-right: 0.5rem !important; }
.apple-icon-hidden { display: none !important; opacity: 0 !important; pointer-events: none !important; }

/* ==========================================================================
   3. BILINGUAL DISPLAY ENGINE (PERSIAN FIRST)
   ========================================================================== */
.apple-font .en { display: none !important; }
.apple-font .fa { display: inline-block !important; }

body.apple-lang-en .apple-font .fa { display: none !important; }
body.apple-lang-en .apple-font .en { display: inline-block !important; }

/* ==========================================================================
   4. FULL BLEED BACKGROUND & GLASS NAVIGATION
   ========================================================================== */
body { 
    background-color: var(--bg-site-color); 
    position: relative; 
    overscroll-behavior-y: none; 
    margin: 0; 
}

/* Base Blur Filter - Hidden in editor for functionality */
body:not(.elementor-editor-active)::before {
    content: ''; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: var(--bg-site-color);
    backdrop-filter: blur(60px) saturate(150%); 
    -webkit-backdrop-filter: blur(60px) saturate(150%);
    z-index: -1; opacity: 0.95; pointer-events: none;
}

.apple-nav {
    background-color: var(--glass-light-bg) !important;
    backdrop-filter: saturate(180%) blur(24px) !important; 
    -webkit-backdrop-filter: saturate(180%) blur(24px) !important;
    border-bottom: 1px solid var(--glass-light-border) !important;
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.1);
    transition: background-color 0.5s ease;
}
.dark-nav { background-color: rgba(29, 29, 31, 0.98) !important; border-bottom: none !important; }

/* ==========================================================================
   5. BUTTON ARCHITECTURE (SOLID PRIMARY, OUTLINE SECONDARY)
   ========================================================================== */
html body .apple-font .btn-pill {
    display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; 
    padding: 14px 28px !important; border-radius: 9999px !important; font-size: 15px; font-weight: 500; 
    transition: all 0.4s var(--ease-spring) !important; text-decoration: none !important;
    cursor: pointer; border: 1.5px solid transparent !important; box-shadow: var(--shadow-btn) !important;
    text-shadow: none !important; /* Never shadow button text */
}

html body .apple-font .btn-pill:active { transform: scale(0.96) !important; }

/* Primary Selected: Solid Blue */
.btn-blue { 
    background-color: var(--apple-blue) !important; 
    color: white !important; 
    border-color: var(--apple-blue) !important; 
}
.btn-blue:hover { 
    background-color: var(--apple-blue-hover) !important; 
    transform: translateY(-2px) scale(1.02) !important; 
    box-shadow: var(--shadow-btn-hover) !important; 
}

/* Secondary Selected: Outline Blue Default */
.btn-outline { 
    background-color: transparent !important; 
    border-color: var(--apple-blue) !important; 
    color: var(--apple-blue) !important; 
    box-shadow: none !important; 
}
.btn-outline:hover { 
    background-color: var(--apple-blue) !important; 
    color: white !important; 
    transform: translateY(-2px) scale(1.02) !important; 
    box-shadow: var(--shadow-btn-hover) !important; 
}

/* Third Variant: Glass Overlay */
.btn-glass { 
    background-color: rgba(255,255,255,0.85) !important; 
    color: #000 !important; 
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border-color: rgba(255,255,255,0.3) !important; 
}
.btn-glass:hover { 
    background-color: #fff !important; 
    transform: translateY(-2px) scale(1.02) !important; 
    box-shadow: var(--shadow-btn-hover) !important; 
}

/* ==========================================================================
   6. SCROLL INTERSECTION OBSERVERS
   ========================================================================== */
.reveal-up { 
    opacity: 0; transform: translate3d(0, 40px, 0) scale(0.98); 
    transition: opacity 1.4s var(--ease-spring), transform 1.4s var(--ease-spring); 
    will-change: transform, opacity; 
}
.reveal-up.active { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }

/* ==========================================================================
   7. ENDLESS SLIDER & IMAGE CROP ENGINE
   ========================================================================== */
.endless-section { background: transparent; }

.slider-container {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; 
    scrollbar-width: none; -ms-overflow-style: none; gap: 16px; 
    padding-bottom: 30px; cursor: grab; user-select: none;
}
.slider-container:active { cursor: grabbing; scroll-snap-type: none; }
.slider-container.is-dragging { scroll-snap-type: none; scroll-behavior: auto; }
.slider-container::-webkit-scrollbar { display: none; }

/* Center Image Engine Class */
.apple-bg-cover-center {
    background-size: cover !important; 
    background-position: center center !important;
    background-repeat: no-repeat !important;
    border-radius: 0px !important; 
    border: none !important; 
    outline: none !important;
    overflow: hidden !important;
    user-select: none;
}

/* MAIN CARDS (Vertical Fill on Mobile, Horizontal on Desktop) */
.slider-wrapper-main { padding: 0 5vw 24px 5vw; }
.slider-card {
    scroll-snap-align: center; scroll-snap-stop: always;
    display: flex; flex-direction: column; justify-content: space-between;
    position: relative; background-color: #000;
    
    /* Mobile Scale */
    flex: 0 0 85vw; height: 75vh; min-height: 550px; 
    
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06); 
    transition: transform 0.8s var(--ease-spring);
    will-change: transform;
}

/* MINI CARDS (Square Fill on Mobile, Landscape on Desktop) */
.slider-wrapper-mini { padding: 0 15vw 24px 15vw; }
.mini-slider-card {
    scroll-snap-align: center; scroll-snap-stop: always;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 24px; text-align: center; border: 1px solid var(--glass-dark-border) !important;
    background-color: var(--glass-dark-bg); position: relative; text-decoration: none !important;
    
    /* Mobile Scale */
    flex: 0 0 70vw; height: 380px; 
    
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    transition: transform 0.6s var(--ease-spring);
    will-change: transform;
}

/* DESKTOP RESPONSIVE RESCALING */
@media (min-width: 768px) {
    .slider-container { gap: 24px; }
    .slider-wrapper-main { padding: 0 10vw 32px 10vw; }
    .slider-card { flex: 0 0 80vw; height: 60vh; max-height: 700px; }
    .slider-wrapper-mini { padding: 0 35vw 24px 35vw; }
    .mini-slider-card { flex: 0 0 30vw; height: 250px; }
}

/* Interactive Floats */
@media (hover: hover) and (pointer: fine) {
    .slider-card:hover { transform: scale(1.015); box-shadow: var(--shadow-float); z-index: 10; }
    .mini-slider-card:hover { transform: scale(1.025); border-color: rgba(255,255,255,0.4) !important; }
}

/* Inner Card Alignments & Text Visibility */
.card-header { position: relative; z-index: 20; width: 100%; padding: 32px 24px; display: flex; align-items: flex-start; pointer-events: none; }
.card-footer { position: relative; z-index: 20; width: 100%; padding: 24px 24px 40px 24px; display: flex; flex-direction: column; align-items: center; pointer-events: auto; }
.mini-slider-card-content { position: relative; z-index: 10; width: 100%; pointer-events: none; }

.apple-font .text-shadow-deep { 
    text-shadow: var(--shadow-text) !important; 
}

/* ==========================================================================
   8. FOOTER MOBILE ACCORDION
   ========================================================================== */
.apple-font footer a { transition: color 0.3s ease, opacity 0.3s ease; }
.apple-font footer a:hover { color: #1d1d1f !important; text-decoration: none !important; opacity: 0.8; }
.footer-links { transition: max-height 0.6s var(--ease-spring), opacity 0.4s ease-out, padding 0.4s ease; max-height: 0; opacity: 0; overflow: hidden; }
.footer-links.open { max-height: 400px; opacity: 1; padding-top: 12px; padding-bottom: 20px; }
.footer-icon { transition: transform 0.5s var(--ease-spring); will-change: transform; }
.footer-icon.open { transform: rotate(45deg); }

@media (min-width: 768px) { 
    .footer-links { max-height: none !important; opacity: 1 !important; overflow: visible !important; padding: 0 !important; margin-top: 12px !important; } 
    .footer-icon { display: none !important; }
}