/* Masjids in Udaipur — ivory/gold/emerald arch-card theme */

:root {
  --hp-mj-ivory: #FBF6EA;
  --hp-mj-emerald-950: #08241C;
  --hp-mj-emerald-900: #17693b;
  --hp-mj-emerald-800: #0F4B39;
  --hp-mj-emerald-700: #155943;
  --hp-mj-gold: #C7A452;
  --hp-mj-gold-bright: #E7C877;
  --hp-mj-gold-dim: #17693b;
  --hp-mj-maroon: #7C3232;
  --hp-mj-ink: #17211B;
  --hp-mj-ink-soft: #4B554D;
  --hp-mj-line: rgba(199,164,82,0.35);
}

/* ── Backdrop ──────────────────────────────────────────────────────────── */
.hp-mj-backdrop {
  position: absolute;
  inset: 0;
  background-color: var(--hp-mj-ivory);
  background-image:
    radial-gradient(circle at 15% 20%, rgba(199,164,82,0.10), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(15,75,57,0.08), transparent 40%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23C7A452' stroke-width='0.6' opacity='0.16'%3E%3Cpath d='M42 2 L60 22 L42 42 L24 22 Z'/%3E%3Cpath d='M42 42 L60 62 L42 82 L24 62 Z'/%3E%3Cpath d='M2 22 L22 22 L22 42 L2 42 Z' transform='rotate(45 22 32)'/%3E%3Cpath d='M62 22 L82 22 L82 42 L62 42 Z' transform='rotate(45 72 32)'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: auto, auto, 84px 84px;
  z-index: 0;
  pointer-events: none;
}

.hp-mj {
  position: relative;
  background: var(--hp-mj-ivory);
  overflow: hidden;
  font-family: 'Jost', sans-serif;
  color: var(--hp-mj-ink);
}

.hp-mj-wrap {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 64px);
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hp-mj-hero {
  position: relative;
  padding: clamp(64px, 9vw, 108px) 0 clamp(40px, 6vw, 72px);
  overflow: hidden;
}

.hp-mj-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 32px;
  position: relative;
  z-index: 2;
}
@media (max-width: 980px) {
  .hp-mj-hero-grid { grid-template-columns: 1fr; }
  .hp-mj-medallion-stage { height: 260px; order: -1; }
}

.hp-mj-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px 9px 14px;
  border: 1px solid var(--hp-mj-line);
  border-radius: 999px;
  background: rgba(255,255,255,0.5);
  color: var(--hp-mj-emerald-800);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0;
  animation: hp-mj-fadeUp 0.7s 0.05s cubic-bezier(.2,.7,.2,1) forwards;
}
.hp-mj-eyebrow svg { width: 16px; height: 16px; flex: none; }

.hp-mj-headline {
  font-family: 'Amiri', Georgia, serif;
  font-weight: 700;
  font-size: clamp(46px, 6.4vw, 82px);
  line-height: 1.02;
  margin: 22px 0 6px;
  color: var(--hp-mj-emerald-950);
  letter-spacing: -0.01em;
  opacity: 0;
  animation: hp-mj-fadeUp 0.8s 0.18s cubic-bezier(.2,.7,.2,1) forwards;
}
.hp-mj-headline em {
  font-style: normal;
  color: var(--hp-mj-gold-dim);
  position: relative;
}

.hp-mj-swash {
  display: block;
  width: min(340px, 46%);
  height: 14px;
  margin: 6px 0 26px;
  opacity: 0;
  animation: hp-mj-fadeUp 0.8s 0.3s cubic-bezier(.2,.7,.2,1) forwards;
}
.hp-mj-swash path {
  fill: none;
  stroke: var(--hp-mj-gold);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: hp-mj-draw 1.4s 0.55s cubic-bezier(.3,.6,.2,1) forwards;
}

.hp-mj-sub {
  max-width: 480px;
  font-size: 17.5px;
  line-height: 1.65;
  color: var(--hp-mj-ink-soft);
  margin: 0 0 32px;
  opacity: 0;
  animation: hp-mj-fadeUp 0.8s 0.38s cubic-bezier(.2,.7,.2,1) forwards;
}

.hp-mj-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  opacity: 0;
  animation: hp-mj-fadeUp 0.8s 0.5s cubic-bezier(.2,.7,.2,1) forwards;
}

.hp-mj-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 28px;
  background: var(--hp-mj-emerald-900);
  color: var(--hp-mj-ivory);
  border-radius: 999px 999px 10px 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.45s ease, transform 0.3s ease;
  cursor: pointer;
  border: none;
}
.hp-mj-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--hp-mj-gold-dim), var(--hp-mj-gold-bright) 60%);
  transform: translateX(-104%);
  transition: transform 0.5s cubic-bezier(.3,.7,.2,1);
  z-index: -1;
}
.hp-mj-btn:hover { color: var(--hp-mj-emerald-950); transform: translateY(-2px); }
.hp-mj-btn:hover::before { transform: translateX(0); }
.hp-mj-btn svg { width: 16px; height: 16px; transition: transform 0.4s cubic-bezier(.3,.7,.2,1); }
.hp-mj-btn:hover svg { transform: translateX(5px); }

.hp-mj-meta {
  font-size: 13.5px;
  color: var(--hp-mj-ink-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}
.hp-mj-meta b {
  font-family: 'Amiri', serif;
  color: var(--hp-mj-emerald-900);
  font-size: 22px;
  font-weight: 700;
}
.hp-mj-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--hp-mj-gold);
  display: inline-block;
}

/* ── Medallion ─────────────────────────────────────────────────────────── */
.hp-mj-medallion-stage {
  position: relative;
  height: clamp(320px, 34vw, 480px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: hp-mj-fadeIn 1.1s 0.3s ease forwards;
}
@media (max-width: 980px) {
  .hp-mj-medallion-stage { height: 260px; order: -1; }
}

.hp-mj-medallion {
  width: 96%;
  height: 96%;
  animation: hp-mj-spin 90s linear infinite;
  transform-origin: center;
}
.hp-mj-medallion-core {
  animation: hp-mj-spin-rev 60s linear infinite;
  transform-origin: center;
}

.hp-mj-crescent {
  position: absolute;
  top: 8%;
  right: 6%;
  width: clamp(46px, 6vw, 72px);
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(199,164,82,0.35));
  animation: hp-mj-float 6s ease-in-out infinite;
}

.hp-mj-spark {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--hp-mj-gold-bright);
  box-shadow: 0 0 8px 2px rgba(231,200,119,0.7);
  animation: hp-mj-twinkle 3.6s ease-in-out infinite;
}

/* ── Cards marquee ────────────────────────────────────────────────────── */
.hp-mj-cards {
  position: relative;
  padding: 20px 0 40px;
  z-index: 2;
  overflow: hidden;
}

.hp-mj-marquee {
  position: relative;
  overflow: hidden;
}

.hp-mj-marquee::before,
.hp-mj-marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 5;
  pointer-events: none;
}
.hp-mj-marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--hp-mj-ivory) 0%, transparent 100%);
}
.hp-mj-marquee::after {
  right: 0;
  background: linear-gradient(-90deg, var(--hp-mj-ivory) 0%, transparent 100%);
}

.hp-mj-marquee-track {
  display: flex;
  gap: 26px;
  width: max-content;
  animation: hp-mj-scroll 35s linear infinite;
}
.hp-mj-marquee:hover .hp-mj-marquee-track {
  animation-play-state: paused;
}

@keyframes hp-mj-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 13px)); }
}

/* ── Individual card ───────────────────────────────────────────────────── */
.hp-mj-card {
  position: relative;
  flex: 0 0 280px;
  flex-shrink: 0;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
  display: flex;
  flex-direction: column;
}
.hp-mj-card.hp-mj-in-view { opacity: 1; transform: translateY(0); }

.hp-mj-card-frame {
  position: relative;
  aspect-ratio: 3/3.6;
  border-radius: 4px;
}

.hp-mj-card-art {
  position: absolute;
  inset: 0;
  clip-path: url(#hp-mj-archClip);
  -webkit-clip-path: url(#hp-mj-archClip);
  overflow: hidden;
  transition: transform 0.7s cubic-bezier(.2,.7,.2,1);
}
.hp-mj-card:hover .hp-mj-card-art { transform: scale(1.045); }

.hp-mj-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hp-mj-mosque-icon {
  position: absolute;
  left: 50%;
  top: 56%;
  transform: translate(-50%, -50%);
  width: 52%;
  opacity: 0.92;
}

.hp-mj-card-outline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.hp-mj-card-outline path {
  fill: none;
  stroke: var(--hp-mj-gold-bright);
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1s cubic-bezier(.3,.7,.2,1);
}
.hp-mj-card:hover .hp-mj-card-outline path { stroke-dashoffset: 0; }

.hp-mj-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(8,36,28,0.55);
  backdrop-filter: blur(6px);
  color: var(--hp-mj-gold-bright);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid rgba(231,200,119,0.4);
}

.hp-mj-card-body {
  padding: 20px 4px 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.hp-mj-card-body h3 {
  font-family: 'Amiri', serif;
  font-size: 22px;
  line-height: 1.25;
  color: var(--hp-mj-emerald-950);
  margin: 0 0 8px;
}
.hp-mj-card-body p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--hp-mj-ink-soft);
  margin: 0 0 12px;
  flex: 1;
}
.hp-mj-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--hp-mj-emerald-800);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.hp-mj-card-link svg { width: 13px; height: 13px; transition: transform 0.3s ease; }
.hp-mj-card:hover .hp-mj-card-link { border-color: var(--hp-mj-gold); color: var(--hp-mj-maroon); }
.hp-mj-card:hover .hp-mj-card-link svg { transform: translateX(4px); }

.hp-mj-card:focus-visible .hp-mj-card-frame {
  outline: 2px solid var(--hp-mj-emerald-800);
  outline-offset: 3px;
}

/* ── Keyframes ─────────────────────────────────────────────────────────── */
@keyframes hp-mj-fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hp-mj-fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes hp-mj-draw { to { stroke-dashoffset: 0; } }
@keyframes hp-mj-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes hp-mj-spin-rev { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
@keyframes hp-mj-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes hp-mj-twinkle { 0%, 100% { opacity: 0.15; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.3); } }

/* ── Reduced motion ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hp-mj-eyebrow,
  .hp-mj-headline,
  .hp-mj-swash,
  .hp-mj-swash path,
  .hp-mj-sub,
  .hp-mj-actions,
  .hp-mj-medallion-stage,
  .hp-mj-medallion,
  .hp-mj-medallion-core,
  .hp-mj-crescent,
  .hp-mj-spark,
  .hp-mj-card,
  .hp-mj-card-art,
  .hp-mj-card-outline path,
  .hp-mj-card-link svg {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
