/*
Theme Name: Chicago Beautiful
Theme URI: https://chicago-beautiful.com
Author: Chicago Beautiful
Description: A city news and travel guide theme for Chicago. Features a large serif wordmark, scrolling news ticker, full-bleed hero, and a latest-news carousel — structurally matching the Seattle Beautiful site.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chicago-beautiful
Tags: news, blog, two-columns, custom-menu, featured-images, sticky-post
*/

/* =========================================================
   GOOGLE FONTS
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;0,900;1,400;1,700&family=Inter:wght@400;500;600;700&display=swap');

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --brand-blue: #0B3D91;
  --news-red:   #C41E3A;
  --gray-900:   #111111;
  --gray-800:   #1f2937;
  --gray-600:   #4b5563;
  --gray-500:   #6b7280;
  --gray-400:   #9ca3af;
  --gray-300:   #d1d5db;
  --gray-200:   #e5e7eb;
  --gray-100:   #f3f4f6;
  --white:      #ffffff;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--white);
  color: var(--gray-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
  color: var(--brand-blue);
}

ul {
  list-style: none;
}

/* =========================================================
   LAYOUT HELPERS
   ========================================================= */
.container {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* =========================================================
   SITE HEADER — Centered wordmark
   ========================================================= */
.site-header {
  background: var(--white);
  text-align: center;
  padding: 1.75rem 1.5rem 1.75rem;
  border-bottom: 1px solid var(--gray-200);
}

.site-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  color: var(--brand-blue);
  letter-spacing: -0.02em;
  line-height: 1;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-title a:hover {
  color: var(--brand-blue);
  opacity: 0.85;
}

.site-description {
  display: none; /* Hidden — title speaks for itself */
}

/* =========================================================
   PRIMARY NAVIGATION
   ========================================================= */
.main-navigation {
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
  position: relative;
  z-index: 100;
}

.main-navigation .nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}

.main-navigation ul {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
}

.main-navigation ul li {
  position: relative;
}

.main-navigation ul li a {
  display: block;
  padding: 0.5rem 0.85rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-800);
  white-space: nowrap;
  transition: color 0.15s ease;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a {
  color: var(--brand-blue);
}

/* Dropdown indicator */
.main-navigation ul li.menu-item-has-children > a::after {
  content: ' \25BE';
  font-size: 0.6rem;
}

/* Dropdown submenu */
.main-navigation ul li .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-top: 2px solid var(--brand-blue);
  min-width: 220px;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  flex-direction: column;
  gap: 0;
}

.main-navigation ul li:hover > .sub-menu,
.main-navigation ul li:focus-within > .sub-menu {
  display: flex;
}

.main-navigation ul li .sub-menu li a {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.7rem;
}

.main-navigation ul li .sub-menu li:last-child a {
  border-bottom: none;
}

/* Search icon */
.nav-search {
  border-left: 1px solid var(--gray-200);
  padding-left: 1rem;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.nav-search a {
  display: flex;
  align-items: center;
  color: var(--gray-900);
  transition: color 0.15s ease;
}

.nav-search a:hover {
  color: var(--brand-blue);
}

.nav-search svg {
  width: 1.1rem;
  height: 1.1rem;
}

/* Mobile menu button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--gray-900);
}

.menu-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Fallback nav for no-menu-assigned */
.nav-fallback {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-fallback a {
  display: block;
  padding: 0.5rem 0.85rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-800);
  white-space: nowrap;
  transition: color 0.15s ease;
}

.nav-fallback a:hover {
  color: var(--brand-blue);
}

/* =========================================================
   NEWS TICKER
   ========================================================= */
.news-ticker {
  background: var(--gray-900);
  color: var(--white);
  height: 2.5rem;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.ticker-label {
  background: var(--news-red);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
  z-index: 2;
}

.ticker-track-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
  will-change: transform;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-block;
  padding: 0 2rem;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.ticker-item a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.15s ease;
}

.ticker-item a:hover {
  color: #a8c4f0;
}

.ticker-date {
  color: var(--gray-400);
  margin-left: 0.4rem;
  font-size: 0.7rem;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* =========================================================
   HERO / FEATURED POST
   ========================================================= */
.hero-section {
  position: relative;
  width: 100%;
  height: 60vh;
  min-height: 420px;
  max-height: 800px;
  background: var(--gray-900);
  overflow: hidden;
  cursor: pointer;
}

@media (min-width: 768px) {
  .hero-section {
    height: 80vh;
  }
}

.hero-section a {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s ease;
}

.hero-section:hover .hero-image {
  transform: scale(1.04);
}

.hero-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0B3D91 0%, #1a1a2e 100%);
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
  padding: 2.5rem 1.5rem 2rem;
}

@media (min-width: 768px) {
  .hero-overlay {
    padding: 4rem 3rem 3rem;
  }
}

.hero-overlay-inner {
  max-width: 900px;
}

.hero-category {
  display: inline-block;
  background: var(--brand-blue);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 3.5rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero-meta {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.85);
  font-family: var(--font-sans);
}

/* =========================================================
   LATEST NEWS SECTION
   ========================================================= */
.latest-news-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--gray-100);
  padding-bottom: 1rem;
  margin-bottom: 2.5rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--gray-900);
}

.carousel-controls {
  display: flex;
  gap: 0.5rem;
}

.carousel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--gray-300);
  background: var(--white);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  color: var(--gray-900);
}

.carousel-btn:hover:not(:disabled) {
  background: var(--gray-900);
  color: var(--white);
  border-color: var(--gray-900);
}

.carousel-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.carousel-btn svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Carousel wrapper */
.carousel-viewport {
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.news-card {
  flex: 0 0 calc(100% - 0px);
  min-width: 0;
}

@media (min-width: 640px) {
  .news-card {
    flex: 0 0 calc(50% - 0.75rem);
  }
}

@media (min-width: 1024px) {
  .news-card {
    flex: 0 0 calc(33.333% - 1rem);
  }
}

@media (min-width: 1280px) {
  .news-card {
    flex: 0 0 calc(25% - 1.125rem);
  }
}

.news-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-image-wrap {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  margin-bottom: 1rem;
  background: var(--gray-200);
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.news-card a:hover .card-image-wrap img {
  transform: scale(1.05);
}

.card-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0B3D91 0%, #1e3a6e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-category {
  display: inline-block;
  background: var(--brand-blue);
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  margin-bottom: 0.75rem;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.35;
  margin-bottom: 0.5rem;
  transition: color 0.15s ease;
}

.news-card a:hover .card-title {
  color: var(--brand-blue);
}

.card-date {
  font-size: 0.7rem;
  color: var(--gray-500);
}

/* View All CTA */
.view-all-wrap {
  text-align: center;
  margin-top: 3rem;
  padding-bottom: 2rem;
}

.btn-view-all {
  display: inline-block;
  border: 2px solid var(--gray-900);
  color: var(--gray-900);
  background: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 1rem 2.5rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  text-decoration: none;
}

.btn-view-all:hover {
  background: var(--gray-900);
  color: var(--white);
}

/* =========================================================
   ARCHIVE / CATEGORY GRID
   ========================================================= */
.archive-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.archive-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.archive-description {
  color: var(--gray-600);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .posts-grid { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================================
   SINGLE POST
   ========================================================= */
.single-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.post-hero-image {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  margin-bottom: 2rem;
}

.single-category {
  display: inline-block;
  background: var(--brand-blue);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  margin-bottom: 1rem;
}

.single-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.single-meta {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--gray-200);
}

.single-meta a {
  color: var(--brand-blue);
}

.entry-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--gray-800);
}

.entry-content p { margin-bottom: 1.5em; }
.entry-content h2 { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 700; margin: 2em 0 0.75em; color: var(--gray-900); }
.entry-content h3 { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 700; margin: 1.75em 0 0.5em; color: var(--gray-900); }
.entry-content ul, .entry-content ol { margin: 0 0 1.5em 1.5em; padding: 0; }
.entry-content ul li { list-style: disc; margin-bottom: 0.4em; }
.entry-content ol li { list-style: decimal; margin-bottom: 0.4em; }
.entry-content a { color: var(--brand-blue); text-decoration: underline; }
.entry-content blockquote { border-left: 3px solid var(--brand-blue); padding-left: 1.5rem; margin: 1.5em 0; color: var(--gray-600); font-style: italic; }
.entry-content img { margin: 1.5em 0; border-radius: 0; }
.entry-content figure { margin: 1.5em 0; }
.entry-content figcaption { font-size: 0.8rem; color: var(--gray-500); text-align: center; margin-top: 0.5em; }

.post-tags {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
  font-size: 0.8rem;
}

.post-tags span { font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-right: 0.5rem; }
.post-tags a { color: var(--brand-blue); margin-right: 0.5rem; }

/* =========================================================
   PAGE TEMPLATE
   ========================================================= */
.page-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.page-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 800;
  margin-bottom: 2rem;
  color: var(--gray-900);
}

/* =========================================================
   SEARCH RESULTS
   ========================================================= */
.search-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.search-form-header {
  margin-bottom: 2.5rem;
}

.search-form-header h1 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--gray-900);
}

.search-form-wrap {
  display: flex;
  max-width: 600px;
}

.search-form-wrap input[type="search"] {
  flex: 1;
  border: 2px solid var(--gray-300);
  border-right: none;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  outline: none;
  font-family: var(--font-sans);
}

.search-form-wrap input[type="search"]:focus {
  border-color: var(--brand-blue);
}

.search-form-wrap button {
  background: var(--brand-blue);
  color: var(--white);
  border: 2px solid var(--brand-blue);
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.15s ease;
}

.search-form-wrap button:hover {
  background: #092f70;
  border-color: #092f70;
}

.no-results {
  color: var(--gray-600);
  font-size: 1rem;
  padding: 2rem 0;
}

/* =========================================================
   404 PAGE
   ========================================================= */
.error-404 {
  max-width: 600px;
  margin: 0 auto;
  padding: 6rem 1.5rem;
  text-align: center;
}

.error-404 .error-number {
  font-family: var(--font-serif);
  font-size: 8rem;
  font-weight: 800;
  color: var(--brand-blue);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-404 h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--gray-900);
}

.error-404 p {
  color: var(--gray-600);
  margin-bottom: 2rem;
}

.error-404 .btn-home {
  display: inline-block;
  background: var(--brand-blue);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.875rem 2rem;
  transition: background 0.15s ease;
}

.error-404 .btn-home:hover {
  background: #092f70;
  color: var(--white);
}

/* =========================================================
   PAGINATION
   ========================================================= */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 0;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--gray-300);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-800);
  transition: all 0.15s ease;
}

.pagination .page-numbers:hover {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: var(--white);
}

.pagination .page-numbers.current {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: var(--white);
}

.pagination .page-numbers.dots {
  border: none;
  background: transparent;
  cursor: default;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 4rem 1.5rem 2.5rem;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
}

.footer-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-blue);
  margin-bottom: 1rem;
}

.footer-description {
  font-size: 0.85rem;
  color: var(--gray-500);
  max-width: 460px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 2.5rem;
}

.footer-links a {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-800);
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--brand-blue);
}

.footer-copyright {
  font-size: 0.75rem;
  color: var(--gray-400);
  letter-spacing: 0.03em;
}

/* WordPress generated classes */
.wp-caption { max-width: 100%; }
.wp-caption img { display: block; }
.wp-caption .wp-caption-text { font-size: 0.8rem; color: var(--gray-500); margin-top: 0.5rem; }
.alignleft { float: left; margin: 0.5em 1.5em 1em 0; }
.alignright { float: right; margin: 0.5em 0 1em 1.5em; }
.aligncenter { display: block; margin: 1em auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }

/* =========================================================
   RESPONSIVE — MOBILE NAV
   ========================================================= */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .main-navigation .primary-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 2px solid var(--brand-blue);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 999;
    padding: 0.5rem 0;
  }

  .main-navigation .primary-menu.is-open {
    display: flex;
  }

  .main-navigation ul li a {
    padding: 0.75rem 1.5rem;
  }

  .main-navigation ul li .sub-menu {
    position: static;
    box-shadow: none;
    border-top: none;
    border-left: 3px solid var(--brand-blue);
    margin-left: 1.5rem;
    display: none;
    flex-direction: column;
  }

  .main-navigation ul li.is-open > .sub-menu {
    display: flex;
  }

  .nav-search {
    display: none;
  }

  .nav-inner {
    flex-direction: row;
  }
}
