/* ========================================
   MGIP Header & Footer Styles
   ======================================== */

:root {
  --mgip-gold-dark: #B8860B;
  --mgip-gold: #D4AF37;
  --mgip-gold-light: #F4E5C3;
  --mgip-gold-accent: #FFD700;
  --mgip-chocolate: #3E2723;
  --mgip-chocolate-light: #5D4037;
  --mgip-chocolate-dark: #2C1810;
  --mgip-bg-light: #F8F6F3;
  --mgip-gray-dark: #4A4A4A;
}

/* ========================================
   HEADER STYLES
   ======================================== */

.mgip-header {
  background: white;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.mgip-header.scrolled {
  box-shadow: 0 4px 20px rgba(184, 134, 11, 0.15);
}

.mgip-header .navbar {
  padding: 0.75rem 0;
}

.mgip-header .navbar-brand {
  font-weight: 700;
  color: var(--mgip-chocolate);
  text-decoration: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-acronym {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--mgip-gold-dark);
  line-height: 1;
  letter-spacing: -0.5px;
}

.brand-full {
  font-size: 0.75rem;
  color: var(--mgip-chocolate-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.mgip-header .nav-link {
  color: var(--mgip-chocolate);
  font-weight: 600;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
  position: relative;
}

.mgip-header .nav-link:hover,
.mgip-header .nav-link.active {
  color: var(--mgip-gold-dark);
}

.mgip-header .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--mgip-gold-dark), var(--mgip-gold));
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 3px 3px 0 0;
}

.mgip-header .nav-link:hover::after,
.mgip-header .nav-link.active::after {
  width: 80%;
}

.mgip-header .dropdown-menu {
  border: none;
  box-shadow: 0 8px 30px rgba(184, 134, 11, 0.2);
  border-radius: 12px;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  border-top: 3px solid var(--mgip-gold);
}

.mgip-header .dropdown-item {
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  color: var(--mgip-chocolate);
  transition: all 0.3s ease;
}

.mgip-header .dropdown-item:hover {
  background: linear-gradient(90deg, var(--mgip-gold-light), transparent);
  color: var(--mgip-gold-dark);
  padding-left: 2rem;
}

.mgip-header .dropdown-item.active {
  background: var(--mgip-gold-light);
  color: var(--mgip-gold-dark);
  font-weight: 700;
}

.mgip-header .navbar-toggler {
  border: 2px solid var(--mgip-gold-dark);
  padding: 0.5rem;
  border-radius: 8px;
}

.mgip-header .navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(184, 134, 11, 0.25);
}

.mgip-header .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23B8860B' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Main Content Spacing for Fixed Header */
.main-content {
  padding-top: 120px;
}

/* Footer Styles */
.mgip-footer {
  background: linear-gradient(180deg, var(--mgip-chocolate-dark) 0%, var(--mgip-chocolate) 100%);
  color: rgba(255, 255, 255, 0.9);
  margin-top: 5rem;
}

.footer-heading {
  font-weight: 700;
  color: rgb(214, 162, 20);
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--mgip-primary);
}

.footer-text {
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  font-size: 0.95rem;
}

.footer-links {
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-links a:hover {
  color: white;
  padding-left: 8px;
}

.footer-contact {
  margin: 0;
  padding: 0;
}

.footer-contact li {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
}

.footer-contact a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-contact a:hover {
  color: var(--mgip-primary);
}

.footer-badges .badge {
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1) !important;
  color: rgba(255,255,255,0.6);
}

.footer-bottom a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: white;
}

.mgip-footer h6 {
    color: white;
}
/* Back to Top Button */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--mgip-gold-dark) 0%, var(--mgip-gold) 100%);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
  z-index: 1000;
  border: 2px solid var(--mgip-gold-accent);
}

#back-to-top i {
  font-size: 1.8rem;
  color: white;
}

#back-to-top.active {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  background: linear-gradient(135deg, var(--mgip-gold) 0%, var(--mgip-gold-accent) 100%);
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.6);
}


/* Responsive Adjustments */
@media (max-width: 991px) {
  .mgip-header .navbar-collapse {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--mgip-bg-light);
    border-radius: 12px;
    border: 2px solid var(--mgip-gold-light);
  }
  
  .mgip-header .nav-link {
    padding: 0.75rem 1rem;
  }
  
  .mgip-header .nav-link::after {
    display: none;
  }
  
  .mgip-header .dropdown-menu {
    box-shadow: none;
    background: white;
    margin-left: 1rem;
  }
  
  .main-content {
    padding-top: 120px;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 767px) {
  .brand-acronym {
    font-size: 1.5rem;
  }
  
  .footer-heading {
    font-size: 1rem;
  }
  
  .mgip-footer {
    margin-top: 3rem;
  }
  
  .footer-bottom {
    text-align: center !important;
  }
  
  .footer-bottom .col-md-6 {
    text-align: center !important;
  }
}

/* Navbar Animation on Mobile */
@media (max-width: 991px) {
  .navbar-collapse {
    max-height: 80vh;
    overflow-y: auto;
  }
  
  .navbar-collapse.collapsing {
    transition: height 0.3s ease;
  }
}

/* Smooth Transitions */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Focus States for Accessibility */
.nav-link:focus,
.dropdown-item:focus,
.footer-links a:focus {
  outline: 2px solid var(--mgip-primary);
  outline-offset: 2px;
}