/* ==========================================================================
   phone.css (2026-11-26, owner: «سایت روی موبایل خیلی عمودیه … باید افقی باشه»)
   Phone layout only (≤700px). Loaded last (functions.php, priority 99), so it wins over base/ui21/lux/shop.
   Ideas: 21st.dev "Bento Grid" (1 large + 2 small news cards), "Snap Carousel" / "Carousel Cards"
   (sideways rows that snap, with the next card peeking), "Footer Section" (compact link columns).
   Removing the enqueue line returns the earlier phone layout.
   ========================================================================== */
@media (max-width:700px){

/* ---------- shared: home sections a little tighter ---------- */
body.home .section{padding-block:34px}
/* section heads: smaller Nastaliq title with its «more» link beside it, the description under both */
body.home .section-head{display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:4px 10px; margin-bottom:16px}
body.home .section-head > .section-sub{grid-column:1 / -1; max-width:none; font-size:.88rem; line-height:1.85}
body.home .section-head .kicker{margin-bottom:.55em; font-size:.86rem}
body.home #seasons .section-head .kicker{font-size:1.15rem}
body.home .section-title{font-size:2.3rem; line-height:1.75; padding-bottom:8px}
body.home .section-head .link-more{margin-bottom:14px; gap:6px; padding-block:4px; padding-inline:10px 4px; font-size:.74rem; white-space:nowrap}
body.home .section-head .link-more svg{width:12px; height:12px; padding:5px}
body.home .section-head .vid-arrows{margin-bottom:14px}
#home .section-head::before{font-size:4.2rem; top:-20px}

/* ---------- sideways rows that snap (seasons, legends, shop items, topic cards) ---------- */
#seasons .seasons-grid, #legends .legends-row, #shop-preview .shop-grid-home, #topics .tx-lead{
  display:flex; gap:10px; overflow-x:auto; overscroll-behavior-x:contain; scroll-snap-type:x mandatory;
  margin-inline:-16px; padding-inline:16px; scroll-padding-inline:16px; scrollbar-width:none}
#seasons .seasons-grid::-webkit-scrollbar, #legends .legends-row::-webkit-scrollbar,
#shop-preview .shop-grid-home::-webkit-scrollbar, #topics .tx-lead::-webkit-scrollbar{display:none}
#seasons .season-card, #legends .legend-card, #shop-preview .shop-card, #topics .tx-card{scroll-snap-align:start; flex:none}

/* ---------- hero: one screen, title beside the trophy, buttons in one row ---------- */
#hero{padding:calc(var(--nav-h) + 14px) 16px 22px}
#hero .hero-inner{display:grid; grid-template-columns:minmax(0,1fr) 36%; gap:0 6px; align-items:center;
  grid-template-areas:"ribbon ribbon" "eyebrow eyebrow" "title art" "lead lead" "cta cta" "stats stats"}
#hero .hero-copy{display:contents}
#hero .hero-copy > .shop-ribbon{grid-area:ribbon; justify-self:start; margin:0 0 14px}
#hero .eyebrow{grid-area:eyebrow; margin:0 0 4px; font-size:.74rem; gap:8px; line-height:1.7}
#hero .eyebrow::before{width:16px}
#hero .hero-title{grid-area:title; font-size:clamp(2.7rem,13.4vw,3.4rem); align-self:center}
#hero .hero-art{grid-area:art; height:210px; width:auto; max-width:none; margin:0}
#hero .plate-1{width:84%; height:56%; top:4%; inset-inline-end:0; transform:rotate(5deg)}
#hero .plate-2{width:70%; height:40%; bottom:8%; inset-inline-start:0; transform:rotate(-7deg)}
#hero .plate-3{display:none}
#hero .plate::before{inset:4px}
#hero .hero-cup{height:92%; bottom:0; inset-inline-start:18%}
#hero .hero-lead{grid-area:lead; margin:8px 0 16px; font-size:.94rem; line-height:1.95}
#hero .hero-cta{grid-area:cta; display:grid; grid-template-columns:1.3fr 1fr 1fr; gap:8px; margin:0 0 14px}
#hero .hero-cta .btn{min-width:0; padding:11px 6px; font-size:.8rem; gap:5px; justify-content:center; white-space:nowrap}
#hero .hero-cta .btn svg{width:14px; height:14px; flex:none}
#hero .hero-stats{grid-area:stats}
#hero .stat{padding:10px 4px}
#hero .stat b{font-size:1.3rem}
#hero .scroll-cue{display:none}

/* ---------- newest article: the title sits on the photograph ---------- */
#fresh.section{padding:26px 16px 0}
#fresh .fresh-card{display:grid; grid-template:1fr / 1fr}
#fresh .fresh-card > *{grid-area:1 / 1}
#fresh .fresh-photo{aspect-ratio:auto; min-height:290px}
#fresh .fresh-photo::after{background:linear-gradient(0deg, rgba(12,9,6,.97) 22%, rgba(12,9,6,.62) 55%, rgba(12,9,6,.05) 82%)}
#fresh .fresh-copy{position:relative; z-index:2; align-self:end; gap:8px; padding:90px 16px 16px; pointer-events:none}
#fresh .fresh-kicker{font-size:0; gap:0}
#fresh .fresh-when{font-size:.74rem; line-height:1.6; background:rgba(14,10,6,.78)}
#fresh .fresh-title{font-size:1.4rem; line-height:1.6}
#fresh .fresh-lead{-webkit-line-clamp:2; font-size:.88rem; line-height:1.9}
#fresh .fresh-go{width:100%; justify-content:space-between; gap:10px; padding-top:2px}
#fresh .fresh-go .btn{padding:9px 14px; font-size:.84rem}
#fresh .fresh-meta{font-size:.76rem}
body.home .fresh + .section#archive-preview{padding-top:34px}

/* ---------- «تازه‌های آرشیو»: three articles — one cover across, two side by side ---------- */
#archive-preview .cards-featured{grid-template-columns:1fr 1fr; gap:10px}
#archive-preview .cards-featured > .card:nth-child(n+4){display:none}
#archive-preview .cards-featured > .card:first-child{grid-column:1 / -1; grid-row:auto}
#archive-preview .cards-featured > .card:first-child:not(:has(.card-noimg)){display:grid}
#archive-preview .cards-featured > .card:first-child:not(:has(.card-noimg)) > *{grid-area:1 / 1}
#archive-preview .cards-featured > .card:first-child .card-thumb{aspect-ratio:16/11; min-height:0; flex:none}
#archive-preview .cards-featured > .card:first-child:not(:has(.card-noimg)) .card-body{align-self:end; z-index:3; padding:70px 14px 12px;
  background:linear-gradient(180deg, transparent, rgba(13,9,6,.86) 42%, rgba(13,9,6,.97))}
#archive-preview .cards-featured > .card:first-child .card-title{font-size:1.3rem; color:var(--parchment)}
#archive-preview .cards-featured > .card:first-child .card-body::before{content:"تازه‌ترین"; align-self:flex-start; font-size:.68rem; font-weight:700; color:#2a1e08; background:var(--gold); border-radius:6px; padding:1px 9px}
#archive-preview .cards-featured > .card:first-child .card-meta{border-top-color:rgba(243,232,208,.18)}

/* ---------- article cards everywhere: two per row with short text (was one per row under 400px) ---------- */
.cards-grid{grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px}
.cards-grid .card-excerpt{display:none}
.cards-grid .card-body{padding:10px 10px 10px; gap:6px}
.cards-grid .card-title{font-size:1rem; line-height:1.45; -webkit-line-clamp:3}
.cards-grid .card-meta{font-size:.68rem; padding-top:8px; gap:4px}
.cards-grid .card-meta svg{width:12px; height:12px}
.cards-grid .card-thumb{aspect-ratio:4/3}
.cards-grid .card-thumb .tag{font-size:.62rem; padding:2px 7px; top:8px; inset-inline-start:8px}
.cards-grid .card-thumb .imgcount{font-size:.62rem}
.cards-grid .card-thumb:has(.rank-badge) .tag{display:none}

/* ---------- shop band: photos beside the words, items in one sliding row ---------- */
#shop-preview.section{padding-block:30px}
#shop-preview .shop-band{display:grid; grid-template-columns:minmax(0,1fr) 40%; gap:0 10px; padding:18px 16px; margin-bottom:14px; border-radius:22px;
  grid-template-areas:"flag flag" "title title" "text fan" "stats fan" "cta cta"}
#shop-preview .shop-band-copy{display:contents}
#shop-preview .shop-band-flag{grid-area:flag; justify-self:start; font-size:.74rem; padding:5px 12px}
#shop-preview .shop-band .section-title{grid-area:title; margin:8px 0 6px; font-size:2rem}
#shop-preview .shop-band-copy > p{grid-area:text; font-size:.84rem; line-height:1.85; display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden}
#shop-preview .shop-fan{grid-area:fan; order:0; height:150px; align-self:center}
#shop-preview .shop-fan img{width:86%; border-width:2px; border-radius:10px}
#shop-preview .shop-fan-tag{display:none}
#shop-preview .shop-band-stats{grid-area:stats; margin:10px 0 12px; gap:16px}
#shop-preview .shop-band-stats b{font-size:1.4rem}
#shop-preview .shop-band-stats span{font-size:.7rem}
#shop-preview .shop-band-cta{grid-area:cta; display:grid; grid-template-columns:1fr 1fr; gap:8px}
#shop-preview .shop-band-cta .btn{min-width:0; padding:10px 8px; font-size:.84rem; justify-content:center; white-space:nowrap}
#shop-preview .shop-grid-home > .shop-card{width:44%}

/* ---------- seasons: a film strip that slides ---------- */
#seasons .seasons-grid{padding-block:26px; border-radius:0;
  background:repeating-linear-gradient(90deg, rgba(243,232,208,.13) 0 14px, transparent 14px 26px) 0 8px / 100% 10px no-repeat,
             repeating-linear-gradient(90deg, rgba(243,232,208,.13) 0 14px, transparent 14px 26px) 0 calc(100% - 8px) / 100% 10px no-repeat, #0d0906}
#seasons .seasons-grid::before, #seasons .seasons-grid::after{display:none}
#seasons .season-card{width:40%; aspect-ratio:3/4.1}

/* ---------- legends: one sliding row of portraits ---------- */
#legends .legend-card{width:38%}

/* ---------- all categories: three cover cards that slide, then the rest as small tiles two by two ---------- */
#topics .tx-lead{margin-bottom:12px; padding-bottom:4px}
#topics .tx-card, #topics .tx-card.is-main{width:80%; min-height:200px}
#topics .tx-card-body{padding:14px 14px 14px; gap:4px}
#topics .tx-card h3, #topics .tx-card.is-main h3{font-size:1.55rem}
#topics .tx-kids{margin-top:4px; gap:5px}
#topics .tx-kids a{padding:3px 10px; font-size:.74rem}
#topics .tx-kids a:nth-child(n+5):not(.tx-more){display:none}
#topics .tx-index-list{grid-template-columns:repeat(2, minmax(0,1fr)); gap:8px}
#topics .tx-row{padding:8px; border-radius:14px; gap:0}
#topics .tx-row-main{grid-template-columns:40px minmax(0,1fr); gap:8px}
#topics .tx-n, #topics .tx-arrow, #topics .tx-row-kids{display:none}
#topics .tx-thumb{width:40px; height:40px; border-radius:10px}
#topics .tx-row-text b{font-size:1rem; line-height:1.4}
#topics .tx-row-text small{font-size:.68rem}
#topics .tx-share{inset-inline:8px}

/* ---------- footer: brand in one row, two link columns side by side, numbers two by two ---------- */
.footer{padding:0 12px 16px}
.footer-motif{margin-bottom:10px}
.footer-shell{gap:10px}
.footer-card{grid-template-columns:1fr 1fr; grid-template-areas:"brand brand" "explore explore" "treasure treasure" "numbers numbers"}
.footer-brand{display:grid; grid-template-columns:44px minmax(0,1fr); align-items:center; gap:6px 12px; padding:16px}
.footer-brand .brand-mark{width:44px; height:44px; border-radius:12px}
.footer-brand b{font-size:1.3rem}
.footer-brand p{grid-column:1 / -1; font-size:.8rem; line-height:1.85}
.footer-col{padding:12px 16px}
.footer-col-title{margin-bottom:8px; font-size:.74rem}
/* links as chips that wrap in rows */
.fc-explore, .fc-treasure{flex-direction:row; flex-wrap:wrap; gap:6px}
.fc-explore .footer-col-title, .fc-treasure .footer-col-title{flex:0 0 100%; margin-bottom:2px}
.fc-explore a, .fc-treasure a{padding:6px 12px; font-size:.8rem; line-height:1.6; border:1px solid var(--line-soft); border-radius:999px; background:rgba(14,10,7,.35)}
.fc-explore a:last-child, .fc-treasure a:last-child{border-bottom:1px solid var(--line-soft)}
.fc-explore a:hover, .fc-treasure a:hover{padding-inline-start:12px; border-color:var(--gold-deep)}
.fc-treasure{border-inline-start:none}
/* the four numbers in one row, like the hero's */
.fc-numbers{display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:0 4px; padding-bottom:12px; text-align:center}
.fc-numbers .footer-col-title{grid-column:1 / -1; text-align:start}
.frow{display:block; padding:4px 0; font-size:.68rem; line-height:1.5; border-bottom:0}
.frow svg{display:none}
.frow-t b{display:block; margin:0; font-size:1.15rem; line-height:1.3}

/* ---------- video row foot: both buttons on one line ---------- */
#video-preview .vid-home-foot{flex-wrap:nowrap; gap:8px; margin-top:14px}
#video-preview .vid-home-foot > a{min-width:0; padding:10px 12px; font-size:.78rem; white-space:nowrap; justify-content:center}
#video-preview .vid-home-foot > .vid-sub{flex:1 1 auto; overflow:hidden; text-overflow:ellipsis}
#video-preview .vid-home-foot > .btn{flex:none}

/* ---------- about: shorter, the era card as a slim strip ---------- */
#about-teaser .about-grid{gap:18px}
#about-teaser .about-copy p{font-size:.92rem; line-height:1.95; margin-block:10px 16px}
#about-teaser .era-card{max-width:none; padding-inline:16px}
.footer-bar{justify-content:center; text-align:center; padding:10px 12px; font-size:.7rem; line-height:1.8}
.lux-wordmark{font-size:3.4rem; margin-top:4px}
}

/* very narrow phones: the three hero buttons keep one row */
@media (max-width:360px){
  #hero .hero-cta .btn{font-size:.74rem; padding-inline:4px}
  #hero .hero-cta .btn svg{display:none}
}
