/* ==========================================================================
   Global Styles - TicketCenter News Theme
   ========================================================================== */

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */
:root {
  /* Primary Colors */
  --color-primary: #EC7500;
  --color-primary-hover: #D46800;
  --color-primary-light: #FFF3E6;
  --color-cta: #3B7FFF;
  --color-cta-hover: #2563EB;
  
  /* Neutral Colors */
  --color-header: #0F1110;
  --color-footer: #333333;
  --color-text: #1A1A1A;
  --color-text-secondary: #4A4A4A;
  --color-text-muted: #6B7280;
  --color-background: #FFFFFF;
  --color-surface: #F8F9FA;
  --color-surface-hover: #F1F3F5;
  --color-border: #E5E7EB;
  --color-border-light: #F3F4F6;
  
  /* Category Colors */
  --color-cat-concerts: #EC7500;
  --color-cat-sports: #3B82F6;
  --color-cat-theater: #1E3A5F;
  --color-cat-family: #10B981;
  --color-cat-festivals: #8B5CF6;
  --color-cat-guides: #F59E0B;
  --color-cat-venues: #6366F1;
  
  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", 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;
  --font-size-5xl: 3rem;
  --line-height-tight: 1.25;
  --line-height-base: 1.6;
  --line-height-loose: 1.75;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4rem;
  --space-8: 5rem;
  
  /* Layout */
  --container-max: 1280px;
  --content-max: 860px;
  --sidebar-width: 340px;
  --gap: 2rem;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  
  /* Z-Index Scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal: 400;
  --z-tooltip: 500;
}

/* ==========================================================================
   CSS Reset & Base Styles
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  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;
  color: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

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

ul,
ol {
  list-style: none;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

/* ==========================================================================
   Accessibility - Skip Link
   ========================================================================== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: var(--font-weight-semibold);
  z-index: var(--z-tooltip);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-3);
  outline: 2px solid var(--color-cta);
  outline-offset: 2px;
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Layout Utilities
   ========================================================================== */
.site-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

.container--narrow {
  max-width: var(--content-max);
}

/* Main Content Layout */
.site-main {
  flex: 1;
  padding-top: var(--space-6);
  padding-bottom: var(--space-7);
}

.content-area {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

@media (min-width: 1024px) {
  .content-area {
    grid-template-columns: 1fr var(--sidebar-width);
  }
}

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

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

h1 {
  font-size: var(--font-size-3xl);
}

h2 {
  font-size: var(--font-size-2xl);
}

h3 {
  font-size: var(--font-size-xl);
}

h4 {
  font-size: var(--font-size-lg);
}

h5 {
  font-size: var(--font-size-base);
}

h6 {
  font-size: var(--font-size-sm);
}

@media (min-width: 768px) {
  h1 {
    font-size: var(--font-size-5xl);
  }
  
  h2 {
    font-size: var(--font-size-3xl);
  }
  
  h3 {
    font-size: var(--font-size-2xl);
  }
}

/* Section Headings */
.section-heading {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-4);
  position: relative;
  padding-bottom: var(--space-3);
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 4px;
  background-color: var(--color-primary);
  border-radius: var(--radius-full);
}

@media (min-width: 768px) {
  .section-heading {
    font-size: var(--font-size-3xl);
  }
}

/* ==========================================================================
   Post Content Styles
   ========================================================================== */
.entry-content {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-loose);
}

.entry-content > * + * {
  margin-top: var(--space-4);
}

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

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

.entry-content a {
  color: var(--color-cta);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

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

.entry-content ul,
.entry-content ol {
  padding-left: var(--space-5);
  margin-bottom: var(--space-4);
}

.entry-content ul {
  list-style-type: disc;
}

.entry-content ol {
  list-style-type: decimal;
}

.entry-content li {
  margin-bottom: var(--space-2);
}

.entry-content li::marker {
  color: var(--color-primary);
}

.entry-content blockquote {
  border-left: 4px solid var(--color-primary);
  padding-left: var(--space-4);
  margin-left: 0;
  margin-right: 0;
  font-style: italic;
  color: var(--color-text-secondary);
  background-color: var(--color-surface);
  padding: var(--space-4);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

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

.entry-content img {
  border-radius: var(--radius-lg);
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
}

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

.entry-content figcaption {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-2);
}

.entry-content pre {
  background-color: var(--color-header);
  color: #E5E7EB;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.entry-content code {
  background-color: var(--color-surface);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
}

.entry-content pre code {
  background: none;
  padding: 0;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-4);
}

.entry-content th,
.entry-content td {
  border: 1px solid var(--color-border);
  padding: var(--space-2) var(--space-3);
  text-align: left;
}

.entry-content th {
  background-color: var(--color-surface);
  font-weight: var(--font-weight-semibold);
}

.entry-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-6) 0;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.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-text-muted); }

.bg-surface { background-color: var(--color-surface); }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

.hidden { display: none !important; }

@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:hidden { display: none !important; }
}

@media (min-width: 1024px) {
  .lg\:flex { display: flex; }
  .lg\:hidden { display: none !important; }
}

/* Focus visible styles for better accessibility */
:focus-visible {
  outline: 2px solid var(--color-cta);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .site-header,
  .site-footer,
  .sidebar,
  .nav-primary,
  .darkmode-toggle {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }
  
  a {
    text-decoration: underline;
  }
  
  .container {
    max-width: 100%;
    padding: 0;
  }
}
