/*
Theme Name: MAAD
Description: Lightweight block theme for MAAD water treatment solutions.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: maad
*/

html { scroll-behavior: smooth; }
:where(section, .wp-block-group)[id] { scroll-margin-top: 90px; }

/* Header */
.maad-header { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 1px 0 rgba(59, 83, 164, .08); }
.maad-header .wp-block-navigation a { font-family: var(--wp--preset--font-family--heading); font-weight: 600; }
.maad-header .wp-block-navigation a:hover { color: var(--wp--preset--color--accent); }

/* Hero */
.maad-hero h1 { letter-spacing: .12em; text-transform: uppercase; }
.maad-hero p { max-width: 560px; }

/* Framed image (vision) */
.maad-framed { position: relative; margin: 30px 30px 0 0 !important; }
.maad-framed::before { content: ""; position: absolute; inset: -30px -30px 30px 30px; border: 14px solid var(--wp--preset--color--accent); z-index: 0; }
.maad-framed img { position: relative; z-index: 1; border-radius: 8px; box-shadow: 0 20px 40px rgba(28, 40, 90, .25); }

/* Section eyebrow */
.maad-eyebrow::before { content: ""; display: block; width: 40px; height: 4px; margin: 0 auto 14px; background: var(--wp--preset--color--primary); border-radius: 2px; }

/* Services */
.maad-services { gap: 2.5rem 1.5rem !important; }
.maad-service { flex: 0 1 calc(33.333% - 1.5rem); text-align: center; transition: transform .25s ease; }
.maad-service:hover { transform: translateY(-6px); }
.maad-service figure { margin: 0 auto 1rem !important; }
.maad-service h4 { margin: 0; }
@media (max-width: 781px) { .maad-service { flex-basis: calc(50% - 1rem); } }
@media (max-width: 480px) { .maad-service { flex-basis: 100%; } }

/* Product cards */
.maad-card { background: #fff; border-radius: 28px; box-shadow: 0 18px 50px rgba(28, 40, 90, .12); overflow: hidden; }
.maad-photo img { border-radius: 28px; box-shadow: 0 18px 50px rgba(28, 40, 90, .18); }

/* Check list */
.maad-checks { list-style: none; padding: 0 !important; margin: 1.5rem 0 0; }
.maad-checks li { position: relative; padding: .8rem 1rem .8rem 3.6rem; margin-bottom: .75rem; background: var(--wp--preset--color--soft); border-radius: 10px; color: var(--wp--preset--color--primary); font-weight: 600; font-size: .95rem; }
.maad-checks li::before { content: ""; position: absolute; left: .7rem; top: 50%; width: 34px; height: 34px; transform: translateY(-50%); border-radius: 8px; background: var(--wp--preset--color--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 18px no-repeat; }

/* Footer */
.maad-footer a { color: #fff; text-decoration: none; }
.maad-footer a:hover { color: var(--wp--preset--color--accent); }
.maad-footer h3 { color: #fff; font-size: 1.1rem; text-transform: uppercase; letter-spacing: .08em; }
.maad-footer p { margin: .25rem 0; }
.maad-footer .maad-ar { direction: rtl; text-align: left; }
.maad-footer .maad-sep { border: 0; border-top: 1px solid rgba(255, 255, 255, .25); margin: var(--wp--preset--spacing--50) auto var(--wp--preset--spacing--30); }

.maad-hero .wp-block-cover__inner-container { width: 100%; padding-inline: max(1.25rem, calc((100% - 1140px) / 2)); box-sizing: border-box; }
.maad-hero .wp-block-cover__inner-container > * { margin-left: 0 !important; }

/* Service icons sit on an orange disc, like the original */
.wp-block-group.maad-service figure.wp-block-image { width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 36% 58%, var(--wp--preset--color--accent) 0 31px, transparent 32px); }
.wp-block-group.maad-service figure.wp-block-image img { width: 78px !important; height: 78px; }

@media (max-width: 781px) {
	.maad-hero { min-height: 70vh !important; }
	.maad-framed { margin: 30px 20px 0 0 !important; }
}
