/* ==========================================================================
   EduHome Connect - Sticky Footer CTA & Floating Actions (Laptop & Mobile)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Floating Action Buttons (Bottom-Left: WhatsApp & Call - Image 1)
   -------------------------------------------------------------------------- */
.desktop-floating-cta {
  position: fixed;
  bottom: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9998;
}

.float-cta-btn {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  text-decoration: none;
  font-size: 1.35rem;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
  cursor: pointer;
  border: none;
  outline: none;
}

.float-cta-btn:hover {
  transform: translateY(-4px) scale(1.08);
}

/* WhatsApp Floating Button (Vibrant Green) */
.float-btn-whatsapp {
  background: #25D366;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
}

.float-btn-whatsapp:hover {
  background: #20ba5a;
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.6);
}

.float-btn-whatsapp::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.6);
  animation: cta-pulse-ring 2.2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  pointer-events: none;
}

/* Phone Floating Button (Navy Blue) */
.float-btn-phone {
  background: #062654;
  box-shadow: 0 6px 18px rgba(6, 38, 84, 0.45);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.float-btn-phone:hover {
  background: #0059D9;
  box-shadow: 0 10px 24px rgba(0, 89, 217, 0.5);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Tooltips on Hover - Floats cleanly above button */
.float-cta-btn .cta-tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  background: #062654;
  color: #ffffff;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 18px rgba(6, 38, 84, 0.35);
  font-family: 'Raleway', sans-serif;
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 10000;
}

/* Common downward triangle pointer */
.float-cta-btn .cta-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  border-width: 6px;
  border-style: solid;
  border-color: #062654 transparent transparent transparent;
}

/* WhatsApp Tooltip (Leftmost button): Anchor at left edge so it never clips off-screen */
.float-btn-whatsapp .cta-tooltip {
  left: 0;
  transform: translateY(4px);
}

.float-btn-whatsapp .cta-tooltip::after {
  left: 24px;
  transform: translateX(-50%);
}

.float-btn-whatsapp:hover .cta-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Phone Tooltip (Second button): Centered above the button */
.float-btn-phone .cta-tooltip {
  left: 50%;
  transform: translateX(-50%) translateY(4px);
}

.float-btn-phone .cta-tooltip::after {
  left: 50%;
  transform: translateX(-50%);
}

.float-btn-phone:hover .cta-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

@keyframes cta-pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  70% { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(0.95); opacity: 0; }
}

/* --------------------------------------------------------------------------
   2. Desktop Sticky Bottom CTA Bar (Laptop View)
   -------------------------------------------------------------------------- */
.desktop-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: linear-gradient(90deg, #062654 0%, #003fa6 60%, #0059D9 100%);
  color: #ffffff;
  z-index: 9995;
  box-shadow: 0 -4px 20px rgba(6, 38, 84, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.35s ease, opacity 0.35s ease;
  font-family: 'Raleway', sans-serif;
}

.desktop-sticky-bar.minimized {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.desktop-sticky-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.desktop-sticky-bar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sticky-badge-pill {
  background: #FCC902;
  color: #062654;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.sticky-bar-headline {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  line-height: 1.35;
}

.sticky-bar-headline span {
  color: #FCC902;
  font-weight: 700;
}

.desktop-sticky-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.sticky-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.sticky-btn-call {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.sticky-btn-call:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff !important;
  transform: translateY(-2px);
}

.sticky-btn-whatsapp {
  background: #25D366;
  color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(37, 211, 102, 0.35);
}

.sticky-btn-whatsapp:hover {
  background: #20ba5a;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.5);
  color: #ffffff !important;
}

.sticky-btn-enquiry {
  background: #FCC902;
  color: #062654 !important;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(252, 201, 2, 0.35);
}

.sticky-btn-enquiry:hover {
  background: #e5b600;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(252, 201, 2, 0.5);
  color: #062654 !important;
}

.sticky-bar-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  font-size: 1.35rem;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.sticky-bar-close:hover {
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   3. Mobile Sticky Bottom Bar (Exact Replica of Image 2)
   -------------------------------------------------------------------------- */
.mobile-sticky-cta {
  display: none; /* Hidden on desktop */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: linear-gradient(180deg, #0056cc 0%, #00368a 100%);
  box-shadow: 0 -4px 18px rgba(0, 47, 120, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 9999;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.mobile-sticky-nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  height: 58px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-sticky-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  text-decoration: none;
  padding: 6px 0;
  transition: background-color 0.2s ease, transform 0.15s ease;
  position: relative;
  height: 100%;
  cursor: pointer;
  background: transparent;
  border: none;
  font-family: inherit;
}

.mobile-sticky-item:active {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(0.97);
}

/* Subtle separator between items */
.mobile-sticky-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 22%;
  height: 56%;
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.mobile-sticky-icon {
  font-size: 1.25rem;
  margin-bottom: 2px;
  color: #ffffff;
  display: block;
}

.mobile-sticky-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ffffff;
  font-family: 'Raleway', sans-serif;
  display: block;
  line-height: 1.1;
}

/* --------------------------------------------------------------------------
   4. Enquiry Modal (Free Consultation & Call Request)
   -------------------------------------------------------------------------- */
.enquiry-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 38, 84, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s ease;
}

.enquiry-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.enquiry-modal-card {
  background: #ffffff;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(6, 38, 84, 0.35);
  overflow: hidden;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  font-family: 'Inter', sans-serif;
}

.enquiry-modal-backdrop.open .enquiry-modal-card {
  transform: translateY(0) scale(1);
}

.enquiry-modal-header {
  background: linear-gradient(135deg, #062654 0%, #0059D9 100%);
  color: #ffffff;
  padding: 22px 24px;
  position: relative;
}

.enquiry-modal-header h3 {
  font-family: 'Raleway', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 6px;
  color: #ffffff;
}

.enquiry-modal-header p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  line-height: 1.4;
}

.enquiry-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  transition: background 0.2s ease;
}

.enquiry-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.enquiry-modal-body {
  padding: 24px;
}

.enquiry-form-group {
  margin-bottom: 16px;
}

.enquiry-form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #062654;
  margin-bottom: 6px;
  font-family: 'Raleway', sans-serif;
}

.enquiry-form-group input,
.enquiry-form-group select,
.enquiry-form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.92rem;
  color: #1e293b;
  background: #f8fafc;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.enquiry-form-group input:focus,
.enquiry-form-group select:focus,
.enquiry-form-group textarea:focus {
  border-color: #0059D9;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 89, 217, 0.15);
}

.enquiry-submit-btn {
  width: 100%;
  background: #FCC902;
  color: #062654;
  border: none;
  padding: 13px;
  border-radius: 8px;
  font-family: 'Raleway', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(252, 201, 2, 0.4);
}

.enquiry-submit-btn:hover {
  background: #e5b600;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(252, 201, 2, 0.5);
}

.enquiry-modal-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.78rem;
  color: #64748b;
}

.enquiry-modal-trust span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.enquiry-modal-trust i {
  color: #22c55e;
}

/* --------------------------------------------------------------------------
   5. Responsive Breakpoint Rules
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  /* On mobile/tablet, show the mobile bottom bar */
  .mobile-sticky-cta {
    display: block;
  }

  /* Hide the desktop bottom bar and desktop floating circles on mobile to avoid clutter */
  .desktop-sticky-bar {
    display: none !important;
  }
  
  .desktop-floating-cta {
    display: none !important;
  }

  /* Ensure page content has bottom padding so footer isn't covered */
  body {
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (min-width: 769px) {
  /* On laptop/desktop, keep the floating circles and sticky desktop bar */
  .mobile-sticky-cta {
    display: none !important;
  }

  /* When desktop sticky bar is open, elevate floating buttons slightly */
  body:not(.sticky-bar-closed) .desktop-floating-cta {
    bottom: 40px;
  }
}
