/* =========================================
   Responsive Navbar Fixes
========================================= */

/* Prevent navbar overlap */
nav {
  width: 100%;
  z-index: 999;
}

/* Mobile menu smooth animation */
#mobileMenu {
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    max-height 0.3s ease;
  transform-origin: top;
}

/* Hidden state */
#mobileMenu.hidden {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
}

/* Visible state */
#mobileMenu.flex {
  opacity: 1;
  transform: translateY(0);
  max-height: 500px;
}

/* Better mobile dropdown */
@media (max-width: 1023px) {

  #mobileMenu {
    width: 100%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border-radius: 1rem;
    margin-top: 1rem;
    padding: 1rem;

    border: 1px solid rgba(229,231,235,0.8);

    box-shadow:
      0 10px 40px rgba(0,0,0,0.08);
  }

  #mobileMenu a {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
  }

  #mobileMenu a:hover {
    background: #f3f4f6;
  }
}

/* Hamburger Animation */
#mobileMenuBtn {
  transition: transform 0.3s ease;
}

#mobileMenuBtn.active {
  transform: rotate(90deg);
}

/* Fix hero section clipping */
section {
  position: relative;
  overflow-x: hidden;
}

/* Improve text rendering */
body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Prevent horizontal scroll */
html,
body {
  overflow-x: hidden;
}

/* Better button interactions */
a,
button {
  -webkit-tap-highlight-color: transparent;
}

/* Glass cards smoother animation */
.glass-card {
  will-change: transform;
}

/* Modal content layering */
.modal-content {
  position: relative;
  z-index: 2;
}

/* Improve mobile typography */
@media (max-width: 640px) {

  h1 {
    line-height: 1.1 !important;
  }

  .glass-card {
    border-radius: 18px;
  }
}
.modal-overlay{
  opacity:0;
  visibility:hidden;
  transition:all .3s ease;
  backdrop-filter:blur(8px);
}

.modal-overlay.active{
  opacity:1;
  visibility:visible;
  display:flex;
}

.modal-content{
  transform:scale(.95) translateY(20px);
  transition:all .35s ease;
}

.modal-overlay.active .modal-content{
  transform:scale(1) translateY(0);
}

/* =========================================
   Global Enhancements
========================================= */

html {
  scroll-behavior: smooth;
}

.glass-nav.scrolled {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 4px 30px rgba(0,0,0,0.06);
}

.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.reveal-up.active {
  opacity: 1;
  transform: translateY(0);
}

.glass-card {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.10);
}

.modal-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
}
