/* Security Cocktail Hour Website - Main Stylesheet */

/* ===================================
   CSS Variables (Design System)
   =================================== */
:root {
  /* Colors - New Palette */
  --color-primary: #192A56;           /* Dark Blue - Main text, navigation, footers */
  --color-secondary: #8D99AE;         /* Cool Grey - Secondary text, borders, dividers */
  --color-background: #F8F9FA;        /* Off-white - Main page background */
  --color-action: #436098;            /* Professional Blue - Buttons, CTAs */
  --color-accent: #CE1F2C;            /* Bright Red - Key CTAs, important highlights */

  /* Legacy color mappings for compatibility */
  --color-security-red: #CE1F2C;      /* Mapped to Accent */
  --color-deep-blue: #436098;         /* Mapped to Action */
  --color-spotlight-cyan: #436098;    /* Mapped to Action */
  --color-light-cyan: #5B9BD5;        /* Keep for gradients */
  --color-olive-green: #7FA560;       /* Keep for compatibility */
  --color-charcoal: #192A56;          /* Mapped to Primary */
  --color-light-gray: #F5F5F5;        /* Keep for UI elements */
  --color-white: #FFFFFF;

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Font Sizes */
  --font-size-h1: 2.5rem;
  --font-size-h2: 2rem;
  --font-size-h3: 1.5rem;
  --font-size-h4: 1.25rem;
  --font-size-body: 1rem;
  --font-size-small: 0.875rem;

  /* Spacing (8px base) */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-strong: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Mobile overrides */
@media (max-width: 899px) {
  :root {
    --font-size-h1: 2rem;
    --font-size-h2: 1.75rem;
    --font-size-h3: 1.375rem;
  }
}

/* ===================================
   Global Resets & Base Styles
   =================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  line-height: 1.6;
  color: var(--color-primary);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   Typography
   =================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  margin-bottom: var(--space-md);
  color: var(--color-primary);
}

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

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

h3 {
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-semibold);
}

h4 {
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-semibold);
  color: var(--color-charcoal);
}

p {
  margin-bottom: var(--space-md);
  max-width: 70ch;
}

ul, ol {
  margin-bottom: var(--space-lg);
  margin-left: var(--space-xl);
  max-width: 70ch;
}

ul li, ol li {
  margin-bottom: var(--space-sm);
  line-height: 1.6;
}

a {
  color: var(--color-spotlight-cyan);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-deep-blue);
  text-decoration: underline;
}

/* ===================================
   Layout Components
   =================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (min-width: 600px) {
  .container {
    padding: 0 var(--space-lg);
  }
}

.section {
  padding: var(--space-2xl) 0;
}

/* ===================================
   Navigation
   =================================== */
.site-header {
  background: var(--color-white);
  box-shadow: var(--shadow-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 80px;
  display: flex;
  align-items: center;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  height: 60px;
}

.site-nav {
  display: none;
}

@media (min-width: 900px) {
  .site-nav {
    display: flex;
    gap: var(--space-xl);
    align-items: center;
  }
}

.site-nav a {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  color: var(--color-charcoal);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--color-security-red);
}

/* Mobile menu toggle */
.menu-toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  z-index: 1001;
  position: relative;
}

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

/* Mobile menu styles */
.site-nav.active {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  background: white;
  padding: var(--space-lg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  gap: var(--space-md);
}

.site-nav.active a {
  padding: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

/* ===================================
   Buttons
   =================================== */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-align: center;
}

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

.btn-primary:hover {
  background: #354A78;
  box-shadow: 0 4px 12px rgba(67, 96, 152, 0.3);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--color-action);
  border: 2px solid var(--color-action);
  padding: 10px 24px;
}

.btn-secondary:hover {
  background: var(--color-action);
  color: var(--color-white);
  text-decoration: none;
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-white);
  padding: 12px 32px;
  font-size: 1rem;
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-accent:hover {
  background: #B91928;
  box-shadow: 0 4px 12px rgba(206, 31, 44, 0.3);
  transform: translateY(-2px);
  text-decoration: none;
}

/* ===================================
   Cards
   =================================== */
.card {
  background: var(--color-white);
  border: 1px solid #E5E5E5;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-4px);
}

.card-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.card-content {
  padding: var(--space-lg);
}

.card-title {
  font-size: var(--font-size-h3);
  margin-bottom: var(--space-sm);
}

.card-meta {
  font-size: var(--font-size-small);
  color: rgba(45, 45, 45, 0.7);
  margin-bottom: var(--space-sm);
}

.card-description {
  margin-bottom: var(--space-md);
}

/* Episode Card specific */
.episode-card .category-tag {
  display: inline-block;
  background: var(--color-secondary);
  color: var(--color-white);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

/* ===================================
   Forms
   =================================== */
.form-group {
  margin-bottom: var(--space-md);
}

label {
  display: block;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-sm);
  color: var(--color-charcoal);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  font-size: var(--font-size-body);
  font-family: var(--font-family);
  border: 1px solid #D0D0D0;
  border-radius: var(--radius-sm);
  background: var(--color-white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border: 2px solid var(--color-spotlight-cyan);
  box-shadow: 0 0 0 3px rgba(59, 160, 212, 0.1);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* ===================================
   Footer
   =================================== */
.site-footer {
  background: var(--color-deep-blue);
  color: var(--color-white);
  padding: var(--space-2xl) 0 var(--space-lg) 0;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.8);
}

.site-footer a:hover {
  color: rgba(255, 255, 255, 1);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

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

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

.footer-section h4 {
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: var(--space-sm);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: var(--space-md);
  text-align: center;
  font-size: var(--font-size-small);
}

.footer-bottom p {
  margin: 0.5rem auto;
  text-align: center;
}

/* ===================================
   Grid Layouts
   =================================== */
.grid {
  display: grid;
  gap: var(--space-lg);
}

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

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

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

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

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

/* ===================================
   Utility Classes
   =================================== */
.text-center {
  text-align: center;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }

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

/* Focus indicators */
*:focus-visible {
  outline: 2px solid var(--color-spotlight-cyan);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-spotlight-cyan);
  outline-offset: 2px;
}
