/*
Theme Name: Search Magazine
Description: Theme for the Search Media community magazines (Search Aurora South, Search Parker, Search Castle Rock) — monthly issue, articles, community calendar, advertisers and business directory.
Version: 2.5.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: search-aurora-south
*/

:root {
  --purple-900: #371563;
  --purple: #51218F;
  --purple-100: #EDE6F5;
  --teal-900: #2A535B;
  --teal: #69A4B2;
  --teal-600: #3F7984;
  --teal-100: #E6EFF1;
  --cream: #FAF8F5;
  --ink: #1E1B1A;
  --ink-soft: #52504D;
  --gray-500: #6B6864;
  --gray-200: #E5E2DC;
  --white: #FFFFFF;
  --radius-lg: 16px;
  --shadow-sm: 0 4px 14px rgba(30,20,10,0.08);
  --shadow-md: 0 14px 32px rgba(30,20,10,0.14);
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-body); color: var(--ink); background: var(--cream); line-height: 1.55; font-size: 16px; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
.entry-content a { color: var(--purple); text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); margin: 0 0 0.4em; line-height: 1.15; font-weight: 600; }
p { margin: 0 0 1em; color: var(--ink-soft); }
.container { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.screen-reader-text { position: absolute; left: -9999px; }

/* Header */
.site-header { background: var(--white); border-bottom: 3px solid var(--ink); padding: 16px 0; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-logo { font-family: var(--font-head); font-weight: 700; line-height: 1.05; }
.site-logo .search { color: var(--ink); font-weight: 400; font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase; display: block; }
.site-logo .aurora { color: var(--purple); font-size: 1.7rem; font-weight: 800; }
.site-logo img { max-height: 60px; width: auto; }
.nav-toggle { display: none; background: none; border: 2px solid var(--ink); border-radius: 8px; padding: 6px 12px; font-weight: 700; font-size: 0.8rem; cursor: pointer; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; flex-wrap: wrap; }
.main-nav a { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); padding-bottom: 3px; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a { color: var(--purple); border-color: var(--purple); }

/* Banner ad strip */
.ad-strip { background: var(--teal-100); border-bottom: 1px solid var(--gray-200); padding: 10px 0; }
.ad-strip .container { display: flex; justify-content: center; }
.ad-rotator { width: 100%; max-width: 728px; position: relative; }
.ad-rotator .ad-slide { display: none; }
.ad-rotator .ad-slide.active { display: block; }
.ad-rotator .ad-slide img { margin: 0 auto; max-height: 90px; width: auto; }
.ad-placeholder { height: 90px; background: repeating-linear-gradient(135deg, var(--white), var(--white) 10px, #F0EEE9 10px, #F0EEE9 20px); border: 1px dashed var(--gray-500); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; color: var(--gray-500); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; text-align: center; padding: 0 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 999px; font-weight: 700; font-size: 0.85rem; cursor: pointer; border: 2px solid transparent; margin: 4px 6px 4px 0; }
.btn-purple { background: var(--purple); color: var(--white); }
.btn-purple:hover { background: var(--purple-900); }
.btn-outline-white { border-color: rgba(255,255,255,0.5); color: var(--white); }
.btn-outline-purple { border-color: var(--purple); color: var(--purple); }
.btn-sm { padding: 7px 14px; font-size: 0.72rem; }

/* Issue hero */
/* The home banner uses the magazine's main color (Brand settings), white text on it. */
.issue-hero { background: linear-gradient(180deg, var(--purple) 0%, var(--purple-900) 100%); color: var(--white); }
.issue-hero .btn-purple { background: var(--white); color: var(--purple); }
.issue-hero .btn-purple:hover { background: var(--purple-100); }
.issue-hero .container { padding: 46px 22px 44px; display: grid; grid-template-columns: 200px 1fr; gap: 34px; align-items: center; }
.cover { aspect-ratio: 3/4; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-md); border: 4px solid var(--white); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-mock { height: 100%; background: linear-gradient(160deg, var(--purple) 0%, var(--purple-900) 100%); display: flex; flex-direction: column; justify-content: space-between; padding: 14px; color: var(--white); }
.cover-mock .badge { align-self: flex-start; background: var(--teal-900); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.08em; padding: 4px 8px; border-radius: 4px; text-transform: uppercase; }
.cover-mock .word { font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; line-height: 1; }
.cover-mock .word small { display: block; font-size: 0.55rem; font-weight: 400; letter-spacing: 0.25em; margin-bottom: 4px; }
.eyebrow { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; display: block; margin-bottom: 8px; color: var(--teal-600); }
.issue-hero .eyebrow { color: var(--teal-100); }
.issue-hero h1 { color: var(--white); font-size: 2rem; margin-bottom: 10px; }
.issue-hero p { color: rgba(255,255,255,0.78); max-width: 480px; }

/* Sections */
.section { padding: 48px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px; flex-wrap: wrap; gap: 8px; }
.section-head h2 { font-size: 1.5rem; margin: 0; }
.section-head .more { font-size: 0.8rem; font-weight: 700; color: var(--purple); }

.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.article-card { background: var(--white); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.article-card .thumb { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--teal-100), #D7E6E9); overflow: hidden; }
.article-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-card .body { padding: 18px 20px 22px; }
.article-card .tag { color: var(--teal-600); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.article-card h3 { font-size: 1.05rem; margin: 6px 0 8px; }
.article-card p { font-size: 0.88rem; margin-bottom: 0; }

.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 26px; }
.panel { background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--gray-200); padding: 26px; box-shadow: var(--shadow-sm); }
.panel h2 { font-size: 1.2rem; }

.event-row { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--gray-200); align-items: center; }
.event-row:last-child { border-bottom: none; }
.event-date { background: var(--teal-100); color: var(--teal-900); border-radius: 8px; width: 52px; height: 52px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-size: 0.95rem; line-height: 1; }
.event-date span { font-size: 0.6rem; font-weight: 700; margin-top: 3px; }
.event-row h4 { font-size: 0.95rem; margin: 0 0 2px; }
.event-row p { font-size: 0.82rem; margin: 0; }
.empty-note { font-size: 0.88rem; color: var(--gray-500); font-style: italic; }

/* Page hero */
.page-hero { background: var(--teal); padding: 44px 0 40px; }
.page-hero .eyebrow { color: var(--teal-900); }
.page-hero h1 { margin-bottom: 8px; }
.page-hero p { color: rgba(30,27,26,0.78); max-width: 560px; margin: 0; }

/* Advertisers */
.advertiser-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.advertiser-card { background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm); padding: 24px; display: flex; gap: 18px; align-items: flex-start; }
.logo-box { width: 74px; height: 74px; border-radius: 12px; background: var(--teal-100); color: var(--teal-900); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.7rem; flex-shrink: 0; overflow: hidden; }
.logo-box img { width: 100%; height: 100%; object-fit: contain; }
.advertiser-card .content { flex: 1; }
.advertiser-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.cat { font-size: 0.7rem; font-weight: 700; color: var(--teal-600); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; display: block; }
.advertiser-card p { font-size: 0.88rem; margin-bottom: 10px; }

/* Directory */
.dir-cat { margin-bottom: 34px; }
.dir-cat h3 { color: var(--teal-900); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 2px solid var(--teal-600); padding-bottom: 8px; margin-bottom: 16px; font-family: var(--font-body); font-weight: 800; }
.dir-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px; }
.dir-item { padding: 12px 0; border-bottom: 1px solid var(--gray-200); }
.dir-item.advertiser { padding-left: 14px; border-left: 3px solid var(--purple); }
.dir-item .name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dir-item h4 { font-size: 0.95rem; margin: 0; }
.badge-adv { background: var(--purple); color: var(--white); font-size: 0.6rem; font-weight: 800; letter-spacing: 0.04em; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; }
.dir-item p { font-size: 0.82rem; margin: 3px 0 0; }
.dir-search { margin-bottom: 28px; }
.dir-search input { width: 100%; max-width: 420px; padding: 11px 16px; border: 1px solid var(--gray-200); border-radius: 999px; font: inherit; font-size: 0.9rem; background: var(--white); }

/* Generic content */
.entry { background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--gray-200); padding: 34px; box-shadow: var(--shadow-sm); max-width: 820px; margin: 0 auto; }
.entry-content { color: var(--ink-soft); }
.entry-content img { border-radius: 10px; margin: 1em 0; }
.entry-meta { font-size: 0.8rem; color: var(--gray-500); margin-bottom: 18px; }
.featured { margin: -34px -34px 26px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; }
.pagination { margin-top: 30px; display: flex; gap: 8px; justify-content: center; }
.pagination .page-numbers { padding: 8px 14px; border-radius: 999px; background: var(--white); border: 1px solid var(--gray-200); font-weight: 700; font-size: 0.85rem; }
.pagination .current { background: var(--purple); color: var(--white); border-color: var(--purple); }

/* Footer */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.7); padding: 40px 0; font-size: 0.85rem; margin-top: 10px; }
.site-footer .container { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer p { color: rgba(255,255,255,0.7); margin: 0; }
.site-footer .footer-brand { font-family: var(--font-head); color: var(--white); font-size: 1.2rem; font-weight: 700; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a:hover { color: var(--white); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .main-nav { display: none; width: 100%; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 12px; padding-top: 10px; }
}
@media (max-width: 720px) {
  .issue-hero .container { grid-template-columns: 1fr; }
  .issue-hero .cover { max-width: 200px; }
  .article-grid, .two-col, .advertiser-grid, .dir-grid { grid-template-columns: 1fr; }
  .entry { padding: 22px; }
  .featured { margin: -22px -22px 20px; }
}

/* ---- v2 additions ---- */
.ad-slot { width: 100%; max-width: 728px; margin: 0 auto; text-align: center; }
.ad-slot img { margin: 0 auto; max-width: 100%; height: auto; }
.ad-strip--content { background: transparent; border: 0; padding: 6px 0 24px; }
.ad-strip--footer { border-top: 1px solid var(--gray-200); }

.card-meta { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.card-meta .when { font-size: 0.68rem; color: var(--gray-500); font-weight: 600; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; align-items: center; }
.filters input[type=search], .filters select { padding: 11px 16px; border: 1px solid var(--gray-200); border-radius: 999px; font: inherit; font-size: 0.9rem; background: var(--white); }
.filters input[type=search] { flex: 1 1 260px; }
.filters .btn { margin: 0; }

.issue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 26px; }
.issue-card { display: block; text-align: center; }
.issue-card .cover { aspect-ratio: 3/4; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-md); border: 4px solid var(--white); transition: transform .15s; }
.issue-card:hover .cover { transform: translateY(-4px); }
.issue-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.issue-card h3 { font-size: 1rem; margin-top: 12px; }

.flipbook { background: var(--ink); border-radius: var(--radius-lg); overflow: hidden; height: 80vh; min-height: 480px; position: relative; }
.flipbook > div { height: 100%; }
.sas-pdf-frame { width: 100%; height: 100%; border: 0; }
.flipbook-actions { text-align: center; margin-top: 16px; }
.entry-back { margin-top: 24px; font-weight: 700; }
.entry-back a { color: var(--purple); }

.issue-hero .cover a { display: block; height: 100%; }
.logo-box { text-decoration: none; }

/* Business Directory Plugin */
.entry--wide { max-width: none; }
.sas-advertiser { border-left: 4px solid var(--purple) !important; padding-left: 14px !important; background: var(--purple-100); border-radius: 8px; }
.sas-specials-link { font-size: 0.75rem; font-weight: 700; color: var(--purple) !important; margin-left: 6px; }
.wpbdp-listing .badge-adv, .wpbdp-listing-excerpt .badge-adv { display: inline-block; margin: 0 0 6px; }

/* ---- v2.2 ---- */
.featured img { width: 100%; max-height: 480px; object-fit: cover; object-position: center 25%; }
.entry-content h2 { margin-top: 1.6em; font-size: 1.35rem; color: var(--purple); }
.entry-content h3 { margin-top: 1.4em; font-size: 1.1rem; }
.entry-content blockquote { margin: 0 0 1.5em; padding: 6px 0 6px 20px; border-left: 4px solid var(--teal); font-family: var(--font-head); font-size: 1.2rem; }
.entry-content blockquote p { color: var(--ink); margin-bottom: .3em; }
.entry-content blockquote cite { font-size: .8rem; font-style: normal; color: var(--gray-500); font-family: var(--font-body); }
.entry-content mark { background: var(--purple-100); color: var(--purple); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 6px; border-radius: 4px; }
.entry-content .guide-price { color: var(--teal-600); font-weight: 700; font-size: .85rem; }
.entry-content small { color: var(--gray-500); font-size: .8rem; }

/* ---- v2.3 masthead: matches the print cover ----
   Print uses Gotham Bold (AURORA) and Avenir Next Regular (SEARCH / SOUTH).
   Web stand-ins: Montserrat 700 and Nunito Sans 400. */
:root {
  --font-mast: "Montserrat", "Gotham", "Avenir Next", Arial, sans-serif;
  --font-mast-light: "Nunito Sans", "Avenir Next", Arial, sans-serif;
}
.masthead { display: inline-grid; grid-template-columns: auto; line-height: 1; }
.masthead .search,
.masthead .south {
  font-family: var(--font-mast-light);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-size: 0.26em;
}
.masthead .search { justify-self: start; margin: 0 0 0.12em 0.06em; }
.masthead .south { justify-self: end; margin: 0.16em -0.42em 0 0; } /* cancel trailing tracking */
.masthead .aurora {
  font-family: var(--font-mast);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  font-size: 1em;
  line-height: 0.82;
}

/* Header */
.site-logo { font-family: var(--font-mast); font-weight: 700; }
.site-logo .masthead { font-size: 2.6rem; color: var(--purple); }
.site-logo .masthead .search,
.site-logo .masthead .south { color: var(--ink); }
.site-logo .search, .site-logo .aurora { display: block; } /* reset v1 rules */

/* Footer */
.site-footer .footer-brand.masthead { font-size: 2rem; color: var(--white); margin-bottom: 10px; }

/* Fallback cover art */
.cover-mock .word.masthead { font-size: 2.1rem; color: var(--white); }
.cover-mock .word.masthead .search, .cover-mock .word.masthead .south { font-size: 0.24em; }
.issue-card .cover-mock .word.masthead { font-size: 2.4rem; }

@media (max-width: 860px) {
  .site-logo .masthead { font-size: 2.1rem; }
}
