/* Custom styles to complement Tailwind */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(170deg, #e6f0fa 0%, #ffffff 100%);
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  z-index: 0;
}

/* Subtle wave pattern with background image */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(165deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 10px, transparent 20px, transparent 110px);
  background-image: url(../img/digital.webp);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.45;
  z-index: -1;
  pointer-events: none;
}

.py-4 {
  padding: 0;
  padding-right: 1rem;
}

nav ul li a {
  transition: color 0.3s ease, transform 0.3s ease;
  font-weight: 400;
}

header {
  background: linear-gradient(90deg, #ffffff 0%, #e6f0fa 100%);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 50;
}

header nav ul li a:hover {
  color: #1e40af;
  transform: translateY(-2px);
}

/* Fix dropdown hover gap */
#about-dropdown,
#media-dropdown,
#resources-dropdown {
  margin-top: 0 !important;   /* remove the gap */
  top: 100%;                  /* align directly under parent */
  left: 0;
}

#about-dropdown.active,
#media-dropdown.active,
#resources-dropdown.active {
  display: block !important;  /* force show when JS adds .active */
}

.form input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
  transition: all 0.3s ease;
}

/* Invalid input styling */
input:invalid:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
  transition: all 0.3s ease;
}

/* Card hover and base styling */
.bg-white {
  background: #ffffff;
  border-radius: 8px;
  transition: all 0.3s ease;
}
.bg-white:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-3px);
  background: linear-gradient(135deg, #ffffff 0%, #f9fbff 100%);
}

/* Button enhancements */
.bg-blue-600 {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  border-radius: 6px;
  transition: all 0.3s ease;
}
.bg-blue-600:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

/* Section container styling */
section {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 10;
}
/* Remove fixed width and height for w-full */
.w-full {
  width: 100%;
  height: auto;
}

/* Footer enhancements */
footer {
  background: linear-gradient(180deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.1);
}
footer a:hover {
  color: #bbf7d0;
  transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .form {
    max-width: 100%;
  }

  .bg-blue-50 {
    padding: 1rem;
  }

  header nav [data-menu="nav-menu"] {
    display: none !important; /* Force hide with high specificity */
  }

  header nav [data-menu="nav-menu"].active {
    display: flex !important; /* Force show when active */
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, #ffffff 0%, #e6f0fa 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 1rem 0;
    z-index: 1000;
  }

  #about-dropdown,
  #media-dropdown,
  #resources-dropdown {
    position: static;
    width: 100%;
    opacity: 1;
    display: none;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 0;
  }

  .group.active #about-dropdown,
  .group.active #media-dropdown,
  .group.active #resources-dropdown {
    display: block;
  }

  .group:hover #about-dropdown,
  .group:hover #media-dropdown,
  .group:hover #resources-dropdown {
    display: none; /* Disable hover on mobile */
  }

  .burger {
    display: block;
    cursor: pointer;
  }

  .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #2563eb;
    margin: 5px 0;
    transition: all 0.3s ease;
  }

  .burger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .burger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .burger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  header nav [data-menu="nav-menu"] li {
    width: 100%;
    text-align: center;
    padding: 0.5rem 0;
  }

  header nav [data-menu="nav-menu"] li a {
    display: block;
    padding: 0.5rem;
  }

  header nav [data-menu="nav-menu"] li .bg-blue-600 {
    margin: 0.5rem 0;
  }
}

/* Desktop styles */
@media (min-width: 769px) {
  .burger {
    display: none;
  }

  header nav [data-menu="nav-menu"] {
    display: flex !important;
  }

  #about-dropdown,
  #media-dropdown,
  #resources-dropdown {
    display: none;
  }

  .group:hover #about-dropdown,
  .group:hover #media-dropdown,
  .group:hover #resources-dropdown {
    display: block;
  }
}

footer a,
p {
  transition: color 0.3s ease, transform 0.3s ease;
  font-size: 0.8em;
}

.w-full {
  width: 100%;
  height: auto;
}

.member .memb-logo {
  width: 200px;
  height: 170px;
  margin: 10px auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.memb-logo .mem_logo {
  max-width: 190px;
  max-height: 150px;
  width: 100%;
  height: auto;
  object-fit: contain;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.memb-logo .mem_logo:hover {
  transform: scale(1.05);
}

/* Dropdown menu styling */
.group:hover #resources-dropdown,
#resources-dropdown.show {
  display: block;
  z-index: 1001;
}

#resources-dropdown {
  display: none;
}

/* PDF viewer modal styling (unchanged unless needed) */
#pdf-modal {
  transition: opacity 0.3s ease;
}

#pdf-modal .modal-content {
  width: 100%;
  max-height: 85vh;
  margin: 10% auto;
}

#pdf-modal.show {
  display: flex;
}

#pdf-canvas {
  max-width: 100%;
  border: 1px solid #e5e7eb;
  height: auto;
}

/* Ensure modal content does not overflow */
.modal-content {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-content .flex-1 {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* Smooth scrolling on mobile */
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal-content {
  background-color: white;
  margin: 15% auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  position: relative;
  transition: transform 0.3s ease;
}

.modal-content:hover {
  transform: scale(1.02);
}

.close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  transition: color 0.3s ease;
}

.close:hover {
  color: #000;
}

@media (min-width: 769px) and (max-width: 1024px) {
  #pdf-modal .modal-content {
    max-height: 95vh;
    width: 40%;
  }
}

@media (min-width: 1025px) and (max-width: 2560px) {
  #pdf-modal .modal-content {
    max-height: 95vh;
    width: 40%;
  }
}