/* ============================================
   🎨 Reset & Variables
   ============================================ */

/* ============================================
   🔤 تعريف الخطوط
   ============================================ */

/* الخط السعودي - للعناوين الرئيسية */
@font-face {
    font-family: 'Saudi';
    src: url('font/Saudi-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

/* IBM Plex Sans Arabic - Regular */
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('font/IBMPlexSansArabic-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

/* IBM Plex Sans Arabic - Light */
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('font/IBMPlexSansArabic-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

/* IBM Plex Sans Arabic - SemiBold */
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('font/IBMPlexSansArabic-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

/* IBM Plex Sans Arabic - Bold */
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('font/IBMPlexSansArabic-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green: #1db954;
    --brand-bg: #00343A;
    --green-dark: #0f7a34;
    --green-glow: transparent;
    --bg: #001315;
    --bg-2: #001315;
    --text: #e8f0e8;
    --text-muted: #8a9a8a;
    --border: rgba(29, 185, 84, 0.15);
    /* خط تقسيم رمادي خفيف بين الأقسام */
    --divider: rgba(232, 240, 232, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Sans Arabic', 'Tahoma', sans-serif;
    background:
        radial-gradient(circle at 20% 10%, rgba(29, 185, 84, 0.08), transparent 50%),
        radial-gradient(circle at 80% 90%, rgba(29, 185, 84, 0.05), transparent 50%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* نجوم الخلفية */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(29, 185, 84, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(29, 185, 84, 0.2), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(29, 185, 84, 0.4), transparent),
        radial-gradient(1px 1px at 40% 90%, rgba(29, 185, 84, 0.3), transparent);
    background-size: 200% 200%;
    pointer-events: none;
    z-index: -1;
    animation: starsMove 20s linear infinite;
}

@keyframes starsMove {
    from { background-position: 0 0; }
    to { background-position: 100% 100%; }
}

/* ============================================
   ✨ حركات الظهور عند التمرير (Scroll Reveal)
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   🔝 Header
   ============================================ */
.header {
    position: fixed;
    top: 15px;
    right: 50%;
    transform: translateX(50%);
    width: calc(100% - 60px);
    max-width: 1300px;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 35px;
    background: rgba(10, 14, 10, 0.75);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 60px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    transition: background 0.4s, box-shadow 0.4s;
}

/* يمين الهيدر: الصورة + الشعار الكتابي */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
    transition: transform 0.4s;
    cursor: pointer;
}

.header-img:hover {
    transform: scale(1.1) rotate(5deg);
}

/* الشعار الكتابي "سمّار" */
.logo-text {
    font-family: 'Saudi', 'IBM Plex Sans Arabic', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--green);
    letter-spacing: 1px;
}

.logo-text .dot {
    color: #fff;
}

.nav {
    display: flex;
    gap: 40px;
    font-size: 15px;
    color: var(--text-muted);

    /* ⬇️ التوسيط المطلق في الشاشة */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav a {
    transition: color 0.3s;
    position: relative;
}

.nav a:hover,
.nav a.active {
    color: var(--green);
}

.nav-indicator {
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
    transition: width 0.28s ease, transform 0.28s ease;
    pointer-events: none;
}

.menu-icon {
    font-size: 24px;
    color: var(--text);
    cursor: pointer;
    display: none;
}

/* يسار الهيدر: الشعار الوطني + البحث */
.header-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* أيقونة الشعار في يسار الهيدر */
.header-icon {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.4s;
}

.header-icon:hover {
    transform: scale(1.08);
}

/* ============================================
   🔍 Search Bar
   ============================================ */
.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 8px 20px;
    transition: all 0.3s;
    width: 200px;
}

.search-bar:focus-within {
    border-color: var(--green);
    box-shadow: 0 0 25px rgba(29, 185, 84, 0.25);
    background: rgba(29, 185, 84, 0.05);
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 14px;
    width: 100%;
    font-family: inherit;
    padding: 4px 10px;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    color: var(--text-muted);
    font-size: 16px;
}

/* ============================================
   🎬 Hero
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 80px;
    background: url('images/hero.jpg')
    center/cover no-repeat;
 }

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        var(--bg) 5%,
        rgba(10, 14, 10, 0.7) 40%,
        rgba(10, 14, 10, 0.4) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    text-align: right;   /* ⬅️ النص على اليمين */
    animation: heroIn 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes heroIn {
    from { opacity: 0; transform: translateY(25px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-meta {
    font-size: 13px;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
}

.hero-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.hero-rating .star {
    color: #ffc107;
}

.hero-title {
    font-family: 'Saudi', 'IBM Plex Sans Arabic', sans-serif;
    font-size: 70px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 20px;
    color: #fff;
}

.hero-desc {
    font-size: 15px;
    color: #ccc;
    margin-bottom: 30px;
    max-width: 450px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-primary {
    background: var(--green);
    color: #000;
}

.btn-primary:hover {
    background: #25d366;
    box-shadow: 0 0 40px rgba(29, 185, 84, 0.45);
    transform: translateY(-2px);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    border-color: var(--green);
    color: var(--green);
    transform: translateY(-2px);
}

.hero-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.dot {
    width: 30px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: var(--green);
    width: 50px;
    box-shadow: 0 0 15px var(--green);
}

/* ============================================
   📚 Sections
   ============================================ */
.section {
    padding: 60px 50px;
}

.section-head {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    /* خط تقسيم رمادي خفيف بدل الأخضر */
    border-bottom: 1px solid var(--divider);
}

.section-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    padding-bottom: 20px;
    margin-bottom: -21px;
}

.section-title-wrap.active {
    border-bottom: 2px solid var(--green);
}

.section-title-wrap h3 {
    font-size: 20px;
    font-weight: 700;
}

.tabs {
    display: flex;
    gap: 30px;
    color: var(--text-muted);
    font-size: 14px;
}

.tabs span {
    cursor: pointer;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tabs span:hover,
.tabs span.active {
    color: var(--green);
}

/* ============================================
   🏷️ Genres
   ============================================ */
.genres {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.genre {
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 13px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.genre:hover {
    color: var(--green);
    border-color: var(--border);
}

.genre.active {
    background: var(--green);
    color: #000;
    font-weight: bold;
}

/* ============================================
   🎞️ Movies Grid
   ============================================ */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.movie-card {
    cursor: pointer;
    transition: transform 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.6s ease forwards;
}

.movie-card:nth-child(1) { animation-delay: 0.1s; }
.movie-card:nth-child(2) { animation-delay: 0.2s; }
.movie-card:nth-child(3) { animation-delay: 0.3s; }
.movie-card:nth-child(4) { animation-delay: 0.4s; }
.movie-card:nth-child(5) { animation-delay: 0.5s; }

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

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

.movie-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    transition: box-shadow 0.4s;
}

.movie-card:hover .movie-poster {
    box-shadow: 0 15px 40px rgba(29, 185, 84, 0.25);
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.08);
}

.movie-poster::after {
    content: '▶';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: var(--green);
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.4s;
    text-shadow: 0 0 30px var(--green);
}

.movie-card:hover .movie-poster::after {
    opacity: 1;
}

.movie-title {
    font-size: 15px;
    font-weight: 700;
    margin-top: 12px;
    text-align: center;
}

.movie-info {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.movie-info .star {
    color: #ffc107;
}

.movie-card.hidden {
    display: none;
}

/* ============================================
   ❌ No Results
   ============================================ */
.no-results {
    display: none;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 18px;
}

.no-results span {
    display: block;
    font-size: 50px;
    margin-bottom: 15px;
}

/* ============================================
   💚 Plans
   ============================================ */
#plans {
    position: relative;
    isolation: isolate;
    border-top: 1px solid rgba(232, 240, 232, 0.06);
    border-bottom: 1px solid rgba(232, 240, 232, 0.06);
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 20px;
}

.plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 35px 30px;
    background: rgba(6, 67, 74, 0.82);
    border: 1px solid var(--border);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    text-align: center;
    transition: transform 0.4s, border-color 0.4s, box-shadow 0.4s;
}

.plan-card:nth-child(1) {
    background: linear-gradient(135deg, #174d46, #0b302f);
}

.plan-card:nth-child(2) {
    background: linear-gradient(135deg, #315448, #123b3b);
}

.plan-card:nth-child(3) {
    background: linear-gradient(135deg, #49704d, #0c3937);
}

.plan-card:hover {
    border-color: var(--green);
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
}

.plan-card.featured {
    background: linear-gradient(180deg, rgba(29, 185, 84, 0.16), rgba(6, 67, 74, 0.94));
    border-color: var(--green);
}

.plan-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--green);
    color: #000;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 16px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.plan-name {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
}

.plan-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.plan-price {
    font-size: 42px;
    font-weight: 900;
    color: var(--green);
    margin-bottom: 20px;
}

.plan-price small {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: normal;
}

/* قائمة مزايا كل باقة */
.plan-features {
    list-style: none;
    text-align: right;
    margin-bottom: 25px;
    flex-grow: 1;
}

.plan-features li {
    font-size: 13.5px;
    color: var(--text);
    padding: 8px 0;
    border-bottom: 1px solid var(--divider);
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features li::before {
    content: '✓';
    color: var(--green);
    font-weight: bold;
}

.plan-note {
    font-size: 12px;
    color: var(--green);
    margin-bottom: 18px;
}

.plan-flag {
    font-size: 18px;
}

/* زر الاشتراك */
.plan-cta {
    width: 100%;
    padding: 12px 0;
    border-radius: 30px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.plan-cta:hover {
    border-color: var(--green);
    color: var(--green);
}

.plan-cta.primary {
    background: var(--green);
    border-color: var(--green);
    color: #000;
}

.plan-cta.primary:hover {
    background: #25d366;
    box-shadow: 0 0 30px rgba(29, 185, 84, 0.35);
}

/* ============================================
   🦶 Footer
   ============================================ */
.footer {
    padding: 60px 50px 30px;
    /* خط تقسيم رمادي خفيف */
    border-top: 1px solid var(--divider);
    margin-top: 40px;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 30px;
    font-weight: 900;
    color: var(--green);
    margin-bottom: 10px;
}

.footer-logo span {
    color: #fff;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-col h4 {
    font-size: 14px;
    color: var(--green);
    margin-bottom: 15px;
    font-weight: 700;
}

.footer-col a {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--green);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 25px;
    /* خط تقسيم رمادي خفيف */
    border-top: 1px solid var(--divider);
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   ⬆️ Scroll Top Button
   ============================================ */
.scroll-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--green);
    color: #000;
    border: none;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s;
    z-index: 99;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 40px var(--green);
}

/* ============================================
   📱 Responsive
   ============================================ */
@media (max-width: 900px) {
    .menu-icon{
        display: block;
    }
    .header {
        padding: 15px 20px;
    }

    .nav {
        display: none;
    }

    .header-tagline,
    .search-bar {
        display: none;
    }

    .hero {
        min-height: 80vh;
        padding: 100px 20px 60px;
    }

    .hero-title {
        font-size: 44px;
    }

    .hero-desc {
        font-size: 13px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

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

    .section {
        padding: 40px 20px;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .tabs {
        display: none;
    }

    .movies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .movie-title {
        font-size: 13px;
    }

    .genres {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

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

    .genre {
        white-space: nowrap;
    }

    .plans-grid {
        grid-template-columns: 1fr;
    }

    .plan-price {
        font-size: 34px;
    }

    .footer {
        padding: 40px 20px 20px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .scroll-top {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 500px) {
    .movies-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: 30px;
    }
    .header-img {
        width: 35px;
        height: 35px;
    }
}