/* ==========================================================================
   Modern Design System - Parsons Amateur Radio Club
   ========================================================================== */

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */

:root {
  /* Dark Theme - Monochrome */
  /* Primary Colors - White/Light Gray for accents */
  --color-primary: #ffffff;
  --color-primary-dark: #e5e5e5;
  --color-primary-light: #1a1a1a;

  /* Accent Colors - Subtle gray tones */
  --color-accent: #a3a3a3;
  --color-accent-dark: #737373;
  --color-accent-light: #262626;

  /* Secondary - Medium gray */
  --color-secondary: #525252;
  --color-secondary-light: #171717;

  /* Text Colors - Light text on dark background */
  --color-text-heading: #ffffff;
  --color-text-body: #d4d4d4;
  --color-text-muted: #a3a3a3;

  /* Background Colors - Dark (lightened for contrast) */
  --color-bg-white: #141414;
  --color-bg-light: #1a1a1a;
  --color-bg-gray: #222222;

  /* Borders & Shadows - Enhanced for dark theme */
  --color-border: #333333;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(255, 255, 255, 0.1);

  /* Font Family */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

  /* Font Sizes */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 3rem;      /* 48px */

  /* Line Heights */
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* Font Weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Spacing Scale (8px base) */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */

  /* Border Radius */
  --radius-sm: 0.25rem;   /* 4px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-full: 9999px;
}

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

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text-body);
  background-color: var(--color-bg-white);
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-4);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text-heading);
}

p {
  margin: 0 0 var(--space-4);
}

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

a:hover {
  color: var(--color-primary-dark);
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

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

.text-center {
  text-align: center;
}

/* ==========================================================================
   Container Component
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ==========================================================================
   Button Components
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-bg-white);
  border-color: var(--color-primary);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25);
  color: var(--color-bg-white);
  background: var(--color-primary-dark);
}

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

.btn-secondary {
  background-color: transparent;
  color: var(--color-text-heading);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Accent button variant */
.btn-accent {
  background: var(--color-accent);
  color: var(--color-bg-white);
  border-color: var(--color-accent);
  box-shadow: 0 4px 15px rgba(163, 163, 163, 0.2);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(163, 163, 163, 0.3);
  color: var(--color-bg-white);
}

/* ==========================================================================
   Card Components
   ========================================================================== */

.feature-card,
.activity-card {
  background: #363636;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  text-align: center;
}

.feature-card:hover,
.activity-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.feature-card::before,
.activity-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent), var(--color-primary));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover::before,
.activity-card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 56px;
  height: 56px;
  background: var(--color-bg-gray);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
  transition: transform 0.3s ease;
}

.feature-card:hover .card-icon,
.activity-card:hover .card-icon {
  transform: scale(1.1);
}

.card-icon svg {
  width: 28px;
  height: 28px;
  color: var(--color-primary);
}

.card-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-heading);
  margin-bottom: var(--space-2);
}

.card-description {
  color: var(--color-text-body);
  line-height: var(--line-height-relaxed);
  margin: 0;
}

/* ==========================================================================
   Section Components
   ========================================================================== */

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

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

.section-light {
  background-color: var(--color-primary-light);
}

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

.section-title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-heading);
  text-align: center;
  margin-bottom: var(--space-4);
  position: relative;
  display: inline-block;
  width: 100%;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary), var(--color-accent));
  border-radius: var(--radius-full);
  margin: var(--space-4) auto 0;
}

.section-description {
  font-size: var(--font-size-lg);
  color: var(--color-text-body);
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-10);
  line-height: var(--line-height-relaxed);
}

/* ==========================================================================
   Card Grid Layout
   ========================================================================== */

.card-grid {
  display: grid;
  gap: var(--space-6);
}

.card-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ==========================================================================
   Header Component
   ========================================================================== */

.header {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(42, 42, 42, 0.8);
  padding: var(--space-4) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text-heading);
}

.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.logo-text {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-heading);
}

/* ==========================================================================
   Navigation Component
   ========================================================================== */

.nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: none;
  align-items: center;
  gap: var(--space-1);
}

.nav-link {
  display: block;
  padding: var(--space-2) var(--space-3);
  color: var(--color-text-body);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
  background-color: var(--color-primary-light);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

/* Dropdown Navigation */
.nav-dropdown {
  position: relative;
}

.nav-dropdown .nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-dropdown .nav-link::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  transition: transform 0.2s ease;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background-color: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2) 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 101;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li a {
  display: block;
  padding: var(--space-2) var(--space-4);
  color: var(--color-text-body);
  font-size: var(--font-size-sm);
  transition: all 0.2s ease;
}

.dropdown-menu li a:hover {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
}

/* Mobile Hamburger Menu */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text-heading);
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation */
.nav-mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--color-bg-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  padding: var(--space-4);
}

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

.nav-mobile .nav-link {
  display: block;
  padding: var(--space-3) var(--space-4);
}

.nav-mobile .dropdown-menu {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  box-shadow: none;
  border: none;
  padding-left: var(--space-4);
  display: none;
}

.nav-mobile .nav-dropdown.active .dropdown-menu {
  display: block;
}

/* ==========================================================================
   Footer Component
   ========================================================================== */

.footer {
  background: var(--color-bg-gray);
  padding: var(--space-12) 0 var(--space-6);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
}

.footer-grid {
  display: grid;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.footer-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.footer-logo .logo-text {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-heading);
}

.footer-tagline {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
  margin: 0;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-heading {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-heading);
  margin: 0 0 var(--space-2);
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-links ul li a {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  transition: color 0.2s ease;
}

.footer-links ul li a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer-bottom p {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  margin: 0;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Tablet (768px and up) */
@media (min-width: 768px) {
  .section {
    padding: var(--space-20) 0;
  }

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

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
  .nav-list {
    display: flex;
  }

  .hamburger {
    display: none;
  }

  .nav-mobile {
    display: none !important;
  }

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

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

/* ==========================================================================
   Sticky Footer Layout
   Ensures footer stays at bottom even for pages with minimal content
   ========================================================================== */

html {
  height: 100%;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

.footer {
  flex-shrink: 0;
}

/* ==========================================================================
   Page-Specific Styles (Content Pages)
   ========================================================================== */

/* Content page main section */
.page-content {
  padding: var(--space-16) 0;
}

.page-title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-heading);
  margin-bottom: var(--space-6);
}

.page-description {
  font-size: var(--font-size-lg);
  color: var(--color-text-body);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-8);
}

/* Embed containers for podcasts, videos */
.embed-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  margin-bottom: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--color-bg-gray);
}

.embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
