/* ============================================
   SITE HEADER - Modern Responsive CSS
   ============================================ */

/* Fixed Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #d8d8d8 !important; /* stejná barva jako sekce benefits (#d8d8d8) */
  background-color: #d8d8d8 !important;
  border-bottom: none;
  transition: padding 0.2s ease, border-bottom 0.2s ease;
  padding: 1rem 0;
}

.site-header.is-scrolled {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.site-header.is-scrolled .nav-wrap {
  height: 2.5rem;
  transition: height 0.2s ease;
}

.site-header.is-scrolled .brand {
  font-size: 1rem;
  transition: font-size 0.2s ease;
}

.site-header.is-scrolled .brand img {
  height: 2.5rem; /* Match reduced nav-wrap height when scrolled */
  width: auto;
  transition: height 0.2s ease;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .site-header {
    transition: none;
  }
}

/* Navigation Wrapper */
.nav-wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 3rem;
  padding: 0 max(var(--page-frame, 60px), 2rem);
  max-width: 100%;
  transition: height 0.2s ease;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #111111;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1;
  transition: opacity 0.15s ease, font-size 0.2s ease;
  border-bottom: none !important;
  justify-self: start;
}

.brand:hover {
  opacity: 0.7;
  text-decoration: none;
  border-bottom: none !important;
}

.brand img {
  height: 3rem; /* Match nav-wrap height */
  width: auto;
  max-width: 200px; /* Prevent logo from being too wide */
  flex-shrink: 0;
  transition: height 0.2s ease;
  object-fit: contain;
}

/* Mobile Navigation Toggle */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  padding: 0.75rem;
  flex-direction: row;
  border-radius: 0;
  transition: background-color 0.15s ease;
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
}

.nav-toggle-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
}

.nav-toggle-text {
  display: none;
  color: #111111;
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1;
  text-transform: none;
}

.nav-toggle:focus,
.nav-toggle:active,
.nav-toggle:focus-visible {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
  background-color: transparent !important;
}

.nav-toggle:hover {
  background-color: transparent !important;
  box-shadow: none !important;
}

.nav-toggle-box {
  width: 24px;
  height: 2px;
  background: #111111;
  transition: all 0.15s ease;
  transform-origin: center;
  border-radius: 2px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon .nav-toggle-box:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon .nav-toggle-box:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon .nav-toggle-box:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Desktop Navigation */
.site-nav {
  justify-self: center;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: #333333;
  text-decoration: none;
  border-bottom: none !important;
  font-weight: 500;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.15s ease;
}

/* Animated underline - expands from center */
.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: rgba(0, 0, 0, 0.35);
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #111111;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  width: 100%;
}

.site-nav a.cta {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.15s ease;
}

.site-nav a.cta:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  border-bottom-color: rgba(255, 255, 255, 0.3);
}

/* Header Social Icons */
.header-social {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-self: end;
}

.header-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: #111111;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.15s ease, opacity 0.15s ease;
  border-bottom: none !important;
}

.header-social a:hover {
  background-color: rgba(0, 0, 0, 0.05);
  opacity: 0.7;
  border-bottom: none !important;
}

.header-social a .icon:before {
  font-size: 1.25rem;
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablet and below */
@media (max-width: 980px) {
  .site-header {
    padding: 0.5rem 0; /* Stejná výška jako při scrollování */
  }
  
  .nav-wrap {
    grid-template-columns: 1fr auto auto;
    height: 2.5rem; /* Stejná výška jako při scrollování */
    padding: 0 max(var(--page-frame, 25px), 1rem);
  }

  .brand {
    font-size: 1rem;
    padding-left: 15px; /* Stejné odsazení jako hero sekce */
  }

  .brand img {
    height: 2.5rem; /* Stejná výška jako při scrollování */
    width: auto;
  }

  .nav-toggle {
    display: flex !important;
    order: 2;
    box-shadow: none !important;
  }

  .header-social {
    display: none !important;
  }
  
  .nav-toggle {
    display: flex !important;
    order: 2;
    box-shadow: none !important;
  }
  
  .nav-toggle-text {
    display: block !important;
  }
  
  .nav-toggle-box {
    width: 24px;
    height: 2.5px;
  }
  
  .nav-toggle-icon {
    gap: 4px;
  }

  .header-social a {
    width: 2.25rem;
    height: 2.25rem;
  }

  .header-social a .icon:before {
    font-size: 1.1rem;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #d8d8d8; /* stejná barva jako sekce benefits (#d8d8d8) */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.15s ease;
    padding: 1.5rem 0;
    grid-column: 1 / -1;
  }

  .site-nav[aria-expanded="true"] {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav li {
    width: 100%;
  }

  .site-nav a {
    display: block;
    padding: 1.25rem 2rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    border-left: none;
    border-right: none;
    transition: background-color 0.15s ease;
  }

  .site-nav a:hover,
  .site-nav a.active {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: transparent;
  }
  
  /* Hide underline animation on mobile */
  .site-nav a::after {
    display: none;
  }

  .site-nav a.cta {
    margin: 1rem 2rem;
    text-align: center;
  }
}

/* Mobile Small */
@media (max-width: 480px) {
  .nav-wrap {
    padding: 0 max(var(--page-frame, 20px), 0.75rem);
  }
  
  .brand {
    padding-left: 10px; /* Stejné odsazení jako hero sekce na menších obrazovkách */
  }
  
  .site-nav a {
    padding: 1rem 1.5rem;
  }
}

