/* ============================================
   UNIFIED HEADER & FOOTER COMPONENTS
   Modern, Responsive, Accessible
   ============================================ */

/* Skip to main content link for accessibility */
.gc-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 99999;
  padding: 12px 20px;
  background: #000;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 4px 0;
  transition: left 0.3s ease;
}

.gc-skip-link:focus {
  left: 0;
}

/* ============================================
   HEADER STYLES
   ============================================ */

.gc-header {
  position: sticky;
  top: 0;
  z-index: 2000;
  background-color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.gc-header.is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #ffffff !important;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);
  animation: gcSlideDown 0.4s ease forwards;
}

@keyframes gcSlideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Prevent parent overflow from breaking sticky behavior */
.main-wrapper {
  overflow: visible !important;
}

/* Hide legacy sticky headers from templates to avoid conflicts */
.stricked-menu, .sticky-header {
  display: none !important;
}

.gc-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 20px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  justify-content: space-between;
}

/* Brand/Logo Section */
.gc-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.gc-brand:hover {
  opacity: 0.85;
}

.gc-brand__logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  display: block;
}

.gc-brand__text {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  color: #111;
}

/* Navigation */
.gc-nav {
  margin-inline-start: auto;
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

.gc-nav__list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.gc-nav__item {
  position: relative;
}

.gc-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  font-weight: 600;
  font-size: 15px;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.gc-nav__link:hover,
.gc-nav__link:focus-visible {
  background: rgba(0, 0, 0, 0.06);
  color: #000;
  outline: none;
}

.gc-nav__link[aria-current="page"] {
  background: rgb(33 150 243 / 20%);
  color: #000;
}

.gc-nav__link--button {
  cursor: pointer;
}

.gc-nav__link--button::after {
  content: "▼";
  font-size: 10px;
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.gc-nav__link--button[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

/* Submenu */
.gc-nav__item--has-submenu {
  position: relative;
}

.gc-submenu {
  pointer-events: none;
  list-style: none;
  margin: 0;
  padding: 8px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  min-width: 240px;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.gc-submenu.is-open {
  pointer-events: auto;
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.gc-submenu__link {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
}

.gc-submenu__link:hover,
.gc-submenu__link:focus-visible {
  background: rgba(235, 248, 0, 0.15);
  color: #000;
  outline: none;
  padding-left: 18px;
}

/* Mobile Navigation Toggle */
.gc-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.gc-nav-toggle:hover,
.gc-nav-toggle:focus {
  background: rgba(0, 0, 0, 0.1);
  outline: none;
}

.gc-nav-toggle[aria-expanded="true"] {
  background: rgba(0, 0, 0, 0.1);
}

.gc-nav-toggle__icon {
  width: 22px;
  height: 2px;
  background: currentColor;
  display: block;
  position: relative;
  transition: background 0.2s ease;
}

.gc-nav-toggle__icon::before,
.gc-nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform 0.3s ease, top 0.3s ease;
}

.gc-nav-toggle__icon::before {
  top: -7px;
}

.gc-nav-toggle__icon::after {
  top: 7px;
}

.gc-nav-toggle[aria-expanded="true"] .gc-nav-toggle__icon {
  background: transparent;
}

.gc-nav-toggle[aria-expanded="true"] .gc-nav-toggle__icon::before {
  top: 0;
  transform: rotate(45deg);
}

.gc-nav-toggle[aria-expanded="true"] .gc-nav-toggle__icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.gc-nav-toggle__label {
  font-weight: 600;
  font-size: 14px;
}

/* CTA Button */
.gc-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 50px;
  background: var(--theme-color, #ebf800);
  color: #111;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(235, 248, 0, 0.3);
  flex-shrink: 0;
}

.gc-header__cta:hover,
.gc-header__cta:focus {
  background: #d9e800;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(235, 248, 0, 0.4);
  outline: none;
}

/* ============================================
   FOOTER STYLES
   ============================================ */

.gc-footer {
  background: #111111;
  color: #e0e0e0;
  margin-top: 60px;
  position: relative;
}

.gc-footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.gc-footer a:hover,
.gc-footer a:focus {
  color: #ebf800;
  outline: none;
}

.gc-footer__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 50px 20px 30px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 50px;
}

.gc-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gc-footer__logo {
  display: inline-block;
  transition: opacity 0.2s ease;
}

.gc-footer__logo:hover {
  opacity: 0.85;
}

.gc-footer__logo img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.gc-footer__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #b0b0b0;
  max-width: 400px;
}

.gc-footer__contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gc-footer__contact li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.gc-footer__contact i {
  width: 18px;
  text-align: center;
  color: #2196F3;
  flex-shrink: 0;
}

.gc-footer__contact a {
  color: #e0e0e0;
}

.gc-footer__contact a:hover {
  color: #2196F3;
}

/* Footer Navigation */
.gc-footer__nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.gc-footer__col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gc-footer__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #2196F3;
}

.gc-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gc-footer__links a {
  display: inline-block;
  font-size: 14px;
  color: #b0b0b0;
  padding: 4px 0;
  transition: all 0.2s ease;
}

.gc-footer__links a:hover {
  color: #ebf800;
  padding-left: 6px;
}

/* Footer Bottom */
.gc-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1400px;
  margin: 0 auto;
}

.gc-footer__copyright {
  margin: 0;
  font-size: 14px;
  color: #888;
}

.gc-footer__copyright a {
  color: #2196F3;
}

.gc-footer__copyright a:hover {
  text-decoration: underline;
}

.gc-footer__social {
  display: inline-flex;
  gap: 12px;
  align-items: center;
}

.gc-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
  font-size: 16px;
  transition: all 0.2s ease;
}

.gc-footer__social a:hover,
.gc-footer__social a:focus {
  background: #ebf800;
  color: #111;
  transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablet and below (max-width: 991px) */
@media (max-width: 991px) {
  .gc-header__inner {
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .gc-nav-toggle {
    display: inline-flex;
    margin-left: auto;
    order: 2;
  }

  .gc-header__cta {
    order: 3;
    margin-left: auto;
  }

  .gc-nav {
    display: none;
    width: 100%;
    order: 4;
    margin-inline-start: 0;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
  }

  .gc-nav.is-open {
    display: block;
  }

  .gc-nav__list {
    flex-direction: column;
    /* align-items: stretch; */
    gap: 4px;
  }

  .gc-nav__link {
    width: 100%;
    justify-content: space-between;
    padding: 12px 14px;
  }

  .gc-submenu {
    position: static;
    margin: 8px 0 0 0;
    box-shadow: none;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.02);
    opacity: 1;
    transform: none;
    display: none;
  }

  .gc-submenu.is-open {
    display: block;
  }

  .gc-footer__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 20px 30px;
  }

  .gc-footer__nav {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .gc-footer__bottom {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
}

/* Mobile (max-width: 575px) */
@media (max-width: 575px) {
  .gc-header__inner {
    padding: 10px 12px;
    gap: 12px;
  }

  .gc-brand__logo {
    width: 44px;
    height: 44px;
  }

  .gc-brand__text {
    font-size: 16px;
  }

  .gc-nav-toggle {
    padding: 8px 12px;
  }

  .gc-nav-toggle__label {
    display: none;
  }

  .gc-header__cta {
    padding: 8px 16px;
    font-size: 13px;
  }

  .gc-footer__inner {
    padding: 30px 16px 24px;
    gap: 30px;
  }

  .gc-footer__logo img {
    width: 56px;
    height: 56px;
  }

  .gc-footer__title {
    font-size: 16px;
  }

  .gc-footer__contact {
    font-size: 13px;
  }

  .gc-footer__links a {
    font-size: 13px;
  }

  .gc-footer__bottom {
    padding: 16px;
  }

  .gc-footer__copyright {
    font-size: 12px;
  }

  .gc-footer__social a {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
}

/* Large screens (min-width: 1200px) */
@media (min-width: 1200px) {
  .gc-header__inner {
    padding: 16px 24px;
  }

  .gc-nav__list {
    gap: 8px;
  }

  .gc-footer__inner {
    padding: 60px 24px 40px;
    gap: 60px;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .gc-header,
  .gc-nav__link,
  .gc-submenu,
  .gc-footer a,
  .gc-header__cta {
    transition: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .gc-header {
    border-bottom-width: 2px;
  }

  .gc-nav__link {
    border: 1px solid transparent;
  }

  .gc-nav__link:focus-visible {
    border-color: currentColor;
    outline: 2px solid currentColor;
    outline-offset: 2px;
  }
}
