/*
Theme Name: Diario del Nazas
Theme URI: https://example.com/
Author: Codex
Description: Tema sencillo y compacto para un periodico local con dos sidebars, slider principal y secciones estilo magazine.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: diario-del-nazas
*/

:root {
  --site-width: 1200px;
  --sidebar-left: 116px;
  --sidebar-right: 270px;
  --gap: 18px;
  --border: #dcdcdc;
  --text: #1a1a1a;
  --muted: #666;
  --bg: #fafafa;
  --card: #fafafa;
  --accent: #e14829;
  --brand: #174072;
  --heading: "Georgia", "Times New Roman", serif;
  --body: "Arial", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.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;
}

.site-shell {
  max-width: calc(var(--site-width) + (var(--gap) * 2));
  margin: 0 auto;
  padding: 0 var(--gap) 28px;
}

.site-topbar {
  width: 100%;
  background: var(--brand);
  color: #fff;
}

.site-topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: calc(var(--site-width) + (var(--gap) * 2));
  margin: 0 auto;
  padding: 10px 20px;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.site-topbar-inner p {
  margin: 0;
}

.site-topbar-content {
  min-width: 0;
}

.site-topbar-phone {
  flex: 0 0 auto;
  text-align: right;
  white-space: nowrap;
}

.site-topbar a {
  color: #fff;
}

.site-topbar a:hover,
.site-topbar a:focus {
  color: var(--accent);
}

@media (max-width: 700px) {
  .site-topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-topbar-phone {
    text-align: left;
  }
}

.site-grid {
  display: grid;
  grid-template-columns: var(--sidebar-left) minmax(0, 1fr) var(--sidebar-right);
  gap: var(--gap);
  align-items: start;
}

.site-panel {
  background: var(--card);
  border: 0;
  box-shadow: none;
}

.site-header {
  padding: 0 0 10px;
  margin-bottom: var(--gap);
  text-align: center;
}

.site-branding {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.custom-logo-link {
  display: block;
  width: 100%;
}

.custom-logo-link img {
  width: 100%;
  max-width: none;
  max-height: none;
  height: auto;
}

.site-title {
  margin: 0;
  font-family: var(--heading);
  font-size: 2.2rem;
  line-height: 1.05;
}

.site-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.sidebar {
  padding: 0;
}

.sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar .widget + .widget {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.sidebar-left {
  position: sticky;
  top: 14px;
  padding: 0;
}

.sidebar-left .widget-title,
.sidebar-right .widget-title,
.banner-area .widget-title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-left .menu,
.sidebar-left .widget_nav_menu .menu {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-left a {
  display: block;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  text-align: center;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.sidebar-left a:hover,
.sidebar-left .current-menu-item > a {
  border-color: var(--accent);
  color: var(--accent);
}

.sidebar-right {
  padding-top: 2px;
}

.sidebar-right .widget,
.banner-area .widget {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.content-area {
  min-width: 0;
}

.slider {
  position: relative;
  overflow: hidden;
  margin-bottom: var(--gap);
  border-bottom: 1px solid var(--border);
}

.slider-track {
  display: flex;
  transition: transform 0.35s ease;
}

.slide {
  min-width: 100%;
  position: relative;
}

.slide-link {
  display: block;
}

.slide-image img {
  width: 100%;
  aspect-ratio: 1000 / 666;
  object-fit: cover;
}

.slide-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 18px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.78));
  color: #fff;
}

.magazine-category-label,
.entry-meta {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.slide-title {
  margin: 0;
  font-family: var(--heading);
  font-size: 1.85rem;
  line-height: 1.1;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

.slide-title,
.magazine-title,
.magazine-excerpt,
.post-teaser .entry-meta,
.entry-title,
.entry-content {
  text-transform: uppercase;
}

.slider-controls {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  z-index: 3;
  pointer-events: none;
}

.slider-buttons {
  display: contents;
}

.slider-button {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--brand);
  cursor: pointer;
  pointer-events: auto;
  transform: translateY(-50%);
  transition: color 0.2s ease, background-color 0.2s ease;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.slider-button:hover,
.slider-button:focus {
  color: #fff;
}

.slider-button[data-slider-prev] {
  left: 16px;
}

.slider-button[data-slider-next] {
  right: 16px;
}

.slider-dots {
  position: absolute;
  top: 16px;
  left: 50%;
  display: flex;
  gap: 8px;
  pointer-events: auto;
  transform: translateX(-50%);
}

.slider-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  cursor: pointer;
}

.slider-dot.is-active {
  background: var(--accent);
}

.magazine-section {
  padding: 0 0 16px;
  margin-bottom: var(--gap);
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.section-title {
  margin: 0;
  color: var(--brand);
  font-family: var(--heading);
  font-size: 1.45rem;
}

.section-title a,
.magazine-category-label,
.sidebar a,
.site-footer a {
  transition: color 0.2s ease, border-color 0.2s ease;
}

.magazine-category-label {
  color: var(--accent);
}

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

.magazine-card {
  min-width: 0;
}

.magazine-image-wrap {
  position: relative;
}

.magazine-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 8px;
}

.magazine-card-category {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  display: inline-block;
  padding: 5px 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.magazine-title {
  margin: 6px 0 0;
  font-family: var(--heading);
  font-size: 1.05rem;
  line-height: 1.2;
}

.magazine-excerpt {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.banner-area {
  padding: 8px 0 14px;
  margin-bottom: var(--gap);
  min-height: 90px;
}

.banner-placeholder {
  display: grid;
  place-items: center;
  min-height: 90px;
  border: 1px dashed #cfcfcf;
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
}

.entry-card,
.archive-list {
  padding: 0 0 18px;
}

.entry-title {
  margin: 10px 0 12px;
  font-family: var(--heading);
  font-size: 2rem;
  line-height: 1.08;
}

.entry-featured {
  margin-bottom: 18px;
}

.entry-featured img {
  width: 100%;
  aspect-ratio: 1000 / 666;
  object-fit: cover;
}

.entry-content p {
  margin-top: 0;
  margin-bottom: 1rem;
}

.entry-content,
.entry-content .wp-block-group,
.entry-content .wp-block-columns {
  color: var(--text);
}

.entry-content a {
  color: var(--accent);
}

.entry-content a:hover,
.entry-content a:focus {
  color: var(--brand);
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  margin: 1.4em 0 0.55em;
  color: var(--brand);
  font-family: var(--heading);
  line-height: 1.15;
}

.entry-content h1,
.entry-content h2 {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.2em;
}

.entry-content ul,
.entry-content ol {
  margin: 0 0 1.1rem 1.25rem;
  padding: 0;
}

.entry-content li {
  margin-bottom: 0.35rem;
}

.entry-content blockquote {
  margin: 1.4rem 0;
  padding: 0.9rem 1rem;
  background: #f7f7f7;
  border-left: 4px solid var(--brand);
  color: #2c2c2c;
}

.entry-content blockquote p:last-child {
  margin-bottom: 0;
}

.entry-content hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.8rem 0;
}

.entry-content table {
  width: 100%;
  margin-bottom: 1.3rem;
  border-collapse: collapse;
  background: #f8f8f8;
}

.entry-content th,
.entry-content td {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  text-align: left;
}

.entry-content th {
  color: #fff;
  background: var(--brand);
}

.entry-content code,
.entry-content pre {
  font-family: "Courier New", monospace;
}

.entry-content :not(pre) > code {
  padding: 0.12rem 0.35rem;
  background: #f1f3f5;
  color: var(--brand);
}

.entry-content pre {
  overflow-x: auto;
  margin-bottom: 1.3rem;
  padding: 1rem;
  background: #f1f3f5;
  border-left: 4px solid var(--accent);
  color: #223;
}

.post-list {
  display: grid;
  gap: 16px;
}

.post-teaser {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.post-teaser:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.post-teaser img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.site-footer {
  background: var(--brand);
  border-top: 0;
  color: #fff;
  font-size: 0.9rem;
}

.site-footer-inner {
  max-width: calc(var(--site-width) + (var(--gap) * 2));
  margin: 0 auto;
  padding: 18px 20px;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer a:hover,
.site-footer a:focus,
.sidebar a:hover,
.sidebar a:focus,
.section-title a:hover,
.section-title a:focus,
.magazine-category-label:hover,
.magazine-category-label:focus {
  color: var(--accent);
}

.nav-links,
.pagination {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

@media (max-width: 1100px) {
  .site-grid {
    grid-template-columns: 92px minmax(0, 1fr) 240px;
  }

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

@media (max-width: 860px) {
  .site-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-left {
    position: static;
    order: -1;
  }

  .sidebar-left .menu,
  .sidebar-left .widget_nav_menu .menu {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .post-teaser {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .site-shell {
    padding-right: 10px;
    padding-left: 10px;
  }

  .site-header {
    padding: 0 0 8px;
  }

  .slide-title,
  .entry-title {
    font-size: 1.45rem;
  }

  .magazine-grid,
  .sidebar-left .menu,
  .sidebar-left .widget_nav_menu .menu {
    grid-template-columns: 1fr;
  }

  .slide-caption {
    padding: 12px;
  }
}
