/* =========================================================
   Rawdah - design refinements: tighter rhythm, compact media,
   service cards, motion. Loaded after style.css + responsive.css
   ========================================================= */

:root {
	--rw-ease: cubic-bezier(.22, .61, .36, 1);
	--rw-shadow: 0 18px 40px -24px rgba(14, 90, 43, .45);
	--rw-shadow-sm: 0 8px 22px -16px rgba(14, 90, 43, .5);
}

/* ---------- Rhythm: less empty space ---------- */
.wp-block-post-content > .alignfull { padding-top: clamp(2.75rem, 6vw, 4.75rem) !important; padding-bottom: clamp(2.75rem, 6vw, 4.75rem) !important; }
.wp-block-post-content > .alignfull.rw-hero { padding-top: clamp(3rem, 7vw, 5.5rem) !important; padding-bottom: clamp(3.25rem, 7vw, 5.5rem) !important; }
.wp-block-post-content > .alignfull.rw-strip { padding-top: 1.6rem !important; padding-bottom: 1.6rem !important; }
.wp-block-post-content > .alignfull.rw-prayer { padding-top: clamp(2.5rem, 5vw, 3.75rem) !important; padding-bottom: clamp(2.5rem, 5vw, 3.75rem) !important; }
.rw-pagehead { padding-top: clamp(2.5rem, 5vw, 3.75rem) !important; padding-bottom: clamp(2.5rem, 5vw, 3.75rem) !important; }

/* Columns: centre text against media, tighter gutters */
.wp-block-post-content .wp-block-columns { align-items: center !important; }
.wp-block-post-content .wp-block-columns.alignwide { column-gap: clamp(2rem, 4.5vw, 3.75rem) !important; }
.wp-block-post-content .rw-services .wp-block-columns,
.wp-block-post-content .rw-pillars,
.wp-block-post-content .rw-strip .wp-block-columns { align-items: stretch !important; }
.wp-block-post-content .wp-block-column > :first-child { margin-top: 0; }
.wp-block-post-content .wp-block-column > :last-child { margin-bottom: 0; }
.wp-block-post-content h2.wp-block-heading { margin-bottom: .6rem; }

/* ---------- Compact arch media ---------- */
.rw-arch img { transition: transform .7s var(--rw-ease); }
.rw-arch { overflow: visible; }
.rw-arch:not(.rw-arch-sm) img { aspect-ratio: 4 / 4.6; max-height: 540px; }
.rw-arch.rw-arch-sm img { aspect-ratio: 5 / 4; max-height: 420px; }
.rw-arch.rw-arch-sm.rw-arch--outline::before { inset: -10px 10px 10px -10px; }
/* clip zoom inside the arch */
.rw-arch { isolation: isolate; }
.rw-arch img { border-radius: var(--rw-arch); }
@media (hover: hover) {
	.rw-arch:hover img { transform: translateY(-4px); }
}

/* Home: "What we do" side image smaller, list tighter */
.rw-section-mist .wp-block-column[style*="flex-basis:34%"] .rw-arch img { aspect-ratio: 4 / 3; max-height: 300px; }
.rw-services .rw-service { padding: 1.2rem 0; }
.rw-services .rw-service h3 { font-size: 1.2rem; }

/* ---------- Eyebrow + section head ---------- */
.rw-eyebrow {
	display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 .5rem !important;
	font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--rw-green);
}
.rw-eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--rw-lime); border-radius: 2px; }
.rw-section-head { margin-bottom: 2rem; max-width: 640px; }
.rw-section-head h2 { margin: 0; }

/* ---------- Service cards ---------- */
.rw-cards {
	display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem;
}
.rw-cards > * { margin: 0 !important; }
.rw-card {
	display: flex !important; flex-direction: column; background: #fff;
	border: 1px solid var(--rw-line); border-radius: 18px; overflow: hidden;
	transition: transform .35s var(--rw-ease), box-shadow .35s var(--rw-ease), border-color .35s;
}
.rw-card-img { margin: 0 !important; padding: .7rem .7rem 0; overflow: hidden; }
.rw-card-img img {
	width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block;
	border-radius: 140px 140px 10px 10px; transition: transform .7s var(--rw-ease);
}
.rw-card-body { padding: 1.15rem 1.35rem 1.45rem; display: flex; flex-direction: column; flex: 1; }
.rw-card-body > * { margin: 0 !important; }
.rw-card-body h3 { font-size: 1.28rem; color: var(--rw-deep); margin-bottom: .45rem !important; }
.rw-card-body p { font-size: .97rem; line-height: 1.6; color: #2c3d31; }
.rw-card-body .wp-block-buttons { margin-top: auto !important; padding-top: 1.1rem; }
@media (hover: hover) {
	.rw-card:hover { transform: translateY(-6px); box-shadow: var(--rw-shadow); border-color: #bcd9b6; }
	.rw-card:hover .rw-card-img img { transform: scale(1.05); }
}
.rw-card--feature {
	background: radial-gradient(circle at 100% 0%, rgba(186,214,50,.25), transparent 50%), var(--rw-deep);
	border-color: var(--rw-deep); color: #fff; position: relative;
}
.rw-card--feature .rw-card-body { justify-content: center; padding: 2rem 1.6rem; }
.rw-card--feature h3 { color: #fff; font-size: 1.5rem; }
.rw-card--feature p { color: #d9ead6; }
.rw-card--feature .rw-card-ar { font-family: "Amiri", serif; font-size: 1.6rem; color: var(--rw-lime); line-height: 1.2; margin-bottom: .2rem !important; }
.rw-card--feature::after {
	content: ""; position: absolute; right: -40px; bottom: -40px; width: 150px; height: 180px;
	border: 2px solid rgba(186,214,50,.35); border-radius: var(--rw-arch); pointer-events: none;
}

/* Nikah band */
.rw-nikah { background: var(--rw-deep); color: #fff; position: relative; overflow: hidden; }
.rw-nikah h2 { color: #fff; }
.rw-nikah p { color: #d9ead6; }
.rw-nikah .rw-eyebrow { color: var(--rw-lime); }

@media (max-width: 1023px) { .rw-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
	.rw-cards { grid-template-columns: 1fr; gap: 1rem; }
	.rw-section-head { margin-bottom: 1.4rem; }
}

/* ---------- Buttons ---------- */
.wp-block-button__link { transition: background-color .2s, color .2s, transform .25s var(--rw-ease), box-shadow .25s var(--rw-ease) !important; }
@media (hover: hover) {
	.wp-block-button__link:hover { transform: translateY(-2px); box-shadow: var(--rw-shadow-sm); }
}

/* ---------- Strip / pillars / checklist polish ---------- */
.rw-strip .wp-block-column { transition: transform .3s var(--rw-ease); }
.rw-pillars .wp-block-column { background: #fff; border-radius: 14px; padding: 1.4rem 1.5rem !important; border-top-width: 4px; box-shadow: var(--rw-shadow-sm); }
.rw-section-mist .rw-pillars .wp-block-column { background: #fff; }
.rw-checklist li { padding-top: .55rem; padding-bottom: .55rem; }
.rw-checklist li::before { top: .85rem; }

/* Mosaic tighter on desktop */
@media (min-width: 782px) { .rw-mosaic { grid-auto-rows: 200px; } }

/* Prayer tiles: soft breathing on the next prayer */
@keyframes rw-glow { 0%, 100% { box-shadow: 0 14px 30px -14px rgba(14,90,43,.6); } 50% { box-shadow: 0 14px 34px -10px rgba(186,214,50,.55); } }
.rw-pt-grid li.is-next { animation: rw-glow 3.2s ease-in-out infinite; }
.rw-pt-grid li { transition: transform .3s var(--rw-ease), background-color .3s; }
@media (hover: hover) { .rw-pt-grid li:not(.is-next):hover { transform: translateY(-4px); } }

/* ---------- Motion: hero entrance ---------- */
@keyframes rw-up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes rw-arch-in { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes rw-draw { from { opacity: 0; transform: translate(10px, -10px); } to { opacity: 1; transform: none; } }
.rw-hero .rw-arabic,
.rw-hero h1,
.rw-hero .rw-lede,
.rw-hero .rw-welcome,
.rw-hero .wp-block-buttons { animation: rw-up .8s var(--rw-ease) both; }
.rw-hero h1 { animation-delay: .08s; }
.rw-hero .rw-lede { animation-delay: .18s; }
.rw-hero .rw-welcome { animation-delay: .26s; }
.rw-hero .wp-block-buttons { animation-delay: .34s; }
.rw-hero .rw-arch img { animation: rw-arch-in 1s var(--rw-ease) .2s both; }
.rw-hero .rw-arch--outline::before { animation: rw-draw 1s var(--rw-ease) .55s both; }
.rw-pagehead h1, .rw-pagehead p { animation: rw-up .7s var(--rw-ease) both; }
.rw-pagehead p { animation-delay: .1s; }

/* ---------- Motion: scroll reveal (only when JS is on) ---------- */
.rw-js .rw-reveal {
	opacity: 0; transform: translateY(24px);
	transition: opacity .75s var(--rw-ease), transform .75s var(--rw-ease);
	transition-delay: var(--rw-delay, 0s);
}
.rw-js .rw-reveal.is-in { opacity: 1; transform: none; }
.rw-js .rw-reveal.rw-card.is-in { transition: opacity .75s var(--rw-ease), transform .35s var(--rw-ease), box-shadow .35s var(--rw-ease), border-color .35s; transition-delay: var(--rw-delay, 0s), 0s, 0s, 0s; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; }
	.rw-js .rw-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
	.rw-card, .rw-card-img img, .rw-arch img, .wp-block-button__link { transition: none !important; }
}

/* ---------- Mobile spacing ---------- */
@media (max-width: 781px) {
	.wp-block-post-content > .alignfull { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
	.wp-block-post-content > .alignfull.rw-hero { padding-top: 2.5rem !important; padding-bottom: 3rem !important; }
	.wp-block-post-content .wp-block-columns { gap: 1.75rem !important; }
	.rw-arch.rw-arch-sm img { aspect-ratio: 4 / 3; max-height: 320px; }
	.rw-arch:not(.rw-arch-sm) img { aspect-ratio: 1 / 1; max-height: 400px; }
	.rw-hero .rw-arch { max-width: 100%; margin-top: .5rem; }
	.rw-section-mist .wp-block-column[style*="flex-basis:34%"] .rw-arch img { max-height: 240px; }
	.rw-pillars .wp-block-column { padding: 1.2rem 1.25rem !important; }
	.rw-nikah .wp-block-columns { flex-direction: column-reverse; }
}

/* ---------- Home: What we do grid ---------- */
.rw-section-head--split { max-width: none; display: grid !important; grid-template-columns: 1fr 1fr; column-gap: 3rem; align-items: end; }
.rw-section-head--split .rw-eyebrow { grid-column: 1 / -1; }
.rw-section-head--split h2 { grid-column: 1; }
.rw-section-head--split .rw-section-lede { grid-column: 2; margin: 0 !important; color: #3d5245; }
.rw-minis { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.rw-minis > * { margin: 0 !important; }
.rw-mini {
	background: #fff; border: 1px solid var(--rw-line); border-radius: 16px; padding: 1.3rem 1.3rem 1.4rem;
	position: relative; overflow: hidden;
	transition: transform .35s var(--rw-ease), box-shadow .35s var(--rw-ease), border-color .35s;
}
.rw-mini > * { margin: 0 !important; }
.rw-mini::before {
	content: ""; position: absolute; left: 1.3rem; top: 0; width: 34px; height: 4px;
	background: var(--rw-lime); border-radius: 0 0 4px 4px; transition: width .35s var(--rw-ease);
}
.rw-mini-n { font-family: "Marcellus", Georgia, serif; font-size: 1.05rem; color: var(--rw-green); opacity: .7; margin-bottom: .55rem !important; }
.rw-mini h3 { font-size: 1.15rem; line-height: 1.25; color: var(--rw-deep); margin-bottom: .4rem !important; }
.rw-mini p:not(.rw-mini-n):not(.rw-mini-ar) { font-size: .93rem; line-height: 1.55; color: #33463a; }
@media (hover: hover) {
	.rw-mini:hover { transform: translateY(-5px); box-shadow: var(--rw-shadow); border-color: #bcd9b6; }
	.rw-mini:hover::before { width: calc(100% - 2.6rem); }
}
.rw-mini--cta {
	background: radial-gradient(circle at 100% 0%, rgba(186,214,50,.28), transparent 55%), var(--rw-deep);
	border-color: var(--rw-deep); display: flex !important; flex-direction: column; justify-content: center;
}
.rw-mini--cta::before { display: none; }
.rw-mini--cta h3 { color: #fff; font-size: 1.3rem; margin-bottom: 1rem !important; }
.rw-mini-ar { font-family: "Amiri", serif; font-size: 1.45rem; color: var(--rw-lime); line-height: 1.2; margin-bottom: .2rem !important; }
@media (max-width: 1023px) {
	.rw-minis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 781px) {
	.rw-section-head--split { grid-template-columns: 1fr; row-gap: .5rem; }
	.rw-section-head--split h2, .rw-section-head--split .rw-section-lede { grid-column: 1; }
}
@media (max-width: 520px) {
	.rw-minis { grid-template-columns: 1fr; gap: .75rem; }
	.rw-mini { padding: 1.1rem 1.15rem 1.2rem; }
	.rw-mini-n { position: absolute; right: 1.1rem; top: 1rem; margin: 0 !important; }
}
/* short-text companions: wider, lower arch */
.rw-arch.rw-arch-wide img { aspect-ratio: 16 / 10.5; max-height: 320px; }
@media (max-width: 781px) { .rw-arch.rw-arch-wide img { aspect-ratio: 4 / 3; } }
