/**
 * Modern ARES Website Styles
 * Color Palette: Navy #003366, Orange #FF6B35, Red #D32F2F, Green #388E3C
 */

/* ===== CSS RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors */
  --navy: #003366;
  --orange: #FF6B35;
  --red: #D32F2F;
  --green: #388E3C;
  --white: #FFFFFF;
  --light-bg: #F5F5F5;
  --text-dark: #212121;
  --text-gray: #616161;
  --border-gray: #E0E0E0;
  --color-warning: #ffc107;
  --color-warning-light: #fff3cd;
  --color-danger: #D32F2F;
  
  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
}

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

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--white);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

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

p { 
  margin-bottom: var(--space-sm); 
  color: var(--text-dark);
}

a {
  color: var(--navy);
  text-decoration: underline;
  transition: all 0.3s ease;
}

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

a:focus {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

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

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

/* ===== HEADER ===== */
.site-header {
  background: var(--navy);
  color: var(--white);
  padding: var(--space-md) 0;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.site-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
}

.site-logo a {
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.site-logo a:hover {
  color: var(--orange);
}

.logo-image {
  height: 90px;
  width: auto;
  display: block;
}

.logo-text {
  display: inline-block;
}

.nav-list {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.nav-link {
  color: var(--white);
  padding: var(--space-xs) var(--space-sm);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link--active {
  background: var(--orange);
  color: var(--white);
  text-decoration: none;
}

/* Mobile Menu */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.hamburger-line {
  width: 25px;
  height: 3px;
  background: var(--white);
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .hamburger-menu {
    display: flex;
  }
  
  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: var(--space-md);
    gap: 0;
  }
  
  .nav-list.active {
    display: flex;
  }
  
  .nav-link {
    display: block;
    padding: var(--space-sm);
  }
}

/* ===== HERO SECTION ===== */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #004080 100%);
  color: var(--white);
  padding: var(--space-md) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 200px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero-title-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  justify-content: center;
}

.hero-logo {
  height: 80px;
  width: auto;
  display: block;
}

.hero-title {
  font-size: 3rem;
  color: var(--white);
  margin-bottom: var(--space-sm);
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--white);
  opacity: 0.95;
  margin-bottom: var(--space-md);
}

.hero-description {
  font-size: 1.1rem;
  color: var(--white);
  opacity: 0.9;
  margin-bottom: 0;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 12px 32px;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  min-width: 44px;
  min-height: 44px;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--red);
  border-color: var(--red);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

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

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

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

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

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  transition: all 0.3s ease;
}

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

.card-header {
  border-bottom: 2px solid var(--orange);
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-md);
}

.card-title {
  color: var(--navy);
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
}

.card-body {
  color: var(--text-dark);
}

/* ===== NET SCHEDULE CARD ===== */
.net-schedule {
  background: var(--light-bg);
  padding: var(--space-md) 0;
}

.net-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: var(--space-xl);
  border-left: 6px solid var(--orange);
}

.net-header {
  background: linear-gradient(135deg, var(--navy) 0%, #004080 100%);
  color: var(--white);
  padding: var(--space-md);
  border-radius: 8px 8px 0 0;
  margin: calc(-1 * var(--space-xl)) calc(-1 * var(--space-xl)) var(--space-md);
}

.net-name {
  font-size: 1.75rem;
  color: var(--white);
  margin: 0;
}

.net-details {
  display: grid;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.net-detail-item {
  display: flex;
  align-items: start;
  gap: var(--space-sm);
}

.detail-label {
  font-weight: 700;
  color: var(--navy);
  min-width: 140px;
}

.detail-value {
  color: var(--text-dark);
  font-size: 1.1rem;
}

.net-backup,
.event-backup-info {
  background: #FFF8F0;
  border-left: 4px solid var(--orange);
  padding: var(--space-md);
  border-radius: 4px;
  margin-top: var(--space-md);
}

.net-backup h4,
.event-backup-info h4 {
  color: var(--orange);
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
}

.net-backup ul,
.event-backup-info ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.net-backup li,
.event-backup-info li {
  padding: var(--space-xs) 0;
  color: var(--text-dark);
}

.backup-title {
  color: var(--orange);
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
}

.backup-frequencies {
  list-style: none;
  padding-left: 0;
}

.backup-frequencies li {
  padding: var(--space-xs) 0;
  color: var(--text-dark);
}

/* ===== TABLES ===== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  border-radius: 8px;
  overflow: hidden;
}

thead {
  background: var(--navy);
  color: var(--white);
}

th {
  padding: var(--space-md);
  text-align: left;
  font-weight: 700;
}

td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-gray);
  color: var(--text-dark);
}

tbody tr:hover {
  background: var(--light-bg);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ===== SECTIONS ===== */
.section-title {
  font-size: 2.5rem;
  color: var(--navy);
  text-align: center;
  margin-bottom: var(--space-lg);
  position: relative;
  padding-bottom: var(--space-sm);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--orange);
  border-radius: 2px;
}

.section-description {
  text-align: center;
  font-size: 1.2rem;
  color: var(--text-gray);
  margin-bottom: var(--space-xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== RESOURCE ITEMS ===== */
.resources-list {
  display: grid;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.resource-item {
  background: var(--white);
  padding: var(--space-md);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--orange);
  transition: all 0.3s ease;
}

.resource-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateX(4px);
}

.resource-item h2 {
  margin-bottom: var(--space-xs);
  font-size: 1.25rem;
}

.resource-item h2 a {
  color: var(--navy);
  text-decoration: none;
}

.resource-item h2 a:hover {
  color: var(--orange);
}

.resource-item p {
  color: var(--text-gray);
  font-size: 0.95rem;
  margin: 0;
}

/* ===== RESOURCE SECTIONS ===== */
.resource-section {
  background: var(--white);
  padding: var(--space-xl);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin: var(--space-xl) 0;
}

.resource-section h2 {
  color: var(--navy);
  font-size: 2rem;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 3px solid var(--orange);
}

.resource-section h3 {
  color: var(--navy);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-md);
}

.resource-links {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0;
}

.resource-links li {
  padding: var(--space-sm) 0;
}

.resource-link {
  color: var(--navy);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease;
}

.resource-link:hover {
  color: var(--orange);
  text-decoration: underline;
}

.resource-icon {
  margin-right: var(--space-sm);
  font-size: 1.2em;
}

.script-metadata {
  color: var(--text-gray);
  font-size: 0.9rem;
  margin-bottom: var(--space-lg);
}

.script-metadata a {
  color: var(--navy);
  text-decoration: none;
}

.script-metadata a:hover {
  color: var(--orange);
  text-decoration: underline;
}

.script-section {
  margin-bottom: var(--space-xl);
}

.script-section h3 {
  color: var(--navy);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 2px solid var(--orange);
}

.script-text {
  background: var(--light-bg);
  padding: var(--space-md);
  border-radius: 4px;
  margin: var(--space-md) 0;
  border-left: 4px solid var(--navy);
}

.script-text p {
  margin-bottom: var(--space-sm);
}

.script-text strong {
  color: var(--navy);
}

.script-text ul {
  list-style: none;
  padding-left: 0;
}

.script-text li {
  padding: var(--space-xs) 0;
  position: relative;
  padding-left: var(--space-md);
}

.script-text li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--orange);
  font-weight: 700;
}

/* Checklist Styles */
.checklist {
  margin-top: var(--space-md);
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  padding: var(--space-xs) 0;
  gap: var(--space-sm);
}

.checkbox-input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--navy);
}

.checkbox-label {
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--text-dark);
  word-break: break-word;
}

/* Print styles for net script */
@media print {
  .script-section {
    page-break-inside: avoid;
  }
  
  .script-section h3 {
    page-break-after: avoid;
  }
  
  .checklist-item {
    page-break-inside: avoid;
  }
  
  .checkbox-input {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #000;
    border-radius: 3px;
    background: white;
  }
  
  .site-header,
  .site-footer,
  .hamburger-menu,
  .resource-cards {
    display: none !important;
  }
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--navy);
  color: var(--white);
  padding: var(--space-xl) 0 var(--space-md);
  margin-top: var(--space-2xl);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-title {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.footer-text {
  color: rgba(255,255,255,0.9);
  line-height: 1.8;
}

.footer-link {
  color: var(--white);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--orange);
  text-decoration: underline;
}

.footer-link:focus {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.footer-nav {
  list-style: none;
  padding: 0;
}

.footer-nav li {
  margin-bottom: var(--space-xs);
}

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

.footer-bottom p {
  margin-bottom: var(--space-xs);
  color: inherit;
}

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--orange);
  color: var(--white);
  padding: var(--space-sm);
  text-decoration: none;
  z-index: 9999;
}

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

/* ===== REGIONAL TEAMS ===== */
.regional-teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.regional-team-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.regional-team-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.regional-team-card .team-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: var(--space-xs);
}

.regional-team-card .team-info {
  font-size: 0.9rem;
  line-height: 1.6;
}

.regional-team-card .team-info p {
  margin: var(--space-xs) 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.regional-team-card .team-info a {
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-all;
}

.regional-team-card .team-info strong {
  color: var(--color-primary-dark);
  font-weight: 600;
}

/* ===== COLLAPSIBLE SECTIONS ===== */
.collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.collapse-toggle {
  background: none;
  border: none;
  padding: var(--space-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  transition: transform 0.3s ease, color 0.2s ease;
}

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

.collapse-toggle:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.collapse-icon {
  transition: transform 0.3s ease;
}

.collapse-toggle[aria-expanded="false"] .collapse-icon {
  transform: rotate(-90deg);
}

.collapsible-content {
  max-height: 15000px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 1;
}

.collapsible-content.collapsed {
  max-height: 0;
  opacity: 0;
}

/* ===== EVENTS ===== */
.event-card {
  margin-bottom: var(--space-lg);
}

.event-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.event-type-badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  background-color: var(--color-accent);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: capitalize;
}

.event-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.event-detail-item {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

.event-detail-item .detail-icon {
  flex-shrink: 0;
  color: var(--color-primary);
  margin-top: 2px;
}

.event-detail-item .detail-label {
  font-weight: 600;
  color: var(--color-primary-dark);
  margin-right: var(--space-xs);
}

.event-detail-item .detail-value {
  color: var(--color-text);
}

.event-description {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-gray-light);
  color: var(--color-text);
  line-height: 1.6;
}

.event-registration {
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-warning-light, #fff3cd);
  border-left: 4px solid var(--color-warning, #ffc107);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.no-data-message,
.error-message {
  text-align: center;
  padding: var(--space-xl);
  color: var(--color-text-muted);
  font-style: italic;
}

.error-message {
  color: var(--color-danger);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 1.25rem; }
  .section-title { font-size: 1.75rem; }
  
  table {
    font-size: 0.9rem;
  }
  
  th, td {
    padding: var(--space-sm);
  }
  
  .net-card {
    padding: var(--space-md);
  }
  
  .net-header {
    margin: calc(-1 * var(--space-md)) calc(-1 * var(--space-md)) var(--space-md);
  }
  
  .detail-label {
    min-width: auto;
    font-weight: 700;
  }
  
  .net-detail-item {
    flex-direction: column;
    gap: var(--space-xs);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-sm);
  }
  
  table {
    display: block;
    overflow-x: auto;
  }
}
