/* Use a native triangular cursor on devices with a mouse. */
@media (hover: hover) and (pointer: fine) {
    html,
    body {
        cursor: url('../img/triangle-cursor.svg') 3 2, auto;
    }

    a,
    button,
    label[for],
    summary,
    select,
    [role="button"],
    [onclick],
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    input[type="checkbox"],
    input[type="radio"] {
        cursor: url('../img/triangle-cursor.svg') 3 2, pointer !important;
    }

    :disabled,
    [aria-disabled="true"] {
        cursor: not-allowed !important;
    }
}

@font-face {
    font-family: 'FF Shamel Sans One';
    src: url('../fonts/FFShamelFamily-SansOneBold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Omar Elbamby palette: #270F04, #2F1505, #492408, #783F11, #FFB141, #FFF6EE */
    /* --- Light Mode Colors (Design System) --- */
    --bg-primary: #FFF6EE;      
    --text-primary: #270F04;    
    --text-secondary: #783F11;  
    --card-bg: #FFF6EE;         
    --btn-primary-bg: #FFB141;  
    --btn-primary-hover: #E59A2D; 
    --primary-yellow: #FFB141;   
    --accent-color: #783F11;    
    
    /* Glassy Header Background */
    --header-bg: rgba(47, 21, 5, 0.28);
    --nav-link: #FFF6EE;
    --nav-link-hover: #FFB141;
    --border-color: rgba(120, 63, 17, 0.15);
    --glow-color: #783F11;
    --select-btn-bg: #FFF6EE;
    --dark-text: #270F04;

    /* Extra variables */
    --bg-secondary: #F7E8DA; 
    --lecture-item-hover: #F7E8DA;
    --primary-green: #783F11;

    /* --- Shared Metrics --- */
    --card-pad: 28px;
    --hero-text: #270F04;
    --logout-btn: #783F11;
    --logout-hover: #270F04;
    --input-bg: #FFF6EE;
    --input-text: #270F04;
    --input-border: #783F11;
    --success-bg: #FFF6EE;
    --success-border: #783F11;
    --success-text: #783F11;
    --error-bg: #fdeef2;
    --error-border: #faccd7;
    --error-text: #d63358;
    --crystal-opacity: 0.4;
}

/* --- Dark Mode Colors (Design System) --- */
body.dark-mode {
    --bg-primary: #270F04;      
    --text-primary: #FFF6EE;    
    
    /* Glassy Header Background */
    --header-bg: rgba(47, 21, 5, 0.14);
    --nav-link: #FFF6EE;
    --nav-link-hover: #FFB141;
    --btn-primary-bg: #FFB141;
    --btn-primary-hover: #E59A2D;
    --border-color: rgba(255, 246, 238, 0.12);
    --glow-color: #FFB141;
    --select-btn-bg: #2F1505;

    --primary-yellow: #FFB141;
    --accent-color: #FFB141;

    --bg-secondary: #2F1505;
    --card-bg: #2F1505;         
    --text-secondary: #FFB141;
    --dark-text: #270F04;
    --hero-text: #FFB141;
    --video-bg: #270F04;
    --lecture-list-bg: #2F1505;
    --lecture-item-bg: #270F04;
    --lecture-item-hover: #492408;
    --logout-btn: #FFB141;
    --logout-hover: #270F04;
    --input-bg: #2F1505;
    --input-text: #FFF6EE;
    --input-border: #FFB141;
    --crystal-opacity: 0.15;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'FF Shamel Sans One', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


body {
    background: var(--bg-primary);
    isolation: isolate;
    color: var(--text-primary);
    line-height: 1.7; /* Increased for better bold text readability */
    font-size: 15px;  /* Slightly adjusted base size */
    direction: rtl;
    -webkit-font-smoothing: antialiased;
}

.keffiyeh-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.keffiyeh-background::before,
.keffiyeh-background::after {
    content: '';
    position: absolute;
    width: clamp(280px, 30vw, 480px);
    height: min(760px, 85vh);
    background: url('/assets/img/keffiyeh-corner.png') left top / contain no-repeat;
    opacity: .55;
    mask-image: linear-gradient(to bottom, #000 65%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent);
}

.keffiyeh-background::before {
    top: 0;
    left: -30px;
}

.keffiyeh-background::after {
    right: -40px;
    bottom: -100px;
    transform: rotate(180deg);
    opacity: .28;
}

@media (max-width: 767px) {
    .keffiyeh-background::before,
    .keffiyeh-background::after {
        width: 220px;
        height: 440px;
        opacity: .22;
    }

    .keffiyeh-background::before { left: -55px; }
    .keffiyeh-background::after { right: -60px; bottom: -80px; }
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

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

.glow {
    animation: glow-effect 1.5s infinite alternate
}

@keyframes glow-effect {
    0% {
        box-shadow: 0 0 5px var(--glow-color), 0 0 10px var(--glow-color), 0 0 15px var(--glow-color)
    }

    100% {
        box-shadow: 0 0 15px var(--glow-color), 0 0 20px var(--glow-color), 0 0 25px var(--glow-color)
    }
}

.main-header {
    position: relative;
    top: 15px;
    width: 95%;
    max-width: 1200px;
    margin: 15px auto;
    border-radius: 50px;
    z-index: 999;
    background: linear-gradient(135deg, rgba(255, 246, 238, 0.07), rgba(255, 246, 238, 0.01)), var(--header-bg);
    backdrop-filter: blur(4px) saturate(115%);
    -webkit-backdrop-filter: blur(4px) saturate(115%);
    padding: 10px 0;
    box-shadow: 0 8px 32px rgba(39, 15, 4, 0.18), inset 0 1px 0 rgba(255, 246, 238, 0.18);
    border: 1px solid rgba(255, 246, 238, 0.24);
    pointer-events: auto;
}

.main-header-wrapper {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 2000;
    pointer-events: none;
}

.has-fixed-mobile-header {
    padding-top: 210px;
}

.main-header.scrolled {
    box-shadow: 0 12px 36px rgba(39, 15, 4, 0.24), inset 0 1px 0 rgba(255, 246, 238, 0.18);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .main-header {
        background: var(--header-bg);
    }
}


.main-header .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row-reverse
}

.main-header .logo img {
    height: 75px;
    width: auto;
    display: block
}

.main-header nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px
}

.main-header nav ul li a {
    color: var(--nav-link);
    font-size: 1.05rem;
    transition: color 0.3s
}

.main-header nav ul li a:hover {
    color: var(--nav-link-hover);
}

.main-header nav ul li a.nav-auth-link {
    color: var(--primary-yellow);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.main-header nav ul li a.nav-auth-link:hover {
    background: rgba(255, 246, 238, 0.1);
}

.nav-user-name {
    color: #FFF6EE;
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-user-name:hover {
    background: rgba(255, 246, 238, 0.1);
}

@media (max-width:768px) {
    .has-fixed-mobile-header {
        padding-top: 180px;
    }

    .main-header-wrapper {
        position: fixed;
    }

    .main-header nav {
        padding: 7px 8px
    }

    .main-header .logo img {
        height: 55px;
        max-width: 160px;
        object-fit: contain;
    }

    .main-header {
        position: relative;
        top: 10px;
        left: auto;
        transform: none;
        width: 95%;
        margin: 0 auto;
        border-radius: 50px;
        z-index: 1;
    }

    /* Keep the decorative lights visible under the fixed mobile header */
    .has-fixed-mobile-header .stage {
        margin-top: 6px !important;
        position: relative;
        z-index: 1;
    }
}

@media (max-width: 480px) {
    .main-header .container {
        padding: 0 10px;
    }
    .main-header nav ul {
        gap: 4px;
    }
    .theme-switch {
        --toggle-size: 9px !important;
        margin-left: 5px !important;
    }
    .main-header .logo img {
        height: 48px;
        max-width: 140px;
        object-fit: contain;
    }
    .main-header nav ul li a.nav-auth-link {
        font-size: 0.8rem;
        padding: 6px 8px;
    }
    .nav-user-name {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
}

.hero {
    display: flex;
    flex-direction: row;
    /* الصورة شمال والكلام يمين */
    justify-content: space-between;
    align-items: center;
    padding: 40px 20px;
    background-color: transparent;
    margin-top: -80px;
    /* سحب القسم للأعلى لتقليل الفراغ */
    z-index: 1;
    /* للتأكد من أن المحتوى يظل تحت الهيدر اللاصق */
    position: relative;
    overflow: visible;
    text-align: right;
    /* يخلي الكلام لليمين */
}

/* Keep the light branch visible between header and hero */
.has-fixed-mobile-header .stage {
    position: relative;
    z-index: 5;
}

.has-fixed-mobile-header .hero {
    margin-top: 0;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: transparent;
    opacity: 0.08;
    z-index: 1
}

.hero .text {
    flex: 1 1 50%;
    padding: 10px 20px;
    position: relative;
    /* <<< ضروري عشان z-index يشتغل */
    z-index: 2;
    /* <<< يرفع الكلام والزر فوق .hero::before */
}

.hero .text h1 {
    font-size: 2.2rem; /* Reduced from 2.8rem */
    margin-bottom: 20px;
    color: var(--hero-text);
    line-height: 1.6; /* Increased from 1.25 for better spacing */
}

.hero .text p {
    font-size: 1.1rem; /* Reduced from 1.25rem */
    margin-bottom: 25px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.hero .text a.btn {
    display: inline-block;
    background: var(--btn-primary-bg);
    color: var(--dark-text);
    padding: 14px 30px;
    border-radius: 30px;
    transition: background 0.3s;
    position: relative;
    z-index: 5;
    letter-spacing: 0.5px;
}

.hero .text a.btn:hover {
    background: var(--btn-primary-hover);
}

.hero .text a.btn.brown-btn {
    background: var(--btn-primary-bg);
    color: #270F04;
}

.hero .text a.btn.brown-btn:hover {
    background: var(--btn-primary-hover);
}

.hero .image {
    flex: 1 1 50%;
    text-align: center; /* Center the image wrapper */
}

/* --- Background Crystals / Blobs --- */
.crystal-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: var(--crystal-opacity, 0.15);
    animation: blobFloat 12s infinite alternate ease-in-out;
}
.blob-1 {
    width: 30vw;
    height: 30vw;
    background: var(--primary-yellow, #FFB141);
    top: -10%;
    right: -5%;
}
.blob-2 {
    width: 40vw;
    height: 40vw;
    background: var(--accent-color, #783F11);
    bottom: -15%;
    left: -10%;
    animation-delay: 2s;
}
.blob-3 {
    width: 25vw;
    height: 25vw;
    background: var(--btn-primary-hover, #E59A2D);
    top: 30%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, -60px) scale(1.15); }
}

/* --- Teacher Hero Animation Effects --- */
.teacher-image-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    z-index: 1;
}

.teacher-img {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    height: auto;
    object-fit: contain;
}

/* --- Organic Blob Backgrounds --- */
.organic-blob {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: fluidShape 8s ease-in-out infinite alternate;
}
.blob-bg-1 {
    width: 120%;
    height: 120%;
    background-color: var(--accent-color, #783F11);
    z-index: 1;
    opacity: 0.85;
}
.blob-bg-2 {
    width: 100%;
    height: 100%;
    background-color: var(--card-bg, #FFF6EE);
    z-index: 2;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation-delay: -2s;
    box-shadow: 0 15px 35px rgba(39, 15, 4, 0.15);
}
.blob-bg-3 {
    width: 30%;
    height: 30%;
    background-color: var(--primary-yellow, #FFB141);
    z-index: 4; /* Above the white blob but behind the teacher */
    top: 30%;
    left: 80%;
    border-radius: 50% 50% 30% 70% / 50% 50% 70% 30%;
    animation-delay: -4s;
}

@keyframes fluidShape {
    0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    50% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    100% { border-radius: 30% 70% 50% 50% / 30% 30% 70% 70%; }
}

.floating-chem, .floating-icon {
    position: absolute;
    z-index: 15;
    background: rgba(39, 15, 4, 0.75); /* Darker background from new palette */
    border: 1px solid rgba(255, 177, 65, 0.6);
    color: var(--primary-yellow);
    border-radius: 10px;
    padding: 8px 14px;
    font-weight: 800;
    font-family: 'Arial', sans-serif;
    font-size: 1.05rem;
    box-shadow: 0 0 18px rgba(120, 63, 17, 0.3), 0 4px 15px rgba(39, 15, 4, 0.3);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: floatHistory 5s ease-in-out infinite alternate;
    transition: transform 0.3s, box-shadow 0.3s;
}
.floating-chem:hover, .floating-icon:hover {
    transform: scale(1.15) !important;
    box-shadow: 0 0 25px rgba(120, 63, 17, 0.6), 0 8px 25px rgba(39, 15, 4, 0.4);
}

.floating-icon {
    border-color: var(--primary-yellow);
    color: var(--primary-yellow);
    box-shadow: 0 0 15px rgba(120, 63, 17, 0.35);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    padding: 0;
    font-size: 1.25rem;
}

.chem-1 { top: 5%; left: 8%; animation-delay: 0s; }
.chem-2 { top: 55%; right: 0%; animation-delay: 1.5s; }
.chem-3 { bottom: 5%; left: 15%; animation-delay: 2.5s; }
.chem-4 { top: 20%; right: -8%; animation-delay: 0.8s; }

.icon-1 { bottom: 22%; right: 5%; animation-delay: 0.5s; }
.icon-2 { bottom: 0%; left: 0%; animation-delay: 2s; }

/* Hieroglyphic Marks */
.history-mark {
    position: absolute;
    z-index: 3;
    font-size: 1.6rem;
    color: rgba(120, 63, 17, 0.2);
    animation: fadeGlyph 6s ease-in-out infinite alternate;
    pointer-events: none;
    user-select: none;
}
.mark-1 { top: 2%; right: 25%; animation-delay: 0s; font-size: 2rem; }
.mark-2 { bottom: 12%; right: -2%; animation-delay: 2s; font-size: 1.4rem; }
.mark-3 { top: 40%; left: -2%; animation-delay: 4s; font-size: 2.2rem; color: rgba(120, 63, 17, 0.15); }

.particles {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 5;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-yellow, #FFB141);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(120, 63, 17, 0.8);
    animation: floatUp 5s linear infinite;
    opacity: 0;
}

.p-1 { left: 15%; bottom: 10%; animation-duration: 7s; width: 3px; height: 3px; }
.p-2 { left: 45%; bottom: 5%; animation-duration: 5s; animation-delay: 1s; }
.p-3 { left: 80%; bottom: 15%; animation-duration: 6s; animation-delay: 2s; background: #783F11; box-shadow: 0 0 8px #783F11; }
.p-4 { left: 25%; bottom: 20%; animation-duration: 8s; animation-delay: 0.5s; width: 3px; height: 3px; }
.p-5 { left: 70%; bottom: 0; animation-duration: 5.5s; animation-delay: 1.5s; }
.p-6 { left: 55%; bottom: 25%; animation-duration: 6.5s; animation-delay: 3s; background: #E59A2D; box-shadow: 0 0 6px #E59A2D; width: 3px; height: 3px; }
.p-7 { left: 35%; bottom: 0; animation-duration: 7.5s; animation-delay: 4s; width: 5px; height: 5px; }

/* --- History Theme Keyframes --- */
@keyframes compassSpin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes compassSpinReverse {
    0% { transform: translate(-50%, -50%) rotate(360deg); }
    100% { transform: translate(-50%, -50%) rotate(0deg); }
}
@keyframes timelineRotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes floatHistory {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.03); }
    100% { transform: translateY(-14px) scale(1.05); }
}

@keyframes floatingImg {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulseAura {
    0% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
}

@keyframes floatUp {
    0% { transform: translateY(0); opacity: 0; }
    15% { opacity: 0.8; }
    70% { opacity: 0.6; }
    100% { transform: translateY(-130px); opacity: 0; }
}

@keyframes fadeGlyph {
    0% { opacity: 0.1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.1); }
    100% { opacity: 0.15; transform: scale(1); }
}

@media (max-width:768px) {
    .hero {
        flex-direction: column-reverse
    }
}

.full-bg-section {
    width: 100%;
    background-color: transparent;
    padding: 30px 10px;
    overflow: hidden
}

.wide-image-section {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
}

.full-bg-section .image-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px
}

.animated-img {
    width: 320px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-in-out
}

.animated-img.show {
    opacity: 1;
    transform: translateY(0)
}

@media (max-width:768px) {
    .animated-img {
        width: 280px
    }
}

.animated-img:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 0 15px var(--accent-color)) drop-shadow(0 0 45px var(--accent-color));
    transition: transform 0.3s ease, filter 0.3s ease;
    z-index: 2
}

.study-years-slider {
    max-width: 1100px;
    margin: 80px auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px
}

.study-year-card {
    flex: 1 1 30%;
    background: var(--card-bg);
    color: var(--text-primary);
    border-radius: 15px;
    padding: 30px 20px;
    box-shadow: 0 4px 12px rgba(39, 15, 4, 0.5);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s
}

.study-year-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(39, 15, 4, 0.6)
}

.study-year-card h3 {
    font-size: 1.65rem;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-green);
    display: inline-block;
    padding-bottom: 8px;
    line-height: 1.3;
}

.study-year-card p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

section {
    padding: 40px 20px;
    max-width: 1100px;
    margin: 0 auto
}

section h2 {
    font-size: 2.2rem;
    margin-bottom: 30px;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
}

.courses-list {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px
}

.course-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(39, 15, 4, 0.4);
    transition: transform 0.3s
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 15px rgba(39, 15, 4, 0.5)
}

.course-card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

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

.course-card .content h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.2rem
}

.course-card .content p {
    color: var(--text-secondary);
    font-size: 1rem
}

.custom-footer {
    position: relative;
    background-image: url('/assets/img/شريط-.png');
    background-size: cover;
    background-position: center;
    color: #FFF6EE;
    text-align: center;
    padding: 500px 20px 80px;
    overflow: hidden
}

.footer-logo {
    position: relative;
    top: -80px;
    /* رفع اللوجو لفوق */
    margin-bottom: 10px;
}

.footer-overlay {
    width: 300px;
    height: auto;
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10
}

.footer-content {
    position: relative;
    z-index: 3
}

.footer-logo-second {
    max-width: 400px;
    height: auto;
    margin: -200px auto 55px;
    display: block;
    position: relative;
    z-index: 5;
    transform: scale(1) translateY(50px);
    transform-origin: center
}

.social-icons {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    justify-content: center;
    position: relative;
    z-index: 25;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #FFF6EE;
    text-decoration: none;
    position: relative;
    box-shadow: 0 4px 15px rgba(39, 15, 4, 0.3);
}

.social-link.youtube {
    background: #FF0000;
}

.social-link.facebook {
    background: #783F11;
}

.social-link.tiktok {
    background: #270F04;
    border: 1px solid rgba(255, 246, 238, 0.1);
}

.social-link i {
    font-size: 24px;
    transition: all 0.4s ease;
}

/* Hover Effects */
.social-link:hover {
    transform: translateY(-8px) scale(1.1);
    color: #FFF6EE;
}

.social-link.youtube:hover {
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.8);
}

.social-link.facebook:hover {
    box-shadow: 0 0 30px rgba(120, 63, 17, 0.8);
}

.social-link.tiktok:hover {
    box-shadow: 0 0 30px rgba(255, 246, 238, 0.3);
}

.social-link:hover i {
    transform: scale(1.15);
}

.footer-rights-box {
    background: rgba(39, 15, 4, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 246, 238, 0.1);
    border-radius: 20px;
    padding: 25px;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(39, 15, 4, 0.2);
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    position: relative;
    z-index: 20;
}

.footer-menu {
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    color: #FFF6EE;
    text-shadow: 0 0 8px rgba(255, 177, 65, 0.3);
}

.footer-copyright {
    color: var(--primary-yellow);
    font-weight: 600;
    margin-top: 10px;
    font-size: 1rem;
    text-shadow: 0 2px 4px rgba(39, 15, 4, 0.3);
}

.footer-menu a {
    color: #2ecc71;
    text-decoration: none;
    margin: 0 5px;
    font-weight: 800;
    transition: 0.3s ease;
}

.footer-menu a:hover {
    color: #FFB141;
    text-shadow: 0 0 10px rgba(255, 213, 154, 0.8);
}



@media (max-width:768px) {
    .footer-overlay {
        width: 200px;
        top: -60px
    }
}

@media (max-width:768px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding: 20px 10px
    }

    .hero .text h1 {
        font-size: 1.6rem
    }

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

    .hero .text a.btn {
        width: 90%;
        margin: 10px auto;
        display: block
    }

    .hero .image img {
        max-width: 90%;
        margin: 0 auto;
        display: block;
    }
}

.full-bg-section.no-padding {
    padding: 0
}

.full-square-image {
    width: 100%;
    height: auto;
    display: block
}

@media (max-width:768px) {
    .study-years-slider {
        flex-direction: column;
        align-items: center
    }

    .study-year-card {
        width: 90%;
        flex: none
    }
}

@media (max-width:768px) {
    .courses-list {
        grid-template-columns: 1fr
    }

    .course-card img {
        height: auto
    }
}

@media (max-width:768px) {
    .custom-footer {
        padding: 250px 10px 30px;
        background-position: center top;
        text-align: center;
    }

    .custom-footer .social-icons {
        position: static;
        /* يشيل الوضع الثابت */
        flex-direction: row;
        /* يخليهم صف جنب بعض */
        justify-content: center;
        margin-top: 15px;
        /* مسافة تحت اللوجو */
    }
}

@media (max-width:768px) {

    img[alt="السنوات الدراسية"],
    img[alt="الكورسات المقترحة"],
    img[alt="الطلاب المتفوقين"],
    img[alt="اختبارات الشهر"],
    img[alt="فيديوهات تهمك"] {
        max-width: 80% !important;
    }
}

.footer-overlay-inside {
    width: 120px;
    height: auto;
    margin-bottom: 15px;
    object-fit: contain
}

.register-page {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 40px;
    padding: 60px 20px
}

.register-form {
    flex: 1 1 420px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 40px 30px;
    box-shadow: 0 6px 14px rgba(39, 15, 4, 0.6)
}

.register-form h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center
}

.register-form label {
    display: block;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-weight: 600
}

.register-form input,
.register-form select {
    width: 100%;
    background: var(--input-bg);
    color: var(--input-text);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 0.95rem;
    transition: border 0.3s
}

.register-form input:focus,
.register-form select:focus {
    border-color: var(--primary-green);
    outline: none
}

.register-form button {
    width: 100%;
    background: var(--btn-primary-bg);
    color: var(--dark-text);
    border: none;
    border-radius: 30px;
    padding: 12px 0;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 14px
}

.register-form button:hover {
    background: var(--btn-primary-hover);
}

.register-image {
    flex: 1 1 500px;
    display: flex;
    justify-content: center;
    align-items: center
}

.register-image img {
    aspect-ratio: 3 / 4;
    height: 900px;
    border-radius: 10px;
    object-fit: cover
}

@media (max-width:768px) {
    .register-page {
        padding: 40px 15px
    }

    .register-form {
        padding: 30px 20px
    }

    .register-image img {
        height: 400px
    }
}

.video-section {
    background: var(--video-bg);
    color: var(--text-primary);
    padding: 40px 20px;
    border-radius: 15px;
    max-width: 1100px;
    margin: 40px auto;
    box-shadow: 0 4px 12px rgba(39, 15, 4, .6)
}

.video-section video {
    width: 100%;
    max-width: 900px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: block;
    margin: 20px auto;
    background: #270F04
}

.lecture-title {
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.6rem
}

.lecture-list-container {
    max-width: 900px;
    margin: 0 auto
}

.lecture-list {
    list-style: none;
    padding: 0;
    margin: 0 0 10px
}

.lecture-list li {
    background: var(--lecture-item-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 15px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background .3s
}

.lecture-list li:hover {
    background: var(--lecture-item-hover);
}

.lecture-list li.active {
    background: var(--primary-green);
    color: var(--dark-text);
}

.toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    color: var(--primary-green);
    font-weight: 700
}

.toggle-arrow {
    transition: transform .3s
}

.toggle-arrow.open {
    transform: rotate(90deg)
}

.instructor-section {
    text-align: center;
    margin: 40px 0
}

.instructor-section img {
    max-width: 280px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(39, 15, 4, .6)
}

.recommended-courses {
    background: var(--bg-primary);
    padding: 40px 20px
}

.recommended-courses h3 {
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.5rem
}

.recommended-courses .courses-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto
}

.recommended-courses .courses-list a {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-align: center;
    padding: 15px 10px;
    transition: transform .3s;
    font-weight: 600
}

.recommended-courses .courses-list a:hover {
    transform: translateY(-6px)
}

.recommended-courses .courses-list img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px
}

@media (max-width: 768px) {
    .recommended-courses img {
        margin-bottom: 30px;
        /* المسافة اللي تعجبك */
    }
}

footer {
    background: #270F04;
    color: var(--primary-green);
    text-align: center;
    padding: 25px 10px;
    margin-top: 40px;
    font-size: .95rem
}

.login-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 40px;
    padding: 60px 20px;
    max-width: 1100px;
    margin: 50px auto
}

.login-form {
    flex: 1 1 420px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 40px 30px;
    box-shadow: 0 6px 14px rgba(39, 15, 4, 0.6)
}

.login-form h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center
}

.login-form label {
    display: block;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-weight: 600
}

.login-form input {
    width: 100%;
    background: var(--input-bg);
    color: var(--input-text);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 0.95rem;
    transition: border 0.3s
}

.login-form input:focus {
    border-color: var(--primary-green);
    outline: none
}

.login-form button {
    width: 100%;
    background: var(--btn-primary-bg);
    color: var(--dark-text);
    border: none;
    border-radius: 30px;
    padding: 12px 0;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 14px
}

.login-form button:hover {
    background: var(--btn-primary-hover);
}

.login-image {
    flex: 1 1 360px;
    display: flex;
    justify-content: center;
    align-items: center
}

.login-image img {
    max-width: 100%;
    border-radius: 10px
}

@media (max-width:768px) {
    .login-container {
        padding: 40px 15px;
        flex-direction: column-reverse
    }

    .login-form {
        padding: 30px 20px
    }
}

.scrollable-courses {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center
}

.course-card {
    flex: 1 1 calc(33.333% - 40px);
    box-sizing: border-box;
    max-width: calc(33.333% - 40px)
}

@media (max-width:992px) {
    .course-card {
        flex: 1 1 calc(50% - 40px);
        max-width: calc(50% - 40px)
    }
}

@media (max-width:576px) {
    .course-card {
        flex: 1 1 100%;
        max-width: 100%
    }
}

.scrollable-courses::-webkit-scrollbar {
    height: 8px
}

.scrollable-courses::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 4px
}

.course-card {
    min-width: 300px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(39, 15, 4, 0.5);
    transition: transform 0.3s
}

.course-card:hover {
    transform: translateY(-6px)
}

.course-card img {
    width: 100%;
    height: auto;
    border-radius: 0;
    object-fit: cover
}

.course-card .content {
    padding: 15px
}

.course-card .content h3 {
    color: var(--primary-yellow);
    font-size: 1.2rem;
    margin-bottom: 10px
}

.course-card .content p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 12px
}

.course-button {
    background: var(--primary-yellow);
    color: var(--dark-text);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s
}

.course-button:hover {
    background: var(--btn-primary-hover);
}

.arrow {
    cursor: pointer;
    transition: transform .3s ease;
    margin-right: 6px
}

.open>.arrow {
    transform: rotate(90deg)
}

.sub-lectures {
    display: none;
    margin-right: 20px
}

.sub-lectures li {
    margin: 4px 0
}

h1,
h2 {
    text-align: center;
    color: #492408
}

.stats {
    display: flex;
    justify-content: space-between;
    margin: 30px 0
}

.stat-box {
    flex: 1;
    background-color: var(--primary-green);
    margin: 0 10px;
    padding: 20px;
    border-radius: 10px;
    text-align: center
}

.stat-box h3 {
    font-size: 28px;
    color: var(--dark-text);
    margin: 0
}

.stat-box p {
    margin-top: 10px;
    font-size: 16px;
    color: #783F11
}

form {
    display: flex;
    flex-direction: column
}

form label {
    margin-top: 15px;
    margin-bottom: 5px;
    color: #492408;
    font-weight: bold
}

form input[type="text"],
form select,
form textarea,
form input[type="file"] {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #E6CFBB;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box
}

form textarea {
    resize: vertical;
    min-height: 100px
}

form button[type="submit"],
button[type="button"] {
    margin-top: 25px;
    padding: 12px;
    background-color: var(--btn-primary-bg);
    color: var(--dark-text);
    border: none;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease
}

form button[type="submit"]:hover,
button[type="button"]:hover {
    background-color: var(--btn-primary-hover);
}

.alert-success {
    background-color: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success-text);
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center
}

.alert-error {
    background-color: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-text);
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-weight: 600
}

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

.courses-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    justify-content: center;
    margin: 30px auto;
    max-width: 1200px;
    padding: 0 15px
}

.courses-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    justify-content: center;
    margin: 30px auto;
    max-width: 1200px;
    padding: 0 15px
}

.course-item {
    border: 1px solid #E6CFBB;
    border-radius: 10px;
    padding: 15px;
    background: #FFF6EE;
    transition: box-shadow 0.3s ease, transform 0.3s ease
}

.course-item:hover {
    box-shadow: 0 4px 15px rgba(39, 15, 4, 0.1);
    transform: translateY(-5px)
}

.course-item img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: transform 0.3s ease
}

.course-item:hover img {
    transform: scale(1.05)
}

.course-button {
    display: inline-block;
    margin-top: 10px
}

.students-table-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 6px 15px rgba(39, 15, 4, 0.6);
    padding: 2rem 1.5rem;
    color: var(--text-primary);
}

.students-table-wrapper h4 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 1.5rem
}

.students-table {
    color: var(--text-primary);
    border-color: var(--border-color);
}

.students-table thead {
    background: var(--border-color);
    color: var(--text-primary);
}

.students-table tbody tr:nth-child(even) {
    background: var(--bg-secondary);
}

.students-table tbody tr:nth-child(odd) {
    background: var(--bg-primary);
}

.students-table tbody tr:hover {
    background: var(--bg-secondary);
    color: var(--primary-green);
}

.students-table .badge {
    background: var(--primary-green);
    color: var(--dark-text);
    padding: .45rem 1.1rem;
    font-size: .9rem;
    border-radius: 50px
}

.logout-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    z-index: 1000
}

.logout-menu .logout-button {
    background: none;
    border: none;
    color: var(--logout-btn);
    cursor: pointer;
    font-weight: bold;
    padding: 5px 10px
}

.logout-menu .logout-button:hover {
    color: var(--logout-hover);
}

.user-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-left: 10px
}

@media (max-width:768px) {
    .main-header nav {
        padding: 8px 10px
    }
}

.branch-image {
    transition: transform 0.3s ease-in-out
}

.branch-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(39, 15, 4, 0.2)
}

.main-btn {
    background-color: var(--btn-primary-bg);
    color: var(--dark-text);
    padding: 12px 25px;
    border: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease
}

.main-btn:hover {
    background-color: var(--btn-primary-hover);
    color: var(--dark-text);
}

.whatsapp-icon {
    width: 40px;
    height: auto;
    margin-top: -5px;
    /* ارفع الصورة لفوق */
}

.admin-login-container {
    min-height: 100vh;
    background: #FFF6EE;
    display: flex;
    justify-content: center;
    align-items: center;
}

.admin-login-card {
    background: #FFF6EE;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(39, 15, 4, 0.1);
    width: 100%;
    max-width: 380px;
}

.admin-login-card h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #492408;
    font-size: 22px;
}

.admin-login-card input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #E6CFBB;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.admin-login-card input:focus {
    border-color: var(--btn-primary-bg);
    outline: none;
    box-shadow: 0 0 5px rgba(255, 61, 94, 0.4);
}

.admin-login-card button {
    width: 100%;
    padding: 12px;
    background: var(--btn-primary-bg);
    color: #270F04;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.admin-login-card button:hover {
    background: var(--btn-primary-hover);
}

.error {
    background: #f8d7da;
    color: #842029;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 14px;
}

.admin-login-card input[name="phone"]:focus,
.admin-login-card input[name="password"]:focus {
    color: #270F04;
    /* لون أغمق شوية عند الكتابة */
}

select:invalid {
    color: #B58D6D;
}

.watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 24px;
    color: rgba(255, 246, 238, 0.3);
    font-weight: bold;
    pointer-events: none;
    /* عشان ما يمنعش التحكم في الفيديو */
    white-space: nowrap;
}

/* Courses Page Styles */
.courses-page {
    background: var(--bg-primary);
    min-height: 100vh;
    padding: 40px 0;
    font-family: 'FF Shamel Sans One', sans-serif;
}

.page-title {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 40px;
    font-size: 2.5rem;
    text-shadow: 0 2px 10px rgba(255, 177, 65, 0.2);
}

.months-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.month-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.month-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 61, 94, 0.35);
    border-color: var(--primary-green);
}

.month-image {
    height: 180px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 3rem;
}

.month-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.month-content {
    padding: 20px;
    text-align: center;
}

.month-title {
    color: var(--text-primary);
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.action-btn {
    display: inline-block;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: 0.3s;
    border: none;
    font-family: 'FF Shamel Sans One', sans-serif;
    font-size: 1rem;
}

.btn-enter {
    background: linear-gradient(135deg, #2ed573 0%, #26af61 100%);
    color: white;
}

.btn-enter:hover {
    box-shadow: 0 0 15px rgba(46, 213, 115, 0.4);
}

.btn-subscribe {
    background: var(--btn-primary-bg);
    color: var(--dark-text);
}

.btn-subscribe:hover {
    box-shadow: 0 0 15px rgba(255, 177, 65, 0.4);
    background: var(--btn-primary-hover);
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(39, 15, 4, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-box {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    border: 1px solid var(--primary-green);
    position: relative;
    animation: slideDown 0.3s ease-out;
    text-align: center;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
}

.code-input {
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    text-align: center;
    font-family: monospace;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    outline: none;
}

.code-input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 10px rgba(255, 177, 65, 0.2);
}

/* Month Page Styles */
.month-page {
    background: var(--bg-primary);
    min-height: 100vh;
    padding: 20px 0;
    font-family: 'FF Shamel Sans One', sans-serif;
}

.month-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.month-header {
    text-align: center;
    margin-bottom: 30px;
}

.month-header h1 {
    color: var(--text-primary);
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(255, 177, 65, 0.2);
}

/* Video Player Area */
.video-box {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(39, 15, 4, 0.3);
    border: 1px solid var(--border-color);
}

.video-frame {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #270F04;
    border-radius: 10px;
    overflow: hidden;
}

.video-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.no-video-msg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-green);
    font-size: 1.2rem;
    text-align: center;
    width: 100%;
}

/* Accordion List */
.lectures-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.lecture-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.lecture-item.active {
    border-color: var(--primary-green);
    box-shadow: 0 0 15px rgba(255, 177, 65, 0.1);
}

.lecture-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--card-bg);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.lecture-header:hover {
    background: var(--bg-secondary);
    color: var(--primary-green);
}

.lecture-item.active .lecture-header {
    background: var(--primary-green);
    color: var(--dark-text);
}

.lecture-content {
    padding: 25px;
    background: var(--lecture-list-bg);
    border-top: 1px solid var(--border-color);
    animation: slideDown 0.3s ease-out;
    display: none;
}

.lecture-item.active .lecture-content {
    display: block;
}

.content-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.content-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.section-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.buttons-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    font-family: 'FF Shamel Sans One', sans-serif;
    font-size: 1rem;
    min-height: 44px;
}

.action-btn:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
    transform: translateY(-2px);
    background: var(--bg-secondary);
}

.action-btn.primary {
    background: var(--btn-primary-bg);
    color: var(--dark-text);
    border: none;
}

.action-btn.primary:hover {
    box-shadow: 0 5px 15px rgba(255, 177, 65, 0.3);
    background: var(--btn-primary-hover);
    color: var(--dark-text);
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--border-color);
    color: var(--text-secondary);
    border-color: var(--border-color);
    box-shadow: none;
    transform: none;
}

.lecture-header i {
    transition: transform 0.3s;
}

.lecture-item.active .lecture-header i {
    transform: rotate(180deg);
}

.group-item {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.group-label {
    display: block;
    color: var(--text-primary);
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1rem;
}

.group-buttons-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.group-buttons-row .action-btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

@media (max-width: 768px) {
    .month-header h1 {
        font-size: 1.8rem;
    }

    .lecture-header {
        font-size: 1rem;
        padding: 15px;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }

    .group-buttons-row {
        flex-direction: column;
    }

    .group-buttons-row .action-btn {
        width: 100%;
    }
}

/* تعديلات إضافية للتوافق مع الثيمات */
.lecture-header:hover {
    color: var(--primary-green);
}

.lecture-item.active .lecture-header {
    color: var(--dark-text);
    /* لون النص في حالة النشطة */
}

.code-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Results Page Styles */
.results-container {
    max-width: 1000px;
    margin: 30px auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(39, 15, 4, 0.1);
    border: 1px solid var(--border-color);
}

.filters-section {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 250px;
}

.filter-group label {
    display: block;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 1.1em;
}

.filter-select {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: 'FF Shamel Sans One', sans-serif;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:hover {
    border-color: var(--primary-green);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 10px rgba(255, 177, 65, 0.3);
}

.filter-select option {
    background: var(--bg-primary);
    color: var(--text-secondary);
}

.results-grid {
    display: grid;
    gap: 20px;
}

.result-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 15px;
    border-right: 5px solid var(--primary-green);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.result-card:hover {
    transform: translateX(-5px);
    box-shadow: 0 8px 20px rgba(39, 15, 4, 0.2);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.exam-title {
    color: var(--text-primary);
    font-size: 1.3em;
    font-weight: 700;
    flex: 1;
}

.score-badge {
    background: var(--primary-green);
    color: var(--dark-text);
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.2em;
    box-shadow: 0 4px 10px rgba(39, 15, 4, 0.2);
}

.result-details {
    display: flex;
    gap: 30px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.detail-label {
    color: var(--text-primary);
    font-weight: 600;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-primary);
}

.empty-state-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.3em;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .results-container {
        padding: 20px;
    }

    .filters-section {
        flex-direction: column;
    }

    .filter-group {
        min-width: 100%;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .score-badge {
        align-self: flex-start;
    }
}

/* --- Platform loading screen --- */
#loader-wrapper {
    position: fixed;
    inset: 0;
    padding: 24px;
    background: var(--bg-primary);
    color: var(--text-primary);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.35s ease-out, visibility 0.35s;
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

.platform-loader {
    width: min(100%, 320px);
    text-align: center;
    font-family: 'FF Shamel Sans One', sans-serif;
}

.platform-loader__symbol {
    width: 96px;
    margin: 0 auto 30px;
}

.platform-loader__symbol svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.platform-loader__outline,
.platform-loader__trail {
    stroke: #FF3030;
    stroke-width: 4;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.platform-loader__outline {
    opacity: 0.12;
}

.platform-loader__trail {
    stroke-dasharray: 75 225;
    animation: loader-triangle 1.8s linear infinite;
}

.platform-loader__name {
    margin: 0;
    font-size: clamp(1.1rem, 5vw, 1.4rem);
    line-height: 1.8;
    color: var(--text-primary);
}

.platform-loader__message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 12px 0 0;
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.8;
}

body.dark-mode .platform-loader__message {
    color: #E6CFBB;
}

.platform-loader__dots {
    display: inline-flex;
    gap: 4px;
}

.platform-loader__dots span {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #FF3030;
    animation: loader-dot 1.2s ease-in-out infinite;
}

.platform-loader__dots span:nth-child(2) { animation-delay: 0.15s; }
.platform-loader__dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes loader-triangle {
    to { stroke-dashoffset: -300; }
}

@keyframes loader-dot {
    0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
    .platform-loader__trail,
    .platform-loader__dots span {
        animation: none;
    }

    .platform-loader__trail {
        stroke-dasharray: none;
    }
}

@keyframes dotTriangle {
    33% {
        transform: translate(0, 0);
    }

    66% {
        transform: translate(10px, -18px);
    }

    100% {
        transform: translate(-10px, -18px);
    }
}

@keyframes pathRect {
    25% {
        stroke-dashoffset: 64;
    }

    50% {
        stroke-dashoffset: 128;
    }

    75% {
        stroke-dashoffset: 192;
    }

    100% {
        stroke-dashoffset: 256;
    }
}

@keyframes dotRect {
    25% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(18px, -18px);
    }

    75% {
        transform: translate(0, -36px);
    }

    100% {
        transform: translate(-18px, -18px);
    }
}

@keyframes pathCircle {
    25% {
        stroke-dashoffset: 125;
    }

    50% {
        stroke-dashoffset: 175;
    }

    75% {
        stroke-dashoffset: 225;
    }

    100% {
        stroke-dashoffset: 275;
    }
}
@keyframes pass1 {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* Original sun, moon and cloud switch. */
.theme-switch {
    --toggle-size: 15px;
    --container-width: 5.625em;
    --container-height: 2.5em;
    --container-radius: 6.25em;
    --circle-container-diameter: 3.375em;
    --sun-moon-diameter: 2.125em;
    --circle-container-offset: calc((var(--circle-container-diameter) - var(--container-height)) / 2 * -1);
    --transition: .5s cubic-bezier(0, -.02, .4, 1.25);
    --circle-transition: .3s cubic-bezier(0, -.02, .35, 1.17);
    display: inline-block;
    position: relative;
    vertical-align: middle;
    margin-left: 15px;
    cursor: pointer;
}
.theme-switch, .theme-switch *, .theme-switch *::before, .theme-switch *::after {
    box-sizing: border-box; margin: 0; padding: 0; font-size: var(--toggle-size);
}
.theme-switch__container {
    width: var(--container-width); height: var(--container-height);
    background-color: #783F11; border-radius: var(--container-radius);
    overflow: hidden; cursor: pointer; position: relative;
    box-shadow: 0 -.062em .062em #270f0440, 0 .062em .125em #fff6eef0;
    transition: var(--transition);
}
.theme-switch__container::before {
    content: ''; position: absolute; z-index: 1; inset: 0; border-radius: inherit;
    box-shadow: inset 0 .05em .187em #270f0440, inset 0 .05em .187em #270f0440;
}
.theme-switch__checkbox {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
}
.theme-switch__checkbox:focus-visible + .theme-switch__container { outline: 3px solid #FFB141; outline-offset: 5px; }
.theme-switch__circle-container {
    width: var(--circle-container-diameter); height: var(--circle-container-diameter);
    background-color: #fff6ee1a; position: absolute;
    left: var(--circle-container-offset); top: var(--circle-container-offset);
    border-radius: var(--container-radius);
    box-shadow: inset 0 0 0 3.375em #fff6ee1a, inset 0 0 0 3.375em #fff6ee1a, 0 0 0 .625em #fff6ee1a, 0 0 0 1.25em #fff6ee1a;
    display: flex; transition: var(--circle-transition); pointer-events: none;
}
.theme-switch__sun-moon-container {
    pointer-events: auto; position: relative; z-index: 2;
    width: var(--sun-moon-diameter); height: var(--sun-moon-diameter);
    margin: auto; border-radius: var(--container-radius); background-color: #FFB141;
    box-shadow: inset .062em .062em .062em #fff6ee9c, inset 0 -.062em .062em #783F11;
    filter: drop-shadow(.062em .125em .125em #270f0440) drop-shadow(0 .062em .125em #270f0440);
    overflow: hidden; transition: var(--transition);
}
.theme-switch__moon {
    transform: translateX(100%); width: 100%; height: 100%; background-color: #E6CFBB;
    border-radius: inherit; position: relative; transition: var(--transition);
    box-shadow: inset .062em .062em .062em #fff6ee9c, inset 0 -.062em .062em #B58D6D;
}
.theme-switch__spot {
    position: absolute; top: .75em; left: .312em; width: .75em; height: .75em;
    border-radius: var(--container-radius); background-color: #CEAD90;
    box-shadow: inset 0 .0312em .062em #270f0440;
}
.theme-switch__spot:nth-of-type(2) { width: .375em; height: .375em; top: .937em; left: 1.375em; }
.theme-switch__spot:nth-last-of-type(3) { width: .25em; height: .25em; top: .312em; left: .812em; }
.theme-switch__clouds {
    width: 1.25em; height: 1.25em; background-color: #FFF6EE;
    border-radius: var(--container-radius); position: absolute; bottom: -.625em; left: .312em;
    box-shadow: .937em .312em #FFF6EE, -.312em -.312em #CEAD90, 1.437em .375em #FFF6EE, .5em -.125em #CEAD90, 2.187em 0 #FFF6EE, 1.25em -.062em #CEAD90, 2.937em .312em #FFF6EE, 2em -.312em #CEAD90, 3.625em -.062em #FFF6EE, 2.625em 0 #CEAD90, 4.5em -.312em #FFF6EE, 3.375em -.437em #CEAD90, 4.625em -1.75em 0 .437em #FFF6EE, 4em -.625em #CEAD90, 4.125em -2.125em 0 .437em #FFF6EE;
    transition: var(--transition);
}
.theme-switch__stars-container {
    position: absolute; color: #FFF6EE; top: -100%; left: .312em; width: 2.75em;
    height: auto; transition: var(--transition);
}
.theme-switch__checkbox:checked + .theme-switch__container { background-color: #2F1505; }
.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__circle-container { left: calc(100% - var(--circle-container-offset) - var(--circle-container-diameter)); }
.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__circle-container:hover { left: calc(100% - var(--circle-container-offset) - var(--circle-container-diameter) - .187em); }
.theme-switch__circle-container:hover { left: calc(var(--circle-container-offset) + .187em); }
.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__moon { transform: translate(0); }
.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__clouds { bottom: -4.062em; }
.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__stars-container { top: 50%; transform: translateY(-50%); }

/* Reveal the new palette in a circle spreading from the dial. */
html.theme-reveal::view-transition-old(root),
html.theme-reveal::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.theme-reveal::view-transition-new(root) { animation: theme-reveal .75s cubic-bezier(.22, 1, .36, 1) both; }
html.theme-reveal::view-transition-old(root) { z-index: 1; }
html.theme-reveal::view-transition-new(root) { z-index: 2; }
@keyframes theme-reveal {
    from { clip-path: circle(0 at var(--theme-x) var(--theme-y)); }
    to { clip-path: circle(var(--theme-radius) at var(--theme-x) var(--theme-y)); }
}
body.theme-fading, body.theme-fading :where(.main-header, .history-home *, .custom-footer, .course-card, .month-card) {
    transition: background-color .6s ease, color .6s ease, border-color .6s ease;
}
@media (prefers-reduced-motion: reduce) {
    .theme-switch, .theme-switch *, .theme-switch *::before { transition: none !important; }
    body.theme-fading, body.theme-fading * { transition: none !important; }
    html.theme-reveal::view-transition-new(root) { animation: none; }
}

/* --- Glowing Button & 3D Card (From index.blade.php) --- */
.glowing-btn {
    animation: glowing-animation 2s infinite ease-in-out;
}

@keyframes glowing-animation {
    0% {
        box-shadow: 0 0 5px var(--glow-color), 0 0 10px var(--glow-color);
    }

    50% {
        box-shadow: 0 0 20px var(--glow-color), 0 0 30px var(--glow-color);
    }

    100% {
        box-shadow: 0 0 5px var(--glow-color), 0 0 10px var(--glow-color);
    }
}

.responsive-img {
    width: 180px;
    height: auto;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.responsive-img:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .responsive-img {
        width: 120px;
    }
}

/* 3D Card Animation */
@keyframes autoRun3d {
    from {
        transform: perspective(1000px) rotateY(-360deg);
    }

    to {
        transform: perspective(1000px) rotateY(0deg);
    }
}

.card-3d {
    position: relative;
    width: min(92vw, 800px);
    height: 400px;
    transform-style: preserve-3d;
    transform: perspective(1000px);
    animation: autoRun3d 20s linear infinite;
    will-change: transform;
    overflow: hidden;
}

.card-3d div {
    position: absolute;
    width: 160px;
    height: 224px;
    background-color: #FFF6EE;
    border: solid 2px lightgray;
    border-radius: 0.5rem;
    top: 50%;
    left: 50%;
    transform-origin: center center;
    transition-duration: 200ms;
    will-change: transform;
}

.card-3d div .details {
    position: absolute;
    top: 10px;
    left: 105%;
    width: 200px;
    background: rgba(255, 246, 238, 0.95);
    color: #492408;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(39, 15, 4, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateX(-20px);
    z-index: 100;
    text-align: right;
    border: 1px solid #F2E2D3;
}

.card-3d:hover {
    animation-play-state: paused !important;
}

.card-3d:hover div {
    animation-play-state: paused !important;
}

.card-3d div:hover .details {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.card-3d div .details h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #783F11;
}

.card-3d div .details p {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: #783F11;
}

@media (max-width: 768px) {
    .card-3d {
        height: 320px;
    }

    .card-3d div {
        width: 120px;
        height: 170px;
    }

    .card-3d div .details {
        left: 50%;
        top: 100%;
        margin-top: 10px;
        transform: translateX(-50%) translateY(-10px);
        text-align: center;
    }

    .card-3d div:hover .details {
        transform: translateX(-50%) translateY(0);
    }
}

/* --- Branch Tabs & Lecture List (From months_show.blade.php) --- */
.branches-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    justify-content: center;
}

.branch-tab-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'FF Shamel Sans One', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.branch-tab-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-yellow);
}

.branch-tab-btn.active {
    background: var(--primary-yellow);
    color: var(--dark-text);
    border-color: var(--primary-yellow);
    box-shadow: 0 0 15px rgba(255, 177, 65, 0.3);
}

.branch-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}

.branch-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.no-lectures-msg {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
}

.no-lectures-msg i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.group-buttons-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

/* --- Month Card Image (From Grade-Courses.blade.php) --- */
.month-image {
    height: auto !important;
    min-height: 250px;
}

.month-image img {
    height: auto !important;
    width: 100%;
}

.month-desc {
    color: var(--text-secondary);
}

/* Premium Course Card Shared Styles */
.premium-course-card {
    background: transparent;
    border: none;
    border-radius: 25px;
    overflow: visible;
    margin-bottom: 50px;
    margin-left: auto;
    margin-right: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    max-width: 480px; /* Increased from 360px */
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.premium-course-card:hover {
    transform: translateY(-5px);
    z-index: 100;
}

.premium-course-card .card-image-wrap {
    width: 100%;
    height: 220px;
    border-radius: 25px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(39, 15, 4, 0.15);
}

.premium-course-card .card-image-wrap img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.premium-course-card:hover .card-image-wrap img {
    transform: scale(1.05);
}

.premium-course-card .card-content-box {
    position: relative;
    margin-top: -30px; 
    margin-left: 15px;
    margin-right: 15px;
    background: #FFF6EE;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 15px 45px rgba(39, 15, 4, 0.12);
    z-index: 20;
    text-align: right;
    border: 1px solid rgba(39, 15, 4, 0.05);
    transition: background-color 0.3s ease;
    pointer-events: auto;
}

.premium-course-card .status-badge {
    width: 100%;
    background: var(--success, #10B981);
    color: #FFF6EE;
    padding: 12px;
    border-radius: 40px;
    font-weight: 800;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.premium-course-card .status-badge:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
}

.premium-course-card .course-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #2F1505;
    margin-bottom: 10px;
    line-height: 1.4;
}

.premium-course-card .course-divider {
    height: 2px;
    background: var(--accent-color);
    margin-bottom: 12px;
    width: 100%;
    opacity: 0.8;
    border-radius: 2px;
}

.premium-course-card .course-desc {
    font-size: 0.95rem;
    color: #9A704F;
    line-height: 1.6;
    margin-bottom: 15px;
}

.premium-course-card .course-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.premium-course-card .meta-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: #492408;
    font-weight: 600;
}

.premium-course-card .meta-item i {
    color: #FFB141;
    font-size: 1rem;
}

.premium-course-card .card-action-btn-wrap {
    display: flex;
    justify-content: flex-start;
    margin-top: 5px;
}

.premium-course-card .card-action-btn {
    background: var(--btn-primary-bg);
    color: var(--dark-text);
    padding: 10px 28px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 8px 20px rgba(255, 177, 65, 0.3);
    transition: all 0.3s ease;
}

.premium-course-card .card-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(255, 177, 65, 0.4);
    color: var(--dark-text);
}

.premium-course-card .card-action-btn.outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--btn-primary-bg);
    box-shadow: none;
}

.premium-course-card .card-action-btn.outline:hover {
    background: var(--btn-primary-bg);
    color: var(--dark-text);
}

/* Dark Mode Support */
.dark-mode .premium-course-card .card-content-box {
    background: #2F1505;
    border-color: rgba(255, 246, 238, 0.1);
    box-shadow: 0 15px 45px rgba(39, 15, 4, 0.4);
}

.dark-mode .premium-course-card .course-title {
    color: #FFF6EE;
}

.dark-mode .premium-course-card .course-desc {
    color: #F2E2D3;
}

.dark-mode .premium-course-card .meta-item {
    color: #FAEEE3;
}

.dark-mode .premium-course-card .course-divider {
    background: var(--accent-color);
}

.dark-mode .premium-course-card .card-action-btn {
    color: #2F1505;
}

.dark-mode .premium-course-card .card-action-btn.outline {
    color: #FFF6EE;
}

@media (max-width: 1200px) {
    .premium-course-card .card-image-wrap {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .premium-course-card {
        margin-bottom: 30px;
    }
    .premium-course-card .card-image-wrap {
        height: 240px;
    }
    .premium-course-card .card-content-box {
        margin-top: 0;
        margin-left: 0;
        margin-right: 0;
        border-radius: 0 0 20px 20px;
    }
}

/* Premium Modal Shared Styles */
.premium-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(39, 15, 4, 0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
}

.premium-modal-box {
    background: #2F1505;
    padding: 35px;
    border-radius: 20px;
    width: 95%;
    max-width: 480px;
    border: 2px solid var(--primary-yellow, #FFB141);
    position: relative;
    animation: premiumSlideDown 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 25px 60px rgba(39, 15, 4, 0.6);
    text-align: center;
}

@keyframes premiumSlideDown {
    from { opacity: 0; transform: translateY(-40px); }
    to { opacity: 1; transform: translateY(0); }
}

.premium-modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    color: #B58D6D;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.premium-modal-close:hover {
    color: #FFF6EE;
    background: rgba(255, 246, 238, 0.1);
}

.premium-modal-title {
    color: #FFF6EE;
    margin: 5px 0 10px;
    font-size: 1.6rem;
    font-weight: 800;
}

.premium-modal-desc {
    color: #CEAD90;
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.premium-modal-input {
    width: 100%;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid #492408;
    background: #270F04;
    color: var(--primary-yellow, #FFB141);
    text-align: center;
    font-family: 'FF Shamel Sans One', sans-serif !important;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    outline: none;
    transition: all 0.3s ease;
    margin-bottom: 25px;
}

.premium-modal-input:focus {
    border-color: var(--primary-yellow, #FFB141);
    box-shadow: 0 0 20px rgba(255, 177, 65, 0.25);
    background: #270F04;
}

/* Premium Hero Buttons & Layout */
.hero-btns-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 35px;
    justify-content: flex-start;
}

.btn-premium {
    background: var(--primary-yellow, #FFB141) !important;
    color: #270F04 !important;
    font-weight: 800 !important;
    padding: 14px 28px !important;
    border-radius: 50px !important;
    border: none !important;
    text-decoration: none !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(255, 177, 65, 0.25);
    font-size: 1.05rem;
    cursor: pointer;
}

.btn-premium:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 15px 35px rgba(255, 177, 65, 0.35);
    filter: brightness(1.05);
}

.btn-premium-outline {
    background: rgba(255, 177, 65, 0.05) !important;
    color: var(--primary-yellow, #FFB141) !important;
    border: 2px solid var(--primary-yellow, #FFB141) !important;
    font-weight: 700 !important;
    padding: 12px 26px !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    cursor: pointer;
}

.btn-premium-outline:hover {
    background: var(--primary-yellow, #FFB141) !important;
    color: #270F04 !important;
    box-shadow: 0 10px 25px rgba(255, 177, 65, 0.2);
    transform: translateY(-3px);
}

.btn-premium-install {
    width: auto !important;
    min-width: 280px;
    background: linear-gradient(135deg, #FFB141, #FFB141) !important;
    margin-top: 5px;
    border-radius: 15px !important;
}

@media (max-width: 768px) {
    .hero-btns-grid {
        justify-content: center;
        gap: 12px;
    }
    .btn-premium, .btn-premium-outline {
        width: 100%;
        justify-content: center;
    }
}

/* Designer Credit Styles */
.designer-link {
    color: var(--primary-yellow) !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}

.designer-link:hover {
    color: #E63250 !important;
    text-shadow: 0 0 8px rgba(255, 61, 94, 0.45);
}

/* Bokeh Background Effect */
.bokeh-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.bokeh-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.25;
    animation: bokeh-float 20s infinite ease-in-out alternate;
}

.bokeh-circle:nth-child(1) {
    width: 35vw;
    height: 35vw;
    background: var(--btn-primary-bg, #783F11);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.bokeh-circle:nth-child(2) {
    width: 30vw;
    height: 30vw;
    background: var(--primary-yellow, #FFB141);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

.bokeh-circle:nth-child(3) {
    width: 25vw;
    height: 25vw;
    background: var(--text-secondary, #492408);
    top: 40%;
    left: 40%;
    animation-delay: -10s;
    opacity: 0.2;
}

@keyframes bokeh-float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, -50px) scale(1.1); }
}

body.dark-mode .bokeh-circle {
    opacity: 0.1;
}
