/* ==========================================================================
   Qualified Training Solutions (QTS) — Modern High-Impact Website Styling
   Brand Theme: Deep Purple (#36114D) & Vibrant Teal (#009F93)
   "Building Stronger Communities"
   ========================================================================== */

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

:root {
  --qts-purple: #36114D;
  --qts-purple-dark: #200830;
  --qts-purple-light: #521d74;
  --qts-purple-glow: rgba(54, 17, 77, 0.22);
  
  --qts-teal: #009F93;
  --qts-teal-dark: #007c73;
  --qts-teal-light: #20b8ac;
  --qts-teal-glow: rgba(0, 159, 147, 0.3);
  
  --qts-teal-50: #eefbf9;
  --qts-purple-50: #fbf7fd;
  --qts-purple-100: #f3e8fa;
  --qts-slate-bg: #f8fafc;
  --qts-text-main: #0f172a;
  --qts-text-muted: #475569;
  --qts-border: #e2e8f0;
}

/* Base Smooth Scrolling & Large Legible Typography */
html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--qts-text-main);
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, .font-heading {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.03em;
  font-weight: 800;
}

/* Ensure dark backgrounds, purple sections, and modals always keep text and headings crystal clear */
.text-white,
.text-white h1, .text-white h2, .text-white h3, .text-white h4, .text-white h5, .text-white h6,
.bg-qtsPurple h1, .bg-qtsPurple h2, .bg-qtsPurple h3, .bg-qtsPurple h4, .bg-qtsPurple h5,
[class*="bg-[#36114D]"] h1, [class*="bg-[#36114D]"] h2, [class*="bg-[#36114D]"] h3, [class*="bg-[#36114D]"] h4, [class*="bg-[#36114D]"] h5,
.modal-header h1, .modal-header h2, .modal-header h3 {
  color: #ffffff !important;
}

/* Mobile form readability and iOS Safari auto-zoom prevention */
@media (max-width: 640px) {
  input, select, textarea {
    font-size: 16px !important; /* Prevents unwanted auto-zoom on iOS Safari */
  }
}

/* Big Display Headings */
.text-display-1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 900;
}

.text-display-2 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
}

/* ==========================================================================
   Modular Content Blocks & Card Styling
   ========================================================================== */

.content-block {
  background: #ffffff;
  border-radius: 1.75rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.05), 0 4px 6px -2px rgba(15, 23, 42, 0.02);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.content-block:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 40px -10px var(--qts-purple-glow), 0 12px 20px -5px rgba(0, 159, 147, 0.1);
  border-color: rgba(54, 17, 77, 0.25);
}

.stat-block {
  background: #ffffff;
  border-radius: 1.5rem;
  border: 2px solid #f1f5f9;
  padding: 1.75rem 1.25rem;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.04);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-block:hover {
  transform: translateY(-4px);
  border-color: var(--qts-teal);
  box-shadow: 0 20px 30px -8px var(--qts-teal-glow);
}

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

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

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

/* Subtle pulse & float animations */
@keyframes softFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 159, 147, 0.6); }
  50% { box-shadow: 0 0 0 14px rgba(0, 159, 147, 0); }
}

@keyframes pulseGlowPurple {
  0%, 100% { box-shadow: 0 0 0 0 rgba(82, 29, 116, 0.6); }
  50% { box-shadow: 0 0 0 14px rgba(82, 29, 116, 0); }
}

@keyframes pulseGlowGreen {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.65); }
  50% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
}

@keyframes subtleShimmer {
  0% { transform: translateX(-150%) rotate(25deg); }
  100% { transform: translateX(250%) rotate(25deg); }
}

.animate-float {
  animation: softFloat 4.5s ease-in-out infinite;
}

.pulse-indicator {
  animation: pulseGlow 2.2s infinite;
}

/* Background Gradients & Meshes */
.hero-glow-mesh {
  background: 
    radial-gradient(circle at 10% 20%, rgba(54, 17, 77, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(0, 159, 147, 0.14) 0%, transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #fbf7fd 100%);
}

.cta-rich-background {
  background: 
    radial-gradient(circle at 15% 30%, rgba(0, 159, 147, 0.35) 0%, transparent 50%),
    radial-gradient(circle at 85% 70%, rgba(126, 34, 206, 0.35) 0%, transparent 50%),
    linear-gradient(135deg, #200830 0%, #36114D 50%, #004D40 100%);
  position: relative;
  overflow: hidden;
}

.cta-rich-background::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.6;
  pointer-events: none;
}

/* ==========================================================================
   Radiant Glowing Buttons & Modern CTAs
   ========================================================================== */

.btn-primary {
  background: linear-gradient(135deg, #36114D 0%, #521d74 100%);
  color: #ffffff !important;
  font-weight: 700;
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  border-radius: 0.85rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 18px rgba(54, 17, 77, 0.4), 0 0 14px rgba(82, 29, 116, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary::after,
.btn-teal::after,
.btn-whatsapp::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    to right, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0.25) 50%, 
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
  transition: all 0.75s ease;
  pointer-events: none;
}

.btn-primary:hover::after,
.btn-teal:hover::after,
.btn-whatsapp:hover::after {
  left: 125%;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #521d74 0%, #36114D 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 28px rgba(82, 29, 116, 0.65), 0 0 25px rgba(82, 29, 116, 0.5);
  color: #ffffff !important;
}

.btn-teal {
  background: linear-gradient(135deg, #009F93 0%, #00bfae 100%);
  color: #ffffff !important;
  font-weight: 700;
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  border-radius: 0.85rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 18px rgba(0, 159, 147, 0.45), 0 0 14px rgba(0, 159, 147, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-teal:hover {
  background: linear-gradient(135deg, #00bfae 0%, #009F93 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(0, 159, 147, 0.7), 0 0 28px rgba(0, 159, 147, 0.55);
  color: #ffffff !important;
}

.btn-outline-purple {
  border: 2px solid var(--qts-purple);
  color: var(--qts-purple);
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  border-radius: 0.85rem;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  box-shadow: 0 2px 10px rgba(54, 17, 77, 0.1);
}

.btn-outline-purple:hover {
  background: linear-gradient(135deg, #36114D 0%, #521d74 100%);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(54, 17, 77, 0.4), 0 0 14px rgba(82, 29, 116, 0.3);
}

.btn-outline-teal {
  border: 2px solid var(--qts-teal);
  color: var(--qts-teal-dark);
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  border-radius: 0.85rem;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  box-shadow: 0 2px 10px rgba(0, 159, 147, 0.15);
}

.btn-outline-teal:hover {
  background: linear-gradient(135deg, #009F93 0%, #00bfae 100%);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 159, 147, 0.5), 0 0 16px rgba(0, 159, 147, 0.35);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #1ebe5d 100%);
  color: #ffffff !important;
  font-weight: 700;
  padding: 0.85rem 1.6rem;
  font-size: 0.95rem;
  border-radius: 0.85rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45), 0 0 14px rgba(37, 211, 102, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-whatsapp:hover {
  background: linear-gradient(135deg, #1ebe5d 0%, #25D366 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.7), 0 0 25px rgba(37, 211, 102, 0.55);
  color: #ffffff !important;
}

/* ==========================================================================
   Floating Support Stack (Circular buttons stacked vertically, expand on hover)
   ========================================================================== */

.floating-btn-stack {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.85rem;
  pointer-events: auto;
}

.floating-btn-circle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  height: 56px;
  width: 56px;
  border-radius: 9999px;
  color: #ffffff !important;
  text-decoration: none;
  overflow: hidden;
  white-space: nowrap;
  padding: 0;
  transition: width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), 
              padding 0.35s ease, 
              transform 0.25s ease, 
              box-shadow 0.35s ease;
  position: relative;
  cursor: pointer;
}

.floating-btn-circle .floating-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.floating-btn-circle .floating-btn-label {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  padding-right: 0;
}

.floating-btn-circle:hover {
  width: auto;
  padding-right: 1.35rem;
  transform: translateY(-3px) scale(1.03);
}

.floating-btn-circle:hover .floating-btn-label {
  max-width: 220px;
  opacity: 1;
}

/* Floating WhatsApp circle */
.floating-btn-wa {
  background: linear-gradient(135deg, #25D366 0%, #1ea34d 100%);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5), 0 0 16px rgba(37, 211, 102, 0.35);
  animation: waPulse 3s infinite ease-in-out;
}

.floating-btn-wa:hover {
  box-shadow: 0 12px 36px rgba(37, 211, 102, 0.75), 0 0 30px rgba(37, 211, 102, 0.65);
}

@keyframes waPulse {
  0%, 100% {
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45), 0 0 14px rgba(37, 211, 102, 0.3);
  }
  50% {
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.7), 0 0 24px rgba(37, 211, 102, 0.55);
  }
}

/* Floating Phone circle */
.floating-btn-phone {
  background: linear-gradient(135deg, #36114D 0%, #1a0525 100%);
  border: 1.5px solid rgba(0, 159, 147, 0.6);
  box-shadow: 0 8px 24px rgba(54, 17, 77, 0.45), 0 0 16px rgba(0, 159, 147, 0.35);
  animation: phonePulse 3s infinite ease-in-out 1.5s;
}

.floating-btn-phone:hover {
  box-shadow: 0 12px 36px rgba(54, 17, 77, 0.65), 0 0 30px rgba(0, 159, 147, 0.65);
}

@keyframes phonePulse {
  0%, 100% {
    box-shadow: 0 6px 20px rgba(54, 17, 77, 0.4), 0 0 14px rgba(0, 159, 147, 0.25);
  }
  50% {
    box-shadow: 0 8px 30px rgba(54, 17, 77, 0.65), 0 0 24px rgba(0, 159, 147, 0.55);
  }
}

/* Modals */
.modal-backdrop {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Badges */
.badge-planned {
  background-color: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-active {
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.badge-active i {
  color: #10b981;
  display: inline-block;
  animation: pulseGlowGreen 2s infinite ease-in-out;
}

/* Card Hover Micro-Interactions & Glow */
.card-hover-lift {
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(226, 232, 240, 0.85);
}

.card-hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 35px -8px rgba(54, 17, 77, 0.12), 0 0 24px rgba(0, 159, 147, 0.22);
  border-color: rgba(0, 159, 147, 0.4);
}

/* Tab Buttons */
.tab-btn-active {
  background: linear-gradient(135deg, #009F93 0%, #00bfae 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 6px 20px rgba(0, 159, 147, 0.45), 0 0 16px rgba(0, 159, 147, 0.3) !important;
  border-color: #009F93 !important;
  transform: translateX(3px);
}
.tab-btn-active i {
  color: #ffffff !important;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
