/* RadioBXI - Modern Ham Radio Community Website Styles */
:root {
  --primary-color: #1a5f7a;
  --primary-dark: #134b61;
  --secondary-color: #57c5b6;
  --accent-color: #f59e0b;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --bg-color: #ffffff;
  --bg-light: #f9fafb;
  --bg-dark: #111827;
  --border-color: #e5e7eb;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
  --radius: 8px;
  --max-width: 1200px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-color);
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

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

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

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

/* Header */
.header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}

.header-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  text-decoration: none;
}

.logo:hover {
  color: var(--secondary-color);
  text-decoration: none;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* Navigation */
.nav {
  display: flex;
  gap: 0.5rem;
}

.nav a {
  color: rgba(255,255,255,0.9);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav a:hover,
.nav a.active {
  background: rgba(255,255,255,0.15);
  color: white;
  text-decoration: none;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 4rem 1.5rem;
  text-align: center;
}

.hero h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  color: rgba(255,255,255,0.9);
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: inline-block;
  background: var(--accent-color);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
  text-decoration: none;
  color: white;
}

/* Main Content */
.main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  width: 100%;
}

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

/* Article Styles */
.article {
  background: var(--bg-color);
  border-radius: var(--radius);
  overflow: hidden;
}

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

.article-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--text-light);
  font-size: 0.875rem;
  margin-top: 1rem;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

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

.article-content h2 {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.article-content h3 {
  margin-top: 2rem;
}

.article-content ul,
.article-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-light);
}

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

.article-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding: 1rem 1.5rem;
  background: var(--bg-light);
  margin: 1.5rem 0;
  font-style: italic;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-image {
  height: 180px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.card-title a {
  color: var(--text-color);
}

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

.card-excerpt {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--primary-color);
}

/* Sidebar */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
}

.sidebar {
  position: sticky;
  top: 90px;
  height: fit-content;
}

.sidebar-widget {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-widget h3 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-color);
}

.sidebar-links {
  list-style: none;
}

.sidebar-links li {
  margin-bottom: 0.75rem;
}

.sidebar-links a {
  display: block;
  padding: 0.5rem 0;
  color: var(--text-color);
  border-bottom: 1px solid var(--border-color);
  transition: padding-left 0.2s ease;
}

.sidebar-links a:hover {
  padding-left: 0.5rem;
  color: var(--primary-color);
  text-decoration: none;
}

/* Footer */
.footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.8);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
}

.footer-section h4 {
  color: white;
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-color);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.625rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--secondary-color);
  text-decoration: none;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 3rem auto 0;
  padding: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.875rem;
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 1rem 0;
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.breadcrumbs a {
  color: var(--text-light);
}

.breadcrumbs span {
  margin: 0 0.5rem;
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.tag {
  background: var(--bg-light);
  color: var(--text-light);
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.tag:hover {
  background: var(--primary-color);
  color: white;
  text-decoration: none;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 4rem 1.5rem;
  text-align: center;
  border-radius: var(--radius);
  margin: 3rem 0;
}

.cta-section h2 {
  color: white;
  margin-bottom: 1rem;
}

.cta-section p {
  color: rgba(255,255,255,0.9);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* Utilities */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }

/* Responsive Design */
@media (max-width: 968px) {
  .content-with-sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }

  .sidebar-widget {
    margin-bottom: 0;
  }
}

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

  .header-content {
    height: 60px;
  }

  .nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
  }

  .nav.active {
    display: flex;
  }

  .nav a {
    padding: 0.875rem 1rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero {
    padding: 3rem 1.5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

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

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

  .article-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Print Styles */
@media print {
  .header, .footer, .sidebar, .nav {
    display: none;
  }

  .main {
    padding: 0;
    max-width: 100%;
  }

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

/* Accessibility */
:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  z-index: 9999;
}

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

/* Selection */
::selection {
  background: var(--primary-color);
  color: white;
}
