/* Extracted from front-page.php; rule order preserved. */

/* ===================================================
   ۱. استایل هدر بخش‌ها و دکمه‌های شیک و نئونی "مشاهده همه"
   =================================================== */
html, body {
    background-color: #070d1a !important;
}
.home-section {
    margin: 35px 0;
    padding: 0 15px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.section-header h2 {
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    margin: 0;
    position: relative;
    padding-right: 12px;
}

/* خط رنگی کوچک کنار عنوان دسته‌بندی‌ها برای جذابیت بیشتر */
.section-header h2::before {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    width: 4px;
    height: 50%;
    background: #0284c7;
    border-radius: 4px;
}

/* دکمه فوق‌العاده شیک و کاستومایز شده "مشاهده همه" */
.section-header a {
    color: #38bdf8;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 16px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 8px;
    background: rgba(14, 165, 233, 0.05);
    transition: all 0.3s ease;
}

.section-header a:hover {
    background: #0284c7;
    color: #fff;
    border-color: #0284c7;
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.4);
}

/* ===================================================
   ۲. تنظیمات اسکرول بار مویی و فوق‌حرفه‌ای افقی
   =================================================== */
.horizontal-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.horizontal-scroll-wrapper::-webkit-scrollbar {
    height: 3px; /* بسیار ظریف */
}

.horizontal-scroll-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.horizontal-scroll-wrapper::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.4);
    border-radius: 10px;
}

.horizontal-scroll {
    display: flex;
    gap: 14px;
    width: max-content;
}

/* ===================================================
   ۳. ظاهر جدید و فوق‌العاده تمیز کارت‌های اسکرول (بدون کادر اضافه)
   =================================================== */
.scroll-card {
    width: 140px; /* اندازه استاندارد و شیک دسکتاپ */
    flex: none;
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scroll-card-inner {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.scroll-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: all0.4s ease;
}

/* لایه اوورلی آیکون پلی */
.scroll-card .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-radius: 12px;
    z-index: 5;
}

.scroll-card:hover .card-overlay {
    opacity: 1;
    visibility: visible;
}

.scroll-card:hover img {
    filter: blur(3px);
}

.scroll-card .play ion-icon {
    font-size: 38px;
    color: #38bdf8;
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.scroll-card:hover .play ion-icon {
    transform: scale(1);
}

/* متون و جزییات زیر پوستر فیلم */
.scroll-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.scroll-card-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #94a3b8;
    font-size: 11px;
}

/* ===================================================
   ۴. کدهای کاملاً ریسپانسیو اختصاصی حالت موبایل
   =================================================== */
@media (max-width: 768px) {
    .home-section {
        margin: 25px 0;
    }
    
    .section-header h2 {
        font-size: 18px;
    }
    
    .section-header a {
        font-size: 14px;
        padding: 4px 12px;
    }

    .scroll-card {
        width: 105px; /* ابعاد فوق‌العاده مینی‌مال، شیک و کوتاه برای موبایل */
        gap: 5px;
    }
    
    .scroll-card-title {
        font-size: 12px;
    }
    
    .scroll-card-info {
        font-size: 10px;
    }
}

.updates-section {
    margin: 4px 0 16px 0 !important;
    background: radial-gradient(ellipse at top, #0d1f3c 0%, #070d1a 60%, #080d17 100%);
    border: 1px solid rgba(96,165,250,0.3) !important;
    border-radius: 16px !important;
    box-shadow: 0 0 0 1px rgba(96,165,250,0.15), 0 8px 32px rgba(2,8,23,0.5), inset 0 1px 0 rgba(255,255,255,0.04) !important;
    padding: 16px !important;
    position: relative;
    overflow: hidden;
}
.updates-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 10% 30%, rgba(255,255,255,0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 85% 15%, rgba(255,255,255,0.15) 0%, transparent 100%),
        radial-gradient(1px 1px at 50% 70%, rgba(255,255,255,0.1) 0%, transparent 100%),
        radial-gradient(1px 1px at 25% 85%, rgba(255,255,255,0.15) 0%, transparent 100%);
    pointer-events: none;
}

.updates-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.updates-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
}

.updates-title-icon {
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #0e7490, #1e40af);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(14,116,144,0.5);
    animation: pulse-icon 2s infinite;
}

@keyframes pulse-icon {
    0%   { box-shadow: 0 0 8px rgba(14,116,144,0.4); }
    50%  { box-shadow: 0 0 18px rgba(14,116,144,0.8); }
    100% { box-shadow: 0 0 8px rgba(14,116,144,0.4); }
}

.updates-title-icon ion-icon {
    font-size: 13px;
    color: #7dd3fc;
}

.updates-title span {
    background: linear-gradient(135deg, #38bdf8, #7dd3fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.updates-swiper-outer {
    overflow: hidden;
    position: relative;
    z-index: 1;
    padding: 0 0 30px;
}

.updates-swiper {
    padding: 0 20px !important;
}

#updatesSwiper {
    height: 230px !important;
}

.updates-swiper-wrap {
    position: relative;
    padding: 10px 0 16px;
    overflow: visible;
    max-height: 300px;
}
.updates-swiper .swiper-slide {
    width: 140px;
    flex-shrink: 0;
}

.update-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #0a0f1e;
    border: 1px solid rgba(96,165,250,0.1);
    transition: border-color 0.2s, transform 0.2s;
    display: block;
    text-decoration: none;
}

.update-card:hover {
    border-color: rgba(14,116,144,0.4);
    transform: translateY(-3px);
}

.update-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.update-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 25%, rgba(7,13,26,0.95) 100%);
}

.update-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #0e7490, #0369a1);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    animation: pulse-new 1.5s infinite;
}

@keyframes pulse-new {
    0%   { box-shadow: 0 0 6px rgba(14,116,144,0.4); }
    50%  { box-shadow: 0 0 14px rgba(14,116,144,0.8); }
    100% { box-shadow: 0 0 6px rgba(14,116,144,0.4); }
}

.update-card-info {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 8px;
}

.update-card-title {
    color: #e0f2fe;
    font-size: 11px;
    font-weight: 700;
    margin: 0 0 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.update-card-desc {
    color: #38bdf8;
    font-size: 10px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.update-card-desc ion-icon {
    font-size: 11px;
    flex-shrink: 0;
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    padding: 0 15px;
}

@media (min-width: 768px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (min-width: 1200px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

.movie-card {
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
    display: none;
}

.movie-card.visible {
    display: flex;
}

.card-head {
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.card-head img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.movie-card:hover .card-head img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 12px;
}

.movie-card:hover .card-overlay {
    opacity: 1;
}

.card-overlay .play ion-icon {
    font-size: 38px;
    color: #38bdf8;
}

.card-overlay .rating {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: #fbbf24;
    background: rgba(0,0,0,0.6);
    padding: 3px 7px;
    border-radius: 20px;
}

.card-overlay .bookmark {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    border-radius: 6px;
    padding: 4px 6px;
    cursor: pointer;
    font-size: 14px;
}

.card-body {
    padding: 0 2px;
}

.card-title {
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.card-info {
    display: flex;
    justify-content: space-between;
    color: #64748b;
    font-size: 11px;
}

/* Live update feed: distinct from content carousels */
.royaye-live-updates{padding:15px 16px !important}.royaye-live-dot{width:7px;height:7px;border-radius:50%;background:#38bdf8;box-shadow:0 0 9px rgba(56,189,248,.7);animation:royayePulse 2.4s ease-in-out infinite}.royaye-update-feed{display:grid;gap:5px}.royaye-update-row{display:flex;align-items:center;gap:10px;min-height:55px;padding:6px 8px;border-radius:11px;text-decoration:none;background:rgba(9,25,49,.58);border:1px solid rgba(96,165,250,.07)}.royaye-update-row img{width:36px;height:48px;object-fit:cover;border-radius:7px;flex:0 0 auto}.royaye-update-row-copy{min-width:0;flex:1}.royaye-update-row-copy strong{display:block;color:#e8f1ff;font-size:11px;line-height:1.5;white-space:normal}.royaye-update-row-copy small{display:flex;align-items:center;gap:4px;color:#7f94b1;font-size:9.5px;margin-top:2px}.royaye-update-row-copy small ion-icon{color:#38bdf8}.royaye-update-open{color:#405777;font-size:16px}.royaye-update-more{margin:8px auto 0;display:flex;align-items:center;gap:5px;border:0;background:transparent;color:#38bdf8;font:700 10px inherit;cursor:pointer}.royaye-update-extra{display:none}.royaye-live-updates.is-expanded .royaye-update-extra{display:flex;animation:royayeFade .2s ease both}@keyframes royayePulse{50%{opacity:.35;transform:scale(.75)}}@keyframes royayeFade{from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:none}}
/* Fresh archive is a grid, not another carousel. */
#custom-updates-header h2{font-size:1.2rem !important}.home-section:has(#custom-updates-header) .movies-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:20px 13px}.home-section:has(#custom-updates-header) .royaye-card-meta{position:absolute;z-index:3;right:6px;left:6px;bottom:6px;display:flex;justify-content:space-between;color:#fff;font:700 9px Roboto,Arial,sans-serif}.home-section:has(#custom-updates-header) .royaye-card-imdb b{font:900 7px Arial;background:#f5c518;color:#111827;border-radius:3px;padding:2px 3px}
@media(max-width:768px){.royaye-live-updates{margin-top:12px !important;padding:12px !important}.updates-title{font-size:13px !important}.home-section:has(#custom-updates-header) .movies-grid{grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:18px 9px !important}.home-section:has(#custom-updates-header) .movie-card .card-title{font-size:11px !important;line-height:1.55 !important;text-align:center !important}.home-section:has(#custom-updates-header) .movie-card .card-info{font-size:9px !important;justify-content:center !important;gap:4px !important;flex-wrap:wrap !important}.home-section:has(#custom-updates-header) .load-more-container{margin:22px 0 10px !important}.home-section:has(#custom-updates-header) .load-more-container button{padding:10px 22px !important;font-size:11px !important}}


/* ===== V4 vertical live-update ticker ===== */
.royaye-live-updates {
  position:relative; isolation:isolate; overflow:hidden; min-height:340px; padding:16px !important;
  border:1px solid rgba(56,189,248,.18); border-radius:20px; background:#081426;
}
.royaye-update-background { position:absolute; inset:-24px; z-index:-3; background-size:cover; background-position:center; filter:blur(18px) saturate(.85); transform:scale(1.12); opacity:.34; transition:background-image .5s ease, opacity .35s ease; }
.royaye-update-shade { position:absolute; inset:0; z-index:-2; background:linear-gradient(180deg,rgba(4,12,28,.68),rgba(5,15,32,.92)),radial-gradient(circle at 80% 20%,rgba(56,189,248,.12),transparent 48%); }
.royaye-live-updates .updates-header { position:relative; z-index:2; margin-bottom:10px; }
.royaye-update-viewport { position:relative; height:264px; overflow:hidden; touch-action:pan-y; mask-image:linear-gradient(to bottom,transparent 0,#000 8%,#000 92%,transparent 100%); -webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 8%,#000 92%,transparent 100%); }
.royaye-update-track { will-change:transform; }
.royaye-update-row { height:88px; box-sizing:border-box; display:flex; align-items:center; gap:11px; padding:7px 9px; text-decoration:none; border-bottom:1px solid rgba(125,211,252,.08); background:linear-gradient(90deg,rgba(8,22,43,.54),rgba(8,22,43,.22)); transition:opacity .3s,transform .3s,background .3s; }
.royaye-update-row.is-focus { background:linear-gradient(90deg,rgba(13,38,70,.86),rgba(8,25,48,.55)); }
.royaye-update-row img { width:56px; height:74px; flex:0 0 56px; border-radius:8px; object-fit:cover; border:1px solid rgba(125,211,252,.16); }
.royaye-update-row-copy { flex:1; min-width:0; display:block; }
.royaye-update-type { display:inline-flex; align-items:center; gap:4px; margin-bottom:3px; color:#67d4ff; font-size:9px; font-weight:800; }
.royaye-update-type ion-icon { font-size:11px; }
.royaye-update-row-copy strong { display:block; color:#f4f8ff; font-size:12px; line-height:1.45; font-weight:850; white-space:normal; }
.royaye-update-row-copy small { display:block; margin-top:3px; color:#a2b1c6; font-size:10.5px; line-height:1.45; white-space:normal; }
.royaye-update-open { flex:0 0 auto; color:#526b8d; font-size:18px; }
.royaye-update-hint { display:flex; align-items:center; justify-content:center; gap:5px; margin-top:8px; color:#60738f; font-size:9px; }
.royaye-update-hint ion-icon { color:#38bdf8; font-size:13px; }
@media(max-width:768px){
  .royaye-live-updates { min-height:338px; margin:14px 0 20px !important; padding:13px 11px !important; border-radius:17px; }
  .royaye-update-viewport { height:252px; }
  .royaye-update-row { height:84px; gap:9px; padding:6px 7px; }
  .royaye-update-row img { width:52px; height:70px; flex-basis:52px; }
  .royaye-update-row-copy strong { font-size:11.5px; }
  .royaye-update-row-copy small { font-size:10px; }
  .home-section:has(#custom-updates-header) .movies-grid { display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr)) !important; gap:18px 9px !important; padding:0 10px !important; }
}
@media(prefers-reduced-motion:reduce){ .royaye-update-track{transition:none !important} .royaye-live-dot{animation:none !important} }


/* ===== RoyayeFilm V5 — fresh archive sizing + lighter live ticker ===== */
@media(max-width:768px){
  .royaye-fresh-grid{
    display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:17px 8px !important;
    width:calc(100% - 20px) !important;margin:16px auto 0 !important;padding:0 !important;
  }
  .royaye-fresh-grid>.movie-card{display:block !important;width:100% !important;min-width:0 !important;max-width:100% !important;margin:0 !important;}
  .royaye-fresh-grid .card-head{width:100% !important;height:auto !important;aspect-ratio:2/3 !important;}
  .royaye-fresh-grid .card-body{padding:7px 0 0 !important;}
  .royaye-fresh-grid .royaye-card-meta{
    right:5px !important;left:auto !important;bottom:5px !important;width:max-content !important;max-width:calc(100% - 10px) !important;
    min-height:0 !important;padding:4px 5px !important;border-radius:7px !important;display:flex !important;gap:5px !important;
    flex-wrap:nowrap !important;white-space:nowrap !important;background:rgba(3,10,22,.80) !important;font-size:9px !important;
  }
  .royaye-fresh-grid .royaye-card-meta span{white-space:nowrap !important;}
  .royaye-fresh-grid .card-title{font-size:11px !important;line-height:1.5 !important;white-space:normal !important;overflow:visible !important;text-overflow:clip !important;display:block !important;}
  .royaye-fresh-grid .card-info{font-size:9px !important;line-height:1.4 !important;text-align:center !important;}
  .royaye-live-updates{min-height:325px !important;}
  .royaye-update-background{filter:blur(10px) saturate(.8) !important;opacity:.24 !important;transition:opacity .25s ease !important;}
  .royaye-update-viewport{height:252px !important;touch-action:none !important;overscroll-behavior:contain !important;}
  .royaye-update-track{will-change:auto !important;}
  .royaye-update-hint{height:20px !important;margin:4px auto 0 !important;font-size:0 !important;}
  .royaye-update-hint ion-icon{font-size:18px !important;color:#38bdf8 !important;}
}


/* ===== V6 ticker: page-scroll friendly ===== */
@media(max-width:768px){
 .royaye-update-viewport{touch-action:pan-y !important;overscroll-behavior:auto !important;}
 .royaye-update-track{will-change:auto !important;}
 .royaye-update-background{filter:blur(7px) saturate(.75) !important;opacity:.20 !important;}
}
