/* Shared header/footer shell for all pages */
body nav {
  background: linear-gradient(90deg, #0f2238, #163252) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 12px 30px rgba(2, 8, 20, 0.28) !important;
  height: 74px !important;
}

body nav .nav__container {
  min-height: 74px !important;
  max-width: 1180px;
  padding: 0 14px !important;
  align-items: center !important;
}

body .navbar-brand img {
  max-width: 92px !important;
  height: auto;
}

body .nav__items {
  gap: 1rem !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: center !important;
}

body .nav__items a {
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  padding: 7px 10px !important;
  border-radius: 8px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 36px;
}

body .nav__items a:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
}

body .nav__items a[href*="apply/index.php"] {
  background: linear-gradient(135deg, #d7b15b, #c89635) !important;
  color: #10233a !important;
}

body .nav__items a[href*="signin.php"] {
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  color: rgba(255, 255, 255, 0.92) !important;
  height: 36px;
}

body .nav__items a[href*="signin.php"]:hover {
  border-color: rgba(255, 255, 255, 0.55) !important;
}

@media (min-width: 1024px) {
  body nav .nav__container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  body .nav__items {
    gap: 1.35rem !important;
  }

  body .nav__items a {
    padding: 10px 14px !important;
    border-radius: 10px !important;
    height: 40px;
  }
}

/* Mobile menu readability */
@media (max-width: 1024px) {
  body nav {
    height: 56px !important;
  }

  body nav .nav__container {
    min-height: 56px !important;
  }

  body .navbar-brand img {
    max-width: 70px !important;
  }

  body .nav__items {
    background: linear-gradient(180deg, #17365a, #0e2744) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 0 0 0 14px !important;
    width: 55% !important;
    max-width: 280px !important;
    right: 0 !important;
    left: auto !important;
    top: 56px !important;
    max-height: calc(100vh - 56px) !important;
    padding: 8px !important;
  }

  body .nav__items li a {
    color: #ffffff !important;
    opacity: 1 !important;
    width: 100% !important;
    padding: 10px 14px !important;
    border-radius: 10px !important;
    display: flex !important;
    height: auto !important;
    background: rgba(255,255,255,0.06) !important;
    margin-bottom: 4px;
  }

  body .nav__items a[href*="apply/index.php"] {
    background: linear-gradient(135deg, #d7b15b, #c89635) !important;
    color: #10233a !important;
    margin: 8px 12px !important;
    border-radius: 8px !important;
    justify-content: center !important;
  }

  body .nav__items a[href*="signin.php"] {
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    margin: 8px 12px !important;
    border-radius: 8px !important;
    justify-content: center !important;
  }

  body nav button {
    display: inline-block !important;
    font-size: 1.5rem;
    background: transparent;
    color: #fff;
    cursor: pointer;
    border: none;
    padding: 8px;
  }

  body nav button#close__nav-btn {
    display: none !important;
  }

  body.nav-open nav button#open__nav-btn {
    display: none !important;
  }

  body.nav-open nav button#close__nav-btn {
    display: inline-block !important;
  }
}

/* Shared footer */
body .site-footer {
  background: linear-gradient(180deg, #0d2036, #091525) !important;
  color: rgba(255, 255, 255, 0.92) !important;
  padding: 48px 0 0 !important;
  box-shadow: inset 0 1.25rem 1.25rem rgba(0, 0, 0, 0.18);
}

body .site-footer .footer__menu a,
body .site-footer .footer__socials a,
body .site-footer .footer__copyright {
  color: rgba(255, 255, 255, 0.92) !important;
}

body .site-footer .footer__socials {
  margin: 0 auto 28px !important;
}

body .site-footer .footer__menu {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 14px;
}

body .site-footer .footer__menu .nav_items {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 18px;
  margin: 0;
  padding: 0;
}

body .site-footer .footer__menu .nav_items li {
  margin: 0;
  padding: 0;
}

body .site-footer .footer__menu .nav_items a {
  text-decoration: none !important;
  font-weight: 600;
  opacity: 0.95 !important;
}

body .site-footer .footer__menu .nav_items a:hover {
  color: #ffffff !important;
  opacity: 1 !important;
}

body .site-footer .footer__copyright {
  text-align: center;
  padding: 18px 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
  margin-top: 28px !important;
}

@media (max-width: 768px) {
  body .site-footer .footer__menu .nav_items {
    gap: 8px 14px;
  }

  /* Contact section responsive */
  .contact-section {
    padding: 30px 16px !important;
    border-radius: 16px !important;
  }

  .contact-section h2 {
    font-size: 1.5rem !important;
  }

  .contact-options {
    flex-direction: column !important;
    gap: 12px !important;
  }

  .contact-option {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    padding: 20px !important;
  }

  .contact-option h3 {
    font-size: 1.1rem !important;
  }

  /* Review section responsive */
  .reviews-content {
    padding: 0 8px !important;
  }

  .testimonial {
    min-width: 85% !important;
    max-width: 85% !important;
  }
}

@media (max-width: 480px) {
  .contact-section h2 {
    font-size: 1.3rem !important;
  }

  .contact-section p {
    font-size: .85rem !important;
  }

  .contact-option {
    padding: 16px !important;
  }

  .testimonial blockquote {
    font-size: .85rem !important;
  }
}

/* ===== General responsive for non-home pages ===== */
@media (max-width: 1024px) {
  /* Ensure content doesn't overflow */
  body .container {
    max-width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Blog post grid responsive */
  body .posts__container {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* Category buttons responsive */
  body .category__buttons-container {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Search bar responsive */
  body .search__bar-container {
    width: 90% !important;
  }

  /* Single post responsive */
  body .singlepost__container {
    padding: 1rem !important;
  }
}

@media (max-width: 600px) {
  body .category__buttons-container {
    grid-template-columns: 1fr !important;
  }

  body .search__bar-container {
    width: 100% !important;
  }

  /* Form sections responsive */
  body .form__section-container {
    padding: 1rem !important;
  }

  /* Footer responsive */
  body .footer__container {
    grid-template-columns: 1fr !important;
    text-align: center !important;
    gap: 1.5rem !important;
  }
}
