/* Modern Floating Header & Footer Styles */

/* ===== FLOATING HEADER ===== */
.floating-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 9999;
  background: transparent;
  backdrop-filter: none;
  border-bottom: none;
  transition: all 0.3s ease;
  overflow: hidden;
  box-sizing: border-box;
}

/* Header Container for full width */
.header-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
  position: relative;
  z-index: 9999;
  min-height: 80px;
}

@media (max-width: 1200px) {
  .header-container {
    max-width: 100%;
    padding: 0 1.5rem;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 0 1rem;
  }
}

/* Prevent horizontal scrollbars */
html, body {
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
}

* {
  box-sizing: border-box;
}

/* Ensure main content doesn't interfere with mega menu */
main, .main-content, .content-area {
  position: relative;
  z-index: 1;
}

/* Ensure main content starts below header */
#main-content {
  position: relative;
  z-index: 1;
  margin-top: 0;
}

/* Ensure hero section doesn't cover header */
.hero {
  position: relative;
  z-index: 1;
}

/* Force all other elements to stay below mega menu */
*:not(.mega-menu):not(.floating-header):not(.header-container):not(.header-content):not(.main-navigation):not(.nav-item) {
  z-index: auto !important;
}

/* Ensure mega menu is always on top */
.mega-menu {
  z-index: 99999 !important;
}

/* Ensure header and all its children are above page content */
.floating-header,
.floating-header * {
  z-index: 9999 !important;
}

/* Ensure mega menu is above everything */
.mega-menu,
.mega-menu * {
  z-index: 99999 !important;
}

.floating-header.scrolled {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

/* Header Top Bar */
.header-top {
  background: var(--brown);
  color: white;
  padding: 8px 0;
  font-size: 14px;
}

.top-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contact-info {
  display: flex;
  gap: 20px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: white;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.contact-link:hover {
  opacity: 0.8;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  color: white;
  transition: transform 0.2s ease;
}

.social-link:hover {
  transform: scale(1.1);
}

/* Header Main */
.header-main {
  padding: 15px 0;
  background: transparent;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  z-index: 9999;
  min-height: 80px;
}

/* Logo Section */
.logo-section {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
}

.logo-link {
  text-decoration: none;
  color: inherit;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.flag-logo {
  width: 50px;
  height: 35px;
  object-fit: cover;
  border-radius: 4px;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.foundation-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--black);
  margin: 0;
  line-height: 1.2;
}

.foundation-subtitle {
  font-size: 14px;
  color: var(--brown);
  margin: 0;
  font-weight: 500;
}

/* Navigation */
.main-navigation {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 10000;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
  flex-wrap: nowrap;
  max-width: 100%;
  justify-content: center;
  align-items: center;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  z-index: 10000;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  color: var(--black);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border-radius: 6px;
  position: relative;
  white-space: nowrap;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.1);
}

.nav-link:hover {
  color: var(--brown);
  background: rgba(139, 92, 42, 0.2);
}

.dropdown-arrow {
  transition: transform 0.2s ease;
}

.nav-item:hover .dropdown-arrow {
  transform: rotate(180deg);
}

/* Mega Menu */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: white;
  border-radius: 12px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
  padding: 30px;
  min-width: 600px;
  max-width: 90vw;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(139, 92, 42, 0.2);
  overflow: hidden;
  z-index: 99999;
}

.nav-item:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mega-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  max-width: 100%;
}

.mega-section h3 {
  color: var(--brown);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 15px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mega-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-section li {
  margin-bottom: 10px;
}

.mega-section a {
  color: var(--black);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
  display: block;
  padding: 6px 0;
  border-radius: 4px;
  padding-left: 8px;
}

.mega-section a:hover {
  color: var(--brown);
  background: rgba(139, 92, 42, 0.1);
  padding-left: 12px;
}

/* Header Actions */
.header-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  position: relative;
  z-index: 10000;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 10001;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-primary {
  background: var(--green);
  color: white;
}

.btn-primary:hover {
  background: #167a3d;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--brown);
  color: white;
}

.btn-secondary:hover {
  background: #7a4f24;
  transform: translateY(-1px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.mobile-menu-toggle:hover {
  background: rgba(139, 92, 42, 0.1);
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background: var(--black);
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation */
.mobile-navigation {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  z-index: 2000;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.mobile-navigation.active {
  transform: translateX(0);
}

.mobile-nav-content {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid rgba(139, 92, 42, 0.1);
}

.mobile-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--black);
}

.mobile-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--black);
  padding: 8px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.mobile-close:hover {
  background: rgba(139, 92, 42, 0.1);
}

.mobile-nav-menu {
  flex: 1;
  padding: 20px;
}

.mobile-nav-footer {
  padding: 20px;
  border-top: 1px solid rgba(139, 92, 42, 0.1);
}

.mobile-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-contact-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--black);
  text-decoration: none;
  font-size: 14px;
}

/* Mobile Menu Styling */
.mobile-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu-item {
  border-bottom: 1px solid rgba(139, 92, 42, 0.1);
}

.mobile-menu-toggle-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  background: none;
  border: none;
  color: var(--black);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.mobile-menu-link {
  display: block;
  padding: 15px 0;
  color: var(--black);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
}

.mobile-submenu {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.mobile-submenu-list {
  list-style: none;
  margin: 0;
  padding: 0 20px;
}

.mobile-submenu-section {
  margin-bottom: 20px;
}

.mobile-submenu-title {
  color: var(--brown);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 10px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.mobile-submenu-links li {
  margin-bottom: 8px;
}

.mobile-submenu-links a {
  color: var(--black);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 0;
  display: block;
  transition: color 0.2s ease;
}

.mobile-submenu-links a:hover {
  color: var(--brown);
}

.mobile-arrow {
  transition: transform 0.3s ease;
}

/* ===== MODERN FOOTER ===== */
.modern-footer {
  background: var(--black);
  color: white;
  margin-top: auto;
}

.footer-main {
  padding: 60px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.footer-section h4 {
  color: var(--cream);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 20px 0;
  position: relative;
}

.footer-section h4::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--green);
}

/* Footer Logo */
.footer-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.footer-logo .flag-logo {
  width: 60px;
  height: 42px;
}

.footer-logo .logo-text h3 {
  color: var(--cream);
  font-size: 20px;
  margin: 0 0 5px 0;
}

.footer-logo .logo-text p {
  color: var(--brown);
  margin: 0;
  font-size: 14px;
}

.footer-description {
  color: #ccc;
  line-height: 1.6;
  margin-bottom: 25px;
}

/* Footer Social */
.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social .social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  transition: all 0.2s ease;
}

.footer-social .social-link:hover {
  background: var(--green);
  transform: translateY(-2px);
}

/* Footer Links */
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.2s ease;
  display: block;
  padding: 4px 0;
}

.footer-links a:hover {
  color: var(--cream);
  padding-left: 5px;
}

/* Coverage Info */
.coverage-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.country-section h5 {
  color: var(--cream);
  font-size: 16px;
  margin: 0 0 8px 0;
}

.country-section p {
  color: #ccc;
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

/* Contact Info */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.contact-item svg {
  color: var(--green);
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-item strong {
  color: var(--cream);
  font-size: 14px;
  display: block;
  margin-bottom: 4px;
}

.contact-item p {
  color: #ccc;
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

/* Footer Bottom */
.footer-bottom {
  background: rgba(0, 0, 0, 0.3);
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.copyright p {
  color: #ccc;
  margin: 0;
  font-size: 14px;
}

.footer-legal {
  display: flex;
  gap: 20px;
}

.footer-legal a {
  color: #ccc;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: var(--cream);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--green);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #167a3d;
  transform: translateY(-2px);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
  .header-content {
    gap: 20px;
  }
  
  .nav-menu {
    gap: 0;
  }
  
  .nav-link {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .mega-menu {
    min-width: 500px;
    max-width: 85vw;
  }
  
  .mega-content {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
  }
}

@media (max-width: 1024px) {
  .main-navigation {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .header-actions {
    display: none;
  }
  
  .mega-menu {
    min-width: 400px;
  }
  
  .mega-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-top {
    display: none;
  }
  
  .header-main {
    padding: 10px 0;
  }
  
  .logo-container {
    gap: 10px;
  }
  
  .foundation-name {
    font-size: 16px;
  }
  
  .foundation-subtitle {
    font-size: 12px;
  }
  
  .mega-menu {
    min-width: 280px;
    max-width: 90vw;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    padding: 20px;
  }
  
  .nav-item:hover .mega-menu {
    transform: translateX(-50%) translateY(0);
  }
  
  .mega-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .mega-section h3 {
    font-size: 14px;
  }
  
  .mega-section a {
    font-size: 13px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .footer-legal {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .header-content {
    gap: 15px;
  }
  
  .flag-logo {
    width: 40px;
    height: 28px;
  }
  
  .foundation-name {
    font-size: 14px;
  }
  
  .foundation-subtitle {
    font-size: 11px;
  }
  
  .mega-menu {
    min-width: 280px;
    padding: 20px;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  .floating-header,
  .mega-menu,
  .back-to-top,
  .mobile-navigation {
    transition: none;
  }
  
  .dropdown-arrow,
  .hamburger-line {
    transition: none;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .floating-header,
  .mobile-navigation,
  .back-to-top {
    display: none !important;
  }
  
  .modern-footer {
    background: white !important;
    color: black !important;
  }
  
  .footer-section h4 {
    color: black !important;
  }
  
  .footer-links a {
    color: black !important;
  }
} 