/*
Theme Name: Saudi Arabia Interiors Magazine
Author: Saudi Arabia Interiors
Description: An editorial theme for Saudi Arabia Interiors.
Version: 1.0.0
Text Domain: sai-magazine
*/
:root {
  --ink: #111;
  --muted: #585858;
  --rule: #dedede;
  --font: Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--ink); font: 16px/1.55 var(--font); }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid #111; outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }
.wrap { width: min(calc(100% - 64px), 1300px); margin: 0 auto; }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 100; background: #111; color: #fff; padding: 10px; }
.skip-link:focus { top: 12px; }
.screen-reader-text { position: absolute; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden; }
.screen-reader-text:focus { clip: auto; width: auto; height: auto; position: static; }

.site-header { background: #fff; }
.masthead { position: relative; display: flex; align-items: center; justify-content: center; min-height: 112px; padding: 20px 0; }
.wordmark { display: block; text-align: center; font: 800 42px/.81 var(--font); letter-spacing: -.07em; }
.wordmark span { display: block; }
.header-search { position: static; transform: none; }
.header-search > button, .menu-toggle { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.header-search > button { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.header-search svg, .menu-toggle svg { width: 21px; height: 21px; }
.menu-toggle { display: none; }
.search-panel { display: none; position: absolute; z-index: 20; right: 0; top: 100%; width: min(360px, 90vw); padding: 15px; background: #fff; border: 1px solid var(--rule); box-shadow: 0 9px 22px #0002; }
.search-panel.is-open { display: block; }
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; min-width: 0; }
.search-form input { width: 100%; min-width: 0; padding: 10px; border: 1px solid #767676; background: #fff; }
.search-form button { flex: 0 0 auto; padding: 10px 14px; border: 0; background: #111; color: #fff; white-space: nowrap; cursor: pointer; }
.primary-nav { height: 48px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.primary-nav ul.wrap { display: flex; align-items: center; justify-content: center; gap: clamp(25px, 4.5vw, 75px); height: 100%; margin: 0 auto; padding: 0; list-style: none; }
.primary-nav a { display: block; padding: 13px 0; font-size: 12px; font-weight: 600; line-height: 20px; }
.primary-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }

.hero { border-bottom: 1px solid var(--rule); }
.hero-image { display: block; height: clamp(400px, 35vw, 510px); width: 100%; background: #eee; overflow: hidden; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-caption { padding: 17px 0 22px; text-align: center; }
.card-category { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }
.hero-caption h1 { max-width: 900px; margin: 5px auto 0; font: 700 clamp(25px, 2.1vw, 30px)/1.18 var(--font); letter-spacing: -.025em; }
.feed-section { padding-top: 25px; padding-bottom: 25px; border-top: 1px solid var(--rule); }
.hero + .feed-section { border-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 16px; }
.section-head h2 { margin: 0; font: 700 27px/1.2 var(--font); letter-spacing: -.035em; }
.section-link { font-size: 13px; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.latest-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(210px, .7fr); gap: 18px; align-items: start; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card-grid.count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid.count-1 { grid-template-columns: minmax(0, 1fr); max-width: 420px; }
.story-card { min-width: 0; }
.card-image { display: block; width: 100%; aspect-ratio: 1.42; overflow: hidden; background: #eee; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.no-image { display: flex; align-items: center; justify-content: center; height: 100%; padding: 20px; background: #eee; color: var(--muted); text-align: center; overflow-wrap: anywhere; }
.story-card .card-category { margin-top: 10px; }
.story-card h2, .story-card h3 { margin: 4px 0 0; font: 700 21px/1.22 var(--font); letter-spacing: -.02em; }
.story-card p { margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.48; }
.reading-list { padding-left: 18px; border-left: 1px solid var(--rule); }
.reading-list h3 { margin: 0 0 6px; font: 700 19px/1.2 var(--font); }
.reading-list article { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.reading-list article:first-of-type { padding-top: 7px; }
.reading-list h4 { margin: 4px 0 0; font: 700 17px/1.25 var(--font); }
.about-journal { display: grid; grid-template-columns: 220px minmax(0, 680px); gap: 28px; padding-top: 27px; padding-bottom: 34px; border-top: 1px solid var(--rule); }
.about-journal h2 { margin: 0; font: 700 18px/1.25 var(--font); }
.about-journal .content { color: var(--muted); font-size: 13px; line-height: 1.5; }
.about-journal .content p:first-child { margin-top: 0; }
.about-journal .content p:last-child { margin-bottom: 0; }
.about-journal a, .entry-content a { text-decoration: underline; text-underline-offset: 3px; }

.archive-intro { max-width: 820px; padding: 38px 0 25px; }
.eyebrow, .section-kicker { color: var(--muted); font-size: 12px; }
.archive-title { margin: 6px 0 0; font: 700 clamp(32px, 3.3vw, 45px)/1.1 var(--font); letter-spacing: -.04em; overflow-wrap: anywhere; }
.archive-intro p { color: var(--muted); }
.archive-grid { padding-bottom: 35px; }
.pagination { padding: 18px 0 45px; border-top: 1px solid var(--rule); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 9px; }
.pagination a, .pagination span { padding: 5px 11px; border: 1px solid var(--rule); }
.pagination .current { background: #111; color: #fff; }
.empty-state { padding: 10px 0 50px; }

.article-header { max-width: 850px; margin: 0 auto; padding: 42px 0 28px; text-align: center; }
.article-header h1 { margin: 9px 0 13px; font: 700 clamp(34px, 4.3vw, 58px)/1.08 var(--font); letter-spacing: -.045em; overflow-wrap: anywhere; }
.article-deck { max-width: 700px; margin: 0 auto; color: var(--muted); font-size: 17px; line-height: 1.55; }
.article-hero { max-width: 1180px; margin: 0 auto 38px; }
.article-hero img { width: 100%; max-height: 680px; object-fit: cover; }
.article-hero figcaption, .entry-content figcaption { margin-top: 7px; color: var(--muted); font-size: 12px; }
.article-body { max-width: 740px; margin: 0 auto; }
.entry-content { font: 17px/1.72 var(--font); overflow-wrap: break-word; }
.entry-content > :first-child { margin-top: 0; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin: 1.6em 0 .5em; font-weight: 700; line-height: 1.2; letter-spacing: -.025em; }
.entry-content h2 { font-size: 32px; }
.entry-content h3 { font-size: 25px; }
.entry-content p, .entry-content ul, .entry-content ol { margin: 0 0 1.25em; }
.entry-content li { margin: .3em 0; }
.entry-content blockquote { margin: 1.6em 0; padding-left: 20px; border-left: 3px solid #111; }
.entry-content figure { margin: 1.8em 0; }
.entry-content figure img { width: auto; max-width: 100%; height: auto; }
.entry-content .wp-block-image img { width: 100%; }
.entry-content table { display: block; width: 100%; margin: 1.7em 0; overflow-x: auto; border-collapse: collapse; font: 14px/1.5 var(--font); }
.entry-content th, .entry-content td { padding: 10px; border: 1px solid var(--rule); text-align: left; vertical-align: top; }
.entry-content th { background: #f3f3f3; }
.entry-content th[scope="row"] { background: transparent; font-weight: inherit; }
.entry-content iframe { max-width: 100%; }
.article-meta { margin-top: 43px; padding: 15px 0 42px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 12px; }
.related { padding-bottom: 50px; }
.simple-page { max-width: 760px; margin: 0 auto; padding: 42px 0 65px; }
.simple-page h1 { overflow-wrap: anywhere; margin: 10px 0 24px; font: 700 clamp(34px, 4vw, 52px)/1.1 var(--font); letter-spacing: -.04em; }

.site-footer { padding: 27px 0 18px; border-top: 1px solid var(--rule); background: #fff; }
.footer-main { display: flex; justify-content: space-between; gap: 35px; padding-bottom: 24px; }
.footer-brand { font-weight: 700; font-size: 17px; line-height: 1.2; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 20px; }
.footer-links a { font-size: 12px; }
.footer-bottom { padding-top: 13px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 11px; }
.fnbdf307-h { color: #595959 !important; opacity: 1 !important; }

@media (max-width: 900px) {
  .wrap { width: min(calc(100% - 40px), 1300px); }
  .latest-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reading-list { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--rule); }
  .reading-list h3 { grid-column: 1 / -1; }
  .reading-list article { border: 0; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .primary-nav { display: none; height: auto; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul.wrap { display: block; height: auto; padding: 7px 0; }
  .primary-nav a { padding: 8px 0; }
  .menu-toggle { display: flex; position: absolute; left: 0; top: 50%; transform: translateY(-50%); }
}
@media (max-width: 600px) {
  .wrap { width: min(calc(100% - 32px), 1300px); }
  .masthead { min-height: 86px; }
  .wordmark { max-width: calc(100% - 100px); font-size: clamp(27px, 8vw, 34px); }
  .hero-image { height: 310px; }
  .hero-caption { padding: 13px 0 17px; }
  .hero-caption h1 { font-size: 25px; }
  .feed-section { padding-top: 21px; padding-bottom: 22px; }
  .section-head h2 { font-size: 24px; }
  .latest-layout, .card-grid, .card-grid.count-2 { grid-template-columns: 1fr; gap: 22px; }
  .card-grid.count-1 { max-width: none; }
  .card-image { aspect-ratio: 1.52; }
  .story-card h2, .story-card h3 { font-size: 21px; }
  .reading-list { display: block; padding-top: 14px; }
  .reading-list article { padding: 9px 0; border-bottom: 1px solid var(--rule); }
  .about-journal { display: block; padding-top: 20px; }
  .about-journal h2 { margin-bottom: 8px; }
  .article-header { padding: 30px 0 20px; }
  .article-header h1 { font-size: 35px; }
  .article-deck { font-size: 15px; }
  .article-hero { margin-bottom: 28px; }
  .entry-content { font-size: 16px; }
  .entry-content h2 { font-size: 27px; }
  .entry-content h3 { font-size: 22px; }
  .footer-main { display: block; }
  .footer-brand { margin-bottom: 17px; }
  .footer-links { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
