/* ===================================
   Liquor News Magazine - Production CSS
   Aligned with Hugo template class names
   ===================================*/

:root {
  --color-primary: #1a1a2e;
  --color-secondary: #c4a35a;
  --color-accent: #e94560;
  --color-bg: #f5f5f5;
  --color-text: #2d2d2d;
  --color-text-light: #6b6b6b;
  --color-card-bg: #ffffff;
  --color-texas-spotlight: #fdf6e3;

  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;

  --base-spacing: 1rem;
  --container-max-width: 1400px;
  --sidebar-width: 300px;

  --transition-fast: 150ms ease-in-out;
  --transition-standard: 300ms ease-in-out;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.15);
}

/* ===================================
   Reset & Base
   ===================================*/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-secondary);
}

/* Accessibility: Focus-visible outlines */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 0 0 4px 4px;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--color-secondary);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--base-spacing);
  color: var(--color-primary);
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--base-spacing);
}

ul {
  list-style: none;
}

/* ===================================
   Site Header (matches header.html)
   ===================================*/

.site-header {
  background-color: var(--color-primary);
  color: var(--color-card-bg);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: var(--container-max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.header-brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-logo {
  text-decoration: none;
}

.site-title-text {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-secondary);
}

.site-tagline {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

/* Navigation */
.site-nav {
  flex: 1;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  justify-content: center;
}

.nav-item a {
  color: var(--color-card-bg);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.nav-item a:hover,
.nav-item.active a {
  color: var(--color-secondary);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  padding: 0.75rem;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.mobile-menu-toggle .hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-card-bg);
  position: relative;
  transition: background-color var(--transition-fast);
}

.mobile-menu-toggle .hamburger::before,
.mobile-menu-toggle .hamburger::after {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-card-bg);
  position: absolute;
  left: 0;
  transition: transform var(--transition-standard), top var(--transition-standard);
}

.mobile-menu-toggle .hamburger::before {
  top: -7px;
}

.mobile-menu-toggle .hamburger::after {
  top: 7px;
}

/* Hamburger to X animation */
.mobile-menu-toggle[aria-expanded="true"] .hamburger {
  background-color: transparent;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Header Actions (newsletter CTA) */
.header-actions {
  flex-shrink: 0;
}

/* ===================================
   Ad Slots
   ===================================*/

.ad-slot {
  background-color: var(--color-bg);
  border: 2px dashed #ccc;
  border-radius: 6px;
  padding: 1.5rem;
  text-align: center;
  color: var(--color-text-light);
  font-size: 0.85rem;
  display: none; /* Hidden until ads enabled */
}

.ad-slot.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===================================
   Article Single Page
   ===================================*/

.article-single {
  background-color: var(--color-card-bg);
  padding: 3rem;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  max-width: 800px;
  margin: 2rem auto 3rem;
}

.article-single-header {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--color-bg);
}

.article-single h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.article-single-meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.article-single-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

.article-single-content p {
  margin-bottom: 1.5rem;
}

.article-single-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.75rem;
}

.article-single-content blockquote {
  border-left: 4px solid var(--color-secondary);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--color-text-light);
}

.article-single-content ul,
.article-single-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  list-style: disc;
}

.article-single-content li {
  margin-bottom: 0.5rem;
}

/* ===================================
   Footer (matches footer.html)
   ===================================*/

.site-footer {
  background-color: var(--color-primary);
  color: var(--color-card-bg);
  padding: 3rem 1.5rem 1.5rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--container-max-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h3,
.footer-col h4 {
  color: var(--color-secondary);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-col p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col li {
  margin-bottom: 0.75rem;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--color-secondary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom p {
  margin: 0;
}

.footer-social {
  display: flex;
  gap: 1.5rem;
}

.footer-social a {
  color: rgba(255, 255, 255, 0.6);
}

.footer-social a:hover {
  color: var(--color-secondary);
}

/* ===================================
   Newsletter Form
   ===================================*/

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(196, 163, 90, 0.15);
}

.newsletter-form button {
  padding: 0.75rem 1.5rem;
  background-color: var(--color-secondary);
  color: var(--color-primary);
  border-radius: 4px;
  font-weight: 600;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.newsletter-form button:hover {
  background-color: var(--color-accent);
  color: var(--color-card-bg);
}

/* ===================================
   Share Buttons
   ===================================*/

.share-buttons {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--color-bg);
  border-bottom: 1px solid var(--color-bg);
}

.share-buttons label {
  font-weight: 600;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  margin-right: 0.5rem;
}

.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--color-bg);
  color: var(--color-primary);
  transition: all var(--transition-fast);
  font-size: 1.2rem;
}

.share-button:hover {
  background-color: var(--color-secondary);
  transform: scale(1.1);
}

/* ===================================
   Category / List Pages
   ===================================*/

.list-page {
  max-width: var(--container-max-width);
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* ===================================
   Responsive Design
   ===================================*/

@media (max-width: 1024px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .header-actions {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .article-single {
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .site-header {
    padding: 1rem;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-primary);
    padding: 1rem;
    z-index: 99;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.25s ease-out;
  }

  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .site-nav.active {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
  }

  .nav-item a {
    display: block;
    padding: 0.875rem 1rem;
    min-height: 44px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 1rem;
  }

  .nav-item:last-child a {
    border-bottom: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .article-single {
    padding: 1.5rem;
    margin: 1rem;
  }

  .article-single h1 {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .site-title-text {
    font-size: 1.35rem;
  }
}

/* ===================================
   Print Styles
   ===================================*/

@media print {
  .site-header,
  .ticker-container,
  .sidebar-content,
  .site-footer,
  .ad-slot,
  .share-buttons,
  .newsletter-form {
    display: none;
  }

  body {
    background-color: white;
    color: black;
  }

  .article-single {
    box-shadow: none;
    padding: 0;
    max-width: 100%;
  }

  a { color: black; }
  h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
  p { page-break-inside: avoid; }
}

/* ===================================
   Accessibility & Focus
   ===================================*/

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-accent);
  color: white;
  padding: 0.5rem 1rem;
  z-index: 200;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

*:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 2px;
}

/* Fluid Ad Sizing on Mobile */
@media (max-width: 768px) {
  .ad-slot,
  .sponsored-content-unit {
    max-width: 100%;
    overflow: hidden;
  }

  .ad-slot img,
  .ad-slot iframe {
    max-width: 100%;
    height: auto;
  }
}

/* Touch-friendly target sizing */
@media (hover: none) and (pointer: coarse) {
  .nav-item a,
  .pagination-btn,
  .pagination-num,
  .share-button,
  .error-btn,
  .newsletter-form button {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ===================================
   Utility Classes
   ===================================*/

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
