@import url('https://fonts.googleapis.com/css2?family=Aref+Ruqaa:wght@400;700&family=IBM+Plex+Sans+Arabic:wght@100;200;300;400;500;600;700&display=swap');
:root {
    --primary: #0d4f6e;
    --primary-light: #1a6b8f;
    --primary-dark: #093a52;
    --secondary: #4ecdc4;
    --secondary-light: #7eddd6;
    --accent: #ffe66d;
    --bg: #f8fafc;
    --white: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius: 16px;
    --radius-lg: 24px;
    --transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Cairo', sans-serif;

    background: var(--bg);
    color: var(--text);
    direction: rtl;
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: clip;
}
@media (min-width: 769px) {
    body { scrollbar-gutter: stable; }
}

/* Theme Variables */

/* ==================== THEME VARIABLES ==================== */

/* Original Themes (1-14) */
.theme-1 { --primary: #0d4f6e; --primary-light: #1a6b8f; --primary-dark: #093a52; --secondary: #4ecdc4; --secondary-light: #7eddd6; --accent: #ffe66d; }
.theme-2 { --primary: #2e7d32; --primary-light: #43a047; --primary-dark: #1b5e20; --secondary: #81c784; --secondary-light: #a5d6a7; --accent: #fff59d; }
.theme-3 { --primary: #e65100; --primary-light: #ff6d00; --primary-dark: #bf360c; --secondary: #ffb74d; --secondary-light: #ffcc80; --accent: #fff3e0; }
.theme-4 { --primary: #6a1b9a; --primary-light: #8e24aa; --primary-dark: #4a148c; --secondary: #ba68c8; --secondary-light: #ce93d8; --accent: #f3e5f5; }
.theme-5 { --primary: #c62828; --primary-light: #e53935; --primary-dark: #b71c1c; --secondary: #ef9a9a; --secondary-light: #ffcdd2; --accent: #ffebee; }
.theme-6 { --primary: #f9a825; --primary-light: #fbc02d; --primary-dark: #f57f17; --secondary: #fff176; --secondary-light: #fff59d; --accent: #fffde7; }
.theme-7 { --primary: #1a237e; --primary-light: #283593; --primary-dark: #0d1642; --secondary: #7986cb; --secondary-light: #9fa8da; --accent: #e8eaf6; }
.theme-8 { --primary: #ad1457; --primary-light: #c2185b; --primary-dark: #880e4f; --secondary: #f48fb1; --secondary-light: #f8bbd9; --accent: #fce4ec; }
.theme-9 { --primary: #00695c; --primary-light: #00897b; --primary-dark: #004d40; --secondary: #4db6ac; --secondary-light: #80cbc4; --accent: #e0f2f1; }
.theme-10 { --primary: #d84315; --primary-light: #f4511e; --primary-dark: #bf360c; --secondary: #ff8a65; --secondary-light: #ffab91; --accent: #fbe9e7; }
.theme-11 { --primary: #283593; --primary-light: #3949ab; --primary-dark: #1a237e; --secondary: #9fa8da; --secondary-light: #c5cae9; --accent: #e8eaf6; }
.theme-12 { --primary: #1b5e20; --primary-light: #2e7d32; --primary-dark: #0d3d13; --secondary: #a5d6a7; --secondary-light: #c8e6c9; --accent: #e8f5e9; }
.theme-13 { --primary: #ff6f00; --primary-light: #ff8f00; --primary-dark: #e65100; --secondary: #ffd54f; --secondary-light: #ffe082; --accent: #fff8e1; }
.theme-14 { --primary: #37474f; --primary-light: #455a64; --primary-dark: #263238; --secondary: #90a4ae; --secondary-light: #b0bec5; --accent: #eceff1; }

/* ============================================
   Nature Inspired Themes (15-20)
   ============================================ */
.theme-15 { --primary: #7c4dff; --primary-light: #9e7bff; --primary-dark: #5a2dcc; --secondary: #b388ff; --secondary-light: #d1b3ff; --accent: #ede7f6; }
.theme-16 { --primary: #bf360c; --primary-light: #e64a19; --primary-dark: #8c2700; --secondary: #ff8a65; --secondary-light: #ffab91; --accent: #fff3e0; }
.theme-17 { --primary: #558b2f; --primary-light: #7cb342; --primary-dark: #33691e; --secondary: #aed581; --secondary-light: #c5e1a5; --accent: #f1f8e9; }
.theme-18 { --primary: #546e7a; --primary-light: #78909c; --primary-dark: #37474f; --secondary: #b0bec5; --secondary-light: #cfd8dc; --accent: #eceff1; }
.theme-19 { --primary: #8d6e63; --primary-light: #a1887f; --primary-dark: #6d4c41; --secondary: #d7ccc8; --secondary-light: #e7e0dd; --accent: #efebe9; }
.theme-20 { --primary: #00897b; --primary-light: #26a69a; --primary-dark: #00695c; --secondary: #4dd0e1; --secondary-light: #80deea; --accent: #e0f7fa; }

/* ============================================
   Modern & Trendy Themes (21-26)
   ============================================ */
.theme-21 { --primary: #1a1a2e; --primary-light: #2a2a4e; --primary-dark: #0f0f1a; --secondary: #e94560; --secondary-light: #f06b80; --accent: #0f3460; }
.theme-22 { --primary: #2d132c; --primary-light: #4a1f49; --primary-dark: #1a0b1a; --secondary: #ee4c7c; --secondary-light: #f47a9e; --accent: #c3f0ca; }
.theme-23 { --primary: #3d1a78; --primary-light: #5c2da3; --primary-dark: #2a1254; --secondary: #ff71ce; --secondary-light: #ff9edd; --accent: #01cdfe; }
.theme-24 { --primary: #424242; --primary-light: #616161; --primary-dark: #212121; --secondary: #9e9e9e; --secondary-light: #bdbdbd; --accent: #fafafa; }
.theme-25 { --primary: #00a896; --primary-light: #00c4ad; --primary-dark: #007d6f; --secondary: #02c39a; --secondary-light: #4dd9b8; --accent: #f0f3bd; }
.theme-26 { --primary: #fa7268; --primary-light: #fb9189; --primary-dark: #e85a50; --secondary: #feb692; --secondary-light: #fecdb3; --accent: #fef6e4; }

/* ============================================
   Professional Themes (27-30)
   ============================================ */
.theme-27 { --primary: #0d47a1; --primary-light: #1565c0; --primary-dark: #0a3576; --secondary: #42a5f5; --secondary-light: #64b5f6; --accent: #e3f2fd; }
.theme-28 { --primary: #455a64; --primary-light: #607d8b; --primary-dark: #37474f; --secondary: #78909c; --secondary-light: #90a4ae; --accent: #f5f5f5; }
.theme-29 { --primary: #1a237e; --primary-light: #303f9f; --primary-dark: #0d1259; --secondary: #3949ab; --secondary-light: #5c6bc0; --accent: #e8eaf6; }
.theme-30 { --primary: #004d40; --primary-light: #00695c; --primary-dark: #00332a; --secondary: #26a69a; --secondary-light: #4db6ac; --accent: #e0f2f1; }

/* ============================================
   Pastel Themes (31-35)
   ============================================ */
.theme-31 { --primary: #9575cd; --primary-light: #aa8fd8; --primary-dark: #7e57c2; --secondary: #e1bee7; --secondary-light: #f3e5f5; --accent: #fff8e1; }
.theme-32 { --primary: #f48fb1; --primary-light: #f8b4ca; --primary-dark: #ec407a; --secondary: #f8bbd9; --secondary-light: #fce4ec; --accent: #fce4ec; }
.theme-33 { --primary: #ffab91; --primary-light: #ffccbc; --primary-dark: #ff8a65; --secondary: #ffccbc; --secondary-light: #fbe9e7; --accent: #fff3e0; }
.theme-34 { --primary: #81d4fa; --primary-light: #b3e5fc; --primary-dark: #4fc3f7; --secondary: #b3e5fc; --secondary-light: #e1f5fe; --accent: #e1f5fe; }
.theme-35 { --primary: #80cbc4; --primary-light: #b2dfdb; --primary-dark: #4db6ac; --secondary: #b2dfdb; --secondary-light: #e0f2f1; --accent: #e0f2f1; }

/* ============================================
   Bold & Vibrant Themes (36-40)
   ============================================ */
.theme-36 { --primary: #7b1fa2; --primary-light: #9c27b0; --primary-dark: #6a1b9a; --secondary: #e040fb; --secondary-light: #ea80fc; --accent: #ea80fc; }
.theme-37 { --primary: #c2185b; --primary-light: #d81b60; --primary-dark: #ad1457; --secondary: #ff4081; --secondary-light: #ff80ab; --accent: #ff80ab; }
.theme-38 { --primary: #827717; --primary-light: #9e9d24; --primary-dark: #616011; --secondary: #c0ca33; --secondary-light: #d4e157; --accent: #f0f4c3; }
.theme-39 { --primary: #e65100; --primary-light: #ef6c00; --primary-dark: #bf360c; --secondary: #ff6d00; --secondary-light: #ff9100; --accent: #ffab40; }
.theme-40 { --primary: #006064; --primary-light: #00838f; --primary-dark: #004d50; --secondary: #00bcd4; --secondary-light: #4dd0e1; --accent: #84ffff; }

/* ============================================
   Dark Mode Themes (41-45)
   ============================================ */
.theme-41 { --primary: #121212; --primary-light: #1e1e1e; --primary-dark: #000000; --secondary: #bb86fc; --secondary-light: #d4b8fd; --accent: #03dac6; }
.theme-42 { --primary: #1e1e1e; --primary-light: #2d2d2d; --primary-dark: #121212; --secondary: #3d5afe; --secondary-light: #6d7cfe; --accent: #00e5ff; }
.theme-43 { --primary: #0a0a23; --primary-light: #151540; --primary-dark: #050512; --secondary: #6b5b95; --secondary-light: #8a7cb0; --accent: #88d8b0; }
.theme-44 { --primary: #1c1c1c; --primary-light: #2c2c2c; --primary-dark: #0c0c0c; --secondary: #c9b037; --secondary-light: #d9c35f; --accent: #f5f5f5; }
.theme-45 { --primary: #1b2d1b; --primary-light: #2a442a; --primary-dark: #0f1a0f; --secondary: #4caf50; --secondary-light: #81c784; --accent: #a5d6a7; }

/* ============================================
   Cultural Themes (46-50)
   ============================================ */
.theme-46 { --primary: #4a148c; --primary-light: #6a1b9a; --primary-dark: #380d6b; --secondary: #ffd700; --secondary-light: #ffdf4d; --accent: #f3e5f5; }
.theme-47 { --primary: #880e4f; --primary-light: #ad1457; --primary-dark: #5c0a36; --secondary: #ffb7c5; --secondary-light: #ffcdd5; --accent: #fce4ec; }
.theme-48 { --primary: #01579b; --primary-light: #0277bd; --primary-dark: #013a66; --secondary: #4fc3f7; --secondary-light: #81d4fa; --accent: #fff9c4; }
.theme-49 { --primary: #37474f; --primary-light: #546e7a; --primary-dark: #263238; --secondary: #90caf9; --secondary-light: #bbdefb; --accent: #eceff1; }
.theme-50 { --primary: #795548; --primary-light: #8d6e63; --primary-dark: #5d4037; --secondary: #ff9800; --secondary-light: #ffb74d; --accent: #fff8e1; }

/* ============================================
   Gradient Inspired Themes (51-55)
   ============================================ */
.theme-51 { --primary: #1a237e; --primary-light: #283593; --primary-dark: #0d1259; --secondary: #00e676; --secondary-light: #69f0ae; --accent: #b388ff; }
.theme-52 { --primary: #0d47a1; --primary-light: #1565c0; --primary-dark: #0a3576; --secondary: #ff7043; --secondary-light: #ff8a65; --accent: #ffd54f; }
.theme-53 { --primary: #4a148c; --primary-light: #6a1b9a; --primary-dark: #38106b; --secondary: #7c4dff; --secondary-light: #b47cff; --accent: #e1bee7; }
.theme-54 { --primary: #e65100; --primary-light: #ef6c00; --primary-dark: #bf360c; --secondary: #ffc107; --secondary-light: #ffd54f; --accent: #fff8e1; }
.theme-55 { --primary: #004d40; --primary-light: #00695c; --primary-dark: #00332a; --secondary: #00bfa5; --secondary-light: #64ffda; --accent: #1de9b6; }

/* ============================================
   Earth Tones Themes (56-60)
   ============================================ */
.theme-56 { --primary: #bf5a36; --primary-light: #d4724e; --primary-dark: #9c4728; --secondary: #d4a373; --secondary-light: #e0bb93; --accent: #fefae0; }
.theme-57 { --primary: #5c6b3c; --primary-light: #73854c; --primary-dark: #45522e; --secondary: #a3b18a; --secondary-light: #bcc5a8; --accent: #dad7cd; }
.theme-58 { --primary: #6d6875; --primary-light: #847d8c; --primary-dark: #56515c; --secondary: #b5838d; --secondary-light: #c9a0a8; --accent: #ffcdb2; }
.theme-59 { --primary: #9c6644; --primary-light: #b37d58; --primary-dark: #7d5136; --secondary: #ddb892; --secondary-light: #e8ccae; --accent: #ede0d4; }
.theme-60 { --primary: #5e503f; --primary-light: #776753; --primary-dark: #473c30; --secondary: #a98467; --secondary-light: #bda08a; --accent: #eae0d5; }

.theme-1 { --primary: #0d4f6e; --primary-light: #1a6b8f; --primary-dark: #093a52; --secondary: #4ecdc4; --secondary-light: #7eddd6; --accent: #ffe66d; }
.theme-2 { --primary: #059669; --primary-light: #10b981; --primary-dark: #047857; --secondary: #a7f3d0; --secondary-light: #d1fae5; --accent: #fef3c7; }
.theme-3 { --primary: #ea580c; --primary-light: #f97316; --primary-dark: #c2410c; --secondary: #fed7aa; --secondary-light: #ffedd5; --accent: #fef9c3; }
.theme-4 { --primary: #7c3aed; --primary-light: #8b5cf6; --primary-dark: #6d28d9; --secondary: #c4b5fd; --secondary-light: #ddd6fe; --accent: #fef3c7; }
.theme-5 { --primary: #dc2626; --primary-light: #ef4444; --primary-dark: #b91c1c; --secondary: #fca5a5; --secondary-light: #fecaca; --accent: #fef3c7; }
.theme-6 { --primary: #ca8a04; --primary-light: #eab308; --primary-dark: #a16207; --secondary: #fde047; --secondary-light: #fef08a; --accent: #ecfccb; }
.theme-7 { --primary: #1e40af; --primary-light: #2563eb; --primary-dark: #1e3a8a; --secondary: #93c5fd; --secondary-light: #bfdbfe; --accent: #fef3c7; }
.theme-8 { --primary: #be185d; --primary-light: #db2777; --primary-dark: #9d174d; --secondary: #f9a8d4; --secondary-light: #fbcfe8; --accent: #fef3c7; }
.theme-9 { --primary: #0d9488; --primary-light: #14b8a6; --primary-dark: #0f766e; --secondary: #5eead4; --secondary-light: #99f6e4; --accent: #fef3c7; }
.theme-10 { --primary: #c2410c; --primary-light: #ea580c; --primary-dark: #9a3412; --secondary: #fdba74; --secondary-light: #fed7aa; --accent: #fef3c7; }
.theme-11 { --primary: #4338ca; --primary-light: #4f46e5; --primary-dark: #3730a3; --secondary: #a5b4fc; --secondary-light: #c7d2fe; --accent: #fef3c7; }
.theme-12 { --primary: #15803d; --primary-light: #16a34a; --primary-dark: #166534; --secondary: #86efac; --secondary-light: #bbf7d0; --accent: #fef3c7; }
.theme-13 { --primary: #d97706; --primary-light: #f59e0b; --primary-dark: #b45309; --secondary: #fcd34d; --secondary-light: #fde68a; --accent: #ecfccb; }
.theme-14 { --primary: #475569; --primary-light: #64748b; --primary-dark: #334155; --secondary: #cbd5e1; --secondary-light: #e2e8f0; --accent: #f1f5f9; }



/* ==================== HERO SECTION ==================== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 200%;
    background: radial-gradient(ellipse, var(--primary-light) 0%, transparent 70%);
    opacity: 0.4;
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Circle Layout */
.hero.layout-circle {
    min-height: 500px;
    padding: 60px 40px;
}

.hero.layout-circle .hero-container {
    flex-direction: row-reverse;
    gap: 60px;
    min-height: 380px;
}

.hero.layout-circle .hero-image {
    flex-shrink: 0;
    position: relative;
}

.hero.layout-circle .hero-image::before {
    content: '';
    position: absolute;
    inset: -15px;
    border: 3px dashed var(--secondary);
    border-radius: 50%;
    opacity: 0.5;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero.layout-circle .hero-image img {
    width: 600px;
    height: 600px;
    object-fit: cover;
    border-radius: 50%;
    border: 6px solid var(--white);
    box-shadow:
            0 25px 50px -12px rgba(0,0,0,0.4),
            0 0 0 1px rgba(255,255,255,0.1);
    transition: var(--transition);
}

.hero.layout-circle .hero-image img:hover {
    transform: scale(1.05);
}

.hero.layout-circle .hero-content {
    flex: 1;
    text-align: center;
}

/* Rectangle Layout */
.hero.layout-rectangle {
    min-height: 550px;
}

.hero.layout-rectangle .hero-container {
    max-width: 100%;
    flex-direction: row-reverse;
    gap: 0;
    min-height: 550px;
}

.hero.layout-rectangle .hero-image {
    width: 45%;
    min-height: 550px;
    position: relative;
    overflow: hidden;
}

.hero.layout-rectangle .hero-image::after {
    display: none;
}

.hero.layout-rectangle .hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    border: none;
    box-shadow: none;
    transition: var(--transition);
}

.hero.layout-rectangle .hero-image:hover img {
    transform: scale(1.03);
}

.hero.layout-rectangle .hero-content {
    flex: 1;
    text-align: right;
    padding: 60px 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Hero Content Styles */
.hero-content {
    color: var(--white);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.2);
}

.hero-badge i {
    color: var(--accent);
}

.hero-title {
    font-size: 1.3rem;
    margin-bottom: 8px;
    opacity: 0.9;
    font-weight: 600;
    letter-spacing: 1px;
}

.hero-main-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 25px;
    padding: 14px 40px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    color: var(--primary-dark);
    display: inline-block;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.hero-main-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 3s infinite;
    /* Promoted deliberately: this runs forever, so it gets its own layer once
       rather than being re-rastered into the hero's on every frame. */
    will-change: transform;
}

/* Travels on `transform`, never on `left`. An offset animated through `left`
   is not composited -- it invalidates layout on every frame, and this one
   runs infinitely, so it was re-laying-out the hero ~60 times a second for as
   long as the page stayed open. translateX is the same movement (the element
   is its own width, so -100%..100% is the identical sweep) on the GPU. */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Hero name with badge hidden — text still shows, rectangle removed */
.hero-main-title.hero-name-plain {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    color: inherit !important;
    overflow: visible !important;
}

.hero-main-title.hero-name-plain::before {
    display: none !important;
}

.hero-main-title-text {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    opacity: 0.95;
    line-height: 1.4;
    white-space: pre-line;
    direction: rtl;
    text-align: right;
}
@media (max-width: 768px) {
    .hero-main-title-text {
        font-size: 2.4rem;
    }
}

/* Mobile phones (e.g., under 480px) */
@media (max-width: 480px) {
    .hero-main-title-text {
        font-size: 1.8rem;
    }
}

.hero-description-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    opacity: 0.9;
    line-height: 1.6;
    white-space: pre-line;
}

.hero-bio {
    font-size: 1.5rem;
    line-height: 1.9;
    margin-bottom: 35px;
    opacity: 0.95;
    max-width: 500px;
    font-family: "Aref Ruqaa", serif;
}

.hero.layout-circle .hero-bio {
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 50px;
    background: var(--white);
    /*color: var(--primary);*/
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.hero-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary);
    transform: translateX(-100%);
    transition: var(--transition);
}

/*.hero-cta:hover {*/
/*    transform: translateY(-3px);*/
/*    box-shadow: var(--shadow-xl);*/
/*    !*color: var(--white);*!*/
/*}*/

/*.hero-cta:hover::before {*/
/*    transform: translateX(0);*/
/*}*/

.hero-cta span {
    position: relative;
    z-index: 1;
}

.hero-cta i {
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

/*.hero-cta:hover i {*/
/*    transform: translateX(-5px);*/
/*}*/

/* ==================== SECTIONS BASE ==================== */
.section {
    padding: 80px 20px;
    position: relative;
}

.section:nth-child(odd) {
    background: var(--white);
}

.section:nth-child(even) {
    background: var(--bg);
}

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

.section-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--secondary-light);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    /*color: var(--primary);*/
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    border-radius: 2px;
}

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

/* ==================== CAROUSEL ==================== */
.carousel-wrapper {
    position: relative;
    padding: 0 50px;
}

.carousel {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    /* An `overflow-x` that is not `visible` makes the other axis compute to
       `auto` too, so the carousel was silently a *vertical* scroll container
       as well. Dragging up or down with a finger on a course card scrolled
       those few pixels of padding instead of the page, and the page stopped
       moving until the finger left the card. Pinning the y axis hands the
       gesture straight back to the document. */
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    padding: 20px 10px;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.carousel > * {
    scroll-snap-align: start;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--border);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 10;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.carousel-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-lg);
}

.carousel-btn.prev {
    right: 0;
}

.carousel-btn.next {
    left: 0;
}

/* ==================== COURSE CARDS ==================== */
.course-card {
    flex-shrink: 0;
    width: 340px;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
    display: flex;
    flex-direction: column;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    opacity: 0;
    transition: var(--transition);
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--secondary);
}

.course-card:hover::before {
    opacity: 1;
}

.course-card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.course-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 50%);
}

.course-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.course-card:hover .course-card-image img {
    transform: scale(1.1);
}

.course-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    background: var(--accent);
    color: var(--primary-dark);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 1;
    box-shadow: var(--shadow);
}

.course-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.course-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.4;
}

.course-card-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.course-card-subtitle i {
    color: var(--secondary);
}

.course-card-price {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding: 12px 15px;
    background: var(--bg);
    border-radius: var(--radius);
}

.course-card-price .current {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
}

.course-card-price .original {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.course-card-price .discount {
    padding: 4px 10px;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: auto;
}

.course-card-summary {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 20px;
}

.course-card-btn {
    display: block;
    margin-top: auto;
    padding-top: 18px;
    padding: 11px 20px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: #fff;
    text-align: center;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.course-card-btn:hover {
    opacity: 0.88;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

/* "عرض الكورس" outlined link — matches .course-card-btn sizing exactly */
.course-card-view-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* Pin the button pair to the bottom of the card as one group. */
    margin-top: auto;
    margin-bottom: 10px;
    padding: 11px 20px;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
}

/* When a view link is present it owns the auto top-margin; the subscribe
   button sits directly beneath it instead of taking its own free space. */
.course-card-view-link + .course-card-btn {
    margin-top: 0;
}

.course-card-view-link:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.course-card-price .free-badge {
    font-size: 1.3rem;
    font-weight: 800;
    color: #16a34a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.course-card-price .free-badge i {
    font-size: 1.1rem;
}

/* ==================== GALLERY CARDS ==================== */
.gallery-card {
    flex-shrink: 0;
    width: fit-content;
    min-width: 200px;
    max-width: 340px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-card:hover {
    transform: translateY(-8px);
}

.gallery-card-image {
    width: 100%;
    height: 180px;
    margin: 0 auto 20px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
    border: 4px solid var(--white);
    transition: var(--transition);
}

.gallery-card:hover .gallery-card-image {
    border-color: var(--secondary);
    box-shadow: var(--shadow-xl);
}

.gallery-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--primary) 0%, transparent 60%);
    opacity: 0;
    transition: var(--transition);
}

.gallery-card:hover .gallery-card-image::after {
    opacity: 0.7;
}

.gallery-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-card:hover .gallery-card-image img {
    transform: scale(1.1);
}

.gallery-card-title {
    font-weight: 700;
    color: var(--text);
    padding: 12px 25px;
    background: var(--white);
    border-radius: 50px;
    display: inline-block;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid transparent;
    white-space: nowrap;
}

.gallery-card:hover .gallery-card-title {
    background: var(--primary);
    /*color: var(--white);*/
    border-color: var(--primary);
}

/* ==================== FEATURE CARDS ==================== */
.features-grid {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    overflow-y: hidden;        /* see the note on the first .carousel rule */
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    padding: 20px 10px;
}

.feature-card {
    flex-shrink: 0;
    width: 320px;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    text-align: center;
    border: 2px solid var(--border);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    transform: scaleX(0);
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--secondary);
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, var(--secondary-light) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
    transition: var(--transition);
}

.feature-card:hover .feature-card-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
}

.feature-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 15px;
    line-height: 1.5;
}

.feature-card-summary {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* ==================== CONTACT SECTION ==================== */
/* ==================== FOOTER / SECTION 5 ==================== */
.contact-section {
    /* The «اشترك معانا دلوقتي!» button is the last thing on the page and the
       one it is asking for, so it needs air above it — at 50px it sat almost
       against the top edge of its own coloured band and read as clipped
       rather than as a call to action. */
    padding: clamp(58px, 6vw, 84px) 20px 40px;
    position: relative;
}

.contact-title-wrapper {
    text-align: center;
    margin-bottom: 30px;
}

.contact-title {
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 14px 44px;
    background: var(--white, #ffffff);
    color: var(--primary, #0d4f6e);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 50px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    margin-top: 10px;
}

.contact-title:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

/* Address row */
.footer-address-row {
    margin-bottom: 16px;
    font-size: 0.95rem;
    opacity: 0.85;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 820px;
    margin-inline: auto;
}

.footer-address-row i {
    font-size: 1rem;
}

/* Contact section — centered layout */
.contacts-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    max-width: 820px;
    margin: 0 auto;
    width: 100%;
}

/* Text links row */
.contact-text-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px 32px;
}

.contact-text-item {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.contact-text-item:hover { opacity: 1; }

.contact-text-item i {
    font-size: 0.88rem;
    opacity: 0.7;
    flex-shrink: 0;
}

/* Social icon circles row — brand colors */
.contact-icons-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.contact-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    border: none;
    text-decoration: none;
    color: #fff !important;
    font-size: 1rem;
    transition: transform 0.2s, filter 0.2s;
}

.contact-icon-circle:hover {
    transform: translateY(-2px);
    filter: brightness(1.15);
}

/* Per-platform brand colors */
.contact-icon-circle[data-type="facebook"]  { background: #1877F2; }
.contact-icon-circle[data-type="instagram"] { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.contact-icon-circle[data-type="twitter"]   { background: #000000; }
.contact-icon-circle[data-type="youtube"]   { background: #FF0000; }
.contact-icon-circle[data-type="tiktok"]    { background: #010101; }
.contact-icon-circle[data-type="whatsapp"]  { background: #25D366; }
.contact-icon-circle[data-type="telegram"]  { background: #229ED9; }
.contact-icon-circle[data-type="linkedin"]  { background: #0A66C2; }
.contact-icon-circle[data-type="reddit"]    { background: #FF4500; }

/* Footer attribution bar */
.footer-attribution {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 18px 20px;
    text-align: center;
    font-size: 0.82rem;
    opacity: 0.7;
}

.footer-attribution a {
    color: inherit;
    text-decoration: none;
    opacity: 0.9;
}

.footer-attribution a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ==================== FOOTER ==================== */
.footer {
    color: var(--white);
    text-align: center;
    padding: 18px 20px 0;
    font-size: 0.82rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 36px;
    opacity: 0.65;
}

.footer a {
    color: inherit;
    text-decoration: none;
}

.footer a:hover { opacity: 0.9; text-decoration: underline; }

.footer-legal-links {
    margin-top: 8px;
}

.footer-legal-links span {
    margin: 0 0.4em;
}

/* ==================== EMPTY STATE ==================== */
.empty-section {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.empty-section i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
    .hero.layout-circle .hero-image img {
        width: 240px;
        height: 240px;
    }

    .hero-main-title {
        font-size: 2.4rem;
    }

    .course-card {
        width: 300px;
    }

    .feature-card {
        width: 280px;
    }
}

@media (max-width: 992px) {
    .hero.layout-circle {
        padding: 50px 30px;
    }

    .hero.layout-circle .hero-container {
        gap: 40px;
    }

    .hero.layout-circle .hero-image img {
        width: 200px;
        height: 200px;
    }

    /* .hero.layout-rectangle .hero-image { */
        /* width: 40%; */
    /* } */

    .hero.layout-rectangle .hero-content {
        padding: 40px 50px;
    }

    .hero-main-title {
        font-size: 2rem;
        padding: 12px 30px;
    }

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

    .section {
        padding: 60px 20px;
    }

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

    .carousel-wrapper {
        padding: 0 40px;
    }
}

@media (max-width: 768px) {
    .hero.layout-circle,
    .hero.layout-rectangle {
        min-height: auto;
    }

    .hero.layout-circle .hero-container,
    .hero.layout-rectangle .hero-container {
        flex-direction: column;
        min-height: auto;
    }

    .hero.layout-circle {
        padding: 50px 20px;
    }

    .hero.layout-circle .hero-container {
        gap: 30px;
    }

    .hero.layout-circle .hero-image img {
        width: 180px;
        height: 180px;
    }

    .hero.layout-circle .hero-image::before {
        inset: -10px;
    }

    .hero.layout-rectangle .hero-image {
        width: 100%;
        min-height: 280px;
        height: 280px;
    }

    .hero.layout-rectangle .hero-image::after {
        background: linear-gradient(to top, var(--primary) 0%, transparent 50%);
    }

    .hero.layout-rectangle .hero-content {
        padding: 40px 25px;
        text-align: center;
        align-items: center;
        width: 100%;
    }
    .hero-content .hero-cta {
        align-self: center;
    }

    .hero-main-title {
        font-size: 1.7rem;
        padding: 10px 25px;
    }

    .hero-bio {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    .hero-cta {
        padding: 14px 35px;
        font-size: 1rem;
    }

    .section {
        padding: 50px 15px;
    }

    .section-header {
        margin-bottom: 40px;
    }

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

    .carousel-wrapper {
        padding: 0 35px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .course-card {
        width: 280px;
    }

    .course-card-image {
        height: 160px;
    }

    .course-card-content {
        padding: 20px;
    }

    .course-card-title {
        font-size: 1.15rem;
    }

    .gallery-card {
        width: 180px;
    }

    .gallery-card-image {
        width: 150px;
        height: 150px;
    }

    .feature-card {
        width: 260px;
        padding: 30px 20px;
    }

    .feature-card-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .contact-icon-circle {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero.layout-circle {
        padding: 40px 15px;
    }

    .hero.layout-circle .hero-image img {
        width: 150px;
        height: 150px;
        border-width: 4px;
    }

    .hero.layout-circle .hero-image::before {
        inset: -8px;
        border-width: 2px;
    }

    .hero.layout-rectangle .hero-image {
        height: 220px;
        min-height: 220px;
    }

    .hero.layout-rectangle .hero-content {
        padding: 30px 15px;
    }

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

    .hero-main-title {
        font-size: 1.4rem;
        padding: 8px 20px;
    }

    .hero-bio {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .hero-cta {
        padding: 12px 30px;
        font-size: 0.95rem;
    }

    .section {
        padding: 40px 10px;
    }

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

    .carousel-wrapper {
        padding: 0 25px;
    }

    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .course-card,
    .feature-card {
        width: calc(100vw - 80px);
        max-width: 300px;
    }

    .course-card-image {
        height: 150px;
    }

    .gallery-card {
        width: 160px;
    }

    .gallery-card-image {
        width: 130px;
        height: 130px;
        border-width: 3px;
    }

    .gallery-card-title {
        font-size: 0.9rem;
        padding: 10px 20px;
    }

    .contact-title {
        font-size: 1.2rem;
        padding: 12px 25px;
    }

    .contact-text-item {
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {
    .hero.layout-circle .hero-image img {
        width: 130px;
        height: 130px;
    }

    .hero-main-title {
        font-size: 1.25rem;
    }

    .course-card,
    .feature-card {
        width: calc(100vw - 60px);
    }

    .gallery-card-image {
        width: 110px;
        height: 110px;
    }
}

/* Carousel Wrapper - Centers the carousel */
.carousel-wrapper {
    position: relative;
    padding: 0 50px;
}

/* Carousel - Use flexbox centering */
.carousel {
    display: flex;
    flex-wrap: nowrap;
    gap: 25px;
    overflow-x: auto;
    overflow-y: hidden;        /* see the note on the first .carousel rule */
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    padding: 20px 10px;
    scrollbar-width: none;

    /* Center items */
    justify-content: safe center;
}

.carousel::-webkit-scrollbar {
    display: none;
}

/* Cards don't shrink */
.carousel > * {
    flex-shrink: 0;
}

/* For browsers that don't support 'safe center', use this wrapper approach */
.carousel-inner {
    display: flex;
    gap: 25px;
    margin: 0 auto; /* Center the inner container */
}
/* ============================================
   Dark Theme Overrides
   ============================================ */
.theme-41,
.theme-42,
.theme-43,
.theme-44,
.theme-45 {
    --bg: #0a0a0a;
    --white: #1a1a1a;
    --text: #f5f5f5;
    --text-light: #a0a0a0;
    --text-muted: #707070;
    --border: #2d2d2d;
}

.theme-41 .section:nth-child(odd),
.theme-42 .section:nth-child(odd),
.theme-43 .section:nth-child(odd),
.theme-44 .section:nth-child(odd),
.theme-45 .section:nth-child(odd) {
    background: #1a1a1a;
}

.theme-41 .section:nth-child(even),
.theme-42 .section:nth-child(even),
.theme-43 .section:nth-child(even),
.theme-44 .section:nth-child(even),
.theme-45 .section:nth-child(even) {
    background: #0f0f0f;
}

.theme-41 .course-card,
.theme-42 .course-card,
.theme-43 .course-card,
.theme-44 .course-card,
.theme-45 .course-card,
.theme-41 .feature-card,
.theme-42 .feature-card,
.theme-43 .feature-card,
.theme-44 .feature-card,
.theme-45 .feature-card {
    background: #1e1e1e;
    border-color: #2d2d2d;
}

.theme-41 .course-card-price,
.theme-42 .course-card-price,
.theme-43 .course-card-price,
.theme-44 .course-card-price,
.theme-45 .course-card-price {
    background: #0f0f0f;
}

.theme-41 .gallery-card-title,
.theme-42 .gallery-card-title,
.theme-43 .gallery-card-title,
.theme-44 .gallery-card-title,
.theme-45 .gallery-card-title {
    background: #1e1e1e;
    color: #f5f5f5;
}

.theme-41 .contact-section,
.theme-42 .contact-section,
.theme-43 .contact-section,
.theme-44 .contact-section,
.theme-45 .contact-section {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
}

.theme-41 .contact-icon-circle,
.theme-42 .contact-icon-circle,
.theme-43 .contact-icon-circle,
.theme-44 .contact-icon-circle,
.theme-45 .contact-icon-circle {
    background: rgba(255, 255, 255, 0.08);
    border-color: #3a3a3a;
}

.theme-41 .contact-title,
.theme-42 .contact-title,
.theme-43 .contact-title,
.theme-44 .contact-title,
.theme-45 .contact-title {
    background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
    color: #f5f5f5;
}

.theme-41 .carousel-btn,
.theme-42 .carousel-btn,
.theme-43 .carousel-btn,
.theme-44 .carousel-btn,
.theme-45 .carousel-btn {
    background: #1e1e1e;
    border-color: #3d3d3d;
    color: #f5f5f5;
}

/* ==================== INCREASED GALLERY CARD SIZE ==================== */

/* 1. Increase base size for Desktop */
.gallery-card {
    width: 300px; /* Increased from 220px */
}

.gallery-card-image {
    width: 260px; /* Increased from 180px */
    height: 260px; /* Increased from 180px */
    border-width: 6px; /* Slightly thicker border for larger scale */
}

.gallery-card-title {
    font-size: 1.1rem;
    padding: 14px 35px; /* Larger button-style title */
}

/* 2. Adjust for Medium Screens (Tablets) */
@media (max-width: 992px) {
    .gallery-card {
        width: 250px;
    }

    .gallery-card-image {
        width: 220px;
        height: 220px;
    }
}

/* 3. Adjust for Small Screens (Phones) */
@media (max-width: 768px) {
    .gallery-card {
        width: 220px; /* Falls back to your original desktop size */
    }

    .gallery-card-image {
        width: 190px;
        height: 190px;
    }
}

/* 4. Adjust for Extra Small Screens */
@media (max-width: 480px) {
    .gallery-card {
        width: 180px;
    }

    .gallery-card-image {
        width: 150px;
        height: 150px;
    }

    .gallery-card-title {
        font-size: 0.95rem;
        padding: 10px 20px;
    }
}

/**/

/**/

/* ==================== FULL-SCREEN HERO SECTION ==================== */

/* Base hero full screen */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Circle Layout - Full Screen */
.hero.layout-circle {
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(20px, 5vw, 60px);
}

.hero.layout-circle .hero-container {
    min-height: auto;
    max-width: 1200px;
    width: 100%;
    gap: clamp(25px, 5vw, 60px);
}

/* Rectangle Layout - Full Screen */
.hero.layout-rectangle {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0;
}

.hero.layout-rectangle .hero-container {
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    max-width: 100%;
}

.hero.layout-rectangle .hero-image {
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
}

.hero.layout-rectangle .hero-content {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(25px, 6vw, 80px);
}

/* ==================== RESPONSIVE HERO ELEMENTS ==================== */

/* Hero Badge - Responsive */
.hero-badge {
    padding: clamp(6px, 1.5vw, 10px) clamp(14px, 3vw, 24px);
    font-size: clamp(0.75rem, 2vw, 0.95rem);
    gap: clamp(5px, 1vw, 10px);
    margin-bottom: clamp(12px, 3vw, 25px);
}

.hero-badge i {
    font-size: clamp(0.8rem, 2vw, 1rem);
}

/* Hero Title - Responsive */
.hero-title {
    font-size: clamp(0.95rem, 2.5vw, 1.4rem);
    margin-bottom: clamp(5px, 1.5vw, 12px);
    letter-spacing: clamp(0.5px, 0.1vw, 2px);
}

/* Hero Name - Responsive */
.hero-main-title {
    font-size: clamp(1.3rem, 5vw, 3.2rem);
    padding: clamp(8px, 2vw, 18px) clamp(18px, 4vw, 50px);
    margin-bottom: clamp(15px, 4vw, 30px);
    border-radius: clamp(10px, 2vw, 20px);
}

/* Hero Bio - Responsive */
.hero-bio {
    font-size: clamp(0.9rem, 2.5vw, 1.35rem);
    line-height: clamp(1.6, 0.5vw + 1.5, 2);
    margin-bottom: clamp(20px, 5vw, 40px);
    max-width: clamp(280px, 70vw, 550px);
}

.hero.layout-circle .hero-bio {
    margin-left: auto;
    margin-right: auto;
}

/* Hero CTA Button - Responsive */
.hero-cta {
    padding: clamp(10px, 2.5vw, 18px) clamp(25px, 6vw, 55px);
    font-size: clamp(0.9rem, 2.5vw, 1.15rem);
    border-radius: clamp(30px, 5vw, 50px);
    gap: clamp(6px, 1.5vw, 12px);
}

.hero-cta i {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
}

/* ==================== RESPONSIVE HERO IMAGES ==================== */

/* Circle Layout Image - Responsive */
.hero.layout-circle .hero-image img {
    width: clamp(120px, 25vw, 320px);
    height: clamp(120px, 25vw, 320px);
    border-width: clamp(3px, 0.6vw, 8px);
}

.hero.layout-circle .hero-image::before {
    inset: clamp(-6px, -1.5vw, -18px);
    border-width: clamp(2px, 0.4vw, 4px);
}

/* Rectangle Layout Image - Responsive width */
.hero.layout-rectangle .hero-image {
    width: clamp(35%, 45vw, 50%);
}

/* ==================== RESPONSIVE BREAKPOINTS ==================== */

@media (max-width: 992px) {
    /* .hero.layout-rectangle .hero-image {
        width: 42%;
    } */
}

@media (max-width: 768px) {
    /* Circle Layout Mobile */
    .hero.layout-circle {
        min-height: 100vh;
        min-height: 100dvh;
    }

    .hero.layout-circle .hero-container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .hero.layout-circle .hero-image img {
        width: clamp(130px, 35vw, 200px);
        height: clamp(130px, 35vw, 200px);
    }

    /* Rectangle Layout Mobile */
    .hero.layout-rectangle {
        min-height: 100vh;
        min-height: 100dvh;
    }

    .hero.layout-rectangle .hero-container {
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .hero.layout-rectangle .hero-image {
        width: 100%;
        min-height: clamp(200px, 40vh, 350px);
        height: clamp(200px, 40vh, 350px);
        flex-shrink: 0;
    }

    .hero.layout-rectangle .hero-content {
        flex: 1;
        min-height: auto;
        text-align: center;
        justify-content: center;
    }

    .hero-bio {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 480px) {
    .hero.layout-circle .hero-image img {
        width: clamp(110px, 40vw, 160px);
        height: clamp(110px, 40vw, 160px);
    }

    .hero.layout-rectangle .hero-image {
        min-height: clamp(180px, 35vh, 280px);
        height: clamp(180px, 35vh, 280px);
    }
}

/* ==================== LANDSCAPE MODE FIXES ==================== */

@media (max-height: 500px) and (orientation: landscape) {
    .hero.layout-circle,
    .hero.layout-rectangle {
        min-height: 100vh;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .hero.layout-circle .hero-container {
        flex-direction: row-reverse;
        gap: 30px;
    }

    .hero.layout-circle .hero-image img {
        width: clamp(100px, 20vh, 150px);
        height: clamp(100px, 20vh, 150px);
    }

    .hero-main-title {
        font-size: clamp(1.2rem, 4vh, 2rem);
        padding: clamp(6px, 1.5vh, 12px) clamp(15px, 3vh, 30px);
        margin-bottom: clamp(10px, 2vh, 20px);
    }

    .hero-title {
        font-size: clamp(0.85rem, 2.5vh, 1.1rem);
        margin-bottom: clamp(4px, 1vh, 8px);
    }

    .hero-bio {
        font-size: clamp(0.8rem, 2.5vh, 1rem);
        margin-bottom: clamp(12px, 3vh, 25px);
        line-height: 1.5;
    }

    .hero-cta {
        padding: clamp(8px, 2vh, 14px) clamp(20px, 5vh, 40px);
        font-size: clamp(0.85rem, 2.5vh, 1rem);
    }

    .hero-badge {
        padding: clamp(4px, 1vh, 8px) clamp(10px, 2vh, 18px);
        font-size: clamp(0.7rem, 2vh, 0.85rem);
        margin-bottom: clamp(8px, 2vh, 15px);
    }

    .hero.layout-rectangle .hero-container {
        flex-direction: row-reverse;
    }

    .hero.layout-rectangle .hero-image {
        /* width: 40%; */
        min-height: 100vh;
        height: 100vh;
    }

    .hero.layout-rectangle .hero-content {
        width: 60%;
        min-height: auto;
        text-align: right;
    }
}

/* ==================== FRAMED LAYOUT ==================== */

.hero.layout-framed {
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(20px, 5vw, 60px);
}

.hero.layout-framed .hero-container {
    min-height: auto;
    max-width: 1200px;
    width: 100%;
    flex-direction: row-reverse;
    align-items: center;
    gap: clamp(30px, 5vw, 60px);
}

.hero.layout-framed .hero-image {
    flex-shrink: 0;
    width: clamp(220px, 28vw, 380px);
    position: relative;
    padding: 0 0 16px 0;
    margin-left: 16px;
    overflow: visible;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Dark bottom-to-transparent overlay matching the course cards in /courses/ */
.hero.layout-framed .hero-image::after {
    content: '';
    position: absolute;
    inset: 0 0 16px 0;
    border-radius: var(--radius-lg);
    background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 50%);
    z-index: 2;
    pointer-events: none;
}

.hero.layout-framed .hero-image img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: clamp(300px, 60vh, 520px);
    height: clamp(300px, 60dvh, 520px);
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 60px -15px rgba(0,0,0,0.55), 0 12px 24px -8px rgba(0,0,0,0.35);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: block;
}

.hero.layout-framed .hero-image img:hover {
    transform: scale(1.025) translateY(-6px);
    box-shadow: 0 40px 80px -18px rgba(0,0,0,0.6), 0 16px 32px -10px rgba(0,0,0,0.4);
}

.hero.layout-framed .hero-content {
    flex: 1;
    text-align: right;
}

@media (max-width: 992px) {
    .hero.layout-framed .hero-image {
        width: clamp(190px, 32vw, 320px);
    }

    .hero.layout-framed .hero-image img {
        height: clamp(260px, 55vh, 440px);
        height: clamp(260px, 55dvh, 440px);
    }
}

@media (max-width: 768px) {
    .hero.layout-framed {
        min-height: 100vh;
        min-height: 100dvh;
        padding: clamp(30px, 6vw, 60px) clamp(20px, 5vw, 40px);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero.layout-framed .hero-container {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 30px;
        width: 100%;
    }

    .hero.layout-framed .hero-image {
        width: clamp(240px, 80vw, 380px);
        padding: 0;
        margin-left: 0;
        display: flex;
        justify-content: center;
    }

    .hero.layout-framed .hero-image::before {
        display: none;
    }

    /* image fills the box on mobile (no bottom padding), so overlay spans fully */
    .hero.layout-framed .hero-image::after {
        inset: 0;
    }

    .hero.layout-framed .hero-image img {
        height: clamp(260px, 62vw, 400px);
    }

    .hero.layout-framed .hero-content {
        text-align: center;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero.layout-framed {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero.layout-framed .hero-image {
        width: clamp(220px, 85vw, 340px);
        padding: 0;
        margin-left: 0;
        display: flex;
        justify-content: center;
    }

    .hero.layout-framed .hero-image img {
        height: clamp(240px, 68vw, 360px);
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .hero.layout-framed {
        min-height: 100vh;
        padding-top: 15px;
        padding-bottom: 15px;
    }

    .hero.layout-framed .hero-container {
        flex-direction: row-reverse;
        gap: 30px;
    }

    .hero.layout-framed .hero-image {
        width: clamp(120px, 18vw, 200px);
    }

    .hero.layout-framed .hero-image img {
        height: clamp(140px, 78vh, 300px);
        height: clamp(140px, 78dvh, 300px);
    }
}

/* ==================== SCROLL INDICATOR ==================== */

.hero-scroll-indicator {
    position: absolute;
    bottom: clamp(15px, 4vh, 35px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(4px, 1vh, 10px);
    color: var(--white);
    opacity: 0.7;
    animation: bounce 2s infinite;
    z-index: 10;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.hero-scroll-indicator:hover {
    opacity: 1;
}

.hero-scroll-indicator span {
    font-size: clamp(0.7rem, 2vw, 0.9rem);
    font-weight: 500;
}

.hero-scroll-indicator i {
    font-size: clamp(1rem, 3vw, 1.6rem);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Hide scroll indicator in landscape when space is tight */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-scroll-indicator {
        display: none;
    }
}

/* ==================== SMOOTH SCROLLING & IOS FIXES ==================== */

html {
    scroll-behavior: smooth;
    overflow-x: clip;
}

/* Fix for iOS Safari viewport height issues */
@supports (-webkit-touch-callout: none) {
    .hero,
    .hero.layout-circle,
    .hero.layout-rectangle,
    .hero.layout-rectangle .hero-container,
    .hero.layout-rectangle .hero-image,
    .hero.layout-rectangle .hero-content {
        min-height: -webkit-fill-available;
    }
}

/* ==================== ULTRA-WIDE SCREENS ==================== */

@media (min-width: 1800px) {
    .hero.layout-circle .hero-container {
        max-width: 1400px;
    }

    .hero.layout-circle .hero-image img {
        width: 600px;
        height: 600px;
    }

    .hero-main-title {
        font-size: 3.5rem;
    }

    .hero-bio {
        font-size: 1.5rem;
        max-width: 650px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-cta {
        padding: 20px 60px;
        font-size: 1.25rem;
    }
}

/* ==================== SMALL HEIGHT DEVICES (FIXES) ==================== */

@media (max-height: 650px) and (orientation: portrait) {
    .hero.layout-circle .hero-container {
        gap: clamp(15px, 3vh, 30px);
    }

    .hero.layout-circle .hero-image img {
        width: clamp(100px, 18vh, 160px);
        height: clamp(100px, 18vh, 160px);
    }

    .hero-main-title {
        font-size: clamp(1.2rem, 4vh, 2rem);
        margin-bottom: clamp(10px, 2vh, 20px);
    }

    .hero-bio {
        font-size: clamp(0.85rem, 2.2vh, 1.1rem);
        margin-bottom: clamp(15px, 3vh, 25px);
    }

    .hero-badge {
        margin-bottom: clamp(8px, 1.5vh, 15px);
    }

    .hero.layout-rectangle .hero-image {
        min-height: clamp(150px, 30vh, 250px);
        height: clamp(150px, 30vh, 250px);
    }
}


/*/*/

/* ==================== CUSTOM FIXES - CORRECTED ==================== */

/* ========== CIRCLE LAYOUT FIXES ========== */
/* ========== CIRCLE LAYOUT FIXES ========== */

/* 1. تكبير الصورة في الإطار الدائري */
.hero.layout-circle .hero-image img {
    width: clamp(200px, 38vw, 420px);
    height: clamp(200px, 38vw, 420px);
}

.hero.layout-circle .hero-image::before {
    inset: clamp(-12px, -2.5vw, -28px);
}

/* 2. محاذاة كل المحتوى ناحية الشمال (جهة الصورة) */
.hero.layout-circle .hero-content {
    text-align: left !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start !important;
}

/* 3. تكبير كلمة "منصة" */
.hero.layout-circle .hero-title {
    font-size: clamp(1.3rem, 3.5vw, 2rem);
    font-weight: 700;
}

/* 4. تكبير العبارة الدعائية ومحاذاتها للشمال */
.hero.layout-circle .hero-bio {
    /*font-size: clamp(1.05rem, 3vw, 1.5rem);*/
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: center !important;
    max-width: 500px;
}

/* 5. محاذاة الزر للشمال */
.hero.layout-circle .hero-cta {
    align-self: center !important;
}

/* 6. محاذاة مستطيل الاسم للشمال */
.hero.layout-circle .hero-main-title {
    /* يبقى كما هو - inline-block يتبع text-align */
}

/* ========== RESPONSIVE - MOBILE (Circle) ========== */

@media (max-width: 768px) {
    /* Circle Layout Mobile - الوسط */
    .hero.layout-circle .hero-content {
        text-align: center !important;
        align-items: center !important;
    }

    .hero.layout-circle .hero-bio {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .hero.layout-circle .hero-cta {
        align-self: center !important;
    }

    .hero.layout-circle .hero-image img {
        width: clamp(150px, 40vw, 220px);
        height: clamp(150px, 40vw, 220px);
    }
}

@media (max-width: 480px) {
    .hero.layout-circle .hero-image img {
        width: clamp(130px, 45vw, 180px);
        height: clamp(130px, 45vw, 180px);
    }
}

/* ========== LANDSCAPE MODE (Circle) ========== */

@media (max-height: 500px) and (orientation: landscape) {
    .hero.layout-circle .hero-content {
        text-align: left !important;
        align-items: center !important;
    }

    .hero.layout-circle .hero-bio {
        text-align: center !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .hero.layout-circle .hero-cta {
        align-self: flex-start !important;
    }
}
/*!* 1. تكبير الصورة في الإطار الدائري *!*/
/*.hero.layout-circle .hero-image img {*/
/*    width: clamp(200px, 38vw, 420px);*/
/*    height: clamp(200px, 38vw, 420px);*/
/*}*/

/*.hero.layout-circle .hero-image::before {*/
/*    inset: clamp(-12px, -2.5vw, -28px);*/
/*}*/

/*!* 2. محاذاة كل المحتوى لليسار (الشمال) في RTL *!*/
/*.hero.layout-circle .hero-content {*/
/*    text-align: right;*/
/*    direction: rtl;*/
/*    display: flex;*/
/*    flex-direction: column;*/
/*    align-items: flex-end;*/
/*}*/

/*!* 3. تكبير كلمة "منصة" *!*/
/*.hero.layout-circle .hero-title {*/
/*    font-size: clamp(1.3rem, 3.5vw, 2rem);*/
/*    font-weight: 700;*/
/*}*/

/*!* 4. تكبير العبارة الدعائية ومحاذاتها صح *!*/
/*.hero.layout-circle .hero-bio {*/
/*    font-size: clamp(1.05rem, 3vw, 1.5rem);*/
/*    margin-left: 0 !important;*/
/*    margin-right: 0 !important;*/
/*    text-align: right;*/
/*    max-width: 500px;*/
/*}*/

/*!* 5. محاذاة الزر *!*/
/*.hero.layout-circle .hero-cta {*/
/*    align-self: flex-end;*/
/*}*/

/* ========== RECTANGLE LAYOUT FIXES ========== */

/* 1. الصورة مربعة تملأ نصف الشاشة */
.hero.layout-rectangle .hero-image {
    width: 50%;
    min-height: 100vh;
    min-height: 100dvh;
}

.hero.layout-rectangle .hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 2. تصغير مستطيل اسم المعلم ليكون طبيعي */
.hero.layout-rectangle .hero-main-title {
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    padding: clamp(12px, 2vw, 16px) clamp(30px, 5vw, 50px);
    width: auto !important;
    max-width: fit-content !important;
    display: inline-block;
}

/* 3. تصغير زر "اشترك معنا" ليكون طبيعي */
.hero.layout-rectangle .hero-cta {
    padding: clamp(12px, 2vw, 16px) clamp(35px, 5vw, 55px);
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    width: auto !important;
    max-width: fit-content !important;
    display: inline-flex;
}

/* 4. محاذاة المحتوى في الجانب الأيمن */
.hero.layout-rectangle .hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: right;
    padding: clamp(30px, 5vw, 80px);
}

/* 5. تكبير العنوان والوصف */
.hero.layout-rectangle .hero-title {
    font-size: clamp(1.2rem, 3vw, 1.7rem);
}

.hero.layout-rectangle .hero-bio {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    max-width: 450px;
    margin-left: 0;
    margin-right: 0;
}

/* ========== RESPONSIVE - MOBILE ========== */

@media (max-width: 768px) {
    /* Circle Layout Mobile - الوسط */
    .hero.layout-circle .hero-content {
        text-align: center;
        align-items: center;
    }

    .hero.layout-circle .hero-bio {
        text-align: center;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .hero.layout-circle .hero-cta {
        align-self: center;
    }

    .hero.layout-circle .hero-image img {
        width: clamp(150px, 40vw, 220px);
        height: clamp(150px, 40vw, 220px);
    }

    /* Rectangle Layout Mobile */
    .hero.layout-rectangle .hero-container {
        flex-direction: column;
    }

    .hero.layout-rectangle .hero-image {
        width: 100%;
        min-height: 45vh;
        max-height: 45vh;
    }

    .hero.layout-rectangle .hero-content {
        align-items: center;
        text-align: center;
        flex: 1;
        min-height: auto;
    }

    .hero.layout-rectangle .hero-main-title {
        font-size: clamp(1.4rem, 5vw, 2rem);
    }

    .hero.layout-rectangle .hero-cta {
        padding: 12px 40px;
    }

    .hero.layout-rectangle .hero-bio {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero.layout-circle .hero-image img {
        width: clamp(130px, 45vw, 180px);
        height: clamp(130px, 45vw, 180px);
    }

    .hero.layout-rectangle .hero-image {
        min-height: 40vh;
        max-height: 40vh;
    }
}

/* ========== LANDSCAPE MODE ========== */

@media (max-height: 500px) and (orientation: landscape) {
    .hero.layout-circle .hero-content {
        text-align: right;
        align-items: center;
    }

    .hero.layout-circle .hero-bio {
        text-align: center;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .hero.layout-circle .hero-cta {
        align-self: flex-end;
    }

    /* .hero.layout-rectangle .hero-image { */
        /* width: 50%; */
    /* } */

    .hero.layout-rectangle .hero-content {
        align-items: flex-start;
    }
}

.hero-main-title{
    color:white;
    padding: 3px 10px 3px 10px;

}


.hero-bio {
    font-size: 2.5rem !important;
    color: white;
}
.hero-title{
    align-self: center;
    color: white;
}
.hero.layout-circle .hero-content{
    align-items: center !important;
}
.hero.layout-rectangle .hero-content{
    align-items: center !important;
}

/**/
/**/

/* ==================== LARGER HERO IMAGE ==================== */

/* ========== CIRCLE LAYOUT - LARGER IMAGE ========== */

.hero.layout-circle .hero-image img {
    width: clamp(280px, 45vw, 550px);  /* Increased from clamp(200px, 38vw, 420px) */
    height: clamp(280px, 45vw, 550px); /* Increased from clamp(200px, 38vw, 420px) */
    border-width: clamp(5px, 0.8vw, 10px); /* Thicker border for larger image */
}

.hero.layout-circle .hero-image::before {
    inset: clamp(-15px, -3vw, -35px); /* Larger dashed border spacing */
    border-width: clamp(3px, 0.5vw, 5px);
}

/* ========== RECTANGLE LAYOUT - LARGER IMAGE ========== */

.hero.layout-rectangle .hero-image {
    /* width: 55%; Increased from 50% */
    min-height: 100vh;
    min-height: 100dvh;
}

/* ========== ULTRA-WIDE SCREENS - EVEN LARGER ========== */

@media (min-width: 1800px) {
    .hero.layout-circle .hero-image img {
        width: 650px;  /* Increased from 600px */
        height: 650px; /* Increased from 600px */
        border-width: 12px;
    }

    .hero.layout-circle .hero-image::before {
        inset: -40px;
        border-width: 5px;
    }

    /* .hero.layout-rectangle .hero-image { */
        /* width: 55%; */
    /* } */
}

/* ========== LARGE SCREENS (1400px - 1800px) ========== */

@media (min-width: 1400px) and (max-width: 1799px) {
    .hero.layout-circle .hero-image img {
        width: 500px;
        height: 500px;
    }
}

/* ========== MEDIUM SCREENS (992px - 1399px) ========== */

@media (min-width: 992px) and (max-width: 1399px) {
    .hero.layout-circle .hero-image img {
        width: clamp(350px, 40vw, 450px);
        height: clamp(350px, 40vw, 450px);
    }

    /* .hero.layout-rectangle .hero-image {
        width: 50%;
    } */
}

/* ========== TABLETS (768px - 991px) ========== */

@media (min-width: 768px) and (max-width: 991px) {
    .hero.layout-circle .hero-image img {
        width: clamp(280px, 38vw, 380px);
        height: clamp(280px, 38vw, 380px);
    }

    /* .hero.layout-rectangle .hero-image { */
        /* width: 48%; */
    /* } */
}

/* ========== MOBILE (max-width: 767px) ========== */

@media (max-width: 767px) {
    .hero.layout-circle .hero-image img {
        width: clamp(180px, 50vw, 280px);  /* Increased from clamp(150px, 40vw, 220px) */
        height: clamp(180px, 50vw, 280px); /* Increased from clamp(150px, 40vw, 220px) */
        border-width: 5px;
    }

    .hero.layout-circle .hero-image::before {
        inset: clamp(-10px, -2vw, -18px);
    }

    .hero.layout-rectangle .hero-image {
        width: 100%;
        min-height: 50vh;  /* Increased from 45vh */
        max-height: 50vh;  /* Increased from 45vh */
    }
}

/* ========== SMALL MOBILE (max-width: 480px) ========== */

@media (max-width: 480px) {
    .hero.layout-circle .hero-image img {
        width: clamp(160px, 55vw, 220px);  /* Increased from clamp(130px, 45vw, 180px) */
        height: clamp(160px, 55vw, 220px); /* Increased from clamp(130px, 45vw, 180px) */
        border-width: 4px;
    }

    .hero.layout-rectangle .hero-image {
        min-height: 45vh;  /* Increased from 40vh */
        max-height: 45vh;  /* Increased from 40vh */
    }
}

/* ========== EXTRA SMALL MOBILE (max-width: 360px) ========== */

@media (max-width: 360px) {
    .hero.layout-circle .hero-image img {
        width: clamp(140px, 50vw, 180px);
        height: clamp(140px, 50vw, 180px);
    }
}

/* ========== LANDSCAPE MODE ========== */

@media (max-height: 500px) and (orientation: landscape) {
    .hero.layout-circle .hero-image img {
        width: clamp(140px, 30vh, 220px);  /* Increased */
        height: clamp(140px, 30vh, 220px); /* Increased */
    }

    /* .hero.layout-rectangle .hero-image { */
        /* width: 50%; */
    /* } */
}

/* ========== SHORT HEIGHT DEVICES ========== */

@media (max-height: 650px) and (orientation: portrait) {
    .hero.layout-circle .hero-image img {
        width: clamp(140px, 25vh, 220px);  /* Increased from clamp(100px, 18vh, 160px) */
        height: clamp(140px, 25vh, 220px); /* Increased from clamp(100px, 18vh, 160px) */
    }
}

/**/
.hero.layout-rectangle .hero-bio {
    text-align: center !important;
}

/*
*/
/**/

/* ==================== HERO ACTION BUTTONS ==================== */
.hero-action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* Align buttons based on the layout type */
.hero.layout-circle .hero-action-buttons {
    justify-content: center; /* Center for circle layout */
}

.hero.layout-rectangle .hero-action-buttons {
    justify-content: flex-start; /* Aligns to the right in RTL */
}

/* Secondary CTA Styling (Outline Style) */
.hero-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 50px;
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.5);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition);
}

.hero-cta-secondary:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    /* Uncomment below if you want the hover lift effect */
    /* transform: translateY(-3px); */
}

.hero-cta-secondary span,
.hero-cta-secondary i {
    position: relative;
    z-index: 1;
}

/* ==================== RESPONSIVE BUTTONS ==================== */
@media (max-width: 768px) {
    .hero-action-buttons {
        flex-direction: column; /* Stack buttons vertically on mobile */
        justify-content: center;
        align-items: center;
        width: 100%;
        max-width: 300px;
        margin: 10px auto 0;
    }

    .hero-cta,
    .hero-cta-secondary {
        width: 100%; /* Make them full width of the container */
        justify-content: center;
        padding: clamp(12px, 2.5vw, 16px) clamp(20px, 5vw, 35px);
    }

}

/* ==================== HERO SCROLL INDICATOR (Desktop) ==================== */
.hero-scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    z-index: 10;
}

.hero-scroll-indicator:hover {
    color: var(--white);
}

/* Bouncing animation for the arrow */
.hero-scroll-indicator i {
    font-size: 1.2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* ==================== SCROLL INDICATOR RESPONSIVE (Mobile) ==================== */
/* Adjust the width here if you want it to happen sooner/later (e.g., 992px or 768px) */
@media (max-width: 768px) {
    .hero-scroll-indicator {
        display: none;
    }

    /* Optional: Ensure the hero section allows vertical stacking on mobile */
    .hero.layout-circle,
    .hero.layout-rectangle {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}
/* ==================== PAGE NAV BAR ==================== */
.page-nav {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 4px 24px rgba(0,0,0,0.06);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 28px;
    min-height: 62px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
}

.nav-brand {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary, #0d4f6e);
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: -0.3px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    flex: 1;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-link {
    position: relative;
    padding: 7px 16px;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 3px;
    right: 14px;
    left: 14px;
    height: 2px;
    border-radius: 2px;
    background: var(--primary, #0d4f6e);
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

.nav-link:hover {
    color: var(--primary, #0d4f6e);
    background: rgba(13, 79, 110, 0.06);
}

.nav-link.active {
    color: var(--primary, #0d4f6e);
    background: rgba(13, 79, 110, 0.07);
}

.nav-link.active::after {
    transform: scaleX(1);
}

.nav-cta-btn {
    flex-shrink: 0;
    padding: 9px 22px;
    background: var(--primary, #0d4f6e);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    font-family: inherit;
}

.nav-cta-btn:hover {
    background: #0a3d55;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(13, 79, 110, 0.28);
}

/* Tablet: shrink brand, smaller CTA */
@media (max-width: 900px) {
    .nav-inner {
        padding: 0 20px;
        gap: 10px;
    }

    .nav-brand {
        font-size: 0.88rem;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-cta-btn {
        padding: 7px 16px;
        font-size: 0.8rem;
    }

    .nav-link {
        padding: 6px 12px;
        font-size: 0.82rem;
    }
}

/* ==================== MOBILE NAV — three dashes ====================
   Collapses everything but the brand and the parent-portal button behind a
   hamburger under 860px. The parent-portal button stays OUT of the drawer
   on purpose: a parent arriving at their child's teacher's page is not
   browsing it, and burying the one control they came for behind a menu
   they have no reason to open is the whole cost of a hamburger. Everything
   else (section links + the register CTA + the language toggle) collapses.

   This used to live in the now-retired page-templates.css, unscoped to any
   template ("on every template including classic") — it is base nav
   behaviour, not a template shape, so it belongs here. */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 38px;
    padding: 0 8px;
    margin-inline-start: 4px;
    background: transparent;
    border: 1px solid rgba(127, 127, 127, .28);
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    border-radius: 2px;
    background: var(--tp-nav-text, #0d4f6e);
    transition: transform .25s ease, opacity .2s ease;
}

.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Desktop: the collapse is just a normal flex row, indistinguishable from
   the markup this replaced. */
.nav-collapse {
    display: flex;
    align-items: center;
    gap: 10px 16px;
    flex: 1;
}

.nav-collapse .nav-links { flex: 1; }

@media (max-width: 860px) {
    .nav-toggle { display: flex; }

    /* The brand stays visible behind a hamburger — there is room, and a
       nav bar with no name in it reads as a chrome bar rather than as the
       teacher's page. */
    #pageNav .nav-brand {
        display: inline-block;
        max-width: 45vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #pageNav .nav-inner {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 8px;
        padding: 8px 14px;
    }

    #pageNav .nav-collapse {
        position: absolute;
        inset-inline: 0;
        top: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 10px 14px 16px;
        /* Not `inherit`: that pulls .nav-inner's own (unset, transparent)
           background, not #pageNav's — the renderer sets nav_bg_color on
           #pageNav itself via inline !important, several levels up from
           here, and `inherit` only ever reaches one level. A transparent
           drawer let the hero photo underneath show straight through it. */
        background: linear-gradient(135deg, var(--tp-nav-1, #ffffff), var(--tp-nav-2, #ffffff));
        border-bottom: 1px solid rgba(127, 127, 127, .18);
        box-shadow: 0 18px 30px rgba(0, 0, 0, .12);

        /* Collapsed rather than display:none so it can animate, and
           `visibility` so a closed drawer is not focusable. */
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        overflow: hidden;
        transition: max-height .42s ease, opacity .32s ease, visibility .42s;
    }

    #pageNav .nav-collapse.open {
        max-height: 70vh;
        opacity: 1;
        visibility: visible;
        overflow-y: auto;
    }

    #pageNav .nav-links {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 2px;
    }

    #pageNav .nav-link {
        width: 100%;
        padding: 11px 14px;
        font-size: .92rem;
        border-radius: 10px;
        text-align: start;
    }

    #pageNav .nav-link::after { display: none; }

    #pageNav .nav-cta-btn {
        width: 100%;
        text-align: center;
        padding: 12px 18px;
        margin-top: 4px;
    }

    #pageNav .nav-parent-btn {
        margin-inline-end: 0;
        padding: 8px 12px;
        font-size: .8rem;
        flex-shrink: 0;
    }
}

/* The very small end: the parent button keeps its icon and loses its word
   rather than wrapping onto a second line. */
@media (max-width: 400px) {
    #pageNav .nav-parent-btn { padding: 8px 10px; }
    #pageNav .nav-parent-btn span { display: none; }
    #pageNav .nav-brand { max-width: 38vw; font-size: .85rem; }
}

/* ==================== DYNAMIC SECTION BASE ==================== */
.dyn-section {
    padding: 70px 0;
}

/* ==================== TESTIMONIALS SECTION ==================== */
.testimonial-card {
    background: white;
    border-radius: 16px;
    padding: 28px 24px;
    min-width: 280px;
    max-width: 320px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
}

.testimonial-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary, #0d4f6e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
}
.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-stars { display: flex; gap: 3px; font-size: 0.85rem; }

.testimonial-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #475569;
    font-style: italic;
    flex: 1;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
}

.testimonial-name { font-weight: 700; font-size: 0.9rem; }
.testimonial-role { font-size: 0.78rem; color: #94a3b8; }

/* ==================== YOUTUBE SECTION ==================== */
.youtube-section-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 0 40px;
}
.youtube-video-col {
    width: 100%;
}

.youtube-embed-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.youtube-embed-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.youtube-placeholder {
    aspect-ratio: 16/9;
    background: #f1f5f9;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #94a3b8;
}
.youtube-placeholder i { font-size: 3rem; color: #ff0000; }
.youtube-placeholder p { font-size: 0.9rem; }

.youtube-embed-error {
    aspect-ratio: 16/9;
    background: #1a1a1a;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #fff;
    text-align: center;
}
.youtube-embed-error i { font-size: 3rem; color: #ff0000; }
.youtube-embed-error p { font-size: 0.95rem; color: #ccc; margin: 0; }
.youtube-embed-error a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #ff0000;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.youtube-embed-error a:hover { background: #cc0000; }

.youtube-facade {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    background: #000;
}
.youtube-facade img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.85;
}
.youtube-facade:hover img { transform: scale(1.03); opacity: 1; }
.youtube-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.youtube-play-btn i {
    font-size: clamp(3rem, 8vw, 5rem);
    color: #ff0000;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
    transition: transform 0.2s ease;
}
.youtube-facade:hover .youtube-play-btn i { transform: scale(1.12); }
.youtube-external-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    padding: 8px 18px;
    background: #ff0000;
    color: #fff;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}
.youtube-external-link:hover { background: #cc0000; transform: translateY(-1px); color: #fff; }

.youtube-text-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: right;
    align-items: center;
}

.youtube-title {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.4;
}

.youtube-text {
    font-size: 1rem;
    line-height: 1.8;
    color: #475569;
    max-width: 420px;
}

@media (max-width: 768px) {
    .youtube-section-layout {
        grid-template-columns: 1fr;
        padding: 0 20px;
        gap: 24px;
    }
    .youtube-video-col { order: 2; width: 100%; }
    .youtube-text-col { order: 1; }
}

/* ==================== SCROLL FEATURES SECTION ==================== */
.scroll-features-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 6vw, 80px);
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}
.scroll-features-layout.no-images {
    grid-template-columns: 1fr;
    max-width: 720px;
}
.scroll-features-layout.no-images .sf-right {
    padding: 0;
}

.sf-left {
    position: sticky;
    top: 80px;
    height: min(calc(100vh - 160px), 560px);
    min-width: 0;
    border-radius: 20px;
    overflow: hidden;
    background: transparent;
}

.sf-imgs {
    position: relative;
    width: 100%;
    height: 100%;
}

.sf-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    opacity: 0;
    transition: opacity 0.45s ease;
    border-radius: 20px;
}
.sf-img.active { opacity: 1; }

.sf-right {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    padding: clamp(40px, 6vh, 80px) 0;
}

.sf-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: auto;
    justify-content: center;
    padding: 48px 0;
    padding-bottom: 120px;
    border-bottom: 1px solid rgba(0,0,0,0.07);
}
.sf-item:last-child { border-bottom: none; }

.sf-item-title {
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    font-weight: 800;
    line-height: 1.4;
}

.sf-item-desc {
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    line-height: 1.8;
    color: #475569;
    white-space: pre-line;
}

@keyframes sf-btn-shine {
    0%        { left: -80%; opacity: 0; }
    8%        { opacity: 1; }
    38%       { left: 120%; opacity: 1; }
    39%, 100% { left: 120%; opacity: 0; }
}

.scroll-feature-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: #3b1f8c;
    color: #fff;
    border-radius: 50px;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    width: fit-content;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scroll-feature-btn::after {
    content: '';
    position: absolute;
    top: -10%;
    left: -80%;
    width: 50%;
    height: 120%;
    background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,0.28) 50%, transparent 80%);
    transform: skewX(-15deg);
    animation: sf-btn-shine 3.2s linear infinite;
}

.scroll-feature-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(59,31,140,0.3); color: #fff; }

/* Below the side-by-side layout: hide images, center the text content */
@media (max-width: 900px) {
    .sf-left { display: none; }
    .scroll-features-layout,
    .scroll-features-layout.no-images {
        grid-template-columns: 1fr;
        gap: 0;
        max-width: 560px;
        margin: 0 auto;
        text-align: center;
    }
    .sf-right { padding: 0; }
    .sf-item {
        min-height: auto;
        padding: 16px 0;
        align-items: center;
    }
    .scroll-feature-btn { margin-left: auto; margin-right: auto; }
}

/* ==================== INTEGRATIONS SECTION ==================== */
.integrations-hub-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.integrations-center-hub {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 10px rgba(255,255,255,0.12), 0 0 0 20px rgba(255,255,255,0.06);
    z-index: 2;
    flex-shrink: 0;
}
.integrations-center-hub img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 12px;
}
.integrations-center-hub i {
    font-size: 2rem;
    color: #6d28d9;
}

.integrations-lines {
    width: 85%;
    height: 140px;
    display: block;
    flex-shrink: 0;
    margin: 0 auto;
}

.integrations-items {
    display: grid;
    width: 85%;
    gap: 24px 16px;
    justify-items: center;
}

.integration-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.integration-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.2s ease, background 0.2s ease;
}
.integration-icon:hover { transform: translateY(-4px); background: rgba(255,255,255,0.18); }
.integration-icon img { width: 48px; height: 48px; object-fit: contain; }
.integration-icon i { font-size: 1.6rem; color: rgba(255,255,255,0.7); }

.integration-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
    text-align: center;
    line-height: 1.3;
    max-width: 80px;
}

@media (max-width: 768px) {
    .integrations-items { width: 100%; grid-template-columns: repeat(4, 1fr) !important; }
    .integrations-lines { width: 100%; height: 80px; }
}
@media (max-width: 480px) {
    .integrations-items { grid-template-columns: repeat(3, 1fr) !important; }
    .integration-icon { width: 56px; height: 56px; border-radius: 14px; }
    .integration-icon img { width: 36px; height: 36px; }
    .integrations-lines { height: 60px; }
}

/* ==================== FEATURE CARDS SECTION ==================== */
.feature-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-cards-grid .feature-card {
    width: auto;
    flex-shrink: 1;
    border-radius: 20px;
    background: #3b1f8c;
    color: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 240px;
    min-width: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    text-align: right;
    position: relative;
}
.feature-cards-grid .feature-card-full {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    min-height: 260px;
}

.feature-card-content {
    padding: clamp(24px, 4vw, 36px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 0 0 auto;
    min-width: 0;
    z-index: 1;
}
.feature-card-content h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 800;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.feature-card-content p {
    font-size: 0.92rem;
    line-height: 1.7;
    opacity: 0.85;
    overflow-wrap: anywhere;
}

.feature-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    padding: 11px 26px;
    background: #fff;
    color: #3b1f8c;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    width: fit-content;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); color: #3b1f8c; }

.feature-card-img {
    flex: 1 1 auto;
    margin-top: auto;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 16px 16px;
}
.feature-card-full .feature-card-img {
    max-width: 45%;
    align-self: stretch;
    padding: 20px 20px 20px 0;
}
.feature-card-img img {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
    display: block;
}

/* Below the multi-column layout: single column, show images below content */
@media (max-width: 900px) {
    .feature-cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        width: min(520px, calc(100% - 32px));
        margin: 0 auto;
    }
    .feature-cards-grid .feature-card,
    .feature-cards-grid .feature-card-full { min-height: auto; flex-direction: column; }
    .feature-card-content {
        text-align: center;
        align-items: center;
    }
    .feature-card-btn { margin-left: auto; margin-right: auto; }
    .feature-card-img {
        justify-content: center;
        padding: 0 16px 16px;
        max-width: 100%;
    }
    .feature-card-img img {
        max-width: 100% !important;
    }
}
@media (max-width: 480px) {
    .feature-card-content { padding: 20px; }
    .feature-cards-grid .feature-card { max-width: none; width: 100%; }
}

/* ==================== FAQ SECTION ==================== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 20px;
}

.faq-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-align: right;
    gap: 12px;
    color: inherit;
    transition: background 0.2s;
}
.faq-question:hover { background: #f8fafc; }
.faq-question span { flex: 1; }

.faq-icon {
    font-size: 0.8rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    color: var(--primary, #0d4f6e);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #475569;
    padding: 0 20px;
}
.faq-item.open .faq-answer { padding: 0 20px 18px; }

/* ═══════════════════════════════════════════
   SCROLL REVEAL & PAGE ANIMATIONS
═══════════════════════════════════════════ */

/* Hero element cascade */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroScaleIn {
    from { opacity: 0; transform: scale(0.88) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.hero .hero-title           { animation: fadeSlideUp 0.6s cubic-bezier(.22,1,.36,1) 0.05s both; }
.hero .hero-main-title      { animation: fadeSlideUp 0.6s cubic-bezier(.22,1,.36,1) 0.18s both; }
.hero .hero-main-title-text { animation: fadeSlideUp 0.6s cubic-bezier(.22,1,.36,1) 0.28s both; }
.hero .hero-description-text { animation: fadeSlideUp 0.6s cubic-bezier(.22,1,.36,1) 0.34s both; }
.hero .hero-bio             { animation: fadeSlideUp 0.6s cubic-bezier(.22,1,.36,1) 0.36s both; }
.hero .hero-action-buttons  { animation: fadeSlideUp 0.6s cubic-bezier(.22,1,.36,1) 0.46s both; }
.hero .hero-image           { animation: heroScaleIn 0.8s cubic-bezier(.22,1,.36,1) 0.08s both; }
.hero .hero-scroll-indicator { animation: fadeSlideUp 0.6s cubic-bezier(.22,1,.36,1) 0.6s both; }

/* Scroll reveal base states */
.sr-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.65s cubic-bezier(.22,1,.36,1),
                transform 0.65s cubic-bezier(.22,1,.36,1);
}
.sr-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.65s cubic-bezier(.22,1,.36,1),
                transform 0.65s cubic-bezier(.22,1,.36,1);
}
.sr-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.65s cubic-bezier(.22,1,.36,1),
                transform 0.65s cubic-bezier(.22,1,.36,1);
}
.sr-scale {
    opacity: 0;
    transform: scale(0.88) translateY(20px);
    transition: opacity 0.65s cubic-bezier(.22,1,.36,1),
                transform 0.65s cubic-bezier(.22,1,.36,1);
}
.sr-up.sr-visible,
.sr-left.sr-visible,
.sr-right.sr-visible,
.sr-scale.sr-visible { opacity: 1; transform: none; }

/* Stagger delays */
.sr-d1 { transition-delay: 0.00s; }
.sr-d2 { transition-delay: 0.08s; }
.sr-d3 { transition-delay: 0.16s; }
.sr-d4 { transition-delay: 0.24s; }
.sr-d5 { transition-delay: 0.32s; }
.sr-d6 { transition-delay: 0.40s; }

/* Section title underline reveal */
.section-header.sr-up .section-title::after {
    width: 0;
    transition: width 0.6s cubic-bezier(.22,1,.36,1) 0.35s;
}
.section-header.sr-visible .section-title::after { width: 60px; }

/* Nav scroll shadow */
.page-nav.nav-scrolled {
    box-shadow: 0 4px 24px rgba(0,0,0,0.14);
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .sr-up, .sr-left, .sr-right, .sr-scale {
        opacity: 1 !important; transform: none !important; transition: none !important;
    }
    .hero .hero-title, .hero .hero-main-title, .hero .hero-main-title-text,
    .hero .hero-description-text, .hero .hero-bio, .hero .hero-action-buttons,
    .hero .hero-image, .hero .hero-scroll-indicator { animation: none !important; }
    .section-header.sr-up .section-title::after { width: 60px !important; transition: none !important; }
}
/* ── Forum posts section (منشورات المنتدى) ──────────────────────────── */
/* Renders the posts a teacher promoted from their forum. RTL like the rest of
   the page; the grid collapses to one column on narrow screens. */
.forum-posts-grid {
    display: grid;
    /* auto-fit + a capped track (not `1fr`) is what lets `justify-content`
       centre one or two promoted posts instead of stretching them full
       width — see the long comment on .student-reviews-grid below, which
       hit the same failure first. .forum-post-card has no max-width of its
       own (it is a flexible column, not a fixed-size testimonial card), so
       the cap here is a deliberate 380px rather than reused from a card
       rule that doesn't exist. */
    grid-template-columns: repeat(auto-fit, minmax(320px, 380px));
    justify-content: center;
    gap: 32px;
    margin-top: 40px;
    padding-bottom: 20px;
}

/* ── Student reviews section (تقييمات الطلاب) ───────────────────────── */
/* Auto-populated from approved StudentReview rows. Cards reuse
   .testimonial-card's own styling (see the testimonials section); this is
   only the grid, since student reviews render as a grid, not a carousel. */
.student-reviews-grid {
    display: grid;
    /* `auto-fill` + `1fr` was the earlier attempt at this and it could never
       have worked: with one review, auto-fill still creates exactly one
       track, and `1fr` stretches that track to the row's full width — so the
       card (max-width 320px, .testimonial-card above) sits at the start edge
       of an already-full-width cell, and `justify-content` has no leftover
       space between tracks to redistribute. `auto-fit` collapses the empty
       reserved tracks that never held a card, and capping the track at 320px
       (the card's own max-width) instead of `1fr` stops the remaining track
       from stretching past it — so with few reviews the grid is only as wide
       as its cards, and `justify-content: center` can actually center that
       narrower block in the row. With enough reviews to fill it, this reads
       identically to the old rule: full rows of 280–320px cards. */
    grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
    justify-content: center;
    gap: 24px;
    margin-top: 40px;
    padding-bottom: 20px;
}

.forum-post-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.forum-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.15);
}

.forum-post-image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f8fafc;
}

.forum-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.forum-post-card:hover .forum-post-image img {
    transform: scale(1.08);
}

.forum-post-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 50%, rgba(0,0,0,0.6) 100%);
    opacity: 0.6;
    transition: opacity 0.4s ease;
}

.forum-post-card:hover .forum-post-image-overlay {
    opacity: 0.8;
}

.forum-post-badge {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(13, 79, 110, 0.9);
    backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(10px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.forum-post-card:hover .forum-post-badge {
    transform: translateY(0);
    opacity: 1;
}

.forum-post-badge i {
    color: #f59e0b;
}

.forum-post-body {
    display: flex;
    flex-direction: column;
    padding: 24px;
    flex: 1;
    background: #ffffff;
    z-index: 2;
}

.forum-post-title {
    margin: 0 0 12px 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.forum-post-card:hover .forum-post-title {
    color: var(--primary, #0d4f6e);
}

.forum-post-content-wrap {
    position: relative;
    flex: 1;
    margin-bottom: 20px;
}

.forum-post-content {
    margin: 0;
    color: #334155;
    line-height: 1.8;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

.forum-post-card.expanded .forum-post-content {
    -webkit-line-clamp: unset;
}

.forum-post-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #ffffff 90%);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.forum-post-card.expanded .forum-post-fade {
    opacity: 0;
}

.forum-post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.forum-post-date {
    font-size: 0.85rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.forum-post-read-more {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary, #0d4f6e);
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transform: translateX(10px);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.forum-post-card.expanded .forum-post-read-more {
    opacity: 1;
    transform: translateX(0);
}

.forum-post-card:hover .forum-post-read-more {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 600px) {
    .forum-posts-grid { grid-template-columns: 1fr; gap: 24px; }
    .forum-post-body { padding: 20px; }
    .forum-post-read-more { opacity: 1; transform: translateX(0); }
    .forum-post-badge { opacity: 1; transform: translateY(0); }
}

/* ==================== TOUCH: NO STICKY HOVER ====================
   A touch browser fires :hover on tap and leaves it stuck there. Putting a
   finger on a course card mid-scroll therefore started a 0.3s `all` transition
   that lifted the card 10px, swapped its shadow for the 25px-blur --shadow-xl
   and scaled the cover image to 1.1 — a repaint of the largest thing on screen,
   on the exact frames the page was already trying to scroll. That is the "lag"
   on the public page: the card animating, not the scroll thread stalling.

   These effects are for a mouse pointer, so they are gated to one. Everything
   else about the cards is unchanged — a tap still navigates, and the reduced
   `transition` only narrows *which* properties animate, so nothing else on the
   card is left mid-animation. */
@media (hover: none), (pointer: coarse) {
    .course-card,
    .gallery-card,
    .feature-card,
    .forum-post-card {
        /* not `none`: the page toggles opacity/background on these on load. */
        transition: opacity 0.3s ease, background-color 0.3s ease;
    }

    .course-card:hover,
    .gallery-card:hover,
    .feature-card:hover,
    .forum-post-card:hover {
        transform: none;
    }

    /* Keep each card's resting shadow/border rather than its hover one. */
    .course-card:hover {
        box-shadow: var(--glass-shadow, var(--shadow));
        border-color: var(--glass-border, var(--border));
    }

    .feature-card:hover {
        box-shadow: var(--shadow);
        border-color: var(--border);
    }

    .forum-post-card:hover {
        box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    }

    .gallery-card:hover .gallery-card-image {
        border-color: var(--white);
        box-shadow: var(--shadow-lg);
    }

    .course-card:hover::before,
    .gallery-card:hover .gallery-card-image::after {
        opacity: 0;
    }

    .feature-card:hover::before {
        transform: scaleX(0);
    }

    .course-card:hover .course-card-image img,
    .gallery-card:hover .gallery-card-image img,
    .forum-post-card:hover .forum-post-image img,
    .feature-card:hover .feature-card-icon {
        transform: none;
    }

    .course-card-btn:hover,
    .course-card-view-link:hover,
    .feature-card-btn:hover,
    .scroll-feature-btn:hover,
    .youtube-external-link:hover,
    .integration-icon:hover {
        transform: none;
    }
}

/* The hero carries three animations that never end -- the shimmer above, the
   dashed ring around the circle photo, and the scroll chevron's bounce. They
   keep a compositor frame scheduled for as long as the tab is open, which on
   a phone is a battery cost paid for decoration nobody is looking at after
   the first few seconds. A visitor who has asked the OS for less motion gets
   none of it.

   The shimmer is *hidden*, not merely stopped: its resting position is now
   `left: 0` (it travels on transform), so a paused one would sit as a
   translucent white band across the teacher's name instead of off-stage. */
@media (prefers-reduced-motion: reduce) {
    .hero-main-title::before { display: none; }

    /* The scroll hint bounces twice over -- once on the container, once on the
       chevron inside it -- so both have to be named here. */
    .hero.layout-circle .hero-image::before,
    .hero-scroll-indicator,
    .hero-scroll-indicator i {
        animation: none;
    }
}
