/* ==========================================================================
   QuestVilla Solutions - Modern Premium Redesign Stylesheet
   Fully Mobile-Optimized & Fluidly Responsive Across All Devices
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --primary-navy: #0f172a;
  --primary-blue: #1e3a8a;
  --accent-gold: #d97706;
  --accent-amber: #f59e0b;
  --accent-blue: #2563eb;
  --accent-teal: #0d9488;
  --bg-light: #f8fafc;
  --bg-card: #ffffff;
  --bg-dark: #090d16;
  --text-main: #334155;
  --text-muted: #64748b;
  --text-light: #f8fafc;
  --border-light: #e2e8f0;
  --border-dark: #1e293b;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 24px 48px rgba(15, 23, 42, 0.16);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

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

ul, ol {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary-navy);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.8rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.65rem, 3.2vw, 2.6rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.8rem); }
h4 { font-size: 1.12rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 1.02rem;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-padding {
  padding: 5.5rem 0;
}

.text-center { text-align: center; }
.text-gold { color: var(--accent-gold); }
.text-blue { color: var(--accent-blue); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  background: rgba(37, 99, 235, 0.15);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.badge-gold {
  background: rgba(217, 119, 6, 0.9);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

/* Buttons with 44px Touch Targets */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.85rem;
  min-height: 44px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  touch-action: manipulation;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--primary-blue) 100%);
  color: #ffffff;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

.btn-gold {
  background: linear-gradient(135deg, var(--accent-amber) 0%, var(--accent-gold) 100%);
  color: #ffffff;
}
.btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.35);
}

.btn-outline {
  background: rgba(15, 23, 42, 0.3);
  border-color: #ffffff;
  color: #ffffff;
  backdrop-filter: blur(8px);
}
.btn-outline:hover {
  background: #ffffff;
  color: var(--primary-navy);
  transform: translateY(-2px);
}

.btn-light {
  background: #ffffff;
  color: var(--primary-navy);
  box-shadow: var(--shadow-md);
}
.btn-light:hover {
  background: var(--bg-light);
  transform: translateY(-2px);
}

/* Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}
.navbar.scrolled {
  box-shadow: var(--shadow-md);
}
.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 84px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.2rem;
}
.nav-item {
  position: relative;
}
.nav-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--primary-navy);
  padding: 0.6rem 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent-gold);
  border-radius: var(--radius-full);
  transition: var(--transition);
}
.nav-link:hover::after, .nav-item.active .nav-link::after {
  width: 100%;
}
.nav-item.active .nav-link {
  color: var(--accent-gold);
}

/* Desktop Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 240px;
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 0.75rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-item {
  padding: 0.65rem 1rem;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--primary-navy);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
}
.dropdown-item:hover {
  background: rgba(37, 99, 235, 0.06);
  color: var(--accent-blue);
  padding-left: 1.25rem;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--primary-navy);
  cursor: pointer;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

/* Hero Slider */
.hero-slider {
  position: relative;
  width: 100%;
  height: clamp(540px, 78vh, 780px);
  overflow: hidden;
  background: #0f172a;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1), transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1.04);
  display: flex;
  align-items: center;
}
.slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.38) 55%, rgba(15, 23, 42, 0.18) 100%);
  z-index: 1;
}

.slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.75) contrast(1.05);
}

.slide-content {
  position: relative;
  z-index: 2;
  color: #ffffff;
  max-width: 800px;
}
.slide-content h1 {
  color: #ffffff;
  margin-bottom: 1.25rem;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.95), 0 2px 6px rgba(0, 0, 0, 0.8);
  font-weight: 800;
}
.slide-content p {
  color: #ffffff;
  font-size: 1.22rem;
  margin-bottom: 2.25rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95), 0 1px 4px rgba(0, 0, 0, 0.8);
  font-weight: 500;
}
.slide-btns {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.slider-controls {
  position: absolute;
  bottom: 2.5rem;
  right: 3.5rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.slider-arrow {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.4);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.slider-arrow:hover {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  transform: scale(1.08);
}

.slider-dots {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 0.6rem;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.dot.active {
  width: 36px;
  background: var(--accent-gold);
}

/* Floating Stats Banner */
.stats-banner {
  background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-blue) 100%);
  color: #ffffff;
  padding: 3.5rem 2.5rem;
  margin-top: -3.5rem;
  position: relative;
  z-index: 20;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  text-align: center;
}
.stat-item h3 {
  color: var(--accent-amber);
  font-size: 3rem;
  margin-bottom: 0.25rem;
  font-weight: 800;
}
.stat-item p {
  color: rgba(255,255,255,0.88);
  font-size: 0.98rem;
  margin-bottom: 0;
  font-weight: 500;
}

/* Grid & Cards System */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.25rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
  gap: 3.5rem;
  align-items: center;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 2.25rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37, 99, 235, 0.3);
}

.card-img-wrapper {
  overflow: hidden;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  position: relative;
  aspect-ratio: 16/10;
}
.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.card:hover .card-img-wrapper img {
  transform: scale(1.07);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-blue) 100%);
  color: #ffffff;
  padding: 5rem 0 4rem;
  text-align: center;
}
.page-header h1 {
  color: #ffffff;
}
.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
}
.breadcrumb a {
  color: var(--accent-amber);
}

/* Forms & iOS Auto-Zoom Prevention Fix */
.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--primary-navy);
  font-size: 0.92rem;
}
.form-control {
  width: 100%;
  padding: 0.9rem 1.15rem;
  font-family: var(--font-body);
  font-size: 16px; /* Prevents iOS safari auto-zoom on input focus */
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: #ffffff;
  transition: var(--transition);
  min-height: 48px;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

textarea.form-control {
  resize: vertical;
  min-height: 130px;
}

/* Footer */
.footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.72);
  padding: 5rem 0 2.5rem;
  border-top: 1px solid var(--border-dark);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 3.5rem;
  margin-bottom: 3.5rem;
}
.footer h4 {
  color: #ffffff;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  position: relative;
}
.footer h4::after {
  content: '';
  display: block;
  width: 35px;
  height: 3px;
  background: var(--accent-gold);
  margin-top: 0.6rem;
  border-radius: var(--radius-full);
}
.footer-links li {
  margin-bottom: 0.75rem;
}
.footer-links a:hover {
  color: var(--accent-gold);
  padding-left: 6px;
}
.footer-bottom {
  border-top: 1px solid var(--border-dark);
  padding-top: 2.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.9rem;
}

/* ==========================================================================
   Responsive Breakpoints: Mobile Navigation & Dropdowns
   ========================================================================== */

/* 1. Medium Screens / Tablets (max-width: 992px) */
@media (max-width: 992px) {
  .navbar .container {
    height: 76px;
  }
  .nav-menu {
    position: fixed;
    top: 76px;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 76px);
    overflow-y: auto;
    background: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 1.75rem 3rem;
    box-shadow: var(--shadow-xl);
    gap: 1rem;
    clip-path: circle(0% at 100% 0);
    transition: clip-path 0.4s ease-in-out;
  }
  .nav-menu.active {
    clip-path: circle(150% at 100% 0);
  }
  .nav-item {
    width: 100%;
  }
  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
  }
  .dropdown-menu {
    position: static;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transform: none;
    box-shadow: none;
    border: none;
    width: 100%;
    padding: 0 0 0 1rem;
    transition: all 0.35s ease-in-out;
    background: rgba(37, 99, 235, 0.03);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
  }
  .dropdown-menu.show-mobile {
    opacity: 1;
    visibility: visible;
    max-height: 350px;
    padding: 0.5rem 0 0.5rem 1rem;
    margin-top: 0.35rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--accent-gold);
  }
  .mobile-toggle {
    display: flex;
  }
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

/* 2. Mobile Smartphones (max-width: 768px) */
@media (max-width: 768px) {
  .container {
    padding: 0 1.15rem;
  }
  .section-padding {
    padding: 3.5rem 0;
  }

  /* Mobile Hero Slider */
  .hero-slider {
    height: auto;
    min-height: 490px;
    padding: 4rem 0 5rem;
  }
  .slide {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }
  .slide.active {
    display: flex;
  }
  .slide::before {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.75) 0%, rgba(15, 23, 42, 0.85) 100%);
  }
  .slide-content h1 {
    font-size: 1.85rem;
    line-height: 1.3;
    margin-bottom: 0.85rem;
  }
  .slide-content p {
    font-size: 1.02rem;
    line-height: 1.55;
    margin-bottom: 1.75rem;
  }
  .slide-btns {
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
  }
  .slide-btns .btn {
    width: 100%;
    justify-content: center;
  }
  .slider-controls {
    bottom: 1.25rem;
    right: 1.25rem;
  }
  .slider-arrow {
    width: 40px;
    height: 40px;
  }
  .slider-dots {
    bottom: 1.5rem;
  }

  /* Mobile Stats Banner */
  .stats-banner {
    margin-top: 1.75rem;
    padding: 2rem 1.25rem;
    border-radius: var(--radius-md);
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem 1rem;
  }
  .stat-item h3 {
    font-size: 2.2rem;
  }
  .stat-item p {
    font-size: 0.85rem;
  }

  /* Mobile Cards & Layout */
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .card {
    padding: 1.5rem;
  }
  .card-img-wrapper {
    margin-bottom: 1.15rem;
  }
  .page-header {
    padding: 3.5rem 0 3rem;
  }

  /* Mobile Footer */
  .footer {
    padding: 3.5rem 0 2rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
    margin-bottom: 2.5rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.85rem;
  }
}

/* 3. Small Mobile Devices (max-width: 480px) */
@media (max-width: 480px) {
  .logo img {
    height: 42px;
  }
  .slide-content h1 {
    font-size: 1.6rem;
  }
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .stat-item h3 {
    font-size: 2.5rem;
  }
}
