/* NOLDY22 REBUILD: LAYOUT STYLES */
/* Defines the structure for the header, footer, and main navigation. */

/* 1. Header */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: var(--spacing-md) 0;
  z-index: 1000;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  background-color: rgba(10, 25, 47, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* For Safari */
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

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

.logo {
  max-width: 80px;
  height: auto;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

/* 2. Navigation */
.main-nav ul {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  list-style: none;
}

.main-nav a {
  color: var(--text-primary);
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
  font-size: 1rem;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease-out;
}

.main-nav a:hover::after,
.main-nav a.current::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* 3. Footer */
.main-footer {
  padding: calc(var(--spacing-lg) * 2) 0;
  margin-top: calc(var(--spacing-lg) * 2);
  text-align: center;
  border-top: 1px solid rgba(255, 215, 0, 0.1);
}

/* CORRECTED RULE */
.main-footer p {
    text-align: center;
    margin: 0 auto; /* This centers the block itself */
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-md);
}

.footer-socials a {
  font-size: 1.5rem;
  color: var(--text-secondary);
  transition: color 0.3s ease, transform 0.3s ease;
}

.footer-socials a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

/* 4. Mobile Navigation Styles (CORRECTED) */
.menu-toggle {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
}

/* This is the media query that activates mobile styles */
@media (max-width: 992px) {
  .menu-toggle {
    display: block; /* Show the hamburger */
  }

  /* Use the ID for higher specificity to avoid conflicts */
  #mainNav {
    display: none; /* Hide the nav by default on mobile */
    position: absolute;
    top: 100%; /* Position it right below the header */
    left: 0;
    width: 100%;
    background-color: var(--primary-light);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  }

  /* This style will now reliably override the 'display: none' */
  #mainNav.mobile-active {
    display: block; /* Show the nav when the class is added */
  }

  #mainNav ul {
    flex-direction: column;
    gap: 0;
    padding: var(--spacing-md) 0;
  }

  #mainNav li {
    width: 100%;
  }

  #mainNav a {
    display: block;
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: center;
  }
  
  #mainNav a::after {
      display: none; /* Hide underline effect on mobile */
  }
}