/*
Theme Name: Shahid4u
Theme URI: https://example.com/shahid4u
Author: Theme Studio
Author URI: https://example.com
Description: A fast, RTL-first Shahid4u cinema and entertainment WordPress theme with movie listings, blog templates, and a secure demo importer.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: shahid-stream
Tags: entertainment, blog, rtl-language-support, custom-logo, featured-images, translation-ready
*/

:root {
  --ss-bg: #101114;
  --ss-surface: #191b20;
  --ss-surface-2: #22252b;
  --ss-text: #f7f7f7;
  --ss-muted: #a5a8af;
  --ss-brand: #ed1c24;
  --ss-brand-dark: #ba1118;
  --ss-gold: #f7c948;
  --ss-border: #30333a;
  --ss-success: #1ea672;
  --ss-radius: 6px;
  --ss-container: 1220px;
  --ss-shadow: 0 12px 30px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ss-bg); color: var(--ss-text); font-family: Tahoma, Arial, sans-serif; line-height: 1.75; }
body.admin-bar .site-header { top: 32px; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }
.container { width: min(calc(100% - 32px), var(--ss-container)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { clip: auto; width: auto; height: auto; margin: 8px; padding: 8px 14px; background: var(--ss-brand); z-index: 99999; }
:focus-visible { outline: 3px solid var(--ss-gold); outline-offset: 3px; }

.site-header { position: sticky; top: 0; z-index: 100; background: rgba(16,17,20,.96); border-bottom: 1px solid var(--ss-border); backdrop-filter: blur(12px); }
.topbar { background: var(--ss-brand); color: #fff; font-size: 13px; text-align: center; padding: 5px 16px; }
.header-inner { min-height: 76px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; font-size: 24px; font-weight: 900; }
.brand-mark { width: 38px; height: 38px; border-radius: 7px; object-fit: cover; }
.brand em { color: var(--ss-brand); font-style: normal; }
.custom-logo { max-height: 46px; width: auto; }
.main-navigation { flex: 1; }
.main-navigation ul { display: flex; align-items: center; gap: 4px; list-style: none; padding: 0; margin: 0; }
.main-navigation a { display: block; padding: 10px 12px; font-size: 14px; font-weight: 700; border-radius: 4px; }
.main-navigation a:hover, .main-navigation .current-menu-item > a { background: var(--ss-surface-2); color: var(--ss-brand); }
.header-search { display: flex; width: min(300px, 27vw); }
.header-search input { width: 100%; min-width: 0; border: 1px solid var(--ss-border); border-inline-end: 0; border-radius: 0 var(--ss-radius) var(--ss-radius) 0; background: var(--ss-surface); color: var(--ss-text); padding: 10px 12px; }
.header-search button { border: 0; border-radius: var(--ss-radius) 0 0 var(--ss-radius); color: #fff; background: var(--ss-brand); padding: 0 14px; cursor: pointer; }
.menu-toggle { display: none; border: 1px solid var(--ss-border); background: var(--ss-surface); color: var(--ss-text); width: 42px; height: 42px; border-radius: var(--ss-radius); cursor: pointer; }

.ticker { border-bottom: 1px solid var(--ss-border); background: var(--ss-surface); }
.ticker-inner { min-height: 44px; display: flex; align-items: center; gap: 14px; overflow: hidden; }
.ticker-label { flex: none; background: var(--ss-brand); color: #fff; padding: 4px 10px; border-radius: 3px; font-size: 12px; font-weight: 800; }
.ticker-links { display: flex; gap: 24px; white-space: nowrap; font-size: 13px; color: var(--ss-muted); overflow: hidden; }
.ticker-links a:hover { color: var(--ss-text); }

.site-main { min-height: 65vh; padding-block: 36px 64px; }
.hero { position: relative; min-height: 450px; display: flex; align-items: flex-end; overflow: hidden; background: var(--ss-surface); }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, var(--ss-bg) 0%, rgba(16,17,20,.12) 72%); }
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.hero-content { position: relative; z-index: 1; padding-block: 70px 48px; max-width: 760px; }
.eyebrow { color: var(--ss-brand); font-weight: 800; font-size: 13px; }
.hero h1 { margin: 6px 0 12px; font-size: clamp(34px, 5vw, 62px); line-height: 1.18; }
.hero p { color: #e3e4e7; max-width: 620px; margin: 0 0 22px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 20px; border: 0; border-radius: var(--ss-radius); background: var(--ss-brand); color: #fff; font-weight: 800; cursor: pointer; }
.button:hover { background: var(--ss-brand-dark); }
.button.secondary { background: var(--ss-surface-2); border: 1px solid var(--ss-border); }

.section { padding-top: 42px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--ss-border); }
.section-title, .archive-title { margin: 0; padding-bottom: 10px; font-size: 24px; line-height: 1.3; border-bottom: 3px solid var(--ss-brand); }
.section-link { color: var(--ss-muted); font-size: 14px; }
.movie-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.movie-card { min-width: 0; }
.poster-wrap { position: relative; aspect-ratio: 2 / 3; overflow: hidden; border-radius: var(--ss-radius); background: var(--ss-surface); box-shadow: var(--ss-shadow); }
.poster-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.movie-card:hover .poster-wrap img { transform: scale(1.045); }
.poster-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .25s; }
.movie-card:hover .poster-overlay, .movie-card:focus-within .poster-overlay { opacity: 1; }
.play-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--ss-brand); color: #fff; font-size: 20px; }
.badge { position: absolute; top: 10px; right: 10px; z-index: 2; padding: 3px 8px; border-radius: 3px; background: var(--ss-brand); color: #fff; font-size: 11px; font-weight: 800; }
.rating { position: absolute; left: 10px; bottom: 10px; z-index: 2; padding: 3px 7px; background: rgba(0,0,0,.82); color: var(--ss-gold); border-radius: 3px; font-size: 12px; font-weight: 700; }
.movie-title { margin: 11px 0 2px; font-size: 14px; line-height: 1.55; }
.movie-title a:hover { color: var(--ss-brand); }
.movie-year { color: var(--ss-muted); font-size: 12px; }

.category-strip { padding: 22px 0; background: var(--ss-surface); border-block: 1px solid var(--ss-border); }
.category-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.category-list a { flex: none; padding: 8px 15px; background: var(--ss-surface-2); border: 1px solid var(--ss-border); border-radius: 4px; font-size: 13px; }
.category-list a:hover { border-color: var(--ss-brand); color: var(--ss-brand); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 32px; align-items: start; }
.post-list { display: grid; gap: 16px; }
.post-card { display: grid; grid-template-columns: 190px 1fr; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--ss-border); }
.post-card img { width: 190px; height: 120px; object-fit: cover; border-radius: var(--ss-radius); background: var(--ss-surface); }
.post-card h2 { margin: 0 0 6px; font-size: 19px; }
.post-meta { color: var(--ss-muted); font-size: 12px; }
.post-card p { color: var(--ss-muted); margin: 6px 0 0; font-size: 14px; }
.sidebar { padding: 20px; background: var(--ss-surface); border: 1px solid var(--ss-border); border-radius: var(--ss-radius); }
.widget-title { margin-top: 0; font-size: 17px; border-right: 3px solid var(--ss-brand); padding-right: 10px; }

.movie-hero { position: relative; min-height: 520px; display: flex; align-items: flex-end; background: var(--ss-surface); overflow: hidden; }
.movie-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, var(--ss-bg) 2%, rgba(16,17,20,.42) 100%); }
.movie-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; filter: blur(2px); }
.movie-detail { position: relative; z-index: 1; display: grid; grid-template-columns: 250px 1fr; gap: 30px; align-items: end; padding-block: 48px; }
.movie-detail > img { width: 250px; aspect-ratio: 2/3; object-fit: cover; border-radius: var(--ss-radius); box-shadow: var(--ss-shadow); }
.movie-detail h1 { margin: 0 0 10px; font-size: clamp(30px, 5vw, 52px); line-height: 1.25; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0; }
.meta-row span { background: rgba(25,27,32,.9); border: 1px solid var(--ss-border); padding: 4px 9px; border-radius: 3px; font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.entry-content { font-size: 16px; }
.entry-content > * { max-width: 820px; }
.entry-content img { border-radius: var(--ss-radius); }
.pagination { margin-top: 34px; }
.pagination .nav-links { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.pagination .page-numbers { min-width: 38px; padding: 6px 10px; text-align: center; border: 1px solid var(--ss-border); background: var(--ss-surface); border-radius: 3px; }
.pagination .current { background: var(--ss-brand); border-color: var(--ss-brand); }
.empty-state { padding: 44px 20px; text-align: center; background: var(--ss-surface); border: 1px solid var(--ss-border); }

.site-footer { background: #0a0b0d; border-top: 1px solid var(--ss-border); }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; align-items: center; min-height: 100px; color: var(--ss-muted); font-size: 13px; }
.footer-menu { display: flex; gap: 14px; list-style: none; margin: 0; padding: 0; }

@media (max-width: 1040px) {
  .movie-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .header-search { width: 240px; }
  .main-navigation a { padding-inline: 8px; }
}
@media (max-width: 780px) {
  body.admin-bar .site-header { top: 46px; }
  .header-inner { min-height: 64px; gap: 12px; }
  .menu-toggle { display: inline-grid; place-items: center; order: 3; }
  .main-navigation { display: none; position: absolute; top: 100%; inset-inline: 0; background: var(--ss-surface); border-bottom: 1px solid var(--ss-border); padding: 12px 16px; }
  .main-navigation.is-open { display: block; }
  .main-navigation ul { display: block; }
  .main-navigation a { padding: 11px; }
  .header-search { margin-inline-start: auto; width: min(230px, 48vw); }
  .brand span { display: none; }
  .hero { min-height: 390px; }
  .movie-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .movie-detail { grid-template-columns: 170px 1fr; gap: 20px; }
  .movie-detail > img { width: 170px; }
}
@media (max-width: 520px) {
  .container { width: min(calc(100% - 22px), var(--ss-container)); }
  .topbar { font-size: 11px; }
  .header-search { width: auto; flex: 1; }
  .header-search input { font-size: 13px; padding-inline: 9px; }
  .hero { min-height: 360px; }
  .hero-content { padding-block: 60px 34px; }
  .hero h1 { font-size: 32px; }
  .movie-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .section { padding-top: 34px; }
  .section-title, .archive-title { font-size: 20px; }
  .post-card { grid-template-columns: 110px 1fr; gap: 12px; }
  .post-card img { width: 110px; height: 90px; }
  .post-card h2 { font-size: 15px; }
  .post-card p { display: none; }
  .movie-hero { min-height: 0; }
  .movie-detail { grid-template-columns: 108px 1fr; gap: 15px; padding-block: 30px; }
  .movie-detail > img { width: 108px; }
  .movie-detail h1 { font-size: 24px; }
  .movie-summary { display: none; }
  .actions { grid-column: 1 / -1; }
  .button { flex: 1; }
  .footer-inner { flex-direction: column; justify-content: center; text-align: center; padding-block: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
