/**
 * EventSeat Pro - Main Stylesheet
 * 
 * Table of Contents:
 * 1. CSS Custom Properties (Design Tokens)
 * 2. Reset & Base Styles
 * 3. Layout & Grid
 * 4. Header & Navigation
 * 5. Content Area & Sidebar
 * 6. Posts & Pages
 * 7. Components (Buttons, Cards, Forms)
 * 8. Footer
 * 9. Utilities
 * 10. Responsive
 */

/* ============================================
   1. CSS CUSTOM PROPERTIES
   ============================================ */
:root {
  /* Colors - Primary (Blue) */
  --color-primary-50: #eff6ff;
  --color-primary-100: #dbeafe;
  --color-primary-200: #bfdbfe;
  --color-primary-300: #93c5fd;
  --color-primary-400: #60a5fa;
  --color-primary-500: #3b82f6;
  --color-primary-600: #2563eb;
  --color-primary-700: #1d4ed8;
  --color-primary-800: #1e40af;
  --color-primary-900: #1e3a8a;
  
  /* Colors - Slate (Gray) */
  --color-slate-50: #f8fafc;
  --color-slate-100: #f1f5f9;
  --color-slate-200: #e2e8f0;
  --color-slate-300: #cbd5e1;
  --color-slate-400: #94a3b8;
  --color-slate-500: #64748b;
  --color-slate-600: #475569;
  --color-slate-700: #334155;
  --color-slate-800: #1e293b;
  --color-slate-900: #0f172a;
  
  /* Semantic Colors */
  --color-primary: var(--color-primary-600);
  --color-background: var(--color-slate-50);
  --color-foreground: var(--color-slate-900);
  --color-muted: var(--color-slate-100);
  --color-muted-foreground: var(--color-slate-500);
  --color-border: var(--color-slate-200);
  --color-card: #ffffff;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  
  /* Layout */
  --container-max: 1280px;
  --container-padding: 1.5rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

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

html {
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-background);
  color: var(--color-foreground);
  font-size: var(--font-size-base);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
}

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

ul, ol {
  list-style: none;
}

/* ============================================
   3. LAYOUT & GRID
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container--boxed {
  max-width: 960px;
}

.container--narrow {
  max-width: 768px;
}

.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-content {
  flex: 1;
  padding-top: var(--space-8);
  padding-bottom: var(--space-16);
}

.content-wrapper {
  display: grid;
  gap: var(--space-8);
}

.content-wrapper.has-sidebar {
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .content-wrapper.has-sidebar {
    grid-template-columns: 1fr 320px;
  }
  
  .content-wrapper.has-sidebar.sidebar-left {
    grid-template-columns: 320px 1fr;
  }
}

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

/* ============================================
   4. HEADER & NAVIGATION
   ============================================ */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  gap: var(--space-4);
}

.site-branding {
  display: flex;
  align-items: center;
}

.site-logo {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-slate-900);
}

.site-description {
  font-size: var(--font-size-sm);
  color: var(--color-muted-foreground);
  margin-left: var(--space-4);
}

/* Navigation */
.main-navigation {
  display: none;
}

@media (min-width: 768px) {
  .main-navigation {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
  }
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-menu a {
  color: var(--color-slate-600);
  font-weight: 500;
  font-size: var(--font-size-sm);
  padding: var(--space-2) 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-menu a:hover,
.nav-menu a:focus {
  color: var(--color-primary);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

.menu-toggle-icon {
  position: relative;
  width: 1.5rem;
  height: 2px;
  background-color: currentColor;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: currentColor;
}

.menu-toggle-icon::before {
  top: -6px;
}

.menu-toggle-icon::after {
  bottom: -6px;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: none;
  color: var(--color-slate-600);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.search-toggle:hover {
  color: var(--color-primary);
}

/* Search Overlay */
.search-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.search-overlay.active {
  display: flex;
}

.search-overlay .container {
  position: relative;
  max-width: 600px;
}

.search-close {
  position: absolute;
  top: -3rem;
  right: 0;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/* ============================================
   5. POSTS & PAGES
   ============================================ */
.page-header {
  margin-bottom: var(--space-8);
  text-align: center;
}

.page-title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--color-slate-900);
  line-height: 1.2;
}

@media (min-width: 768px) {
  .page-title {
    font-size: var(--font-size-4xl);
  }
}

/* Posts Grid */
.posts-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}

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

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

/* Post Article */
article.post,
article.page {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: box-shadow var(--transition-fast);
}

article.post:hover {
  box-shadow: var(--shadow-lg);
}

.post-thumbnail {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

article.post:hover .post-thumbnail img {
  transform: scale(1.05);
}

.entry-content-wrapper {
  padding: var(--space-6);
}

.entry-header {
  margin-bottom: var(--space-4);
}

.entry-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--space-2);
}

.entry-title a {
  color: var(--color-slate-900);
  transition: color var(--transition-fast);
}

.entry-title a:hover {
  color: var(--color-primary);
}

.entry-meta {
  font-size: var(--font-size-sm);
  color: var(--color-muted-foreground);
  display: flex;
  gap: var(--space-4);
}

.entry-content {
  color: var(--color-slate-600);
  line-height: 1.7;
}

.entry-content p {
  margin-bottom: var(--space-4);
}

.entry-footer {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

/* Single Post */
.single .entry-title {
  font-size: var(--font-size-3xl);
}

.single .entry-content {
  font-size: var(--font-size-lg);
}

/* ============================================
   6. COMPONENTS
   ============================================ */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.625rem 1.25rem;
  font-size: var(--font-size-sm);
  font-weight: 500;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--color-primary-700);
}

.btn-secondary {
  background-color: white;
  color: var(--color-slate-700);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background-color: var(--color-slate-50);
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-slate-600);
}

.btn-ghost:hover {
  background-color: var(--color-slate-100);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: var(--font-size-xs);
}

/* Read More Link */
.read-more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-primary);
  font-weight: 500;
  font-size: var(--font-size-sm);
  transition: gap var(--transition-fast);
}

.read-more:hover {
  gap: var(--space-3);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-10);
}

.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 var(--space-3);
  font-size: var(--font-size-sm);
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background-color: white;
  color: var(--color-slate-700);
  transition: all var(--transition-fast);
}

.page-numbers:hover {
  background-color: var(--color-slate-50);
}

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

/* Cards */
.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: box-shadow var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: var(--font-size-base);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background-color: white;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-100);
}

.search-form {
  position: relative;
}

.search-form input[type="search"] {
  padding-right: 3rem;
}

.search-form button {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-slate-400);
  cursor: pointer;
}

/* Widgets */
.widget-area {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.widget {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
}

.widget-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-4);
  color: var(--color-slate-900);
}

/* ============================================
   7. FOOTER
   ============================================ */
.site-footer {
  background-color: white;
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.footer-widgets {
  padding: var(--space-12) 0;
  border-bottom: 1px solid var(--color-border);
}

.footer-widgets-grid {
  display: grid;
  gap: var(--space-8);
  grid-template-columns: 1fr;
}

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

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

.footer-bottom {
  padding: var(--space-6) 0;
}

.footer-bottom-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-copyright {
  font-size: var(--font-size-sm);
  color: var(--color-muted-foreground);
}

.footer-menu {
  display: flex;
  gap: var(--space-6);
}

.footer-menu a {
  font-size: var(--font-size-sm);
  color: var(--color-slate-600);
  transition: color var(--transition-fast);
}

.footer-menu a:hover {
  color: var(--color-primary);
}

/* ============================================
   8. UTILITIES
   ============================================ */
.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;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: white;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  z-index: 99999;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
}

/* Text utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--color-primary); }
.text-muted { color: var(--color-muted-foreground); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

/* ============================================
   9. WORDPRESS DEFAULTS
   ============================================ */
.alignleft {
  float: left;
  margin-right: var(--space-4);
  margin-bottom: var(--space-4);
}

.alignright {
  float: right;
  margin-left: var(--space-4);
  margin-bottom: var(--space-4);
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.wp-block-image img {
  height: auto;
}

/* Admin bar fix */
body.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

/* ============================================
   10. RESPONSIVE
   ============================================ */
@media (max-width: 767px) {
  .container {
    --container-padding: 1rem;
  }
  
  .page-title {
    font-size: var(--font-size-2xl);
  }
  
  .entry-title {
    font-size: var(--font-size-lg);
  }
}
