/* Sadiq Public School - Custom Theme Styles */

@layer base {
  html, body {
    margin: 0;
    padding: 0;
  }
  body {
    overscroll-behavior: none;
    font-family: 'Source Sans 3', sans-serif;
    color: #121c2a;
    background-color: #FDFCF7;
  }
  main > :first-child {
    margin-top: 0 !important;
  }
  main > :last-child {
    margin-bottom: 0 !important;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #eff4ff;
}
::-webkit-scrollbar-thumb {
  background: #b7c6f1;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #7684ac;
}

/* Back to Top Button */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background-color: #0b1b3d;
  color: #E2C98A;
  border: 1px solid #E2C98A;
  box-shadow: 0 4px 14px rgba(11, 27, 61, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 49;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
}

#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

#back-to-top:hover {
  background-color: #9a4152;
  color: #ffffff;
  border-color: #ffffff;
  transform: scale(1.08);
}

/* Sticky Navbar Scroll State */
.site-header {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(11, 27, 61, 0.12);
}

.site-header.scrolled .nav-primary-bar {
  background-color: rgba(253, 252, 247, 0.98) !important;
  backdrop-filter: blur(12px);
}

/* Mobile Menu Drawer */
#mobile-menu {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#mobile-menu.hidden {
  display: none;
}

/* Button & Link Hover Micro-effects */
.btn-animate {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-animate:hover {
  transform: translateY(-1px);
}

/* Print Utilities */
@media print {
  header, footer, #back-to-top, .no-print {
    display: none !important;
  }
  main {
    padding-top: 0 !important;
  }
}
