/* ===== ANTI-FLICKERING SOLUTION ===== */
/* Hide header and footer until they are loaded */
#header:empty, #footer:empty {
    display: none;
}

/* Prevent flickering during load */
#header, #footer {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

#header.loaded, #footer.loaded {
    opacity: 1;
}

/* Hide main content until components are loaded */
main.content-hidden {
    visibility: hidden;
    opacity: 0;
}

main.content-visible {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

/* Optional: Add minimal loading indicator */
#header:empty::before, #footer:empty::before {
    content: "";
    display: block;
    height: 80px; /* Approximate header height */
    background: transparent;
}

/* ===== EXISTING STYLES ===== */
html {
    font-size: 62.5%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --dark-green: #1B5E20;
    --menu-green: #6bcd31;
    --hover-gold: #FBC02D;
    --cream-bg: #f0dfcc;
    --text-dark: #2D2D2D;
    --text-light: #FFFFFF;
}

a {
    cursor: pointer;
}

.wrapper{
    max-width: 130rem;
    margin: 0 auto;
    padding: 0 20px; 
}

h1 {
    font-size: 5.6rem;
    color: #6bcd31;
    font-weight: 700;
    line-height: 1.2;
}

body{
    background-color: #f0dfcc;
}

.header  {
    height: auto;
    width: 100%;
    background-color: #1B5E20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    padding: 15px 20px;
    border: #FBC02D 2px solid;
    z-index: 1000;
}

.header-logo {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.header-logo img {
    max-height: 7rem;
    flex-shrink: 0;
    transform: scale(1.8);
}

.logo-text{
    display: flex;
    flex-direction: column;
}

.name {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
}

.motto {
    font-size: 2rem;
    font-style: italic;
    color: #6bcd31;
}

.locate {
    font-size: 1.5rem;
    color: whitesmoke;
}

/*NAVIGATION BAR*/
.header-nav {
    display: flex;
}

.header-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.header-nav-item {
    font-size: 1.5rem;
    color: #6bcd31;
    text-decoration: none;
    float: left;
    transition: color 0.2s ease-in-out;
    padding: 0.5rem 1rem;
}

.header-nav-item:hover {
    color: #FBC02D;
    transform: translate(-3px);
}

.social-icons {
    display: flex;
    gap: 10px;
    align-items: center;  
}

.social-icons img {
    height: 3rem;
    transition: opacity 0.2s;
}

.social-icons img:hover {
    transform: translate(-3px);
}

.fb {
   transform: scale(1.8);
}

.x {
    transform: scale(1.4);
}

.LinkedIn {
    transform: scale(1.8);
    padding-top: 5px;
}

.LinkedIn:hover {
    opacity: 1;
}

.Insta {
    transform: scale(1.3);
    opacity: 0.5
}

/* HAMBURGER */
#menu-toggle {
  display: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: white;
  transition: 0.3s;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .header {
    flex-wrap: wrap;
  }

  /* Show hamburger */
  .hamburger {
    display: flex;
  }

  /* Hide menu initially */
  .header-nav {
    display: none;
    width: 100%;
  }

  .header-nav-list {
    flex-direction: column;
    background: #1B5E20;
    padding: 10px;
  }

  /* Show menu when checked */
  #menu-toggle:checked ~ .header-nav {
    display: flex;
  }

  /* Animate hamburger to X */
  #menu-toggle:checked + .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  #menu-toggle:checked + .hamburger span:nth-child(2) {
    opacity: 0;
  }

  #menu-toggle:checked + .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  /* Stack logo & socials */
  .social-icons {
    margin-top: 10px;
  }
}

/* =====FOOTER===== */
.footer-enka {
    padding: 10px 10px;
    border: 3px solid #327629;
    background-color: whitesmoke;
    max-width: fit-content;
    font-size: 1.9rem;
    font-weight: 900;
    display: block;
    transition: all ease-in-out 200ms;
    align-self: center;
    margin-bottom: 3rem;
    border-radius: 5px;
}

.footer-enka:hover {
    border: 3px solid  #FBC02D;
    background-color: #6bcd31;
    transform: translate(-3px)
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main content area - just for demonstration */
main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Footer styles */
footer.futa {
    background: linear-gradient(135deg, #2c5c3c 0%, #1e3e2a 100%);
    color: #fff;
    padding: 3rem 0 1.5rem;
    margin-top: auto;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.wraper-index {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-main-flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
}

.footer-sitemap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    width: 100%;
}

.footer-sitemap ul {
    list-style: none;
}

.footer-sitemap ul li {
    margin-bottom: 0.8rem;
}

.footer-sitemap ul li:first-child {
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
}

.footer-sitemap ul li:first-child::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #8bc34a;
}

.footer-sitemap a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.footer-sitemap a:hover {
    color: #8bc34a;
    transform: translateX(5px);
}

.footer-sitemap p {
    color: #e0e0e0;
    line-height: 1.6;
    text-align: justify;
}

.nchi {
    color: #e0e0e0;
    line-height: 1.6;
    text-align: justify;
    margin-top: 5px;
}
/* Contact info specific styling */
.footer-sitemap ul:last-child li:first-child {
    color: #8bc34a;
}

.footer-sitemap ul:last-child {
    justify-self: flex-end;
}

.footer-sitemap ul:last-child p {
    margin-bottom: 0.5rem;
}

/* Footer bottom section */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    padding-top: 1.5rem;
    text-align: center;
    color: #b0b0b0;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .footer-sitemap {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-sitemap ul li:first-child {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    footer.futa {
        padding: 2rem 0 1rem;
    }
    
    .wraper-index {
        padding: 0 15px;
    }
}