/**
 * public-layout.css
 *
 * Styles for the public-facing page chrome: header, mobile menu,
 * footer, and responsive visibility utilities (.desktop-only / .mobile-only).
 *
 * Loaded by: templates/partials/head-home.html
 *            templates/partials/head.html
 *
 * Source: extracted from main.deprecated.css
 *   section-container  → line 418
 *   main-header block  → lines 3183–3558
 *   footer block       → lines 9792–10048
 *   footer-nav-group / footer-bottom-bar / footer-legal → lines 10427–10529
 *   desktop/mobile utilities → lines 10555–10575
 *
 * Dependencies: design-tokens.css (must be loaded first)
 */

/* ========================================
   SECTION CONTAINER
   ======================================== */

.section-container {
  max-width: 144rem;
  margin: 0 auto;
}

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

.main-header {
  padding: 0 2.5rem;
  color: var(--text-primary);
}
.main-header .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3.2rem;
  flex-wrap: wrap;
  max-width: 144rem;
  margin: auto;
  padding: 1rem 0;
}
.main-header .header-nav {
  flex-grow: 1;
}
.main-header .nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 3.2rem;
  justify-content: flex-end;
}
.main-header .nav-item {
  margin: 0;
}
.main-header .nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  padding: 0.8rem 1.6rem;
  border-radius: 0.4rem;
  transition: all 0.3s ease;
}
.main-header .nav-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}
.main-header .logo {
  flex-shrink: 0;
  max-width: 17.8rem;
  margin-bottom: 0.8rem;
}
.main-header .logo-img {
  object-fit: contain;
}
.main-header .right-actions {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  justify-content: flex-end;
}
.main-header .user-info .user-info__fullname {
  font-size: var(--text-base);
}
.main-header .button-border-inverse {
  color: var(--text-primary);
  border-color: var(--text-primary);
}
.main-header .button-border-inverse:not(disabled):not(.disabled):hover,
.main-header .button-border-inverse:not(.disabled):not(.disabled):hover,
.main-header .button-border-inverse:not(disabled):focus,
.main-header .button-border-inverse:not(.disabled):focus {
  background-color: var(--text-primary);
  color: #ffffff;
}

@media (max-width: 480px) {
  .main-header {
    padding: 1.2rem 2.5rem;
  }
  .main-header .header-container {
    flex-direction: column;
    justify-content: center;
    gap: 0;
  }
  .main-header .header-container .buttons {
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 1rem;
  }
  .main-header .user-info {
    position: absolute !important;
    top: 2rem;
    right: 2rem;
  }
  .main-header .user-info .user-info__fullname {
    display: none;
  }
}

/* ========================================
   LANGUAGE OPTIONS
   ======================================== */

.language-options ul {
  display: flex;
  gap: 0.4rem;
  list-style-type: none;
  margin: 0;
  padding: 0;
}
.language-options ul li {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
.language-options ul li a {
  display: inline-flex;
  font-size: var(--text-base);
  text-transform: uppercase;
  color: var(--text-primary);
  padding: 0.4rem 0.8rem;
  border-radius: 0.4rem;
  font-weight: var(--font-medium);
  font-style: normal;
}
.language-options ul li a.active {
  background-color: rgba(0, 0, 0, 0.08);
}
.language-options ul li a:hover {
  color: var(--text-primary);
}

/* ========================================
   MOBILE HAMBURGER MENU
   ======================================== */

/* Hidden on desktop */
.hamburger-btn,
.mobile-menu-overlay,
.mobile-menu-panel {
  display: none;
}

@media (max-width: 767px) {
  .main-header {
    height: 64px;
    padding: 0 1.6rem;
    overflow: visible;
  }

  .main-header .header-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    flex-wrap: nowrap;
    gap: 1.2rem;
    padding: 0;
    overflow: visible;
  }

  .main-header .logo {
    margin-bottom: 0;
    max-width: 13rem;
    order: 2;
  }

  .main-header .logo-img {
    max-width: 100%;
    height: auto;
  }

  /* Hamburger Button
   * .hamburger-btn.mobile-only needed because .mobile-only gives display:block !important
   * which overrides display:flex. Two-class selector has higher specificity (0,2,0 > 0,1,0)
   * and wins the !important cascade. */
  .hamburger-btn,
  .hamburger-btn.mobile-only {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1000;
    order: 1;
  }

  .hamburger-icon {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    position: relative;
    transition: all 0.3s ease;
  }

  .hamburger-icon::before,
  .hamburger-icon::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
  }

  .hamburger-icon::before {
    transform: translateY(-7px);
  }

  .hamburger-icon::after {
    transform: translateY(7px);
  }

  .main-header .right-actions {
    order: 3;
    gap: 0;
    position: relative;
  }

  .main-header .user-info {
    position: static !important;
    top: auto;
    right: auto;
  }

  .main-header .user-info.dropdown {
    display: inline-flex;
    position: relative;
    z-index: 1001;
  }

  .main-header .user-info .dropdown-menu {
    z-index: 1001 !important;
  }

  /* Overlay */
  .mobile-menu-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  body.mobile-menu-opened .mobile-menu-overlay {
    opacity: 1;
    visibility: visible;
  }

  /* Slide-in panel */
  .mobile-menu-panel {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background-color: #FFFFFF;
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
  }

  body.mobile-menu-opened .mobile-menu-panel {
    transform: translateX(0);
  }

  .mobile-menu-header {
    display: flex;
    justify-content: flex-end;
    padding: 1.6rem;
    border-bottom: 1px solid #E5E7EB;
  }

  .mobile-menu-close {
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    font-size: 2.4rem;
    color: #111111;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  .mobile-menu-list {
    list-style: none;
    padding: 1.6rem 0;
    margin: 0;
  }

  .mobile-menu-list > li {
    margin: 0;
  }

  .mobile-menu-list > li > a {
    display: block;
    padding: 1.6rem 2.4rem;
    font-size: var(--text-base);
    color: #111111;
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-weight: var(--font-medium);
  }

  .mobile-menu-list > li > a:hover {
    background-color: #F3F4F6;
  }

  .mobile-menu-divider {
    height: 1px;
    background-color: #E5E7EB;
    margin: 1.6rem 0;
  }

  .mobile-menu-language {
    padding: 0;
  }

  .mobile-menu-language .language-label {
    display: block;
    padding: 1.6rem 2.4rem 0.8rem;
    font-size: 1.4rem;
    font-weight: var(--font-semibold);
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .mobile-menu-language form {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .mobile-menu-language button {
    display: block;
    padding: 1.2rem 2.4rem;
    font-size: 1.6rem;
    color: #111111;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-weight: var(--font-normal);
    width: 100%;
  }

  .mobile-menu-language button:hover {
    background-color: #F3F4F6;
  }

  .mobile-menu-language button.active {
    background-color: #E0E7FF;
    color: #4338CA;
    font-weight: var(--font-medium);
  }
}

/* ========================================
   FOOTER
   ======================================== */

.footer-new {
  background-image: linear-gradient(110deg, #0058e6 0%, #0b92db 55%, #19c79c 100%);
  background-color: #0058e6;
  color: #FFFFFF;
}

.footer-main {
  padding: var(--space-12);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-start;
}

.footer-brand {
  flex: 1.4;
  min-width: 180px;
}

.footer-col-product,
.footer-col-resources,
.footer-col-company {
  flex: 1;
  min-width: 120px;
}

.footer-col-location {
  flex: 1.2;
  min-width: 150px;
}

@media (max-width: 1024px) {
  .footer-content {
    gap: 32px;
  }

  .footer-brand {
    flex: 0 0 100%;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .footer-content {
    gap: 2.4rem;
    text-align: center;
  }

  .footer-col-product,
  .footer-col-resources,
  .footer-col-company,
  .footer-col-location {
    flex: 0 0 100%;
  }

  .footer-main {
    padding: 4rem 0 3rem;
  }
}

.footer-column {
  display: flex;
  flex-direction: column;
}

.footer-title {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  margin: 2rem 0 1rem 0;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-subtitle {
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  margin: 0 0 var(--space-3) 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.footer-links li {
  margin-bottom: 0.5rem;
  margin-left: 0;
  margin-top: 0;
  padding: 0;
  line-height: 1.1;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: var(--text-base);
  line-height: 1.5;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #FFFFFF;
  text-decoration: none;
}

.footer-link {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: var(--text-sm);
  margin-bottom: 9px;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #FFFFFF;
}

.footer-contact-info {
  margin-bottom: 2.4rem;
}

.footer-email a {
  color: #FFFFFF;
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.footer-email a:hover {
  opacity: 0.8;
}

.footer-description {
  font-size: var(--text-base);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin: 1.2rem 0 0 0;
}

.footer-logo {
  margin-bottom: 2.4rem;
}

.footer-logo-img {
  height: auto;
  max-width: 30rem;
  filter: brightness(0) invert(1);
}

.footer-tagline {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  margin: 0 0 1.6rem 0;
  color: #FFFFFF;
  line-height: 1.3;
}

.footer-brand-description {
  font-size: var(--text-base);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

/* Sponsors Bar */
.footer-sponsors-bar {
  background-color: #FFFFFF;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2.4rem 0;
}

.footer-sponsors-content {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  gap: 2rem;
  min-height: 4rem;
}

@media (max-width: 1024px) {
  .footer-sponsors-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
}

.footer-copyright {
  color: #FFF;
  display: flex;
  align-items: center;
}

.footer-sponsors {
  display: flex;
  align-items: center;
  gap: 2rem;
}

@media (max-width: 1024px) {
  .footer-sponsors {
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
  }
}

.sponsors-text {
  font-size: 1rem;
  color: #666;
  margin: 0;
  margin-bottom: 0 !important;
  white-space: nowrap;
  display: flex;
  align-items: center;
  line-height: 1;
  font-weight: var(--font-medium);
}

.sponsors-logos {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .sponsors-logos {
    justify-content: center;
    gap: 1.5rem;
  }
}

.sponsor-logo {
  max-height: var(--space-10);
  width: auto;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.sponsor-logo:hover {
  opacity: 1;
}

/* ========================================
   FOOTER NAV GROUP & MOBILE NAV
   ======================================== */

.footer-nav-group {
  display: flex;
  flex-direction: column;
}

.footer-mobile-nav {
  margin-top: 1.6rem;
}

.footer-address {
  font-style: normal;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin: 0 0 var(--space-3) 0;
  font-size: var(--text-sm);
}

.footer-maps-link {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: underline;
  margin-top: 0.5rem;
}

.footer-maps-link:hover {
  color: #FFFFFF;
}

.footer-sla {
  color: rgba(255, 255, 255, 0.6);
  margin-top: 1rem;
}

/* ========================================
   FOOTER BOTTOM BAR
   ======================================== */

.footer-bottom-bar {
  background-color: rgba(0, 20, 60, 0.28);
  padding: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--text-sm);
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: var(--font-medium);
}

.footer-legal a:hover {
  color: #FFFFFF;
}

.footer-legal .separator {
  color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-legal {
    justify-content: center;
  }
}

/* ========================================
   RESPONSIVE VISIBILITY UTILITIES
   ======================================== */

@media (max-width: 767px) {
  .desktop-only {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .mobile-only {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .mobile-only {
    display: block !important;
  }
}

/* ========================================
   COOKIE ADVICE MODAL
   Source: main.deprecated.css lines 5240–5335, 11211–11240
   ======================================== */

.cookie-overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.1);
  width: 100%;
  height: 100%;
  display: none;
}

.cookie-advice {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1030;
  margin: 2.4rem;
  display: none;
}

.cookie-advice__container {
  width: 90%;
  max-width: 40rem;
  max-height: 90vh;
  overflow: auto;
  padding: 2.4rem 2.4rem 3.6rem;
  background: linear-gradient(135deg, rgba(136, 241, 212, 0.95), rgba(131, 183, 255, 0.95));
  color: #FFFFFF;
  box-shadow: 0px 7px 14px rgba(0, 0, 0, 0.2);
}

@media (max-width: 480px) {
  .cookie-advice__container {
    width: 100%;
    max-width: 36rem;
  }
}

.cookie-advice__container p {
  font-size: 1.4rem;
  line-height: 1.286;
  color: rgba(12, 73, 56, 0.9);
  margin: 1.8rem 0;
}

.cookie-advice__container p a {
  color: #026DFF;
}

.cookie-advice__container p a:hover {
  color: rgba(31, 209, 159, 0.9);
}

.cookie-advice__header {
  display: flex;
  justify-content: space-around;
  align-items: center;
  column-gap: 2.4rem;
  padding: 1.8rem 0;
  margin: 0;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.60);
  z-index: 9;
  border-radius: 12px 12px 12px 12px;
  text-align: center;
}

.cookie-advice__header + p {
  margin-top: 0;
}

.cookie-advice__close {
  flex-shrink: 0;
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
}

.cookie-advice__title {
  color: #026DFF;
  font-size: var(--text-base);
  line-height: 1.625;
  margin: 0;
  font-weight: var(--font-bold);
  font-style: normal;
  text-align: center;
}

.cookie-advice__options {
  display: flex;
  flex-direction: column;
  row-gap: 0rem;
  margin-bottom: 2.4rem;
}

.cookie-advice__options .field {
  margin-bottom: 0.8rem;
}

.cookie-advice__options p {
  display: none !important;
  margin: 0;
}

.cookie-advice .button-border-inverse {
  display: block;
  margin: 0 auto;
  text-align: center;
}

@media (max-width: 768px) {
  .cookie-advice {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    top: auto;
    margin: 2rem 0;
  }

  .cookie-advice__container {
    width: 90vw;
    max-width: 36rem;
  }
}
