/**
 * Dar Ul-Isra Custom Styles
 *
 * Provides exact visual fidelity matching the original React/Tailwind website.
 * Uses dui- prefix for all custom classes to avoid conflicts.
 *
 * @package DarUlIsra
 */

/* ========================================
   CSS Custom Properties
   ======================================== */
:root {
	--dui-brand: #890514;
	--dui-brand-light: #a11122;
	--dui-brand-dark: #6b030f;
	--dui-stone-50: #fafaf9;
	--dui-stone-100: #f5f5f4;
	--dui-stone-200: #e7e5e4;
	--dui-stone-300: #d6d3d1;
	--dui-stone-400: #a8a29e;
	--dui-stone-500: #78716c;
	--dui-stone-600: #57534e;
	--dui-stone-700: #44403c;
	--dui-stone-800: #292524;
	--dui-stone-900: #1c1917;
}

/* ========================================
   Global
   ======================================== */
html {
	scroll-behavior: smooth;
}

body {
	font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	background-color: var(--dui-stone-50);
	color: var(--dui-stone-900);
	overflow-x: hidden;
}

/* Ensure block content doesn't overflow */
.wp-block-group,
.wp-block-columns,
.entry-content {
	overflow-wrap: break-word;
	word-break: break-word;
}

/* Responsive images */
.entry-content img,
.wp-block-image img {
	max-width: 100%;
	height: auto;
}

/* Smooth scroll target offset for fixed header */
[id] {
	scroll-margin-top: 6rem;
}

/* ========================================
   Header — CRITICAL z-index fixes for iOS
   ======================================== */
.dui-header {
	position: fixed !important;
	top: 0;
	left: 0;
	right: 0;
	z-index: 999999 !important;
	transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
	background: rgba(255, 255, 255, 0.8);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid transparent;
}

/* Hide header on scroll down, show on scroll up */
.dui-header.is-hidden {
	transform: translateY(-100%);
}

/* Reduced padding & logo on mobile */
@media (max-width: 600px) {
	.dui-header {
		padding-top: 0.35rem !important;
		padding-bottom: 0.35rem !important;
		padding-left: 0.75rem !important;
		padding-right: 0.75rem !important;
	}

	.dui-header .wp-block-site-logo img {
		max-width: 200px;
		max-height: 50px;
	}
}

.dui-header.is-scrolled {
	background: rgba(255, 255, 255, 0.95);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	border-bottom-color: var(--dui-stone-200);
}

/* Header logo — wide rectangular */
.dui-header .dui-header-brand {
	flex-shrink: 0;
}

.dui-header .wp-block-site-logo {
	margin: 0;
	line-height: 0;
}

.dui-header .wp-block-site-logo img {
	width: auto;
	max-width: 320px;
	max-height: 80px;
	object-fit: contain;
	transition: transform 0.2s ease;
}

.dui-header-brand:hover .wp-block-site-logo img {
	transform: scale(1.03);
}

/* Nav link hover */
.dui-main-nav a:hover,
.dui-main-nav .wp-block-navigation-item a:hover {
	color: var(--dui-brand) !important;
	transition: color 0.2s ease;
}

/* Remove link underlines */
.dui-app-btn,
.dui-social-icon,
.dui-header a {
	text-decoration: none;
}

/* Donate button hover */
.dui-donate-btn .wp-block-button__link {
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	transition: all 0.2s ease;
}

.dui-donate-btn .wp-block-button__link:hover {
	background-color: var(--dui-brand-light) !important;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

/* ========================================
   Mobile Navigation Overlay
   The header uses position:fixed + backdrop-filter which creates
   a stacking context on iOS Safari. The overlay must break out
   of this context to sit above page content.
   ======================================== */

/* Ensure the main content never overlaps the header */
.dui-main,
main,
.wp-site-blocks > *:not(header) {
	position: relative;
	z-index: 1;
}

/* Offset for fixed header — only on frontend, not in Site Editor */
.dui-main {
	padding-top: 5rem;
}

/* When WP admin bar is present, push header below it */
.admin-bar .dui-header {
	top: 32px;
}

.admin-bar .dui-main {
	padding-top: calc(5rem + 32px);
}

@media screen and (max-width: 782px) {
	.admin-bar .dui-header {
		top: 46px;
	}

	.admin-bar .dui-main {
		padding-top: calc(5rem + 46px);
	}
}

/* The responsive container wrapper — sits above main content */
.wp-block-navigation__responsive-container {
	z-index: 9999999 !important;
}

/* Hamburger button — always tappable */
.wp-block-navigation__responsive-container-open {
	position: relative;
	z-index: 9999999 !important;
}

/* When menu is open: full-screen overlay */
.wp-block-navigation__responsive-container.is-menu-open {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	width: 100vw !important;
	max-width: 100vw !important;
	height: 100vh !important;
	z-index: 9999999 !important;
	background-color: #ffffff !important;
	padding: 0 !important;
	margin: 0 !important;
	overflow-y: auto !important;
	-webkit-overflow-scrolling: touch;
	transform: none !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

/* Mobile nav content — centered on screen */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	height: auto !important;
	padding: 0 !important;
	margin: 0 !important;
	gap: 0;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	width: 100%;
	text-align: center;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--dui-stone-700);
	padding: 0.75rem 0;
	display: block;
	border-bottom: 1px solid var(--dui-stone-200);
	text-align: center;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:last-child a {
	border-bottom: none;
}

/* Home link inside mobile nav overlay */
.dui-mobile-home {
	display: block;
	padding: 0.75rem 0;
	font-size: 1.25rem;
	font-weight: 600;
	color: #1c1917 !important;
	text-decoration: none;
	border-bottom: 1px solid #e7e5e4;
}

.dui-mobile-home:hover {
	color: var(--dui-brand) !important;
}

/* Donate button inside mobile nav overlay */
.dui-mobile-donate {
	display: inline-block;
	margin-top: 1.5rem;
	padding: 0.75rem 2rem;
	background-color: var(--dui-brand);
	color: #ffffff !important;
	font-size: 1rem;
	font-weight: 700;
	border-radius: 9999px;
	text-decoration: none;
	text-align: center;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.dui-mobile-donate:hover {
	background-color: var(--dui-brand-light);
	transform: translateY(-2px);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a:hover {
	color: var(--dui-brand) !important;
}

/* Close button — fixed to top-right of screen */
.wp-block-navigation__responsive-container-close {
	position: fixed !important;
	top: 1rem !important;
	right: 1rem !important;
	z-index: 99999999 !important;
	color: var(--dui-stone-900) !important;
	background: none !important;
	border: none !important;
	padding: 0.5rem !important;
}

/* When menu is open, disable backdrop-filter on header to prevent
   iOS stacking context trapping the overlay behind content.
   .dui-nav-open is toggled by JS for broad browser support. */
.dui-header:has(.is-menu-open),
.dui-header.dui-nav-open {
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
	background: #ffffff !important;
}

/* Lock body scroll when nav is open */
body.dui-nav-open {
	overflow: hidden !important;
}

/* ========================================
   Hero Section
   ======================================== */
.dui-hero-section {
	position: relative;
	overflow: hidden;
	width: 100%;
}

.dui-hero-bg-gradient {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at top right, rgba(137, 5, 20, 0.08), transparent 40%),
		radial-gradient(circle at bottom left, rgba(137, 5, 20, 0.05), transparent 40%);
	pointer-events: none;
	z-index: 0;
}

/* Inner constrained content sits above the gradient */
.dui-hero-section > .wp-block-group {
	position: relative;
	z-index: 1;
}

/* Badge with pulse dot */
.dui-badge {
	display: inline-flex !important;
	align-items: center;
	gap: 0.5rem;
	background: rgba(137, 5, 20, 0.05);
	border: 1px solid rgba(137, 5, 20, 0.2);
	border-radius: 9999px;
	padding: 0.375rem 1rem;
}

.dui-badge-text {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--dui-brand);
}

.dui-pulse-dot {
	position: relative;
	display: inline-flex;
	width: 0.5rem;
	height: 0.5rem;
}

.dui-ping {
	position: absolute;
	display: inline-flex;
	width: 100%;
	height: 100%;
	border-radius: 9999px;
	background-color: var(--dui-brand);
	opacity: 0.75;
	animation: dui-ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.dui-dot {
	position: relative;
	display: inline-flex;
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 9999px;
	background-color: var(--dui-brand);
}

@keyframes dui-ping {
	75%, 100% {
		transform: scale(2);
		opacity: 0;
	}
}

/* Hero buttons */
.dui-btn-primary .wp-block-button__link {
	transition: all 0.2s ease;
}

.dui-btn-primary .wp-block-button__link:hover {
	background-color: var(--dui-brand-light) !important;
	transform: translateY(-4px);
}

.dui-btn-secondary .wp-block-button__link {
	transition: all 0.2s ease;
}

.dui-btn-secondary .wp-block-button__link:hover {
	background-color: var(--dui-stone-50) !important;
}

/* ========================================
   Programme Cards (hero + inner pages)
   ======================================== */
.dui-card {
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	transition: all 0.3s ease;
}

.dui-card:hover {
	background-color: #ffffff !important;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
	transform: translateY(-4px);
}

.dui-icon-box {
	width: 2.5rem;
	height: 2.5rem;
	padding: 0.5rem;
	border-radius: 0.75rem;
	background-color: rgba(137, 5, 20, 0.1);
	color: var(--dui-brand);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 1rem;
}

.dui-icon-box svg {
	width: 100%;
	height: 100%;
}

.dui-card-cta {
	display: inline-block;
	margin-top: 1rem;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--dui-brand);
	text-decoration: none;
	transition: color 0.2s ease;
}

.dui-card-cta:hover {
	color: #6b0410;
	text-decoration: underline;
}

/* ========================================
   Prayer Times Widget
   ======================================== */
.dui-prayer-widget-wrap {
	overflow: hidden;
	border-radius: 2rem;
	padding: 0 !important;
	box-shadow: 0 25px 50px -12px rgba(120, 113, 108, 0.15);
}

.dui-prayer-widget-wrap iframe {
	border: none;
	width: 100%;
	display: block;
	border-radius: 2rem;
}

/* ========================================
   Donation Section — layout fix
   ======================================== */
.dui-donation-banner {
	position: relative;
	overflow: hidden;
	box-shadow: 0 25px 50px -12px rgba(137, 5, 20, 0.4);
	/* Force side-by-side layout on desktop */
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 2.5rem;
}

.dui-donation-banner::before {
	content: '';
	position: absolute;
	inset: 0;
	opacity: 0.1;
	background-image: radial-gradient(circle at 2px 2px, white 2px, transparent 0);
	background-size: 32px 32px;
	pointer-events: none;
}

.dui-donation-text {
	position: relative;
	z-index: 1;
	flex: 1 1 400px;
	min-width: 280px;
}

.dui-donation-widget-wrap {
	position: relative;
	z-index: 1;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	flex: 0 1 450px;
	min-width: 280px;
	width: 100%;
	overflow: hidden;
	border-radius: 1rem;
	padding: 0.15rem !important;
	border: 1px solid rgba(255, 255, 255, 0.3);
}

.dui-donation-widget-wrap iframe {
	border: none;
	width: 100%;
	display: block;
	border-radius: 1.5rem;
}

.dui-donation-badge {
	display: inline-flex !important;
	background: rgba(255, 255, 255, 0.1);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

/* ========================================
   Social & App Links
   ======================================== */
.dui-app-links {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.dui-app-btn {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	background-color: var(--dui-stone-900);
	color: #ffffff;
	padding: 0.75rem;
	border-radius: 0.75rem;
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 700;
	transition: background-color 0.2s ease;
}

.dui-app-btn:hover {
	background-color: var(--dui-stone-800);
	color: #ffffff;
}

.dui-app-btn .dui-icon {
	width: 1.5rem;
	height: 1.5rem;
	flex-shrink: 0;
}

.dui-social-links {
	display: flex;
	gap: 1rem;
}

.dui-social-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	background-color: var(--dui-stone-200);
	border-radius: 9999px;
	color: var(--dui-stone-600);
	transition: all 0.2s ease;
	text-decoration: none;
}

.dui-social-icon:hover {
	background-color: var(--dui-brand);
	color: #ffffff;
}

.dui-social-icon .dui-icon {
	width: 1.25rem;
	height: 1.25rem;
}

/* Contact info in social footer */
.dui-contact-address,
.dui-contact-email {
	color: var(--dui-stone-600);
	font-size: 0.875rem;
	margin: 0;
	line-height: 1.625;
}

.dui-contact-email {
	margin-top: 0.25rem;
}

/* ========================================
   Footer
   ======================================== */
.dui-site-footer {
	background-color: var(--dui-stone-900);
	color: #a8a29e;
}

.dui-footer-main {
	border-top: 1px solid var(--dui-stone-200);
	padding: 3rem 1.5rem;
}

.dui-footer-inner {
	max-width: 1280px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: 3rem;
}

/* Footer column headings */
.dui-footer-heading {
	color: #ffffff;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin: 0 0 1rem 0;
}

.dui-footer-text {
	font-size: 0.875rem;
	line-height: 1.75;
	color: #a8a29e;
	margin: 0;
}

/* Brand column */
.dui-footer-brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.dui-footer-logo {
	max-width: 180px;
	height: auto;
	max-height: 50px;
	object-fit: contain;
}

.dui-footer-site-name {
	color: #ffffff;
	font-size: 1.125rem;
	font-weight: 700;
	margin: 0;
	line-height: 1.2;
}

.dui-footer-site-tagline {
	color: #a8a29e;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin: 0;
}

.dui-footer-desc {
	font-size: 0.875rem;
	line-height: 1.75;
	color: #a8a29e;
	margin: 0 0 1.25rem 0;
}

/* Social icons in footer */
.dui-footer-socials {
	display: flex;
	gap: 0.625rem;
}

.dui-footer-socials .dui-social-icon {
	width: 2.25rem;
	height: 2.25rem;
	background-color: #292524;
	border: 1px solid #44403c;
	border-radius: 9999px;
	color: #a8a29e;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: all 0.2s ease;
}

.dui-footer-socials .dui-social-icon:hover {
	background-color: var(--dui-brand);
	border-color: var(--dui-brand);
	color: #ffffff;
}

.dui-footer-socials .dui-icon {
	width: 1rem;
	height: 1rem;
}

/* Quick links menu */
.dui-footer-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.dui-footer-menu li {
	margin-bottom: 0.5rem;
}

.dui-footer-menu a {
	color: #a8a29e;
	text-decoration: none;
	font-size: 0.875rem;
	transition: color 0.2s ease;
}

.dui-footer-menu a:hover {
	color: #ffffff;
}

/* App store badges */
.dui-footer-badges {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	margin-top: 1rem;
}

.dui-store-badge {
	display: inline-block;
	transition: opacity 0.2s ease, transform 0.2s ease;
	line-height: 0;
}

.dui-store-badge:hover {
	opacity: 0.85;
	transform: translateY(-1px);
}

.dui-store-badge svg {
	height: 40px;
	width: auto;
}

/* Footer bottom bar */
.dui-footer-bottom {
	border-top: 1px solid #44403c;
	padding: 1.25rem 1.5rem;
}

.dui-footer-bottom-inner {
	max-width: 1280px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
}

.dui-footer-bottom p {
	font-size: 0.75rem;
	color: #78716c;
	margin: 0;
}

.dui-footer-bottom a {
	color: #a8a29e;
	text-decoration: none;
}

.dui-footer-bottom a:hover {
	color: #ffffff;
}

/* Footer responsive */
@media (max-width: 900px) {
	.dui-footer-inner {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 600px) {
	.dui-footer-main {
		padding: 2rem 1rem;
	}

	.dui-footer-inner {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.dui-footer-bottom {
		padding: 1rem;
	}

	.dui-footer-bottom-inner {
		flex-direction: column;
		text-align: center;
	}
}

/* ========================================
   Responsive: Small screens (up to 600px)
   ======================================== */
@media (max-width: 600px) {
	/* Header: smaller on mobile */
	.dui-header > .wp-block-group {
		padding-left: 1rem !important;
		padding-right: 1rem !important;
		padding-top: 0.75rem !important;
		padding-bottom: 0.75rem !important;
	}

	.dui-header .wp-block-site-logo img {
		max-width: 200px;
		max-height: 50px;
	}

	/* Main top padding for smaller header */
	.dui-main {
		padding-top: 3.5rem !important;
	}

	/* Hero */
	.dui-hero-section {
		padding: 2rem 1rem !important;
	}

	.dui-hero-section h1 {
		font-size: 1.75rem !important;
	}

	.dui-hero-section .wp-block-buttons {
		flex-direction: column;
	}

	.dui-hero-section .wp-block-button {
		width: 100%;
	}

	.dui-hero-section .wp-block-button__link {
		width: 100%;
		text-align: center;
		justify-content: center;
	}

	/* Donation */
	.dui-donation-outer {
		padding-left: 0.75rem !important;
		padding-right: 0.75rem !important;
	}

	.dui-donation-banner {
		padding: 1.5rem !important;
		border-radius: 1.5rem !important;
		gap: 1.5rem;
	}

	.dui-donation-banner h2 {
		font-size: 1.5rem !important;
	}

	.dui-donation-text,
	.dui-donation-widget-wrap {
		flex-basis: 100% !important;
		min-width: 0 !important;
	}

	/* Prayer */
	.dui-prayer-section {
		padding: 3rem 1rem !important;
	}

	.dui-prayer-section h2 {
		font-size: 1.5rem !important;
	}

	.dui-prayer-widget-wrap,
	.dui-prayer-widget-wrap iframe {
		border-radius: 1.25rem !important;
	}

	/* Social footer */
	.dui-social-section {
		padding-left: 1rem !important;
		padding-right: 1rem !important;
	}

	.dui-social-section .wp-block-columns {
		flex-direction: column !important;
	}

	.dui-social-section .wp-block-column {
		flex-basis: 100% !important;
	}

	/* Cards */
	.dui-card {
		padding: 1.25rem !important;
	}

	/* Page headings */
	.wp-block-group h1,
	.entry-title {
		font-size: 1.75rem !important;
	}

	/* All columns stack on mobile */
	.wp-block-columns {
		flex-direction: column !important;
	}

	.wp-block-column {
		flex-basis: 100% !important;
	}
}

/* ========================================
   Responsive: Tablets (601px to 781px)
   ======================================== */
@media (max-width: 781px) {
	.dui-hero-section .wp-block-columns {
		flex-direction: column;
	}

	.dui-programme-cards {
		flex-direction: column;
	}

	.dui-donation-banner {
		padding: 2rem !important;
	}

	.dui-donation-text {
		flex-basis: 100% !important;
		text-align: center;
	}

	.dui-donation-widget-wrap {
		flex-basis: 100% !important;
	}

	/* Header CTA hidden on mobile */
	.dui-header-cta {
		display: none !important;
	}

	/* WP columns stack */
	.wp-block-columns:not(.is-not-stacked-on-mobile) {
		flex-wrap: wrap !important;
	}

	.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
		flex-basis: 100% !important;
		flex-grow: 1;
	}
}

/* ========================================
   Responsive: Desktop (782px+)
   ======================================== */
@media (min-width: 782px) {
	.dui-hero-section {
		padding-top: 6rem !important;
		padding-bottom: 6rem !important;
	}

	.dui-prayer-section {
		padding-top: 6rem !important;
	}

	.dui-donation-banner {
		padding: 3.5rem !important;
	}

	/* Donation: force side-by-side */
	.dui-donation-text {
		flex: 1 1 50%;
	}

	.dui-donation-widget-wrap {
		flex: 0 0 420px;
	}
}

@media (min-width: 1024px) {
	.dui-donation-banner {
		padding: 4rem !important;
	}

	.dui-donation-widget-wrap {
		flex: 0 0 450px;
	}
}

/* ========================================
   Contact Page
   ======================================== */
.dui-contact-details-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.dui-contact-details-list li {
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--dui-stone-200);
	font-size: 0.9rem;
	color: var(--dui-stone-600);
	line-height: 1.6;
}

.dui-contact-details-list li:last-child {
	border-bottom: none;
}

.dui-contact-details-list li strong {
	color: var(--dui-stone-900);
	display: block;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 0.125rem;
}

.dui-contact-details-list a {
	color: var(--dui-brand);
	text-decoration: none;
}

.dui-contact-details-list a:hover {
	text-decoration: underline;
}

.dui-map-embed {
	border-radius: 1.5rem;
	overflow: hidden;
}

.dui-map-embed iframe {
	display: block;
	width: 100%;
}

/* Map on contact page — spacing when moved below content */
.dui-map-embed {
	margin-top: 2.5rem;
}

/* ========================================
   Contact Form 7
   ======================================== */
.wpcf7 {
	max-width: 100%;
}

.wpcf7 *,
.wpcf7 *::before,
.wpcf7 *::after {
	box-sizing: border-box;
}

.wpcf7-form label {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--dui-stone-700);
	margin-bottom: 0.375rem;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="number"],
.wpcf7-form input[type="date"],
.wpcf7-form select,
.wpcf7-form textarea {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid var(--dui-stone-300);
	border-radius: 0.75rem;
	background-color: var(--dui-stone-50);
	color: var(--dui-stone-900);
	font-size: 0.9375rem;
	font-family: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form input[type="url"]:focus,
.wpcf7-form input[type="number"]:focus,
.wpcf7-form input[type="date"]:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
	outline: none;
	border-color: var(--dui-brand);
	box-shadow: 0 0 0 3px rgba(137, 5, 20, 0.1);
	background-color: #ffffff;
}

.wpcf7-form select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2378716c' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 1.25rem;
	padding-right: 2.5rem;
	cursor: pointer;
}

.wpcf7-form textarea {
	min-height: 150px;
	resize: vertical;
}

.wpcf7-form .dui-cf7-row {
	margin-bottom: 1.25rem;
}

/* Submit button */
.wpcf7-form input[type="submit"],
.wpcf7-form .wpcf7-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.875rem 2rem;
	background-color: var(--dui-brand);
	color: #ffffff;
	font-size: 0.9375rem;
	font-weight: 700;
	font-family: inherit;
	border: none;
	border-radius: 9999px;
	cursor: pointer;
	transition: all 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.wpcf7-form input[type="submit"]:hover,
.wpcf7-form .wpcf7-submit:hover {
	background-color: var(--dui-brand-light);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(137, 5, 20, 0.3);
}

.wpcf7-form input[type="submit"]:active,
.wpcf7-form .wpcf7-submit:active {
	transform: translateY(0);
}

/* Spinner */
.wpcf7-spinner {
	margin-left: 0.75rem;
}

/* Validation messages */
.wpcf7-not-valid-tip {
	color: #dc2626;
	font-size: 0.8rem;
	margin-top: 0.375rem;
	display: block;
}

.wpcf7-not-valid {
	border-color: #dc2626 !important;
}

/* Response messages */
.wpcf7-response-output {
	border-radius: 0.75rem !important;
	padding: 1rem 1.25rem !important;
	margin: 1.5rem 0 0 !important;
	font-size: 0.9rem;
	border-width: 1px !important;
}

.wpcf7-mail-sent-ok,
.wpcf7 form.sent .wpcf7-response-output {
	background-color: #f0fdf4;
	border-color: #bbf7d0 !important;
	color: #15803d;
}

.wpcf7-validation-errors,
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output {
	background-color: #fef2f2;
	border-color: #fecaca !important;
	color: #dc2626;
}

.wpcf7-mail-sent-ng,
.wpcf7 form.failed .wpcf7-response-output {
	background-color: #fef2f2;
	border-color: #fecaca !important;
	color: #dc2626;
}

/* Acceptance checkbox */
.wpcf7-form .wpcf7-acceptance label {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-weight: 400;
	font-size: 0.85rem;
	color: var(--dui-stone-600);
}

.wpcf7-form .wpcf7-acceptance input[type="checkbox"] {
	width: 1.125rem;
	height: 1.125rem;
	margin-top: 0.125rem;
	accent-color: var(--dui-brand);
}

/* Responsive */
@media (max-width: 600px) {
	.wpcf7-form input[type="submit"],
	.wpcf7-form .wpcf7-submit {
		width: 100%;
	}
}
