/* ==========================================================================
   Intimaa Transformation Redesign Stylesheet
   Full Responsive — Mobile-First Approach
   Breakpoints: 320 → 480 → 640 → 768 → 1024 → 1280 → 1440 → 1920+
   ========================================================================== */

/* ========== 1. CSS CUSTOM PROPERTIES & DESIGN TOKENS ========== */
:root {
  /* Brand Colors */
  --c-wine: #8e3b46;
  --c-wine-light: #a84a58;
  --c-ivory: #faf5f1;
  --c-dim: #ddd9d6;
  --c-gold: #c5a059;
  --c-dark: #1a1a1a;

  /* Responsive Typography Scale (clamp: min, preferred, max) */
  --fs-hero:    clamp(2.25rem, 5vw + 0.5rem, 4.5rem);
  --fs-h2:      clamp(1.625rem, 3vw + 0.5rem, 3rem);
  --fs-h3:      clamp(1.25rem, 2vw + 0.25rem, 1.75rem);
  --fs-h4:      clamp(1rem, 1.5vw + 0.25rem, 1.25rem);
  --fs-body:    clamp(0.8125rem, 1vw + 0.125rem, 0.9375rem);
  --fs-small:   clamp(0.6875rem, 0.8vw + 0.1rem, 0.75rem);
  --fs-caption: clamp(0.5625rem, 0.6vw + 0.1rem, 0.625rem);

  /* Responsive Spacing */
  --section-py:    clamp(3rem, 6vw, 8rem);
  --container-px:  clamp(1rem, 3vw, 1.5rem);
  --card-padding:  clamp(1.25rem, 2.5vw, 2.5rem);

  /* Layout */
  --nav-height: 5rem;
  --nav-height-scrolled: 4rem;
  --max-content: 80rem; /* 1280px */
  --border-radius-brand: 24px;
  --border-radius-brand-sm: 16px;

  /* Transitions */
  --transition-fast: 200ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

/* ========== 2. GLOBAL RESETS & CORE DEFAULTS ========== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 1rem);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--c-ivory);
  color: #333;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

h1, h2, h3, .font-editorial {
  font-family: 'Playfair Display', serif;
}

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

/* Prevent iOS zoom on input focus */
@media (max-width: 767px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* Text wrapping */
.text-balance {
  text-wrap: balance;
}

/* ========== 3. RESPONSIVE TYPOGRAPHY CLASSES ========== */
.responsive-hero   { font-size: var(--fs-hero); line-height: 1.1; }
.responsive-h2     { font-size: var(--fs-h2); line-height: 1.2; }
.responsive-h3     { font-size: var(--fs-h3); line-height: 1.3; }
.responsive-h4     { font-size: var(--fs-h4); line-height: 1.4; }
.responsive-body   { font-size: var(--fs-body); line-height: 1.7; }
.responsive-small  { font-size: var(--fs-small); }
.responsive-caption { font-size: var(--fs-caption); }

/* ========== 4. LAYOUT UTILITIES ========== */
.section-padding {
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
}

.luxury-overlay {
  background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(142, 59, 70, 0.4));
}

/* Touch-friendly minimum sizes */
button, a, [role="button"], input[type="submit"] {
  min-height: 44px;
}
/* Exception for inline/text links */
p a, span a, li a, .inline-link {
  min-height: unset;
}
/* Exception for nav links */
nav a, footer a, .nav-link {
  min-height: unset;
}

/* ========== 5. NAVIGATION — RESPONSIVE ========== */
/* Navbar scroll shrink effect */
.nav-scrolled {
  height: var(--nav-height-scrolled) !important;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
.nav-scrolled img {
  height: 2rem !important;
}

/* Services dropdown — prevent viewport overflow */
.services-dropdown {
  max-width: calc(100vw - 2rem);
}
@media (max-width: 767px) {
  .services-dropdown {
    position: fixed !important;
    left: 1rem !important;
    right: 1rem !important;
    max-width: none;
  }
}

/* Mobile drawer — responsive width */
#mobile-menu-drawer {
  width: min(320px, 85vw);
  max-width: min(320px, 85vw);
}

/* Luxury scrollbar for Services Dropdown */
.absolute::-webkit-scrollbar {
  width: 6px;
}
.absolute::-webkit-scrollbar-track {
  background: transparent;
}
.absolute::-webkit-scrollbar-thumb {
  background-color: rgba(142, 59, 70, 0.2);
  border-radius: 10px;
}
.absolute::-webkit-scrollbar-thumb:hover {
  background-color: rgba(142, 59, 70, 0.4);
}

/* ========== 6. HERO SECTION — RESPONSIVE ========== */
.hero-section {
  min-height: 100svh;
  min-height: 100vh; /* Fallback */
  display: flex;
  align-items: center;
}

.hero-card {
  padding: clamp(1.5rem, 4vw, 3rem);
  max-width: min(42rem, calc(100vw - 2rem));
  border-radius: var(--border-radius-brand-sm);
}
@media (min-width: 640px) {
  .hero-card {
    border-radius: var(--border-radius-brand);
  }
}

.hero-card h1 {
  font-size: var(--fs-hero);
  line-height: 1.1;
}

/* Hero tags responsive */
.hero-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

/* Hero buttons responsive */
.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}
@media (min-width: 480px) {
  .hero-buttons {
    flex-direction: row;
    width: auto;
  }
}
.hero-buttons a {
  text-align: center;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== 7. TRANSFORMATION JOURNEY — RESPONSIVE TIMELINE ========== */
.journey-step {
  position: relative;
  padding-left: 3.5rem;
  padding-bottom: 2rem;
}
.journey-step::before {
  content: '';
  position: absolute;
  left: 1.125rem;
  top: 2.5rem;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--c-wine), var(--c-gold));
}
.journey-step:last-child::before {
  display: none;
}
.journey-step-number {
  position: absolute;
  left: 0;
  top: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--c-wine);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  z-index: 2;
}
.journey-card {
  background: #fff;
  border-radius: var(--border-radius-brand-sm);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border: 1px solid rgba(221, 217, 214, 0.2);
  overflow: hidden;
}

/* Desktop: centered timeline with alternating cards */
@media (min-width: 768px) {
  .journey-timeline {
    position: relative;
    padding-left: 0;
  }
  .journey-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--c-wine), var(--c-gold), var(--c-wine));
    transform: translateX(-50%);
  }
  .journey-step {
    padding-left: 0;
    padding-bottom: 3rem;
    width: 50%;
  }
  .journey-step::before {
    display: none;
  }
  .journey-step-number {
    position: absolute;
    left: auto;
    z-index: 2;
  }
  .journey-step:nth-child(odd) {
    padding-right: 3rem;
    text-align: right;
  }
  .journey-step:nth-child(odd) .journey-step-number {
    right: -1.25rem;
  }
  .journey-step:nth-child(even) {
    margin-left: 50%;
    padding-left: 3rem;
  }
  .journey-step:nth-child(even) .journey-step-number {
    left: -1.25rem;
  }
}

/* ========== 8. SOCIAL REELS — RESPONSIVE ========== */
.reel-iframe-card {
  min-width: 160px;
  max-width: 160px;
  height: 277px;
  position: relative;
  overflow: hidden;
}
.reel-iframe-card iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 300px !important;
  height: 520px !important;
  max-width: none !important;
  transform-origin: top left;
  transform: scale(0.53333);
  border: none;
}
@media (min-width: 640px) {
  .reel-iframe-card {
    min-width: 220px;
    max-width: 220px;
    height: 381px;
  }
  .reel-iframe-card iframe {
    transform: scale(0.73333);
  }
}
@media (min-width: 1024px) {
  .reel-iframe-card {
    min-width: 300px;
    max-width: 300px;
    height: 520px;
  }
  .reel-iframe-card iframe {
    transform: scale(1);
  }
}
.reels-container::-webkit-scrollbar {
  display: none;
}
.reels-container {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* ========== 9. TREATMENTS & SERVICES CARDS — RESPONSIVE ========== */
.treat-scroll::-webkit-scrollbar {
  display: none;
}
.treat-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.treat-card {
  min-width: 150px;
  max-width: 150px;
  padding: 1rem !important;
}
.treat-card h4 {
  font-size: 12px;
}
.treat-card p {
  font-size: 9px;
}
@media (min-width: 480px) {
  .treat-card {
    min-width: 180px;
    max-width: 180px;
    padding: 1.25rem !important;
  }
}
@media (min-width: 640px) {
  .treat-card {
    min-width: 240px;
    max-width: 240px;
    padding: 1.5rem !important;
  }
  .treat-card h4 {
    font-size: 14px;
  }
  .treat-card p {
    font-size: 10px;
  }
}
@media (min-width: 1024px) {
  .treat-card {
    min-width: 260px;
    max-width: 260px;
  }
}

/* Category Icon Circle — Responsive */
.cat-icon-circle {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8e3b46 0%, #c5a059 100%);
}
.cat-icon-circle i {
  color: #fff;
  font-size: 24px;
}
@media (min-width: 640px) {
  .cat-icon-circle {
    width: 72px;
    height: 72px;
    min-width: 72px;
  }
  .cat-icon-circle i {
    font-size: 32px;
  }
}
@media (min-width: 768px) {
  .cat-icon-circle {
    width: 90px;
    height: 90px;
    min-width: 90px;
  }
  .cat-icon-circle i {
    font-size: 40px;
  }
}

/* Carousel Nav Arrows */
.nav-arrow {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #8e3b46;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  font-size: 16px;
  line-height: 1;
}
@media (min-width: 640px) {
  .nav-arrow {
    width: 44px;
    height: 44px;
    min-width: 44px;
    font-size: 18px;
  }
}
.nav-arrow:hover {
  background: #a84a58;
  transform: scale(1.05);
}
.nav-arrow:active {
  transform: scale(0.95);
}

/* ========== 10. PATIENT STORIES — RESPONSIVE ========== */
.story-card {
  position: relative;
  padding-top: 2rem;
  margin-top: 1.5rem;
}
.story-avatar {
  position: absolute;
  top: -1.5rem;
  left: clamp(1.5rem, 4vw, 2.5rem);
}

/* ========== 11. DOCTOR PROFILES — RESPONSIVE ========== */
.doctor-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.doctor-card-image {
  width: 100%;
  min-height: 280px;
  max-height: 400px;
  position: relative;
  overflow: hidden;
}
.doctor-card-content {
  width: 100%;
  padding: clamp(1.5rem, 3vw, 2rem);
}
@media (min-width: 1024px) {
  .doctor-card {
    flex-direction: row;
  }
  .doctor-card-image {
    width: 41.666%;
    min-height: unset;
    max-height: unset;
  }
  .doctor-card-content {
    width: 58.333%;
  }
}

/* ========== 12. BOOKING FORM — RESPONSIVE ========== */
.booking-form-container {
  display: flex;
  flex-direction: column;
}
.booking-image-side {
  width: 100%;
  min-height: 300px;
  position: relative;
}
.booking-form-side {
  width: 100%;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
@media (min-width: 1024px) {
  .booking-form-container {
    flex-direction: row;
  }
  .booking-image-side {
    width: 50%;
    min-height: 500px;
  }
  .booking-form-side {
    width: 50%;
    padding: clamp(2.5rem, 4vw, 5rem);
  }
}

/* Form inputs — touch-friendly */
.form-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--c-dim);
  padding: 0.75rem 0;
  font-size: 0.875rem;
  transition: border-color var(--transition-base);
  background: transparent;
  min-height: 44px;
}
.form-input:focus {
  border-color: var(--c-wine);
  outline: none;
  box-shadow: none;
}

/* ========== 13. FAQ ACCORDION — RESPONSIVE ========== */
.faq-item {
  transition: all var(--transition-base);
}
.faq-item button {
  padding: clamp(0.875rem, 2vw, 1.25rem) clamp(1rem, 3vw, 1.5rem);
}
.faq-answer {
  transition: max-height var(--transition-slow) ease-in-out;
}

/* ========== 14. FOOTER — RESPONSIVE GRID ========== */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}
@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
  }
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}
@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ========== 15. SERVICES PAGE — RESPONSIVE ========== */
.services-filter-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}
@media (min-width: 640px) {
  .services-filter-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    align-items: center;
  }
}
.services-filter-buttons button {
  width: 100%;
}
@media (min-width: 640px) {
  .services-filter-buttons button {
    width: auto;
  }
}

/* Services treatment grid */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}
@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* ========== 16. TREATMENT PAGES — RESPONSIVE ========== */
.treatment-overview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .treatment-overview-grid {
    grid-template-columns: 7fr 5fr;
    gap: 3rem;
    align-items: center;
  }
}

.treatment-suitability-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .treatment-suitability-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

.treatment-journey-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .treatment-journey-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* ========== 17. TESTIMONIALS GRID — RESPONSIVE ========== */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 640px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========== 18. FLOATING BUTTONS & GLOW EFFECTS ========== */
.whatsapp-glow {
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
  animation: whatsapp-pulse 2s infinite;
}
@keyframes whatsapp-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.scrolltop-glow {
  box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.6);
  animation: scrolltop-pulse 2s infinite;
}
@keyframes scrolltop-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 12px rgba(197, 160, 89, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(197, 160, 89, 0);
  }
}

/* ========== 19. STICKY SOCIAL SIDEBAR ========== */
.social-sidebar-tab {
  overflow: hidden;
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.15);
  border-left: 3px solid #c5a059;
}
@media (max-width: 639px) {
  .social-sidebar-tab {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    width: 2.75rem;
  }
}

/* ========== 20. ULTRA-WIDE & 4K ENHANCEMENTS ========== */
@media (min-width: 1920px) {
  .max-w-7xl {
    max-width: 1400px;
  }
  :root {
    --section-py: 10rem;
  }
}
@media (min-width: 2560px) {
  .max-w-7xl {
    max-width: 1600px;
  }
}

/* ========== 21. ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus visible indicators */
:focus-visible {
  outline: 2px solid var(--c-wine);
  outline-offset: 2px;
}

/* Skip to content link (screen readers) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--c-wine);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 8px 8px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: top var(--transition-fast);
}
.skip-link:focus {
  top: 0;
}

/* ========== 22. PRINT STYLES ========== */
@media print {
  nav, footer, #social-sticky-sidebar,
  .whatsapp-glow, .scrolltop-glow,
  .reels-container, .nav-arrow {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }
  .section-padding {
    padding: 1rem 0;
  }
}
