/*
Theme Name: Shababeks Magazine
Description: Independent Arabic magazine theme for Shababeks staging.
Version: 1.2.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: shababeks-magazine
*/

:root {
	--petrol: #00362f;
	--burgundy: #790b25;
	--ivory: #fbf6ef;
	--gold: #ac7533;
	--line: #e4d5c3;
	--ink: #211914;
	--surface: #fffdf9;
	--gap: clamp(1rem, 2vw, 1.5rem);
	--radius: .65rem;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 1rem/1.65 Tahoma, Arial, sans-serif; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--burgundy); text-underline-offset: .19em; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.3; margin-block: 0 .55em; }
h1 { font-size: clamp(1.85rem, 4vw, 3rem); color: var(--burgundy); }
h2 { font-size: clamp(1.12rem, 2vw, 1.45rem); }
p { margin-block: 0 1em; }
.wrap { width: min(100% - 2rem, 88rem); margin-inline: auto; }
.main { min-height: 55vh; padding-block: var(--gap) 3rem; }
.skip-link, .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip-link:focus { z-index: 10; inset: 1rem auto auto 1rem; width: auto; height: auto; background: white; padding: .7rem; clip-path: none; }
.masthead { background: var(--surface); }
.masthead-inner { display: grid; gap: .75rem; align-items: center; padding-block: 1rem; }
.identity { display: none; color: var(--burgundy); }
.identity strong { font-size: 1.35rem; }
.identity p { margin: 0; color: var(--ink); }
.brand { justify-self: center; }
.brand img { max-height: 7rem; width: auto; object-fit: contain; }
.site-search { display: flex; }
.site-search label { flex: 1; min-width: 0; }
.site-search input { width: 100%; min-height: 44px; border: 1px solid var(--line); padding-inline: .6rem; font: inherit; }
button { min-height: 44px; padding-inline: .85rem; border: 0; background: var(--burgundy); color: white; font: inherit; cursor: pointer; }
.primary, .site-footer { background: var(--petrol); color: white; border-block-end: 3px solid var(--gold); }
.primary a, .site-footer a { color: inherit; }
.primary summary { min-height: 44px; padding: .6rem 1rem; cursor: pointer; font-weight: bold; }
.desktop-navigation { display: none; }
.category-links, .category-links ul, .subcategories { list-style: none; margin-block: 0; padding-inline-start: 0; }
.category-links a, .subcategories a { display: inline-block; padding: .6rem .7rem; text-decoration: none; }
.category-links ul { padding-inline-start: 1rem; }
.category-links a:hover, .category-links [aria-current="page"], .current-cat > a { background: var(--burgundy); }
.editorial-grid, .article-layout, .cards { display: grid; gap: var(--gap); align-items: start; }
.card, .panel, .section-banner, .advertising { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card a { display: block; color: inherit; text-decoration: none; }
.card a:hover h2 { text-decoration: underline; }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-copy, .panel, .section-banner, .advertising { padding: 1rem; }
.card h2, .section-heading { color: var(--burgundy); }
.cover { background: var(--petrol); color: white; }
.cover h2 { color: inherit; font-size: clamp(1.45rem, 3.2vw, 2.6rem); }
.cover img { aspect-ratio: 2 / 1; }
.card time, .metadata { font-size: .85rem; }
.section-heading { margin-block: 1.5rem .75rem; border-block-end: 1px solid var(--line); padding-block-end: .45rem; }
.section-banner { margin-block-end: var(--gap); border-block-end: 3px solid var(--gold); }
.subcategories, .nav-links { display: flex; flex-wrap: wrap; gap: .3rem; }
.nav-links { margin-block: var(--gap); }
.page-numbers { padding: .25rem .65rem; border: 1px solid var(--line); }
.page-numbers.current { background: var(--burgundy); color: white; }
.article-layout { min-width: 0; }
.article-heading, .metadata { margin-block-end: 1rem; }
.metadata, blockquote { background: #f4e8da; padding: .65rem 1rem; border-radius: var(--radius); }
.article-photo { margin: 0 0 1rem; }
.article-photo img { width: 100%; border-radius: var(--radius); }
.article-tools, .tags { margin-block: .85rem; }
.prose { max-width: 78ch; margin-inline: auto; line-height: 1.9; overflow-wrap: anywhere; }
.literary .prose { max-width: 62ch; line-height: 2.05; }
.prose iframe, .prose video { max-width: 100%; }
.prose blockquote { margin: 1.5rem 0; border-inline-start: 4px solid var(--gold); color: var(--burgundy); }
.article-sidebar .card + .card { margin-block-start: .7rem; }
.advertising { margin-block: 1rem; }
.advertising small { display: block; margin-block-end: .5rem; color: var(--burgundy); }
.site-footer { padding-block: 1.5rem .7rem; }
@media (min-width: 42rem) {
	.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.masthead-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.editorial-grid { grid-template-columns: minmax(0, 2.5fr) minmax(0, 1fr); }
}
@media (min-width: 64rem) {
	.identity, .desktop-navigation { display: block; }
	.mobile-navigation { display: none; }
	.masthead-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.category-links { display: flex; flex-wrap: wrap; align-items: start; }
	.category-links li { position: relative; }
	.category-links ul { display: none; position: absolute; inset-inline-start: 0; z-index: 2; min-width: max-content; padding: 0; background: var(--petrol); }
	.category-links li:hover > ul, .category-links li:focus-within > ul { display: block; }
	.category-links ul ul { inset-inline-start: 100%; inset-block-start: 0; }
	.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.article-layout { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }
}

.home .masthead { background: linear-gradient(115deg, #ead8bf, var(--surface) 37%, var(--ivory) 70%, #ead8bf); }
.home .masthead-inner { padding-block: .4rem; }
.home .masthead .brand img { max-height: 7.8rem; }
.home .primary { border-block-end-color: #cfaa63; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; }
.footer-inner p { margin: 0; }
.footer-inner ul { display: flex; flex-wrap: wrap; list-style: none; gap: .35rem 1rem; margin: 0; padding: 0; }
.home .desktop-navigation .category-links { justify-content: center; }
.magazine-home { width: min(100% - 2rem, 100rem); padding-block-start: .75rem; }
.home-lead, .home-sections { display: grid; gap: .65rem; }
.home-feature, .home-news, .section-tile, .home-columns {
	border: 1px solid var(--line);
	border-radius: .45rem;
	overflow: hidden;
}
.home-feature { background: var(--petrol); color: white; }
.home-feature > a { display: grid; height: 100%; color: inherit; text-decoration: none; }
.home-feature img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.home-feature-copy { padding: clamp(.8rem, 2vw, 1.6rem); }
.home-feature h2 { margin-block: .5rem; font-size: clamp(1.25rem, 2.4vw, 2.5rem); }
.home-feature-compact h2 { font-size: clamp(1.15rem, 1.65vw, 1.8rem); }
.home-feature-compact:not(:has(img)) { background: linear-gradient(120deg, #410819, #831831 60%, #ba8249); }
.home-feature-compact:not(:has(img)) .home-feature-copy { background: transparent; }
.home-feature p { margin-block-end: .6rem; }
.home-ribbon, .home-action {
	display: inline-block;
	background: linear-gradient(140deg, #a92239, var(--burgundy) 48%, #500819);
	color: white;
	border-radius: .32rem;
	padding: .25rem .7rem;
	font-weight: bold;
}
.home-action { border: 1px solid #ceb07f; margin-block-start: .35rem; }
.home-feature a:hover .home-action { text-decoration: underline; }
.home-news, .home-columns, .section-tile { background: linear-gradient(145deg, var(--surface), #f4e8d7); }
.home-news h2 { margin: 0; padding: .45rem .75rem; color: var(--burgundy); background: #f0e2d0; }
.home-news ul, .home-ticker ul, .home-columns ul { list-style: none; margin: 0; padding: 0; }
.home-news li + li { border-block-start: 1px solid var(--line); }
.home-news a { display: flex; gap: .55rem; align-items: center; padding: .5rem; font-size: .9rem; font-weight: bold; }
.home-news img { width: 38%; max-width: 7rem; aspect-ratio: 1.6; object-fit: cover; border-radius: .3rem; }
.home-news a, .home-ticker a, .tile-story, .home-columns li a { color: var(--ink); text-decoration: none; }
.home-news a:hover, .home-ticker a:hover, .tile-story:hover, .home-columns li a:hover { text-decoration: underline; }
.home-ticker { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; margin-block: .6rem; background: #f1e5d7; }
.home-ticker h2 { margin: 0; padding: .45rem .8rem; background: var(--burgundy); color: white; font-size: 1rem; }
.home-ticker ul { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; padding: .4rem .65rem; }
.home-ticker li { font-size: .87rem; font-weight: bold; }
.home-ticker li::before { content: '•'; margin-inline-end: .45rem; color: var(--burgundy); }
.section-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.section-tile h2 { margin: 0; background: var(--petrol); color: white; font-size: .98rem; }
.section-tile:nth-child(3n) h2 { background: var(--burgundy); }
.section-tile h2 a { display: block; padding: .36rem .55rem; color: inherit; }
.tile-story { display: block; font-size: .86rem; font-weight: bold; }
.tile-story img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.tile-story span { display: block; padding: .45rem; }
.home-columns { display: grid; gap: .75rem; align-items: center; margin-block-start: .75rem; padding: .65rem; }
.home-columns h2 { color: var(--burgundy); }
.home-columns p { margin: 0 0 .4rem; }
.columns-heading a { display: inline-block; border: 1px solid #cba166; border-radius: .4rem; background: #f1d4a0; padding: .32rem .7rem; }
.home-columns ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.home-columns li { border-inline-start: 1px solid var(--line); padding: .6rem; font-size: .9rem; font-weight: bold; }
.home-columns li::before { display: block; content: '❞'; color: var(--burgundy); font-size: 1.3rem; }
.home-sections > .advertising, .home-columns > .advertising { margin: 0; }
.suite-hero,.suite-sections,.suite-footer { display:grid; align-items:start; gap:var(--gap); }
.suite-sections { margin-block-start:var(--gap); }
.suite-slider,.suite-today,.suite-section { min-width:0; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); overflow:hidden; }
.suite-today > h2,.suite-section > header { margin:0; padding:.55rem .8rem; background:var(--section-color,var(--suite-accent)); color:white; }
.suite-today > time { display:block; padding:.6rem .8rem; }
.suite-controls:not([hidden]) { display:flex; align-items:center; justify-content:space-between; padding:.35rem .65rem; }
.suite-section > header { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.suite-section > header h2 { margin:0; }
.suite-category-icon { display:inline-block; vertical-align:middle; margin-inline-end:.35rem; filter:invert(1); }
.suite-section > header a { color:inherit; }
.suite-stories { display:grid; grid-auto-flow:column; grid-auto-columns:min(75%,14rem); gap:.65rem; overflow-x:auto; scroll-snap-type:x mandatory; padding:.65rem; }
.suite-stories .card { scroll-snap-align:start; height:100%; }
.suite-stories .card h2 { font-size:1rem; }
.suite-section-list .suite-stories { display:block; }
.suite-section-list .card + .card { margin-block-start:.4rem; }
.suite-section-list .card a { display:flex; align-items:center; }
.suite-section-list .card img { width:6rem; }
.suite-footer table { border-collapse:collapse; }
.suite-footer td { padding:.18rem .35rem; border-block-end:1px solid #ffffff42; font-size:.85rem; }
.faw-ads { margin:.35rem auto; width:fit-content; max-width:100%; }
.faw-ads img { display:block; object-fit:contain; margin:auto; }
.faw-ads-category img { width:320px; aspect-ratio:320 / 100; }
.faw-ads-between { grid-column:1 / -1; }
.masthead-inner:has(.faw-ads-header) .faw-ads-header { grid-column:1 / -1; }
@media (min-width:600px) {
	.faw-ads-category img { width:468px; aspect-ratio:468 / 60; }
	.suite-hero:has(.suite-slider):has(.suite-today) { grid-template-columns:minmax(0,2.4fr) minmax(0,1fr); }
}
@media (min-width:1024px) {
	.faw-ads-category img { width:600px; aspect-ratio:6; }
	.suite-sections { grid-template-columns:repeat(2,minmax(0,1fr)); }
	.suite-footer { grid-template-columns:repeat(3,minmax(0,1fr)); align-items:center; }
	.suite-footer > p { text-align:center; }
	.masthead-inner:has(.faw-ads-header) { grid-template-columns:repeat(4,minmax(0,1fr)); }
	.masthead-inner:has(.faw-ads-header) .faw-ads-header { grid-column:auto; }
}
@media (min-width: 46rem) {
	.home-lead { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
	.home-lead > .home-feature-compact { grid-column: 1 / -1; }
	.home-feature > a { position: relative; min-height: 13rem; align-items: center; }
	.home-feature img { position: absolute; inset: 0; height: 100%; }
	.home-feature-copy { position: relative; width: 100%; background: linear-gradient(to left, #00362ff5 0%, #00362fd9 32%, #00362f00 100%); }
	.home-feature-cover .home-feature-copy { display: grid; align-content: center; min-height: 100%; padding-inline-end: 45%; }
	.home-feature-cover .home-ribbon, .home-feature-cover .home-action { justify-self: start; }
	.home-feature-compact .home-feature-copy { background: #3f1f0fce; }
	.section-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.home-columns { grid-template-columns: minmax(10rem, 1fr) minmax(0, 4fr); }
	.home-columns ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 68rem) {
	.home-lead { grid-template-columns: minmax(0, 5fr) minmax(0, 1.55fr) minmax(0, 2.12fr); }
	.home-lead > .home-feature-compact { grid-column: auto; }
	.home-lead > .home-feature > a { min-height: 17rem; }
	.home-lead > .home-feature { align-self: stretch; }
	.home-sections { grid-template-columns: minmax(0, 6fr) minmax(0, 3fr); }
	.home-sections:has(> .advertising) { grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 1.2fr); }
	.section-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.home-columns:has(> .advertising) { grid-template-columns: minmax(10rem, 1fr) minmax(0, 4fr) minmax(0, 1.1fr); }
}

.sh-navigation{position:relative;z-index:20;background:var(--nav-bg);color:white}
.sh-navigation.sh-fixed{position:sticky;top:0}
body.admin-bar .sh-navigation.sh-fixed{top:32px}
.sh-nav-inner{display:flex;align-items:center;position:relative;gap:.5rem;height:58px;white-space:nowrap}
.sh-nav-inner a,.sh-drawer-toggle{text-decoration:none;font-weight:bold}
.sh-home-link,.sh-nav-inner summary,.sh-drawer-toggle,.sh-close{padding:.55rem .9rem;border-radius:.4rem}
.sh-home-link{background:var(--burgundy)}
.sh-featured{display:flex;flex:1 1 0;min-width:0;overflow:hidden}
.sh-featured>span{flex:none}
.sh-featured a{display:block;padding:.6rem .75rem}
.sh-featured a:hover,.sh-mega summary:hover{background:#ffffff20}
.sh-featured .sh-cat-icon{display:none}
.sh-nav-search{width:clamp(10rem,17vw,16rem)}
.sh-navigation .site-search{overflow:hidden;border-radius:.4rem}
.sh-navigation input[type=search]{color:#251e1d}
.sh-mega summary{list-style:none}.sh-mega summary::-webkit-details-marker{display:none}
.sh-mega summary::after{content:'⌄';margin-inline-start:.45rem}
.sh-mega-grid{position:absolute;inset:100% 0 auto;background:var(--surface);border:1px solid var(--line);border-top:3px solid var(--gold);padding:1rem;box-shadow:0 12px 22px #20160d25;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));max-height:65vh;overflow:auto;gap:.35rem;border-radius:0 0 .7rem .7rem;white-space:normal}
.sh-cat-icon{width:32px;height:32px;display:inline-grid;place-items:center;flex:none;border-radius:.5rem}
.sh-cat-icon img{filter:brightness(0) invert(1)}
.sh-mega-grid a,.sh-drawer-links a{display:flex;align-items:center;gap:.65rem;padding:.5rem;color:var(--ink);text-decoration:none;border-radius:.4rem}
.sh-mega-grid a:hover,.sh-drawer-links a:hover{background:#efe4d5}
.sh-drawer-toggle{display:none}
#sh-drawer{inset:0 0 0 auto;margin:0;width:min(25rem,88vw);max-width:none;height:100%;height:100dvh;max-height:none;overflow:auto;overscroll-behavior:contain;border:0;border-inline-end:3px solid var(--gold);padding:1.1rem;background:var(--surface);color:var(--ink);text-align:start}
#sh-drawer[open]{animation:sh-enter .2s ease-out}
#sh-drawer::backdrop{background:#121f1ac7}
.sh-drawer-head{display:flex;align-items:center;justify-content:space-between;font-size:1.25rem;margin-bottom:1rem;color:var(--burgundy)}
.sh-close{font-size:1.55rem;line-height:1}
.sh-drawer-links{margin-block-start:1rem}.sh-drawer-links a{border-bottom:1px solid var(--line)}
html.sh-nav-open,html.sh-nav-open body{overflow:hidden}
@keyframes sh-enter{from{transform:translateX(100%)}to{transform:translateX(0)}}
@media(prefers-reduced-motion:reduce){#sh-drawer[open]{animation:none}}
@media(max-width:1023px){.sh-nav-inner{justify-content:space-between;height:52px}.sh-drawer-toggle{display:flex;align-items:center;gap:.65rem;background:transparent;color:white}.sh-featured,.sh-mega,.sh-nav-search{display:none}}
@media(max-width:782px){body.admin-bar .sh-navigation.sh-fixed{top:46px}}
