/*
Theme Name: Gridlove Magazine
Theme URI: https://example.com/gridlove-magazine
Author: Local Studio
Description: A responsive editorial magazine theme inspired by bold, modular news layouts.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: gridlove-magazine
*/

:root {
  --gl-accent: #ed4b43; --gl-ink: #202226; --gl-muted: #8b9098;
  --gl-paper: #fff; --gl-canvas: #f2f3f5; --gl-line: #e9eaed; --gl-container: 1200px;
  --gl-display: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  --gl-body: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--gl-canvas); color: var(--gl-ink); font: 16px/1.65 var(--gl-body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gl-accent); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.site-shell { width: min(100%, var(--gl-container)); margin: 0 auto; background: var(--gl-paper); min-height: 100vh; box-shadow: 0 0 50px rgb(29 33 41 / 4%); }
.site-topline { min-height: 34px; padding: 7px 34px; display: flex; justify-content: space-between; align-items: center; background: #25272b; color: #d3d4d6; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.topline-links { display: flex; gap: 18px; }
.topline-links a:hover { color: #fff; }
.site-branding { min-height: 120px; padding: 25px 44px; display: flex; justify-content: center; align-items: center; border-bottom: 1px solid var(--gl-line); }
.custom-logo-link img { width: auto; max-height: 64px; }
.site-title { margin: 0; font: 54px/.95 var(--gl-display); letter-spacing: -.035em; text-transform: uppercase; }
.site-description { margin: 8px 0 0; color: var(--gl-muted); font-size: 11px; text-align: center; letter-spacing: .2em; text-transform: uppercase; }
.main-navigation { position: relative; z-index: 10; min-height: 54px; padding: 0 32px; display: flex; align-items: stretch; border-bottom: 3px solid var(--gl-ink); }
.primary-menu, .primary-menu ul { margin: 0; padding: 0; list-style: none; }
.primary-menu { display: flex; align-items: stretch; flex: 1; }
.primary-menu > li { position: relative; }
.primary-menu > li > a { height: 51px; padding: 0 15px; display: flex; align-items: center; font-size: 11px; font-weight: 800; letter-spacing: .085em; text-transform: uppercase; }
.primary-menu > li:hover > a, .primary-menu > li.current-menu-item > a { color: var(--gl-accent); }
.primary-menu .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; padding: 9px 0; background: var(--gl-ink); box-shadow: 0 15px 30px rgb(0 0 0 / 15%); }
.primary-menu li:hover > .sub-menu, .primary-menu li:focus-within > .sub-menu { display: block; }
.primary-menu .sub-menu a { display: block; padding: 9px 17px; color: #eee; font-size: 11px; }
.primary-menu .sub-menu a:hover { color: #fff; background: var(--gl-accent); }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.icon-button, .menu-toggle { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; border: 0; background: transparent; color: var(--gl-ink); }
.icon-button:hover, .menu-toggle:hover { color: var(--gl-accent); }
.search-panel { display: none; position: absolute; top: calc(100% + 3px); right: 0; width: min(100%, 420px); padding: 18px; background: #fff; box-shadow: 0 14px 28px rgb(0 0 0 / 12%); }
.search-panel.is-open { display: block; }
.search-form { display: flex; border: 1px solid var(--gl-line); }
.search-field { width: 100%; min-width: 0; padding: 12px 14px; border: 0; outline: 0; }
.search-submit { padding: 0 16px; border: 0; background: var(--gl-accent); color: #fff; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.menu-toggle { display: none; }
.main-content { padding: 32px 34px 70px; }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 36px; align-items: start; }
.content-layout.no-sidebar { grid-template-columns: 1fr; }
.content-primary { min-width: 0; }
.section-heading { margin: 0 0 22px; display: flex; justify-content: space-between; align-items: center; gap: 15px; border-bottom: 2px solid var(--gl-ink); }
.section-heading h1, .section-heading h2 { margin: 0; padding: 0 0 10px; font: 25px/.95 var(--gl-display); letter-spacing: -.015em; text-transform: uppercase; }
.section-kicker { color: var(--gl-accent); font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.hero-grid { display: grid; grid-template-columns: 1.55fr 1fr 1fr; grid-template-rows: 210px 210px; gap: 5px; margin-bottom: 42px; }
.hero-card { position: relative; min-width: 0; overflow: hidden; background: #d9dadd; color: #fff; }
.hero-card:first-child { grid-column: 1; grid-row: 1 / 3; }
.hero-card:nth-child(2) { grid-column: 2 / 4; }
.hero-card:nth-child(3) { grid-column: 2; }
.hero-card:nth-child(4) { grid-column: 3; }
.hero-card img, .card-image img, .horizontal-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.hero-card:hover img, .card-image:hover img, .horizontal-card:hover img { transform: scale(1.04); }
.hero-card::after { position: absolute; inset: 25% 0 0; background: linear-gradient(transparent, rgb(0 0 0 / 78%)); content: ""; pointer-events: none; }
.hero-copy { position: absolute; z-index: 1; right: 22px; bottom: 19px; left: 22px; }
.hero-card:not(:first-child) .hero-copy { right: 15px; bottom: 13px; left: 15px; }
.category-label { display: inline-block; margin-bottom: 7px; color: #fff; background: var(--gl-accent); padding: 3px 7px; font-size: 9px; font-weight: 800; letter-spacing: .1em; line-height: 1.4; text-transform: uppercase; }
.hero-copy h2 { max-width: 600px; margin: 0; color: #fff; font: 31px/1.04 var(--gl-display); letter-spacing: -.015em; text-transform: uppercase; }
.hero-card:not(:first-child) h2 { font-size: 20px; }
.hero-meta { margin-top: 8px; color: rgb(255 255 255 / 80%); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.section-block { margin: 0 0 43px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 25px 20px; }
.post-card { min-width: 0; }
.card-image { position: relative; display: block; aspect-ratio: 1.34; margin-bottom: 12px; overflow: hidden; background: #ececef; }
.card-cover-link { position: absolute; z-index: 0; inset: 0; }
.card-image img { position: absolute; inset: 0; }
.card-image .category-label { position: absolute; z-index: 1; bottom: 9px; left: 9px; margin: 0; }
.post-card h3 { margin: 0 0 7px; font: 20px/1.1 var(--gl-display); letter-spacing: -.01em; text-transform: uppercase; }
.post-excerpt { margin: 0 0 9px; color: #70757d; font-size: 12px; line-height: 1.65; }
.post-meta { display: flex; flex-wrap: wrap; gap: 5px 10px; color: var(--gl-muted); font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.post-meta a:hover { color: var(--gl-accent); }
.meta-author { color: var(--gl-ink); }
.editor-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.editor-pick { position: relative; min-height: 240px; overflow: hidden; background: #ddd; color: #fff; }
.editor-pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.editor-pick:hover img { transform: scale(1.04); }
.editor-pick::after { position: absolute; inset: 20% 0 0; content: ""; background: linear-gradient(transparent, rgb(0 0 0 / 76%)); }
.editor-pick .hero-copy { bottom: 17px; }
.editor-pick h3 { margin: 0; color: #fff; font: 24px/1.05 var(--gl-display); text-transform: uppercase; }
.latest-layout { display: grid; grid-template-columns: 1fr; }
.post-list { display: grid; gap: 18px; }
.horizontal-card { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 15px; padding-bottom: 18px; border-bottom: 1px solid var(--gl-line); }
.horizontal-card .card-image { aspect-ratio: 1.3; margin: 0; }
.horizontal-card .card-image .category-label { display: none; }
.horizontal-card h3 { margin: 1px 0 6px; font: 19px/1.08 var(--gl-display); text-transform: uppercase; }
.sidebar { min-width: 0; }
.widget { margin: 0 0 30px; }
.widget-title { margin: 0 0 15px; padding-bottom: 9px; border-bottom: 2px solid var(--gl-ink); font: 18px/.95 var(--gl-display); text-transform: uppercase; }
.social-links { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.social-links li { min-width: 0; list-style: none; }
.social-links a { display: block; padding: 9px; background: #25272b; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.social-links a:hover { background: var(--gl-accent); }
.mini-post { display: grid; grid-template-columns: 76px 1fr; gap: 11px; margin-bottom: 12px; align-items: center; }
.mini-post img { width: 76px; height: 58px; object-fit: cover; background: #eee; }
.mini-post h4 { margin: 0; font: 14px/1.08 var(--gl-display); text-transform: uppercase; }
.newsletter { padding: 20px; background: #f5f5f6; border-top: 3px solid var(--gl-accent); }
.newsletter p { margin: -4px 0 14px; color: #737780; font-size: 12px; }
.newsletter input[type="email"] { width: 100%; padding: 10px; border: 1px solid #dfe0e3; background: #fff; }
.newsletter button { width: 100%; margin-top: 8px; padding: 10px; border: 0; background: var(--gl-ink); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.newsletter button:hover { background: var(--gl-accent); }
.sidebar-ad { display: grid; min-height: 230px; place-items: center; padding: 25px; background: #f6e7e3; color: #ba6357; font-size: 10px; letter-spacing: .18em; text-align: center; text-transform: uppercase; }
.load-more-wrap { margin: 27px 0; text-align: center; }
.load-more { min-width: 180px; padding: 12px 22px; border: 2px solid var(--gl-ink); background: #fff; color: var(--gl-ink); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.load-more:hover { border-color: var(--gl-accent); background: var(--gl-accent); color: #fff; }
.load-more[disabled] { opacity: .55; cursor: wait; }
.pagination { margin: 30px 0; display: flex; gap: 8px; justify-content: center; }
.pagination .page-numbers { min-width: 38px; padding: 8px 11px; border: 1px solid var(--gl-line); text-align: center; font-size: 12px; font-weight: 700; }
.pagination .current, .pagination a:hover { border-color: var(--gl-ink); background: var(--gl-ink); color: #fff; }
.archive-intro { margin: 0 0 25px; padding: 28px; background: #f6f6f7; border-left: 4px solid var(--gl-accent); }
.archive-intro p { margin: 8px 0 0; color: #717680; }
.single-header { max-width: 850px; margin: 0 auto 25px; text-align: center; }
.single-header h1 { margin: 8px 0 13px; font: clamp(36px, 5.3vw, 64px)/.98 var(--gl-display); letter-spacing: -.02em; text-transform: uppercase; }
.single-header .post-meta { justify-content: center; }
.single-featured { max-height: 600px; margin: 0 auto 30px; object-fit: cover; }
.entry-content { max-width: 760px; margin: 0 auto; font: 17px/1.9 Georgia, serif; color: #373a3f; }
.entry-content h2, .entry-content h3 { font-family: var(--gl-display); line-height: 1.1; text-transform: uppercase; }
.entry-content img { margin: 25px auto; }
.entry-content blockquote { margin: 28px 0; padding: 6px 24px; border-left: 4px solid var(--gl-accent); color: var(--gl-ink); font-size: 22px; font-style: italic; }
.author-box { max-width: 760px; margin: 35px auto; padding: 20px; display: flex; gap: 16px; background: #f5f5f6; align-items: center; }
.author-box img { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; }
.author-box p { margin: 3px 0 0; color: #727780; font-size: 13px; }
.comments-area { max-width: 760px; margin: 45px auto 0; }
.comments-area h2 { font: 24px var(--gl-display); text-transform: uppercase; }
.comment-list { padding-left: 22px; }
.comment-body { margin-bottom: 20px; padding: 18px; background: #f7f7f8; }
.comment-meta { color: var(--gl-muted); font-size: 11px; }
.comment-form input:not([type=submit]), .comment-form textarea { width: 100%; padding: 11px; border: 1px solid var(--gl-line); }
.comment-form p { margin-bottom: 12px; }
.comment-form input[type=submit] { padding: 11px 18px; border: 0; background: var(--gl-ink); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.page-header { margin-bottom: 25px; padding: 26px; background: #f5f5f6; }
.page-header h1 { margin: 0; font: 34px var(--gl-display); text-transform: uppercase; }
.site-footer { padding: 43px 40px 0; background: #232529; color: #c6c8cb; }
.footer-main { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.1fr; gap: 30px; padding-bottom: 37px; }
.footer-brand { margin: 0 0 12px; color: #fff; font: 31px/.95 var(--gl-display); text-transform: uppercase; }
.site-footer h3 { margin: 0 0 15px; color: #fff; font: 17px var(--gl-display); text-transform: uppercase; }
.site-footer p, .site-footer li { color: #aeb1b6; font-size: 12px; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin: 8px 0; }
.footer-bottom { min-height: 54px; margin: 0 -40px; padding: 15px 40px; display: flex; justify-content: space-between; gap: 15px; border-top: 1px solid #3c3f44; color: #888c92; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.footer-menu { display: flex; gap: 15px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { z-index: 99999; top: 8px; left: 8px; width: auto; height: auto; padding: 12px; clip: auto; background: #fff; }
.skip-link { position: absolute; z-index: 100; top: -100px; left: 12px; padding: 10px; background: #fff; }
.skip-link:focus { top: 12px; }
.is-loading { opacity: .5; }
.custom-header-minimal .site-topline { display: none; }
@media (max-width: 980px) {
  .main-content { padding: 26px 25px 55px; }
  .content-layout { grid-template-columns: minmax(0, 1fr) 245px; gap: 25px; }
  .latest-layout { grid-template-columns: 1fr; }
  .latest-layout .sidebar { display: none; }
  .hero-grid { grid-template-rows: 190px 190px; }
  .footer-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .site-topline { padding-right: 16px; padding-left: 16px; }
  .topline-links { gap: 10px; }
  .site-branding { min-height: 94px; padding: 18px; }
  .site-title { font-size: 42px; }
  .main-navigation { min-height: 52px; padding: 4px 14px; justify-content: space-between; }
  .menu-toggle { display: grid; width: auto; gap: 8px; grid-auto-flow: column; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  .primary-menu { display: none; position: absolute; top: 100%; right: 0; left: 0; padding: 7px 15px 12px; background: #24262a; box-shadow: 0 14px 24px rgb(0 0 0 / 12%); }
  .primary-menu.is-open { display: block; }
  .primary-menu > li > a { height: auto; min-height: 40px; padding: 0 8px; color: #fff; }
  .primary-menu .sub-menu { position: static; display: block; padding: 0 0 4px 12px; background: transparent; box-shadow: none; }
  .primary-menu .sub-menu a { padding: 7px 8px; color: #bfc1c5; }
  .content-layout { grid-template-columns: 1fr; }
  .content-layout > .sidebar { display: none; }
  .hero-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 260px 150px; }
  .hero-card:first-child { grid-column: 1 / 3; grid-row: 1; }
  .hero-card:nth-child(2) { grid-column: 1; grid-row: 2; }
  .hero-card:nth-child(3) { grid-column: 2; grid-row: 2; }
  .hero-card:nth-child(4) { display: none; }
  .hero-copy h2 { font-size: 27px; }
  .hero-card:not(:first-child) h2 { font-size: 16px; }
  .main-content { padding: 22px 17px 45px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 13px; }
  .post-card h3 { font-size: 17px; }
  .post-excerpt { font-size: 11px; }
  .editor-pick { min-height: 175px; }
  .editor-pick h3 { font-size: 18px; }
  .horizontal-card { grid-template-columns: 115px minmax(0, 1fr); gap: 11px; }
  .horizontal-card h3 { font-size: 16px; }
  .horizontal-card .post-excerpt { display: none; }
  .site-footer { padding: 32px 20px 0; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 22px; }
  .footer-bottom { margin: 0 -20px; padding: 14px 20px; flex-direction: column; }
}
@media (max-width: 420px) {
  .topline-links a:nth-child(n+3) { display: none; }
  .hero-grid { grid-template-rows: 230px 130px; }
  .hero-copy { right: 14px; bottom: 13px; left: 14px; }
  .hero-copy h2 { font-size: 23px; }
  .section-heading h1, .section-heading h2 { font-size: 22px; }
  .card-grid { gap: 17px 10px; }
  .card-image { margin-bottom: 8px; }
  .card-grid .post-meta { font-size: 8px; }
  .footer-main { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

