/**
 * GMS WordPress adaptations — hero slider, preloader, forms, WP sections.
 * Built on top of gms-umair.css (reference design system).
 */

/* Preloader handled in gms-polish.css — keep minimal base */
.gms-preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a4a4e;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.gms-preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gms-preloader-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.gms-preloader-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  padding: 8px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.2);
}

.gms-preloader-bar {
  width: 120px;
  height: 2px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 99px;
  overflow: hidden;
}

.gms-preloader-bar span {
  display: block;
  height: 100%;
  width: 45%;
  background: #fff;
  border-radius: 99px;
  animation: gmsProgress 1.15s ease-in-out infinite;
}

@keyframes gmsProgress {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

/* ----- Site shell ----- */
.gms-site {
  overflow-x: hidden;
}

.gms-content {
  padding-top: 0;
}

.glass-nav {
  z-index: 1040;
}

.glass-nav .lang-switcher {
  display: flex;
  gap: 0.35rem;
}

.glass-nav .lang-btn {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all var(--transition, 280ms ease);
}

.glass-nav .lang-btn.active,
.glass-nav .lang-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.header-cta-wrap {
  flex-wrap: nowrap;
  flex-shrink: 0;
}

/* Buttons refined in gms-polish.css */

/* ----- Hero slider (banner behaviour + Umair look) ----- */
.hero-slider.hero-section {
  position: relative;
  min-height: 92vh;
  padding: 0;
  overflow: hidden;
  background: #0f2329;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0.9s ease;
  z-index: 1;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 7s ease;
}

.hero-slide.active .hero-slide-bg {
  transform: scale(1);
}

.hero-slide-overlay,
.hero-slider .overlay {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  z-index: 1;
}

.hero-slider .hero-content,
.hero-slider .hero-slide-inner {
  position: relative;
  z-index: 3;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  padding-bottom: 120px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 1rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(112, 193, 129, 0.15);
  border: 1px solid rgba(112, 193, 129, 0.35);
}

.hero-slider .hero-title,
.hero-slider .hero-heading {
  color: #fff;
  margin-bottom: 1.25rem;
}

.hero-slider .hero-subtitle,
.hero-slider .hero-desc {
  color: rgba(255, 255, 255, 0.92);
  max-width: 540px;
  margin-bottom: 1.75rem;
}

#particles-js {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 35, 41, 0.35);
  color: #fff;
  backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition, 280ms ease);
  cursor: pointer;
}

.hero-arrow:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.06);
}

.hero-dots {
  display: flex;
  gap: 0.5rem;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  padding: 0;
  cursor: pointer;
  transition: all var(--transition, 280ms ease);
}

.hero-dot.active {
  width: 28px;
  border-radius: 99px;
  background: var(--secondary);
}

/* Stats overlap */
.stats-section {
  position: relative;
  z-index: 6;
  margin-top: -100px;
  padding-bottom: 40px;
}

@media (max-width: 767px) {
  .stats-section {
    margin-top: -60px;
  }

  .hero-slider.hero-section,
  .hero-slider .hero-content,
  .hero-slider .hero-slide-inner {
    min-height: 85vh;
  }

  .hero-controls {
    bottom: 20px;
  }
}

/* ----- Section helpers kept from GMS ----- */
.section-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.about-text {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.about-features-grid {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.about-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-weight: 500;
}

.about-feature-item i {
  color: var(--secondary);
  margin-top: 0.2rem;
}

.about-collage {
  position: relative;
  min-height: 420px;
}

.about-collage-main {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-collage-main img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

.about-exp-badge {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.about-exp-badge strong {
  display: block;
  font-size: 1.35rem;
  color: var(--primary);
  line-height: 1;
}

.about-exp-badge span {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.about-collage-stat {
  position: absolute;
  top: 1.5rem;
  right: -0.5rem;
  background: var(--gradient-primary);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-glow);
  z-index: 2;
}

.about-collage-stat strong {
  display: block;
  font-size: 1.4rem;
  line-height: 1.1;
}

.about-collage-stat span {
  font-size: 0.75rem;
  opacity: 0.9;
}

.about-collage-secondary {
  position: absolute;
  right: 0;
  bottom: -1.5rem;
  width: 48%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 4px solid #fff;
}

.about-collage-secondary img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

/* Service cards */
.service-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  height: 100%;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(19, 128, 134, 0.08);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 1.35rem;
  margin-bottom: 1rem;
  transition: all var(--transition);
}

.service-card:hover .service-icon {
  background: var(--gradient-primary);
  color: #fff;
  transform: scale(1.05);
}

.service-card h4 {
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.65rem;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.service-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap var(--transition), color var(--transition);
}

.service-link:hover {
  color: var(--primary-dark);
  gap: 0.65rem;
}

/* Expand grids */
.gms-collapsed-item {
  display: none !important;
}

.gms-expand-grid.is-expanded .gms-collapsed-item {
  display: block !important;
}

.gms-collapsed-item.show {
  animation: fadeUp 0.5s ease both;
}

/* Doctors */
.gms-doctor-card-premium {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  height: 100%;
  transition: all var(--transition);
  border: 1px solid rgba(19, 128, 134, 0.08);
}

.gms-doctor-card-premium:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

.gms-doctor-avatar {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-soft);
}

.gms-doctor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gms-doctor-card-premium:hover .gms-doctor-avatar img {
  transform: scale(1.06);
}

.gms-doctor-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 3rem;
  color: var(--primary);
  opacity: 0.4;
}

.gms-doctor-info {
  padding: 1.25rem;
  text-align: center;
}

.gms-doctor-info h5 {
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.gms-doctor-info h5 a {
  color: var(--dark);
  text-decoration: none;
}

.gms-doctor-specialty {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.gms-doctor-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.gms-doctor-social {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.gms-doctor-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  color: var(--primary);
  transition: all var(--transition);
  text-decoration: none;
}

.gms-doctor-social a:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

/* Countries / testimonials / blog polish */
.country-card,
.testimonial-card,
.blog-card,
.gms-blog-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid rgba(19, 128, 134, 0.08);
}

.country-card:hover,
.testimonial-card:hover,
.blog-card:hover,
.gms-blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.gms-country-card .gms-flag {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.gms-testimonial-card .gms-stars {
  color: var(--accent);
  margin-bottom: 0.85rem;
  letter-spacing: 0.08em;
}

.gms-testimonial-card h4 {
  margin-top: 1rem;
  margin-bottom: 0.25rem;
  font-size: 1.05rem;
}

.section-title.text-start::after {
  margin-left: 0;
}

/* Consultation form */
.consult-form-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(19, 128, 134, 0.1);
}

.consult-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.4rem;
}

.consult-form input,
.consult-form select,
.consult-form textarea {
  width: 100%;
  border: 1.5px solid #d9e5e4;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.consult-form input:focus,
.consult-form select:focus,
.consult-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.consult-info p {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  column-gap: 0.85rem;
  row-gap: 0.15rem;
  align-items: start;
  margin-bottom: 1.15rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.consult-info i {
  color: var(--primary);
  margin-top: 0.2rem;
  width: 1.1rem;
  text-align: center;
  grid-row: 1 / span 3;
}

.consult-info strong {
  display: block;
  color: var(--dark);
  font-weight: 650;
  grid-column: 2;
}

.consult-info a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 600;
  grid-column: 2;
}

.consult-info a:hover {
  color: var(--primary);
}

.footer-col ul li {
  margin-bottom: 0.55rem;
}

.footer-col ul a {
  line-height: 1.5;
}

.gms-form-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Form success modal */
.gms-form-modal[hidden] {
  display: none !important;
}

.gms-form-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.gms-form-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 35, 41, 0.55);
  backdrop-filter: blur(4px);
}

.gms-form-modal-dialog {
  position: relative;
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 2rem 1.75rem 1.75rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.4s ease both;
}

.gms-form-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.85rem;
  border: none;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

.gms-form-modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  font-size: 1.75rem;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.35);
}

.gms-form-modal-dialog h3 {
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.gms-form-modal-dialog p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.gms-form-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Why-us / insurance */
.why-us-section .bg-gradient {
  border-radius: var(--radius-xl);
  padding: 3.5rem 2rem;
}

.why-us-section .section-title.text-white::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
}

/* Outline primary button */
.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary) !important;
  box-shadow: none;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus-visible {
  background: var(--primary);
  color: #fff;
  transform: translateY(-3px) scale(1.02);
}

/* Floating WhatsApp */
.gms-float-wa {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1030;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  font-size: 1.6rem;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.4);
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
}

.gms-float-wa:hover {
  color: #fff;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 14px 36px rgba(37, 211, 102, 0.5);
}

/* Archive / single page spacing under fixed nav */
body:not(.home) .gms-content {
  padding-top: 96px;
}

body.home .glass-nav:not(.scrolled) {
  /* transparent start on home */
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .gms-preloader-ring,
  .gms-preloader-logo,
  .gms-preloader-bar span,
  .hero-slide-bg {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 991px) {
  .about-collage {
    min-height: auto;
    margin-bottom: 1rem;
  }

  .about-collage-secondary,
  .about-collage-stat {
    position: relative;
    right: auto;
    top: auto;
    bottom: auto;
    width: auto;
    margin-top: 1rem;
  }

  .about-collage-stat {
    display: inline-block;
  }
}
