/*
Theme Name: Alevi Gundem v3
Theme URI: https://alevigundem.com
Author: Alevi Gundem
Description: A modern WordPress news theme for Alevi Gundem with headline layout, breaking news, dropdown menus, authors on the homepage, and category archives.
Version: 2.2.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: alevi-gundem
*/

:root {
  --ag-red: #d20f17;
  --ag-red-dark: #aa0b12;
  --ag-black: #101010;
  --ag-text: #151515;
  --ag-muted: #626262;
  --ag-line: #e5e5e5;
  --ag-bg: #f7f7f7;
  --ag-card: #ffffff;
  --ag-radius: 7px;
  --ag-shadow: 0 10px 28px rgba(0, 0, 0, .10);
  --ag-max: 1180px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ag-bg);
  color: var(--ag-text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--ag-red); }
img { display: block; height: auto; max-width: 100%; }

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.site-topbar,
.site-header-inner,
.site-nav-inner,
.site-main,
.site-footer-inner {
  margin: 0 auto;
  max-width: var(--ag-max);
  padding-left: 18px;
  padding-right: 18px;
}

.top-strip {
  background: #fff;
  border-bottom: 1px solid var(--ag-line);
  font-size: 13px;
}

.site-topbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 42px;
}

.top-links,
.social-links {
  align-items: center;
  display: flex;
  gap: 14px;
}

.top-links a {
  border-right: 1px solid #cfcfcf;
  line-height: 1;
  padding-right: 14px;
}

.top-links a:last-child { border-right: 0; padding-right: 0; }
.site-date { color: var(--ag-text); }
.social-links a { font-weight: 800; }

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--ag-line);
}

.site-header-inner {
  align-items: center;
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr minmax(360px, 540px);
  min-height: 96px;
}

.site-branding { min-width: 230px; }
.site-logo img { max-height: 72px; width: auto; }

.site-title {
  color: var(--ag-black);
  display: inline-block;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: .95;
}

.site-title .brand-red { color: var(--ag-red); }
.site-title .brand-domain { color: var(--ag-black); font-size: .58em; letter-spacing: 0; }

.site-description {
  color: var(--ag-muted);
  display: block;
  font-size: 14px;
  margin-top: 7px;
}

.header-breaking {
  align-items: center;
  border: 1px solid var(--ag-line);
  border-radius: var(--ag-radius);
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto auto;
  height: 42px;
  overflow: hidden;
}

.header-breaking strong {
  align-items: center;
  align-self: stretch;
  background: var(--ag-red);
  color: #fff;
  display: flex;
  font-size: 13px;
  padding: 0 14px;
  text-transform: uppercase;
}

.breaking-time {
  border-right: 1px solid var(--ag-line);
  color: var(--ag-muted);
  font-size: 13px;
  padding: 0 14px;
}

.breaking-title {
  overflow: hidden;
  padding: 0 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breaking-arrow {
  align-items: center;
  align-self: stretch;
  border-left: 1px solid var(--ag-line);
  display: flex;
  font-size: 22px;
  justify-content: center;
  width: 42px;
}

.site-nav {
  background: var(--ag-red);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-nav-inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 54px;
}

.menu-toggle {
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  display: none;
  font-size: 26px;
  font-weight: 900;
  padding: 10px 0;
}

.primary-menu,
.primary-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-menu {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.primary-menu li { position: relative; }

.primary-menu a {
  color: #fff;
  display: block;
  font-size: 14px;
  font-weight: 900;
  padding: 18px 15px;
  text-transform: uppercase;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current-menu-parent > a {
  background: var(--ag-red-dark);
  color: #fff;
}

.primary-menu .menu-item-has-children > a::after {
  content: "⌄";
  font-size: 13px;
  margin-left: 7px;
}

.primary-menu .sub-menu {
  background: #fff;
  border: 1px solid var(--ag-line);
  border-radius: var(--ag-radius);
  box-shadow: var(--ag-shadow);
  display: none;
  left: 0;
  min-width: 210px;
  padding: 8px;
  position: absolute;
  top: 100%;
  z-index: 60;
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
  display: block;
}

.primary-menu .sub-menu a {
  border-radius: 5px;
  color: var(--ag-text);
  font-size: 13px;
  padding: 10px 12px;
  text-transform: none;
}

.primary-menu .sub-menu a:hover {
  background: #f5f5f5;
  color: var(--ag-red);
}

.nav-search {
  color: #fff;
  font-size: 26px;
  line-height: 1;
  padding-left: 16px;
}

.site-main { padding-bottom: 46px; padding-top: 20px; }

.home-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) 240px;
}

.headline-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 2fr) minmax(230px, 1fr);
  margin-bottom: 24px;
}

.lead-story,
.side-headline,
.news-card,
.sidebar-widget,
.newsletter-band,
.post-content,
.archive-header,
.author-box,
.comments-area,
.comment-respond {
  background: var(--ag-card);
  border: 1px solid var(--ag-line);
  border-radius: var(--ag-radius);
}

.lead-story,
.side-headline,
.news-card {
  overflow: hidden;
}

.lead-story {
  min-height: 388px;
  position: relative;
}

.lead-story-image,
.side-headline-image,
.card-image {
  background: #ddd;
  display: block;
  overflow: hidden;
}

.lead-story-image {
  height: 388px;
}

.lead-story-image img,
.side-headline-image img,
.card-image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.lead-overlay,
.side-overlay {
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.78) 78%, rgba(0,0,0,.92) 100%);
  bottom: 0;
  color: #fff;
  left: 0;
  padding: 22px;
  position: absolute;
  right: 0;
}

.lead-story h1 {
  font-size: 28px;
  line-height: 1.24;
  margin: 10px 0 0;
}

.side-stack {
  display: grid;
  gap: 8px;
}

.side-headline {
  min-height: 124px;
  position: relative;
}

.side-headline-image {
  height: 124px;
}

.side-overlay {
  padding: 12px;
}

.side-headline h2 {
  font-size: 16px;
  line-height: 1.3;
  margin: 7px 0 0;
}

.section-label,
.card-category,
.post-category {
  background: var(--ag-red);
  border-radius: 3px;
  color: #fff;
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 6px 8px;
  text-transform: uppercase;
}

.entry-meta,
.card-meta {
  color: inherit;
  font-size: 13px;
}

.section-head {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin: 0 0 18px;
}

.section-head h2 {
  color: var(--ag-black);
  font-size: 20px;
  margin: 0;
  padding-bottom: 9px;
  position: relative;
  text-transform: uppercase;
}

.section-head h2::after {
  background: var(--ag-red);
  bottom: 0;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  width: 78px;
}

.section-head a {
  color: var(--ag-red);
  font-size: 13px;
  font-weight: 800;
  padding-bottom: 10px;
}

.card-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 32px;
}

.card-image {
  aspect-ratio: 16 / 10;
}

.card-body {
  padding: 12px 0 0;
}

.news-card {
  background: transparent;
  border: 0;
  border-radius: 0;
}

.news-card.compact {
  display: grid;
  gap: 10px;
  grid-template-columns: 72px minmax(0, 1fr);
}

.news-card.compact .card-image {
  aspect-ratio: 1 / 1;
  border-radius: 4px;
}

.card-title {
  font-size: 16px;
  line-height: 1.32;
  margin: 8px 0 5px;
}

.news-card.compact .card-title {
  font-size: 13px;
  margin: 0 0 4px;
}

.card-excerpt {
  color: var(--ag-muted);
  font-size: 14px;
  margin: 0;
}

.authors-strip {
  margin-bottom: 32px;
}

.authors-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.author-tile {
  align-items: start;
  background: #fff;
  border: 1px solid var(--ag-line);
  border-radius: var(--ag-radius);
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  padding: 14px;
  text-align: center;
}

.author-avatar img,
.author-placeholder {
  border-radius: 50%;
  height: 64px;
  margin: 0 auto;
  width: 64px;
}

.author-placeholder {
  background: linear-gradient(135deg, var(--ag-red), #222);
}

.author-tile h3 {
  font-size: 16px;
  line-height: 1.25;
  margin: 0 0 4px;
}

.author-tile p {
  color: var(--ag-muted);
  font-size: 13px;
  margin: 0;
}

.sidebar {
  align-content: start;
  display: grid;
  gap: 20px;
}

.sidebar-widget {
  overflow: hidden;
}

.sidebar-widget h2,
.sidebar-widget h3 {
  background: var(--ag-red);
  color: #fff;
  font-size: 15px;
  margin: 0;
  padding: 11px 13px;
  text-transform: uppercase;
}

.sidebar-widget ul,
.sidebar-widget ol {
  list-style: none;
  margin: 0;
  padding: 10px 12px;
}

.sidebar-widget li {
  border-bottom: 1px solid var(--ag-line);
  padding: 9px 0;
}

.sidebar-widget li:last-child { border-bottom: 0; }

.sidebar-widget a {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.featured-list li {
  align-items: center;
  display: flex;
  gap: 9px;
}

.featured-list li::before {
  background: var(--ag-red);
  border-radius: 50%;
  color: #fff;
  content: "✓";
  flex: 0 0 15px;
  font-size: 10px;
  font-weight: 900;
  height: 15px;
  line-height: 15px;
  text-align: center;
  width: 15px;
}

.newsletter-band {
  align-items: center;
  background: linear-gradient(135deg, #111, #222);
  color: #fff;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr minmax(320px, .9fr);
  margin-bottom: 32px;
  padding: 22px;
}

.newsletter-band h2 {
  font-size: 18px;
  margin: 0 0 4px;
}

.newsletter-band p {
  color: #e0e0e0;
  margin: 0;
}

.newsletter-form {
  display: grid;
  grid-template-columns: 1fr 130px;
}

.newsletter-form input,
.newsletter-form button {
  border: 0;
  font: inherit;
  min-height: 48px;
}

.newsletter-form input {
  border-radius: 4px 0 0 4px;
  padding: 0 14px;
}

.newsletter-form button {
  background: var(--ag-red);
  border-radius: 0 4px 4px 0;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.post-content {
  padding: 24px;
}

.layout-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.post-title,
.archive-title {
  font-size: 36px;
  line-height: 1.15;
  margin: 8px 0 12px;
}

.post-thumbnail {
  border-radius: var(--ag-radius);
  margin: 18px 0;
  overflow: hidden;
}

.entry-content {
  font-size: 18px;
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote {
  margin-bottom: 1.2em;
}

.author-box,
.archive-header,
.comments-area,
.comment-respond {
  margin-top: 20px;
  padding: 18px;
}

.archive-header {
  margin-bottom: 20px;
  margin-top: 0;
}

.pagination {
  margin-top: 24px;
  text-align: center;
}

.pagination .page-numbers {
  background: #fff;
  border: 1px solid var(--ag-line);
  border-radius: 5px;
  display: inline-block;
  margin: 3px;
  padding: 8px 11px;
}

.pagination .current {
  background: var(--ag-red);
  border-color: var(--ag-red);
  color: #fff;
}

.site-footer {
  background: #111;
  color: #fff;
  margin-top: 34px;
}

.site-footer-inner {
  display: grid;
  gap: 24px;
  grid-template-columns: 1.2fr .8fr .8fr;
  padding-bottom: 34px;
  padding-top: 34px;
}

.site-footer a,
.site-footer p {
  color: #d8d8d8;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.14);
  color: #bbb;
  font-size: 13px;
  padding: 14px 18px;
  text-align: center;
}

@media (max-width: 1040px) {
  .site-header-inner,
  .home-grid,
  .headline-grid,
  .layout-grid,
  .newsletter-band,
  .site-footer-inner {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .authors-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 9px;
    padding-top: 9px;
  }

  .site-title { font-size: 32px; }
  .header-breaking { grid-template-columns: auto 1fr auto auto; }
  .breaking-time { display: none; }

  .menu-toggle { display: block; }
  .site-nav-inner { align-items: stretch; flex-direction: column; }
  .primary-menu { display: none; flex-direction: column; width: 100%; }
  .primary-menu.is-open { display: flex; }
  .primary-menu a { border-top: 1px solid rgba(255,255,255,.18); padding: 13px 0; }
  .primary-menu .sub-menu {
    background: var(--ag-red-dark);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: block;
    left: auto;
    padding: 0 0 0 18px;
    position: static;
  }
  .primary-menu .sub-menu a { color: #fff; }
  .nav-search { display: none; }

  .lead-story-image,
  .lead-story { height: auto; min-height: 320px; }
  .lead-story-image { height: 320px; }
  .lead-story h1 { font-size: 23px; }
  .card-grid,
  .authors-grid { grid-template-columns: 1fr; }
  .newsletter-form { grid-template-columns: 1fr; }
  .newsletter-form input,
  .newsletter-form button { border-radius: 4px; }
}
