html { scroll-behavior: auto !important; }
body.mamadua-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,196,209,.25), transparent 24%),
    radial-gradient(circle at 85% 10%, rgba(153,186,215,.16), transparent 26%),
    linear-gradient(160deg, #fdfbd7 0%, #feeee8 45%, #ffe8e1 72%, #ffc4d1 100%);
  color: #683147;
  font-family: 'Amiri', serif;
}
html[lang="en"] body.mamadua-body { font-family: 'Lora', serif; }
.font-heading, .brand-title, h1, h2, h3, h4 { font-family: 'Amiri', serif; }
html[lang="en"] .font-heading,
html[lang="en"] .brand-title,
html[lang="en"] h1,
html[lang="en"] h2,
html[lang="en"] h3,
html[lang="en"] h4 { font-family: 'Playfair Display', serif; }
.mamadua-header { position: sticky; top: 0; z-index: 30; }
.glass-nav,
.glass-card,
.glass-panel {
  background: rgba(255,255,255,.42);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(213,140,137,.35);
  border-radius: 1.5rem;
  box-shadow: 0 16px 42px rgba(104,49,71,.12);
}
.glass-nav { padding: .75rem 1rem; }
.brand-link { color: #683147; font-weight: 700; }
.brand-title { font-size: 1.1rem; }
.mamadua-header-modern .modern-nav-shell {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1.1rem;
}
.modern-brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding-inline: .25rem;
}
.modern-brand-mark {
  width: 1.8rem;
  height: 1.8rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(140deg, #ffc4d1, #d58c89);
  color: #fff;
  font-size: .9rem;
  box-shadow: 0 8px 20px rgba(104,49,71,.2);
}
.modern-nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-width: 0;
}
.modern-nav-link {
  color: #683147;
  text-decoration: none;
  border-radius: 999px;
  padding: .45rem .85rem;
  font-size: .92rem;
  line-height: 1.2;
  border: 1px solid transparent;
  transition: all .24s ease;
  white-space: nowrap;
}
.modern-nav-link:hover {
  color: #683147;
  border-color: rgba(213,140,137,.3);
  background: rgba(255,255,255,.45);
}
.modern-nav-link.is-active {
  border-color: rgba(213,140,137,.38);
  background: rgba(255,255,255,.72);
  box-shadow: 0 8px 20px rgba(104,49,71,.08);
}
.modern-nav-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
}
.modern-chip {
  border-radius: 999px;
  padding: .46rem .78rem;
  font-size: .86rem;
  line-height: 1.1;
  border: 1px solid rgba(213,140,137,.32);
  text-decoration: none;
  transition: all .2s ease;
  color: #683147;
  white-space: nowrap;
  background: rgba(255,255,255,.45);
}
.modern-chip:hover {
  color: #683147;
  transform: translateY(-1px);
}
.modern-chip-soft {
  background: rgba(255,255,255,.5);
}
.modern-chip-primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #efaac4, #d58c89);
  box-shadow: 0 10px 20px rgba(104,49,71,.18);
}
.modern-chip-primary:hover {
  color: #fff;
}
.modern-chip-lang {
  min-width: 3.1rem;
  text-align: center;
  font-weight: 700;
}
.modern-auth-note {
  letter-spacing: .01em;
}
@media (max-width: 1199.98px) {
  .mamadua-header-modern .modern-nav-shell {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: .7rem;
  }
}
@media (max-width: 991.98px) {
  .modern-nav-links {
    display: none;
  }
  .modern-nav-actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
}
.hero-shell { min-height: calc(100vh - 90px); display: grid; align-items: center; }
.hero-title { font-size: clamp(2.4rem, 10vw, 4.8rem); line-height: 1.04; }
.hero-copy { line-height: 1.9; color: rgba(104,49,71,.82); }
.wizard-shell { position: relative; z-index: 1; }
.wizard-card { position: relative; overflow: hidden; }
.wizard-progress { max-width: 24rem; margin: 0 auto 1.5rem; }
.wizard-progress-bar {
  height: .4rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(213,140,137,.18);
}
.wizard-progress-bar span {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, #efaac4, #d58c89);
  transition: width .35s ease;
}
.wizard-dots {
  display: flex;
  justify-content: center;
  gap: .6rem;
  margin-top: .85rem;
}
.wizard-dot {
  width: .8rem;
  height: .8rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(213,140,137,.28);
  transition: transform .25s ease, background-color .25s ease;
}
.wizard-dot.active {
  background: #d58c89;
  transform: scale(1.15);
}
.wizard-stage {
  position: relative;
  min-height: 24rem;
  padding: 1rem;
  overflow: hidden;
}
.wizard-scene {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(.98);
  transition: opacity .35s ease, transform .35s ease;
}
.wizard-scene.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.scene-label {
  display: inline-flex;
  padding: .45rem .8rem;
  border-radius: 999px;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(213,140,137,.22);
  font-size: .9rem;
  position: relative;
  z-index: 2;
}
.wizard-scene-image {
  width: min(100%, 20rem);
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 14px 30px rgba(104,49,71,.08));
}
.wizard-copy { position: relative; min-height: 22rem; }
.wizard-panel {
  display: none;
  opacity: 0;
}
.wizard-panel.active {
  display: block;
  opacity: 1;
}
.wizard-step-count {
  display: inline-block;
  color: #d58c89;
  font-size: .95rem;
  letter-spacing: .02em;
}
.final-dua-card .dua-arabic {
  font-size: clamp(1.05rem, 3.3vw, 1.45rem);
  line-height: 2.1;
}
.wizard-actions {
  display: flex;
  gap: .75rem;
}
.wizard-actions > * {
  flex: 1 1 0;
}
.wizard-actions button:disabled {
  opacity: .5;
}
.soft-badge {
  display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .9rem;
  border-radius: 999px; background: rgba(255,255,255,.45);
  border: 1px solid rgba(213,140,137,.25);
}
.btn-pink {
  background: linear-gradient(135deg, #efaac4, #d58c89);
  border: none;
  color: #fff;
}
.btn img {
  object-fit: contain;
}
.dua-card .dua-arabic {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  line-height: 2.2;
  text-align: center;
  margin: 1rem 0 .7rem;
}
.home-cta {
  position: relative;
  overflow: hidden;
}
.category-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.flower-card {
  display: flex;
  flex-direction: column;
}
.flower-card-image-link {
  display: block;
}
.flower-card-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 1.1rem;
  box-shadow: 0 10px 26px rgba(104,49,71,.10);
}
.flower-card-category {
  color: #d58c89;
  font-size: .85rem;
}
.flower-library-grid .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.home-cta .hero-copy {
  max-width: 42rem;
}
.dua-meta { color: #d58c89; font-size: .92rem; }
.section-title { font-size: clamp(1.8rem, 5vw, 3rem); }
.form-control, .form-select {
  border-radius: 1rem;
  border-color: rgba(213,140,137,.35);
}
.page-thumb {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  border-radius: 1rem;
}
.envelope-stage { min-height: 100vh; display: grid; place-items: center; overflow: hidden; }
.envelope-shell { width: min(100%, 28rem); }
.envelope { position: relative; aspect-ratio: 1.18/.9; perspective: 1200px; }
.envelope-back, .envelope-front, .envelope-flap { position: absolute; inset: 0; border-radius: 1.5rem; }
.envelope-back { background: linear-gradient(180deg, #f8d9e1, #f1bcc8); box-shadow: 0 25px 60px rgba(104,49,71,.18); }
.envelope-front { background: linear-gradient(180deg, #efb9c8, #db98a6); clip-path: polygon(0 38%, 50% 76%, 100% 38%, 100% 100%, 0 100%); z-index: 3; }
.envelope-flap { background: linear-gradient(180deg, #ffd7df, #f0aab8); clip-path: polygon(0 0, 100% 0, 50% 74%); transform-origin: top center; z-index: 4; border: 0; }
.envelope-paper {
  position: absolute; inset-inline: 8%; bottom: 10%; min-height: 72%; z-index: 2;
  background: rgba(255,252,249,.98); border-radius: 1.35rem; padding: 1.1rem;
  box-shadow: 0 18px 30px rgba(104,49,71,.08);
}
.personal-content { opacity: 0; transform: translateY(16px); }
.floating-hearts { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.floating-hearts span {
  position: absolute; color: rgba(213,140,137,.18); font-size: clamp(14px, 3vw, 30px);
  animation: floatHeart linear infinite;
}
@keyframes floatHeart {
  from { transform: translate3d(0, 100vh, 0); }
  to { transform: translate3d(0, -10vh, 0); }
}

/* Homepage top image banner (duas + meaningful imagery) */
.home-hero-banner {
  position: relative;
  z-index: 1;
}
.home-hero-carousel {
  max-width: 1400px;
  margin-inline: auto;
}
.home-hero-banner-slide {
  position: relative;
  overflow: hidden;
  border-radius: 1.35rem;
  min-height: 200px;
}
.home-hero-banner-img {
  display: block;
  width: 100%;
  height: clamp(14rem, 42vw, 28rem);
  object-fit: cover;
  object-position: center 35%;
}
.home-hero-banner-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(104,49,71,.12) 0%,
    rgba(104,49,71,.05) 35%,
    rgba(104,49,71,.55) 72%,
    rgba(104,49,71,.72) 100%
  );
  pointer-events: none;
}
.home-hero-banner-caption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 1.25rem 1rem 1.5rem;
  text-align: center;
  z-index: 2;
  color: #fffdf8;
  text-shadow: 0 2px 18px rgba(40, 18, 28, .45);
}
.home-hero-banner-quote {
  font-size: clamp(1.05rem, 3.8vw, 1.65rem);
  line-height: 1.75;
  margin-bottom: 0.35rem;
  font-weight: 700;
}
html[lang="en"] .home-hero-banner-quote {
  font-family: 'Playfair Display', 'Amiri', serif;
  font-weight: 600;
}
.home-hero-banner-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.92;
  margin-bottom: 0.65rem;
}
.home-hero-banner-cta {
  box-shadow: 0 8px 24px rgba(40, 18, 28, .2);
}
.home-hero-indicators {
  margin-bottom: 0.35rem;
  z-index: 4;
}
.home-hero-indicators [data-bs-target] {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  border: 0;
  background-color: rgba(255, 253, 248, 0.45);
  opacity: 1;
}
.home-hero-indicators .active {
  background-color: #fffdf8;
  transform: scale(1.15);
}
.home-hero-control {
  width: 2.65rem;
  height: 2.65rem;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.38) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 1 !important;
  z-index: 4;
}
.home-hero-control:hover {
  background: rgba(255, 253, 248, 0.55) !important;
}
.home-hero-control .carousel-control-prev-icon,
.home-hero-control .carousel-control-next-icon {
  filter: drop-shadow(0 1px 2px rgba(40, 18, 28, 0.35));
  width: 1.35rem;
  height: 1.35rem;
}
@media (prefers-reduced-motion: reduce) {
  .home-hero-carousel.carousel-fade .carousel-item {
    transition-duration: 0.01ms !important;
  }
}

/* Parallax section + scroll-scrubbed flip cards (homepage) */
.parallax-flip-section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: min(88vh, 840px);
}
.parallax-flip-bg {
  position: absolute;
  inset: -14% -10% -22% -10%;
  z-index: 0;
  pointer-events: none;
}
.parallax-flip-bg-layer {
  position: absolute;
  inset: 0;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}
.parallax-flip-bg-slow {
  background: radial-gradient(ellipse 72% 58% at 16% 32%, rgba(255, 196, 209, 0.62) 0%, transparent 64%);
}
.parallax-flip-bg-mid {
  background: radial-gradient(ellipse 65% 52% at 86% 62%, rgba(153, 186, 215, 0.42) 0%, transparent 60%);
}
.parallax-flip-bg-fast {
  background:
    radial-gradient(circle at 48% 108%, rgba(213, 140, 137, 0.24) 0%, transparent 42%),
    radial-gradient(ellipse 50% 40% at 72% 18%, rgba(255, 235, 240, 0.35) 0%, transparent 55%);
}
.parallax-flip-bg-glow {
  position: absolute;
  inset: 8% 18%;
  background: radial-gradient(circle, rgba(255, 248, 252, 0.5) 0%, transparent 70%);
  will-change: transform, opacity;
  pointer-events: none;
}
.parallax-flip-content {
  z-index: 1;
}
.parallax-flip-hint {
  opacity: 0.85;
}
.parallax-flip-hint-icon {
  display: inline-block;
  animation: parallaxHintNudge 2.2s ease-in-out infinite;
}
@keyframes parallaxHintNudge {
  0%, 100% { transform: translate3d(0, 0, 0); opacity: 0.7; }
  50% { transform: translate3d(0, 4px, 0); opacity: 1; }
}

.flip-card-wrap {
  perspective: 1280px;
  height: 100%;
  min-height: 16.5rem;
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 16.5rem;
  transform-style: preserve-3d;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}
.flip-card-face {
  position: absolute;
  inset: 0;
  padding: 1.35rem 1.15rem;
  border-radius: 1.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 18px 44px rgba(104, 49, 71, 0.14);
  border: 1px solid rgba(213, 140, 137, 0.38);
}
.flip-card-front {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 236, 241, 0.42) 100%);
}
.flip-card-back {
  transform: rotateY(180deg);
  background: linear-gradient(195deg, rgba(255, 252, 249, 0.58) 0%, rgba(237, 246, 255, 0.35) 100%);
  justify-content: flex-start;
  overflow-y: auto;
}
.flip-card-spark {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 196, 209, 0.2) 0%, transparent 45%);
  pointer-events: none;
}
.flip-card-icon {
  font-size: 1.35rem;
  color: #d58c89;
  line-height: 1;
  margin-bottom: 0.35rem;
}
.flip-card-dua {
  font-size: clamp(0.95rem, 2.4vw, 1.05rem);
  line-height: 1.85;
  text-align: center;
}
.flip-card-trans {
  color: rgba(104, 49, 71, 0.82);
  line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
  .parallax-flip-hint-icon {
    animation: none;
  }
  .parallax-flip-section .flip-card-wrap {
    perspective: none;
    min-height: auto;
  }
  .parallax-flip-section .flip-card-inner {
    transform: none !important;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: auto;
  }
  .parallax-flip-section .flip-card-face {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
  }
  .parallax-flip-section .flip-card-back {
    margin-top: 0;
  }
}

@media (max-width: 575.98px) {
  .wizard-card {
    border-radius: 1.25rem;
  }
  .wizard-stage {
    min-height: 20rem;
    padding: .75rem;
  }
  .wizard-copy {
    min-height: 18rem;
  }
  .wizard-actions {
    flex-direction: column;
  }
}
