/*
Theme Name: mandalatimes.com
Version: 8.0.0
Requires at least: 6.0
Requires PHP: 8.2
License: GPL-2.0-or-later
*/

/* ---------- Tokens (The Verge Style) ---------- */
:root {
    --verge-magenta: #ff00ff; /* Neon Pink */
    --verge-cyan:    #00ffff; /* Neon Cyan */
    --verge-purple:  #5a00ff; /* Deep Purple */
    --ink:           #ffffff; /* White text on dark bg */
    --ink-light:     #cccccc; /* Gray text for excerpts */
    --paper:         #000000; /* Pure black background */
    --paper-2:       #111111; /* Slightly lighter black for cards */
    --rule:          #333333; /* Dark gray borders */
    --rule-strong:   #555555; /* Medium gray borders */
    --muted:         #888888; /* Captions, meta */
    --maxw:          1300px;
    --font-heading:  "Space Grotesk", -apple-system, sans-serif;
    --font-body:     "Inter", -apple-system, sans-serif;
    --font-ui:       "Inter", -apple-system, sans-serif;
}

/* ---------- Reset & Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--paper); color: var(--ink);
    font-family: var(--font-body); font-size: 18px; line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; border: 1px solid var(--rule); }
a { color: var(--ink); text-decoration: none; transition: 0.2s; }
a:hover { color: var(--verge-magenta); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Utility / Faces ---------- */
.kicker, .site-nav, .meta, .tag, .masthead__date, .masthead__cta { font-family: var(--font-ui); }

/* ---------- Masthead (Header Verge Style) ---------- */
.masthead {
    background: var(--paper);
    border-bottom: 2px solid var(--rule-strong);
    position: sticky; top: 0; z-index: 100;
}
.masthead__top {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid var(--rule);
}
.masthead__date { font-size: 13px; color: var(--verge-cyan); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }

.masthead__brand { padding: 25px 0; display: flex; align-items: center; }
.masthead__brand a { color: var(--ink); text-decoration: none; display: inline-block; }
.masthead__logo {
    font-family: var(--font-heading); font-weight: 900; font-size: clamp(32px, 5vw, 48px);
    letter-spacing: -0.05em; margin: 0; line-height: 1; text-transform: uppercase;
}
.masthead__logo .dot { color: var(--verge-magenta); }

/* ---------- Header Search Form ---------- */
.masthead__search { display: flex; align-items: center; }
.masthead__search .search-field {
    font-family: var(--font-ui); font-size: 13px; padding: 8px 12px;
    border: 1px solid var(--rule); background: var(--paper-2); color: var(--ink);
    border-radius: 0; outline: none; transition: border 0.2s;
}
.masthead__search .search-field:focus { border-color: var(--verge-cyan); }
.masthead__search .search-submit {
    font-family: var(--font-ui); font-size: 13px; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.05em; background: var(--verge-cyan); color: #000;
    padding: 9px 16px; border: 1px solid var(--verge-cyan); border-radius: 0; cursor: pointer;
}
.masthead__search .search-submit:hover { background: var(--verge-magenta); border-color: var(--verge-magenta); color: #fff; }

/* ---------- Primary nav ---------- */
.site-nav { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-nav ul {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap;
    max-width: var(--maxw); margin-inline: auto;
}
.site-nav a {
    display: block; color: var(--ink); text-decoration: none;
    font-size: 14px; font-weight: 800; padding: 15px 25px; border-right: 1px solid var(--rule);
    text-transform: uppercase; letter-spacing: 0.05em; transition: all 0.2s;
}
.site-nav li:first-child a { border-left: 1px solid var(--rule); }
.site-nav a:hover, .site-nav .current-menu-item > a { background: var(--verge-magenta); color: #000; }

/* ---------- Layout grid ---------- */
.layout {
    display: grid; grid-template-columns: 1fr 340px; gap: 40px;
    padding: 40px 0 80px;
}

/* ---------- Lead / hero story ---------- */
.lead { margin-bottom: 40px; display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); gap: 30px; align-items: center; border: 1px solid var(--rule); padding: 30px; background: var(--paper-2); transition: border 0.3s;}
.lead:hover { border-color: var(--verge-magenta); }
.lead__media { order: 2; min-width: 0; aspect-ratio: 4 / 3; overflow: hidden; }
.lead__media a { display: block; width: 100%; height: 100%; }
.lead__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.lead__body { order: 1; }
.lead__title {
    font-family: var(--font-heading); font-weight: 800; font-size: clamp(26px, 2.7vw, 34px);
    line-height: 1.08; letter-spacing: -0.035em; margin: 12px 0 16px; text-transform: uppercase;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden;
}
.lead__title a { color: var(--ink); }
.lead__title a:hover { color: var(--verge-magenta); text-decoration: none; }
.lead__standfirst { font-size: 15px; color: var(--ink-light); margin: 0 0 16px; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }

/* ---------- Kicker ---------- */
.kicker {
    display: inline-block; font-size: 11px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.1em; color: #000; background: var(--verge-magenta);
    padding: 4px 8px; margin-bottom: 10px;
}

/* ---------- Story grid ---------- */
.story-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { border: 1px solid var(--rule); padding: 20px; background: var(--paper-2); display: flex; flex-direction: column; transition: border 0.3s; }
.card:hover { border-color: var(--verge-cyan); }
.card__media { order: -1; margin-bottom: 15px; }
.card__title {
    font-family: var(--font-heading); font-weight: 800; font-size: 24px; line-height: 1.15;
    letter-spacing: -0.02em; margin: 0 0 12px; text-transform: uppercase;
}
.card__title a { color: var(--ink); }
.card__title a:hover { color: var(--verge-cyan); }
.card__excerpt { font-size: 15px; color: var(--ink-light); margin-bottom: 15px; flex-grow: 1; }

/* ---------- Photo stand-ins ---------- */
.ph { position: relative; aspect-ratio: 16 / 9; background: var(--rule); overflow: hidden; }
.ph--tall { aspect-ratio: 4 / 5; }

/* ---------- Meta line ---------- */
.meta { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }

/* ---------- Section heads ---------- */
.section-head { margin: 0 0 20px; border-bottom: 1px solid var(--rule); padding-bottom: 10px; }
.section-head h2 { font-family: var(--font-heading); font-weight: 800; font-size: 24px; margin: 0; color: var(--ink); text-transform: uppercase; letter-spacing: -0.02em; }

/* ---------- Sidebar ---------- */
.sidebar { padding-top: 0; }
.widget { margin-bottom: 40px; border: 1px solid var(--rule); padding: 25px; background: var(--paper-2); }
.widget__title {
    font-family: var(--font-heading); font-weight: 800; font-size: 18px; text-transform: uppercase;
    letter-spacing: 0.05em; margin: 0 0 20px; color: var(--verge-cyan); border-bottom: 1px solid var(--rule); padding-bottom: 10px;
}
.most-read { list-style: none; margin: 0; padding: 0; counter-reset: mr; }
.most-read li {
    display: grid; grid-template-columns: 25px 1fr; gap: 10px;
    padding: 15px 0; border-bottom: 1px solid var(--rule); align-items: start;
}
.most-read li:last-child { border-bottom: none; padding-bottom: 0; }
.most-read__rank {
    counter-increment: mr; font-family: var(--font-heading); font-weight: 800; font-size: 16px; color: var(--verge-magenta);
}
.most-read__rank::before { content: "0" counter(mr); }
.most-read a { font-family: var(--font-heading); font-weight: 700; font-size: 16px; line-height: 1.25; color: var(--ink); text-transform: uppercase; }
.most-read a:hover { color: var(--verge-magenta); }

/* ---------- Single article ---------- */
.article { max-width: 100%; margin: 0; padding: 20px 0 80px; }
.article__title {
    font-family: var(--font-heading); font-weight: 900; font-size: clamp(38px, 6vw, 60px); line-height: 1;
    letter-spacing: -0.03em; margin: 15px 0 25px; text-transform: uppercase;
}
.article__standfirst { font-size: 22px; color: var(--ink-light); margin: 0 0 30px; line-height: 1.4; }
.article__meta {
    display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
    margin-bottom: 40px; padding: 15px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.article__meta span { font-family: var(--font-ui); font-size: 13px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.article__body p { margin: 0 0 1.6em; font-size: 19px; color: var(--ink); line-height: 1.7; }
.article__body h2, .article__body h3 { font-family: var(--font-heading); font-weight: 800; margin-top: 1.8em; margin-bottom: 0.8em; font-size: 28px; text-transform: uppercase; color: var(--verge-cyan); }
.article__body blockquote {
    margin: 2em 0; padding: 20px 30px; border-left: 5px solid var(--verge-magenta); background: var(--paper-2);
    font-size: 22px; font-weight: 600; font-style: italic; color: var(--ink); font-family: var(--font-heading);
}

/* ---------- Footer ---------- */
.site-footer { background: var(--paper-2); color: #ffffff; padding: 60px 0 40px; border-top: 2px solid var(--rule-strong); }
.footer-cols { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px; border-bottom: 1px solid var(--rule); padding-bottom: 40px;}
.footer-brand .masthead__logo { color: #fff; font-size: 40px; }
.footer-cols h4 { font-family: var(--font-ui); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--verge-magenta); margin: 0 0 20px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin-bottom: 12px; }
.footer-cols a { color: #aaaaaa; font-family: var(--font-ui); font-size: 14px; font-weight: 600; text-transform: uppercase; }
.footer-cols a:hover { color: var(--verge-cyan); }
.site-footer__legal { margin-top: 30px; font-family: var(--font-ui); font-size: 12px; color: #555; text-align: center; text-transform: uppercase; }

/* ---------- Pagination ---------- */
.pagination { padding: 40px 0; border-top: 1px solid var(--rule); display: flex; gap: 10px; }
.pagination a, .pagination .current {
    font-family: var(--font-ui); font-weight: 700; font-size: 14px; padding: 10px 18px;
    border: 1px solid var(--rule); color: var(--ink); background: var(--paper-2); text-transform: uppercase;
}
.pagination .current { background: var(--verge-magenta); color: #000; border-color: var(--verge-magenta); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .layout { grid-template-columns: 1fr; gap: 40px; }
    .lead { grid-template-columns: 1fr; }
    .lead__media { order: -1; width: 100%; aspect-ratio: 4 / 3; }
    .story-grid { grid-template-columns: 1fr; }
    .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .masthead__logo { font-size: 36px; }
    .footer-cols { grid-template-columns: 1fr; }
}