@import url('https://fonts.googleapis.com/css2?family=Questrial&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: 'Questrial', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1d1d1f;
  background-color: #f6faff;
  background-image: linear-gradient(180deg, #edf5ff 0%, #ffffff 32%, #f1f7ff 70%, #ffffff 100%);
  background-attachment: fixed;
  min-height: 100vh;
  min-height: 100dvh;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  position: relative;
  margin: 0;
  padding: 0;
}

/* Home Hero Section Small Square Grid Pattern */
.hero-grid-pattern {
  position: relative;
  overflow: hidden;
}

.hero-grid-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(0, 113, 227, 0.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 113, 227, 0.09) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 75%);
  pointer-events: none;
  z-index: 0;
}

/* Hide scrollbars globally while maintaining smooth scrolling */
* {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

*::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

/* Apple-style Link & Accent classes */
.apple-blue-text {
  color: #0071e3;
}

.apple-blue-bg {
  background-color: #0071e3;
}

.apple-blue-bg:hover {
  background-color: #0077ed;
}

.apple-link {
  color: #0071e3;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.apple-link:hover {
  text-decoration: underline;
  opacity: 0.85;
}

/* Glassmorphism & Card styling */
.apple-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.apple-card-hover {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

.apple-card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 113, 227, 0.3);
}

/* Master Site Container */
.site-container {
  width: 100%;
  max-width: 80rem; /* 1280px / 7xl */
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 640px) {
  .site-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
@media (min-width: 1024px) {
  .site-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Enforce Consistent 10px Border Radius System Across All Elements */
* {
  --radius: 10px;
}

.rounded-10px,
.rounded-15px,
.apple-card,
.modal-card,
.mega-menu-dropdown,
.custom-dropdown-menu,
.rounded-sm,
.rounded,
.rounded-md,
.rounded-lg,
.rounded-xl,
.rounded-2xl,
.rounded-3xl,
.navbar-floating,
.fab-btn,
.fab-whatsapp-pulse,
button,
input,
select,
textarea,
.dropdown-menu,
.modal-container {
  border-radius: 10px !important;
}

/* Smooth Top-to-Bottom Entrance Animation for Floating Navbar */
@keyframes floating-top-down {
  0% {
    opacity: 0;
    transform: translateY(-16px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Floating Navbar Transition */
.navbar-floating {
  position: fixed !important;
  top: 12px !important;
  left: 12px !important;
  right: 12px !important;
  width: auto !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 0 !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  border-radius: 10px !important;
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.08) !important;
  z-index: 40 !important;
  animation: floating-top-down 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  transition: padding 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}

/* Mega Menu Centering based upon Navbar & Dropdown Top-to-Bottom Entrance Animation */
#mega-menu-dropdown {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 840px !important;
  max-width: min(840px, calc(100vw - 32px)) !important;
  border-radius: 10px !important;
}

@keyframes mega-menu-top-down {
  0% {
    opacity: 0;
    transform: translate(-50%, -8px);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

#mega-menu-dropdown:not(.hidden) {
  animation: mega-menu-top-down 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

/* Snug inner spacing inside floating navbar without touching normal navbar */
#navbar.navbar-floating .site-container {
  width: 100% !important;
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  gap: 1.25rem !important;
}

@media (max-width: 1024px) {
  .navbar-floating {
    left: 8px !important;
    right: 8px !important;
    top: 8px !important;
    width: auto !important;
    max-width: none !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* Logo Hover Subtle Rotate & Scale Effect */
.nav-logo-img {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}
a:hover .nav-logo-img,
.nav-logo-img:hover {
  transform: rotate(-6deg) scale(1.05);
}

/* Fullscreen 100dvh Mobile Menu Drawer with Smooth Slide and Fade */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: min(380px, 100vw);
  height: 100vh;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  z-index: 101;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  overflow: hidden;
}

.mobile-drawer.drawer-closed {
  transform: translateX(100%);
}

.mobile-drawer.drawer-open {
  transform: translateX(0);
}

/* Floating Action Buttons (FABs) */
.fab-container {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: auto;
}

.fab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 10px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, opacity 0.25s ease;
  cursor: pointer;
  text-decoration: none !important;
  border: none;
}

@media (min-width: 640px) {
  .fab-container {
    bottom: 24px;
    right: 24px;
    gap: 12px;
  }
  .fab-btn {
    width: 52px;
    height: 52px;
  }
}

.fab-btn:hover {
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

/* Clean pulse animation for WhatsApp FAB */
@keyframes fab-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6), 0 4px 16px rgba(0, 0, 0, 0.15);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(37, 211, 102, 0), 0 4px 16px rgba(0, 0, 0, 0.15);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0), 0 4px 16px rgba(0, 0, 0, 0.15);
  }
}

.fab-whatsapp-pulse {
  border-radius: 10px !important;
  animation: fab-pulse 2.5s infinite;
}

/* Scroll Animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

