/* ============================================
   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, visibility 0.2s ease;
}

/* Bridge the gap for hover */
.gc-nav__item--has-submenu::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 20px; /* Bridge the gap */
  display: none;
  z-index: 1;
}


@media (min-width: 992px) {
  .gc-nav__item--has-submenu:hover::after {
    display: block;
  }
}


.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: rgb(33 150 243 / 20%);
  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: #2196F3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(235, 248, 0, 0.4);
  outline: none;
}

/* Language Switcher Dropdown */
.gc-lang-switch {
  position: relative;
  display: inline-block;
  margin-left: 20px;
  flex-shrink: 0;
}

.gc-lang-current {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  color: #333;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s ease;
  background: transparent;
  border: none;
  text-transform: uppercase;
}

.gc-lang-current:hover {
  background: rgba(0, 0, 0, 0.05);
}

.gc-lang-current::after {
  content: "▼";
  font-size: 10px;
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.gc-lang-current[aria-expanded="true"]::after,
.gc-lang-switch:hover .gc-lang-current::after {
  transform: rotate(180deg);
}

.gc-lang-dropdown {
  /* Inherits most styles from .gc-submenu */
  right: 0;
  left: auto; /* Override gc-submenu default */
  min-width: 160px;
  padding: 6px;
  z-index: 1001;

  /* Ensure visibility overrides */
  display: none; 
}

/* Show dropdown on hover for desktop */
@media (min-width: 992px) {
  .gc-nav__item--has-submenu:hover .gc-submenu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
  
  .gc-nav__item--has-submenu:hover .gc-nav__link--button::after,
  .gc-nav__item--has-submenu:hover .gc-lang-current::after {
    transform: rotate(180deg);
  }
}

/* Show dropdown when open (Mobile + Keyboard support) */
.gc-lang-dropdown.is-open {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Dropdown link styles */
.gc-lang-link {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s ease;
  width: 100%;
  text-align: left;
}

.gc-lang-link:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #1F5FFF;
}

.gc-lang-link.active {
  font-weight: 700;
  background: rgba(31, 95, 255, 0.05);
  color: #1F5FFF;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile adjustments for Language Switcher */
@media (max-width: 991px) {
  .gc-lang-dropdown {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* RTL Support */
[dir="rtl"] .gc-lang-switch {
  margin-left: 0;
  margin-right: 20px;
}

[dir="rtl"] .gc-lang-dropdown {
  right: auto;
  left: 0;
  text-align: right;
}

[dir="rtl"] .gc-lang-current::after {
  margin-left: 0;
  margin-right: 4px;
}

[dir="rtl"] .gc-lang-link {
  text-align: right;
}

[dir="rtl"] .gc-submenu__link:hover,
[dir="rtl"] .gc-submenu__link:focus-visible {
  padding-left: 14px; /* Reset original padding */
  padding-right: 18px;
}

/* ============================================
   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: #1F5FFF;
  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;
}

.gc-footer__text {
  max-width: 400px;
  line-height: 1.6;
  font-size: 15px;
  color: #b0b0b0;
  margin: 0;
}

.gc-footer__contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.gc-footer__contact li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}

.gc-footer__contact i {
  width: 20px;
  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: #1F5FFF;
  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: #2196F3;
  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-lang-switch {
    margin-left: auto;
    margin-right: 12px;
    order: 1;
  }

  .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;
  }

  /* Override for Language Dropdown to keep it absolute/dropdown-like on mobile */
  .gc-submenu.gc-lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    margin: 8px 0 0 0;
    width: 160px;
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transform: translateY(-10px);
    z-index: 1001;
    display: none;
  }

  .gc-submenu.gc-lang-dropdown.is-open {
    display: block;
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .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;
  }
}
