/* ==========================================================================
   Dr. Kunal Patel - Contact & Appointments Page Styles
   ========================================================================== */

/* ==========================================================================
   1. Compact Hero Section (Clean Heading, No Image, Restrained Height)
   ========================================================================== */
.contact-hero-section {
  padding: 46px 0 42px;
  background: linear-gradient(180deg, #f0f7fd 0%, #e3f2fd 100%);
  border-bottom: 1px solid rgba(2, 132, 199, 0.12);
  text-align: center;
  position: relative;
}

.contact-hero-content {
  max-width: 820px;
  margin: 0 auto;
}

.contact-hero-title {
  font-size: clamp(2.1rem, 3.8vw, 3.1rem);
  font-weight: 800;
  color: var(--color-navy-900);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 12px;
}

/* User requested: highlight 'Health' word in blue */
.highlight-blue {
  color: var(--color-primary-600);
}

.contact-hero-subtitle {
  font-size: 1.05rem;
  color: var(--color-slate-600);
  line-height: 1.6;
  max-width: 660px;
  margin: 0 auto;
}

/* ==========================================================================
   2. Main Layout Section
   - Laptop / Desktop View: 4 Cards & Appointment Form Side by Side, Map Below
   - Mobile View: Map Moves Before Contact Details & Form
   ========================================================================== */
.contact-main-section {
  padding: 48px 0 65px;
  background-color: var(--color-slate-50);
  position: relative;
}

.contact-layout-container {
  display: grid;
  grid-template-columns: 1fr 1.28fr;
  grid-template-areas:
    "cards form"
    "map   map";
  gap: 36px;
  align-items: start;
}

/* ==========================================================================
   3. Left Column: 4 Information Cards & Emergency Support
   ========================================================================== */
.contact-cards-col {
  grid-area: cards;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.contact-cards-header {
  margin-bottom: 4px;
}

.cards-section-tag {
  display: inline-block;
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary-600);
  margin-bottom: 6px;
}

.cards-section-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--color-navy-900);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 8px;
}

.cards-section-desc {
  font-size: 0.925rem;
  color: var(--color-slate-600);
  line-height: 1.55;
}

/* 4 Cards Grid (2x2 on Laptop/Desktop) */
.info-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.info-card {
  background: var(--color-white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 165px;
  box-shadow: 0 4px 16px -2px rgba(11, 31, 58, 0.05);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.info-card:hover {
  transform: translateY(-4px);
  border-color: rgba(2, 132, 199, 0.4);
  box-shadow: 0 12px 28px -4px rgba(11, 31, 58, 0.12);
}

.info-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.info-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.45s ease;
}

.info-card:hover .info-icon-box {
  transform: scale(1.08);
}

.icon-bg-blue {
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.icon-bg-teal {
  background: #ccfbf1;
  color: #0d9488;
  border: 1px solid #99f6e4;
}

.icon-bg-emerald {
  background: #dcfce7;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.icon-bg-indigo {
  background: #ede9fe;
  color: #6366f1;
  border: 1px solid #ddd6fe;
}

.icon-bg-whatsapp {
  background: #ecfdf5;
  color: #10b981;
  border: 1px solid #a7f3d0;
}

.icon-bg-purple {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
}

.card-badge-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-card-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-whatsapp {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.badge-purple {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #c4b5fd;
}

.info-card-whatsapp {
  border-left: 3px solid transparent;
}

.info-card-whatsapp:hover {
  border-color: #86efac;
  border-left-color: #10b981;
  box-shadow: 0 12px 28px -4px rgba(16, 185, 129, 0.16);
}

.info-card-whatsapp:hover .info-icon-box {
  background: #10b981;
  color: #ffffff;
}

.info-card-googleform {
  border-left: 3px solid transparent;
}

.info-card-googleform:hover {
  border-color: #c4b5fd;
  border-left-color: #7c3aed;
  box-shadow: 0 12px 28px -4px rgba(124, 58, 237, 0.16);
}

.info-card-googleform:hover .info-icon-box {
  background: #7c3aed;
  color: #ffffff;
}

.info-card-visit:hover {
  border-left-color: #0284c7;
}

.info-card-consultation:hover {
  border-left-color: #0d9488;
}

.info-card-call:hover {
  border-left-color: #16a34a;
}

.info-card-email:hover {
  border-left-color: #6366f1;
}

.action-whatsapp {
  color: #059669 !important;
}

.action-purple {
  color: #7c3aed !important;
}

.info-card-label {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-slate-500);
}

.info-card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 10px;
}

.info-card-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-navy-900);
  line-height: 1.3;
  letter-spacing: -0.01em;
  word-break: break-word;
}

.info-card-sub {
  font-size: 0.8rem;
  color: var(--color-slate-500);
  line-height: 1.4;
}

.info-card-action {
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--color-primary-600);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.35s ease, color 0.35s ease;
}

.info-card:hover .info-card-action {
  gap: 7px;
}

.info-card-action.text-accent {
  color: #0d9488;
}

/* Emergency Support Card */
.emergency-support-card {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s ease;
}

.emergency-support-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(229, 62, 62, 0.1);
}

.emergency-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: #fee2e2;
  color: #e53e3e;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.emergency-text {
  font-size: 0.84rem;
  color: #742a2a;
  line-height: 1.5;
}

.emergency-text strong {
  display: block;
  font-size: 0.885rem;
  font-weight: 700;
  color: #9b2c2c;
  margin-bottom: 2px;
}

/* ==========================================================================
   4. Right Column: Premium Appointment Form Card
   ========================================================================== */
.contact-form-col {
  grid-area: form;
  width: 100%;
}

.appointment-form-card {
  background: var(--color-white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  box-shadow: 0 12px 36px -6px rgba(11, 31, 58, 0.08), 0 4px 12px rgba(11, 31, 58, 0.03);
  position: relative;
  transition: box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.appointment-form-card:hover {
  box-shadow: 0 16px 42px -8px rgba(11, 31, 58, 0.12);
}

.form-card-header {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--color-slate-100);
  padding-bottom: 18px;
}

.form-header-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary-600);
  background: var(--color-primary-50);
  border: 1px solid var(--color-primary-200);
  padding: 3px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.form-card-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--color-navy-900);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 6px;
}

.form-card-desc {
  font-size: 0.8875rem;
  color: var(--color-slate-500);
  line-height: 1.5;
}

/* Form Layout Grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 16px;
  margin-bottom: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--color-slate-700);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.required-star {
  color: #e53e3e;
  font-weight: 700;
}

/* Input Wrappers & Controls */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--color-slate-400);
  pointer-events: none;
  transition: color 0.35s ease;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.9125rem;
  color: var(--color-slate-800);
  background-color: var(--color-slate-50);
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 11px 14px 11px 40px;
  transition: border-color 0.35s ease, background-color 0.35s ease, box-shadow 0.35s ease;
  outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-slate-400);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  background-color: var(--color-white);
  border-color: var(--color-primary-600);
  box-shadow: 0 0 0 3.5px rgba(2, 132, 199, 0.14);
}

.input-wrapper:focus-within .input-icon {
  color: var(--color-primary-600);
}

/* Select Control */
.select-wrapper {
  position: relative;
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 36px;
}

.select-chevron {
  position: absolute;
  right: 14px;
  width: 16px;
  height: 16px;
  color: var(--color-slate-500);
  pointer-events: none;
}

/* Textarea */
.textarea-wrapper {
  align-items: flex-start;
}

.form-textarea {
  padding: 11px 14px;
  resize: vertical;
  min-height: 80px;
}

/* Form Privacy Note */
.form-privacy-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.785rem;
  color: var(--color-slate-500);
  margin-bottom: 20px;
}

.form-privacy-note svg {
  color: #10b981;
  flex-shrink: 0;
}

/* Submit Button */
.btn-submit-appointment {
  width: 100%;
  padding: 13px 26px;
  background-color: var(--color-navy-900);
  color: var(--color-white);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 0.975rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 18px rgba(11, 31, 58, 0.25);
  transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-submit-appointment:hover {
  background-color: var(--color-primary-600);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.35);
}

.btn-submit-appointment:active {
  transform: translateY(0);
}

.btn-submit-appointment:disabled {
  opacity: 0.85;
  cursor: not-allowed;
  transform: none;
}

.spin-animation {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Form Success Box */
.form-success-box {
  margin-top: 18px;
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  animation: fadeInSuccess 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInSuccess {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.success-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: #10b981;
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.success-text-content {
  flex: 1;
}

.success-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 2px;
}

.success-desc {
  font-size: 0.835rem;
  color: #047857;
  line-height: 1.45;
}

/* ==========================================================================
   5. Google Maps Location Section & Interactive Badge
   ========================================================================== */
.contact-map-block {
  grid-area: map;
  width: 100%;
  margin-top: 10px;
}

.map-card-wrapper {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 34px -6px rgba(11, 31, 58, 0.08);
  background: #cbd5e1;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s ease;
}

.map-card-wrapper:hover {
  box-shadow: 0 16px 40px -6px rgba(11, 31, 58, 0.12);
}

.map-iframe-container {
  width: 100%;
  height: 440px;
  position: relative;
}

.google-map-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ==========================================================================
   6. Slower, Silkier Viewport Entry Animations (Applied to each element)
   ========================================================================== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.15s cubic-bezier(0.16, 1, 0.3, 1), transform 1.15s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.animate-on-scroll.slide-in-left {
  transform: translateX(-32px);
}

.animate-on-scroll.slide-in-right {
  transform: translateX(32px);
}

.animate-on-scroll.scale-up {
  transform: scale(0.96) translateY(20px);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.is-visible.slide-in-left,
.animate-on-scroll.is-visible.slide-in-right {
  opacity: 1;
  transform: translateX(0);
}

.animate-on-scroll.is-visible.scale-up {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Stagger delay classes - Slower & Smoother sequence */
.delay-100 { transition-delay: 0.12s; }
.delay-200 { transition-delay: 0.22s; }
.delay-300 { transition-delay: 0.32s; }
.delay-400 { transition-delay: 0.42s; }
.delay-500 { transition-delay: 0.52s; }
.delay-600 { transition-delay: 0.62s; }
.delay-700 { transition-delay: 0.72s; }

@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .animate-on-scroll.slide-in-left,
  .animate-on-scroll.slide-in-right,
  .animate-on-scroll.scale-up {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   7. Responsive Styles (Laptop, Tablet & Mobile)
   ========================================================================== */
@media (max-width: 1024px) {
  .contact-layout-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

  /* Mobile / Tablet view: Show contact cards first, form after cards, and map right before footer */
  .contact-cards-col {
    order: 1; /* Contact cards on top */
  }

  .contact-form-col {
    order: 2; /* Form after cards */
  }

  .contact-map-block {
    order: 3; /* Map right before footer */
    margin-top: 0;
  }

  .appointment-form-card {
    padding: 28px 28px;
  }
}

@media (max-width: 768px) {
  .contact-hero-section {
    padding: 38px 0 32px;
  }

  .contact-hero-title {
    font-size: 1.85rem;
  }

  .contact-hero-subtitle {
    font-size: 0.95rem;
  }

  .contact-main-section {
    padding: 32px 0 48px;
  }

  .info-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .info-card {
    padding: 16px 14px;
    min-height: 145px;
  }

  .info-icon-box {
    width: 36px;
    height: 36px;
  }

  .info-icon-box svg {
    width: 18px;
    height: 18px;
  }

  .info-card-val {
    font-size: 0.95rem;
  }

  .info-card-sub {
    font-size: 0.75rem;
  }

  .appointment-form-card {
    padding: 24px 20px;
    border-radius: var(--radius-lg);
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .map-iframe-container {
    height: 360px;
  }

  /* Faster, snappier entrance for buttons on mobile so they don't lag behind */
  .form-submit-row.animate-on-scroll,
  .btn-submit-appointment.animate-on-scroll,
  .btn.animate-on-scroll {
    transform: translateY(16px);
    transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1) !important;
    transition-delay: 0.12s !important;
  }

  .form-submit-row.animate-on-scroll.is-visible,
  .btn-submit-appointment.animate-on-scroll.is-visible,
  .btn.animate-on-scroll.is-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }
}

@media (max-width: 480px) {
  .info-cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .info-card {
    min-height: auto;
  }

  .emergency-support-card {
    padding: 12px 14px;
  }

  .form-card-title {
    font-size: 1.35rem;
  }

  .btn-submit-appointment {
    padding: 12px 20px;
    font-size: 0.925rem;
  }
}
