/* HEADER PADDING & OVERLAP FIXES - WCAG & RESPONSIVE COMPLIANT */

:root {
  /* Header height variables for responsive design */
  --header-height-desktop: 72px;
  --header-height-tablet: 64px;
  --header-height-mobile: 56px;
  
  /* Horizontal padding variables */
  --header-h-padding-desktop: 24px;
  --header-h-padding-tablet: 18px;
  --header-h-padding-mobile: 12px;
  
  /* Current header height (dynamic) */
  --header-height: var(--header-height-desktop);
  --header-h-padding: var(--header-h-padding-desktop);
}

/* ===== HEADER FIXES ===== */

/* Main header container */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  padding: 0 var(--header-h-padding);
  display: flex;
  align-items: center; /* Vertical centering */
  justify-content: space-between;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

/* Brand/Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-height);
  margin: 0;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 28px; /* Consistent horizontal spacing */
  height: var(--header-height);
}

.nav a {
  display: inline-block;
  padding: 12px 6px; /* 12px vertical, 6px horizontal */
  line-height: 1;
  color: #FFFFFF; /* WCAG compliant white */
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: #F8FAFC; /* Slightly lighter for hover */
}

/* CTA Button */
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 24px;
  padding: 10px 18px;
  height: 44px; /* Fixed height for vertical alignment */
  border-radius: 6px;
  background: linear-gradient(135deg, #9B2335 0%, #C0392B 100%);
  color: #FFFFFF; /* WCAG compliant white */
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.header-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(155, 35, 53, 0.3);
}

/* ===== PREVENT CONTENT OVERLAP ===== */

/* Hero section - prevent overlap with fixed header */
.hero {
  padding-top: calc(var(--header-height) + 28px); /* Header height + breathing room */
  position: relative;
}

/* Main content wrapper */
.page-content,
.main-content {
  padding-top: calc(var(--header-height) + 20px);
}

/* All headings - ensure no negative margins */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  scroll-margin-top: calc(var(--header-height) + 20px); /* For anchor links */
}

/* Specific hero heading fix */
.hero h1 {
  line-height: 1.02; /* Compact lines for large type */
  margin-bottom: 1.5rem;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Tablet (≤1024px) */
@media (max-width: 1024px) {
  :root {
    --header-height: var(--header-height-tablet);
    --header-h-padding: var(--header-h-padding-tablet);
  }
  
  .header {
    padding: 0 var(--header-h-padding-tablet);
  }
  
  .nav {
    gap: 20px;
  }
  
  .nav a {
    padding: 10px 6px;
    font-size: 15px;
  }
  
  .header-cta {
    padding: 9px 14px;
    height: 40px;
    margin-left: 18px;
  }
  
  .hero {
    padding-top: calc(var(--header-height) + 20px);
  }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
  :root {
    --header-height: var(--header-height-mobile);
    --header-h-padding: var(--header-h-padding-mobile);
  }
  
  .header {
    padding: 0 var(--header-h-padding-mobile);
  }
  
  .brand {
    gap: 10px;
  }
  
  .nav {
    display: none; /* Will be replaced with hamburger menu */
  }
  
  .header-cta {
    padding: 8px 12px;
    height: 36px;
    margin-left: 12px;
    font-size: 14px;
  }
  
  .hero {
    padding-top: calc(var(--header-height) + 18px);
  }
  
  /* Mobile menu toggle (placeholder) */
  .nav-toggle {
    display: block;
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 24px;
    cursor: pointer;
  }
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */

/* Focus states */
.header a:focus,
.header-cta:focus,
.nav a:focus {
  outline: 3px solid #FFB020; /* High contrast focus outline */
  outline-offset: 2px;
}

/* Skip navigation link */
.skip-nav {
  position: absolute;
  top: -40px;
  left: 0;
  background: #9B2335;
  color: #FFFFFF;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 1001;
}

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

/* ===== DEBUG HELPERS (remove in production) ===== */
.debug-header-overlap {
  outline: 4px solid rgba(255, 0, 0, 0.2);
}

/* ===== INTEGRATION INSTRUCTIONS ===== */
/*
1. Add this to HTML: <link rel="stylesheet" href="css/header-fixes.css">
2. Ensure header has class="header"
3. Ensure hero has class="hero"
4. Test at breakpoints: 1920px, 1024px, 768px, 375px
*/
