/*
Theme Name: EL MAMOUN
Theme URI: https://www.instagram.com/elmamounst/
Author: EL MAMOUN Shipping & Trading
Description: Block theme for EL MAMOUN Shipping & Trading — China sourcing, shipping and 3PL from Yiwu. Everything is editable in Appearance → Editor. On first activation it creates the homepage, Resources blog, categories, a CBM calculator page and starter articles.
Version: 1.4.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: elmamoun
Tags: block-patterns, full-site-editing, blog, business
*/

/* ---------- Basics ---------- */
html { scroll-behavior: smooth; }
img { border-radius: 0; }
:where(.wp-block-group.elm-section) { padding-top: var(--wp--preset--spacing--70); padding-bottom: var(--wp--preset--spacing--70); }

.elm-eyebrow {
	font-size: 0.85rem !important; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
	color: var(--wp--preset--color--blue);
}
.elm-dark .elm-eyebrow { color: var(--wp--preset--color--orange); }
.elm-lead { font-size: var(--wp--preset--font-size--large); color: var(--wp--preset--color--ink); }
.elm-muted { color: var(--wp--preset--color--muted); }
.elm-pill {
	display: inline-block; padding: 0.45rem 0.9rem; border-radius: 999px; font-size: 0.875rem; font-weight: 700;
	background: #fff; border: 1px solid #DCE7F3; color: var(--wp--preset--color--blue);
}
.elm-pill::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--wp--preset--color--orange); margin-right: 0.55rem; vertical-align: 1px; }
.elm-checks { font-size: 0.9rem; font-weight: 700; color: var(--wp--preset--color--ink); }

/* ---------- Brand dot spray (from the logo card) ---------- */
.elm-dots { position: relative; overflow: hidden; }
.elm-dots::before, .elm-dots::after {
	content: ""; position: absolute; width: 480px; height: 420px; pointer-events: none; opacity: 0.3; z-index: 0;
	background-image: radial-gradient(#1E88E5 1.4px, transparent 1.6px), radial-gradient(#F7941D 1.4px, transparent 1.6px);
	background-size: 20px 20px, 28px 28px; background-position: 0 0, 10px 14px;
	-webkit-mask-image: radial-gradient(closest-side, #000, transparent); mask-image: radial-gradient(closest-side, #000, transparent);
}
.elm-dots::before { top: -80px; left: -100px; transform: rotate(-12deg); }
.elm-dots::after { bottom: -110px; right: -90px; transform: rotate(18deg); }
.elm-dots > * { position: relative; z-index: 1; }

/* ---------- Section backgrounds ---------- */
.elm-hero { background: #F7FAFE; }
.elm-dark { background: var(--wp--preset--color--navy); color: #fff; }
.elm-dark :where(h1, h2, h3, h4, p) { color: #fff; }
.elm-dark p:not(.elm-eyebrow) { color: #C9D6E6; }
.elm-dark a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--orange); }
.elm-ice { background: var(--wp--preset--color--ice); }
.elm-mist { background: #F7FAFE; }
.elm-border-top { border-top: 1px solid var(--wp--preset--color--line); }
.elm-border-bottom { border-bottom: 1px solid var(--wp--preset--color--line); }

/* ---------- Header / top bar ---------- */
.elm-topbar { background: var(--wp--preset--color--navy); font-size: 0.82rem; font-weight: 600; }
.elm-topbar p { color: #C9D6E6; margin: 0; }
.elm-live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3DD68C; margin-right: 0.5rem; vertical-align: 1px; animation: elmPulse 1.6s ease-in-out infinite; }
.elm-header { background: #fff; border-bottom: 1px solid var(--wp--preset--color--line); }
.elm-header .wp-block-image img { height: 40px; width: auto; }
.elm-header .wp-block-navigation a { color: var(--wp--preset--color--navy); }
.elm-header .wp-block-navigation a:hover { color: var(--wp--preset--color--blue); }
.elm-btn-small .wp-element-button { padding: 0.7rem 1.2rem; font-size: 0.95rem; }
.wp-block-button.is-style-outline > .wp-element-button { border: 1.5px solid #C9D6E6; color: var(--wp--preset--color--navy); background: transparent; }
.wp-block-button.is-style-outline > .wp-element-button:hover { background: var(--wp--preset--color--navy); color: #fff; border-color: var(--wp--preset--color--navy); }
.elm-dark .wp-block-button.is-style-outline > .wp-element-button { color: #fff; border-color: #fff; }
.wp-block-button.is-style-blue > .wp-element-button { background: var(--wp--preset--color--blue); color: #fff; }
.wp-block-button.is-style-blue > .wp-element-button:hover { background: var(--wp--preset--color--navy); }
.wp-block-button.is-style-navy > .wp-element-button { background: var(--wp--preset--color--navy); color: #fff; }
.wp-block-button.is-style-navy > .wp-element-button:hover { background: var(--wp--preset--color--blue); }

/* ---------- Ticker ---------- */
.elm-ticker { background: var(--wp--preset--color--blue); overflow: hidden; white-space: nowrap; }
.elm-ticker p { display: inline-block; margin: 0; padding: 1rem 0; color: #fff; font-family: var(--wp--preset--font-family--sora); font-weight: 700; font-size: 1.1rem; animation: elmMarquee 40s linear infinite; }
@keyframes elmMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes elmPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .elm-ticker p, .elm-live::before { animation: none; } }

/* ---------- Stats ---------- */
.elm-stat-number { font-family: var(--wp--preset--font-family--sora); font-size: 2.5rem !important; font-weight: 800; color: var(--wp--preset--color--blue); line-height: 1; margin-bottom: 0.3rem !important; }
.elm-stat-label { font-weight: 600; color: var(--wp--preset--color--ink); margin-top: 0 !important; }

/* ---------- Cards ---------- */
.elm-card { border: 1px solid var(--wp--preset--color--line); border-radius: 20px; padding: 1.75rem; background: #fff; }
.elm-card-dark { border-radius: 20px; padding: 1.75rem; background: #13284A; }
.elm-card-dark :where(h3, h4) { color: #fff; }
.elm-card-dark p { color: #C9D6E6; }
.elm-card-orange { border-radius: 24px; padding: 2.5rem; background: var(--wp--preset--color--orange); }
.elm-card-orange :where(h2, h3, p) { color: var(--wp--preset--color--navy) !important; }
.elm-card-orange p { font-weight: 600; }
.elm-card-mist { border-radius: 24px; padding: 2.5rem; background: var(--wp--preset--color--mist); }
.elm-card-navy { border-radius: 24px; padding: 2.5rem; background: var(--wp--preset--color--navy); }
.elm-card-navy :where(h2, h3, p) { color: #fff; }
.elm-card-navy p { color: #C9D6E6; }
.elm-step-num { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem !important; color: var(--wp--preset--color--orange) !important; margin-bottom: 0.3rem !important; }
.elm-step-soon { border: 1.5px dashed var(--wp--preset--color--orange); background: transparent; }
.elm-price-featured { border: 2px solid var(--wp--preset--color--blue); position: relative; }
.elm-badge { display: inline-block; padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--wp--preset--color--orange); color: var(--wp--preset--color--navy) !important; font-size: 0.72rem !important; font-weight: 800; letter-spacing: 0.04em; }
.elm-price { font-family: var(--wp--preset--font-family--sora); font-size: 2rem !important; font-weight: 800; line-height: 1.1; }
.elm-card .wp-block-list, .elm-card-mist .wp-block-list { color: var(--wp--preset--color--ink); padding-left: 1.2rem; }
.elm-card .wp-block-buttons { margin-top: auto; }
.elm-card.is-layout-flex, .elm-card { height: 100%; box-sizing: border-box; }

/* ---------- Images ---------- */
.elm-rounded img { border-radius: 20px; }
.elm-rounded-lg img { border-radius: 28px; }

/* ---------- Comparison table ---------- */
.elm-compare table { border-collapse: separate; border-spacing: 0; border: 1px solid var(--wp--preset--color--line); border-radius: 18px; overflow: hidden; }
.elm-compare th, .elm-compare td { border: 0; border-top: 1px solid var(--wp--preset--color--line); padding: 1rem 1.2rem; text-align: left; vertical-align: top; }
.elm-compare thead th { border-top: 0; background: #F7FAFE; font-size: 0.85rem; letter-spacing: 0.04em; color: var(--wp--preset--color--muted); }
.elm-compare thead th:last-child { background: var(--wp--preset--color--blue); color: #fff; }
.elm-compare tbody td:first-child { font-weight: 800; }
.elm-compare tbody td:last-child { background: #F2F8FF; font-weight: 700; }
.elm-compare tbody td:nth-child(2) { color: var(--wp--preset--color--ink); }
.wp-block-table.elm-article-table table { border-collapse: collapse; }
.wp-block-table.elm-article-table th { background: #F7FAFE; }
.wp-block-table.elm-article-table th, .wp-block-table.elm-article-table td { border: 1px solid var(--wp--preset--color--line); padding: 0.8rem 1rem; }

/* ---------- FAQ (Details block) ---------- */
.wp-block-details { border: 1px solid var(--wp--preset--color--line); border-radius: 14px; padding: 1.1rem 1.4rem; }
.wp-block-details summary { font-weight: 800; font-size: 1.05rem; cursor: pointer; }
.wp-block-details[open] summary { margin-bottom: 0.6rem; }
.wp-block-details p { color: var(--wp--preset--color--ink); }

/* ---------- Quick audit form / calculator (Custom HTML blocks) ---------- */
.elm-form { background: #fff; border: 1px solid #DCE7F3; border-radius: 18px; padding: 1.1rem; box-shadow: 0 14px 36px rgba(11,27,51,.08); display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; align-items: end; }
.elm-form label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; color: var(--wp--preset--color--muted); text-transform: uppercase; }
.elm-form input, .elm-form select, .elm-calc input { height: 46px; border: 1.5px solid #DCE7F3; border-radius: 10px; padding: 0 0.75rem; font: inherit; font-size: 1rem; font-weight: 600; color: var(--wp--preset--color--navy); text-transform: none; letter-spacing: 0; background: #fff; }
.elm-form textarea { border: 1.5px solid #DCE7F3; border-radius: 10px; padding: 0.75rem; font: inherit; font-size: 1rem; color: var(--wp--preset--color--navy); text-transform: none; letter-spacing: 0; min-height: 110px; }
.elm-form input:focus, .elm-calc input:focus, .elm-form textarea:focus, .elm-form button:focus-visible { outline: 2px solid var(--wp--preset--color--orange); outline-offset: 2px; }
.elm-form button, .elm-calc .elm-calc-btn { height: 46px; border: 0; border-radius: 10px; background: var(--wp--preset--color--orange); color: var(--wp--preset--color--navy); font: inherit; font-weight: 800; font-size: 0.95rem; cursor: pointer; padding: 0 1rem; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.elm-form .elm-full { grid-column: 1 / -1; }
.elm-calc { background: #fff; border-radius: 24px; padding: 2rem; box-shadow: 0 18px 40px rgba(11,27,51,.08); display: flex; flex-direction: column; gap: 1.1rem; }
.elm-calc .elm-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.8rem; }
.elm-calc label { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.82rem; font-weight: 800; }
.elm-calc .elm-out { border-radius: 16px; padding: 1.1rem 1.25rem; background: var(--wp--preset--color--mist); }
.elm-calc .elm-out.dark { background: var(--wp--preset--color--navy); color: #fff; }
.elm-calc .elm-out span { display: block; font-size: 0.8rem; font-weight: 700; color: var(--wp--preset--color--muted); }
.elm-calc .elm-out.dark span { color: #C9D6E6; }
.elm-calc .elm-out strong { font-family: var(--wp--preset--font-family--sora); font-size: 1.6rem; }
.elm-calc .elm-out.dark strong { color: var(--wp--preset--color--orange); }
.elm-calc .elm-calc-btn { background: var(--wp--preset--color--blue); color: #fff; height: 52px; }

/* ---------- Portal mock (Custom HTML) ---------- */
.elm-portal { background: #fff; border: 1px solid #DCE7F3; border-radius: 22px; box-shadow: 0 30px 60px rgba(11,27,51,.14); overflow: hidden; font-size: 0.9rem; }
.elm-portal-head { display: flex; justify-content: space-between; align-items: center; padding: 0.9rem 1.1rem; border-bottom: 1px solid #EEF2F7; background: #FBFCFE; font-weight: 800; }
.elm-portal-head span { font-family: ui-monospace, Menlo, monospace; font-weight: 600; font-size: 0.75rem; color: var(--wp--preset--color--muted); }
.elm-portal-body { padding: 1.2rem; display: flex; flex-direction: column; gap: 1rem; }
.elm-portal-route { display: flex; justify-content: space-between; align-items: flex-end; gap: 0.75rem; }
.elm-portal-route small { display: block; font-size: 0.75rem; font-weight: 700; color: var(--wp--preset--color--muted); }
.elm-portal-route strong { font-family: var(--wp--preset--font-family--sora); font-size: 1.15rem; }
.elm-tag { padding: 0.35rem 0.65rem; border-radius: 999px; font-size: 0.72rem; font-weight: 800; background: var(--wp--preset--color--orange-soft); color: #8A4B00; white-space: nowrap; }
.elm-tag.green { background: #E7F6EC; color: #1B6B3A; }
.elm-track { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.elm-track div { display: flex; flex-direction: column; gap: 6px; font-size: 0.68rem; font-weight: 700; color: var(--wp--preset--color--ink); }
.elm-track i { display: block; height: 6px; border-radius: 3px; background: var(--wp--preset--color--sky); }
.elm-track .now i { background: var(--wp--preset--color--orange); }
.elm-track .now { color: var(--wp--preset--color--navy); font-weight: 800; }
.elm-track .todo i { background: #E6ECF4; }
.elm-track .todo { color: #8A98AD; }
.elm-qc { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.elm-qc i { aspect-ratio: 1; border-radius: 10px; background: #DCE7F3; display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 800; }
.elm-qc i:last-child { background: var(--wp--preset--color--navy); color: #fff; }
.elm-portal-label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; color: var(--wp--preset--color--muted); }
.elm-saving { display: flex; justify-content: space-between; padding: 0.85rem 1rem; border-radius: 14px; background: var(--wp--preset--color--ice); font-weight: 700; color: var(--wp--preset--color--ink); }
.elm-saving b { font-family: var(--wp--preset--font-family--sora); color: var(--wp--preset--color--blue); }
.elm-bar { height: 8px; border-radius: 4px; background: #EEF2F7; }
.elm-bar i { display: block; height: 8px; border-radius: 4px; background: var(--wp--preset--color--sky); }
.elm-bar.low i { background: var(--wp--preset--color--orange); }
.elm-sku { display: flex; flex-direction: column; gap: 6px; }
.elm-sku div:first-child { display: flex; justify-content: space-between; font-weight: 700; }
.elm-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.elm-kpis div { padding: 0.8rem; border-radius: 12px; background: var(--wp--preset--color--mist); font-size: 0.75rem; font-weight: 700; color: var(--wp--preset--color--muted); }
.elm-kpis b { display: block; font-family: var(--wp--preset--font-family--sora); font-size: 1.2rem; color: var(--wp--preset--color--navy); }

/* ---------- Blog ---------- */
.elm-cats ul, ul.elm-cats { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.elm-cats li a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border-radius: 999px; border: 1.5px solid #DCE7F3; background: #fff; color: var(--wp--preset--color--navy); font-weight: 800; font-size: 0.875rem; text-decoration: none; }
.elm-cats li a:hover { background: var(--wp--preset--color--navy); color: #fff; border-color: var(--wp--preset--color--navy); }
.elm-search .wp-block-search__inside-wrapper { background: #fff; border: 1.5px solid #DCE7F3; border-radius: 16px; padding: 6px; box-shadow: 0 14px 30px rgba(11,27,51,.07); }
.elm-search .wp-block-search__input { border: 0; font: inherit; padding: 0 0.8rem; min-height: 46px; }
.elm-search .wp-block-search__button { background: var(--wp--preset--color--blue); color: #fff; border-radius: 10px; margin-left: 6px; }
.elm-post-grid .wp-block-post-featured-image img { border-radius: 18px; }
.elm-post-grid .wp-block-post-title { font-size: 1.2rem; line-height: 1.3; margin-top: 0.5rem; }
.elm-post-grid .wp-block-post-title a { text-decoration: none; }
.elm-post-list .wp-block-post { border-bottom: 1px solid var(--wp--preset--color--line); padding-bottom: 1.25rem; }
.elm-post-list .wp-block-post-title { font-size: 1.25rem; }
.elm-post-list .wp-block-post-title a { text-decoration: none; }
.elm-article { font-size: 1.12rem; line-height: 1.75; color: #22324A; }
.elm-article h2 { margin-top: 2.5rem; font-size: 1.85rem; }
.elm-article h3 { margin-top: 2rem; font-size: 1.35rem; }
.elm-article .wp-block-quote { border-left: 0; border-radius: 16px; background: #FFF6EB; padding: 1.4rem 1.6rem; font-family: var(--wp--preset--font-family--sora); font-size: 1.2rem; line-height: 1.45; color: var(--wp--preset--color--navy); }
.elm-tldr { border-radius: 18px; background: var(--wp--preset--color--ice); padding: 1.5rem 1.75rem; font-size: 1.02rem; }
.elm-toc { border: 1px solid var(--wp--preset--color--line); border-radius: 16px; padding: 1.25rem 1.5rem; font-size: 0.98rem; font-weight: 700; }
.elm-author-box { border-top: 1px solid var(--wp--preset--color--line); padding-top: 1.75rem; }
.elm-wire-row { display: flex; justify-content: space-between; gap: 0.8rem; padding: 0.6rem 0; border-top: 1px solid #EEF2F7; font-size: 0.92rem; }
.elm-wire-row span:first-child { font-weight: 800; }
.elm-wire-row span:last-child { color: var(--wp--preset--color--ink); text-align: right; }
.wp-block-query-pagination { font-weight: 800; }

/* ---------- Footer ---------- */
.elm-footer { background: var(--wp--preset--color--navy); font-size: 0.9rem; }
.elm-footer p { color: #C9D6E6; }
.elm-footer h4, .elm-footer strong { color: #fff; font-size: 0.95rem; }
.elm-footer a { color: var(--wp--preset--color--orange); }

/* ---------- Mobile ---------- */
@media (max-width: 781px) {
	.elm-hide-mobile { display: none !important; }
	.elm-compare { overflow-x: auto; }
	.elm-compare table { min-width: 620px; }
	.elm-card-orange, .elm-card-mist, .elm-card-navy { padding: 1.75rem; }
}

/* ---------- Spacing helpers for header/footer bands ---------- */
.elm-topbar { padding-top: 0.55rem; padding-bottom: 0.55rem; }
.elm-topbar a { color: var(--wp--preset--color--orange); text-decoration: none; }
.elm-header { padding-top: 0.9rem; padding-bottom: 0.9rem; }
.elm-footer { padding-top: var(--wp--preset--spacing--60); padding-bottom: 2rem; }
.elm-band { padding-top: 3rem; padding-bottom: 3rem; }
.elm-band-sm { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.elm-cta-band { padding-top: var(--wp--preset--spacing--70); padding-bottom: var(--wp--preset--spacing--60); }
.elm-gap-top { margin-top: 2.5rem !important; }
.elm-center { text-align: center; }
.elm-center .wp-block-buttons { justify-content: center; }
.elm-narrow { max-width: 720px; margin-left: auto !important; margin-right: auto !important; }
.elm-footer .wp-block-separator { border-color: #23365A; opacity: 1; }
.elm-card-white { border-radius: 24px; padding: 2.5rem; background: #fff; border: 1px solid var(--wp--preset--color--line); }
.wp-block-column > .elm-card-dark, .wp-block-column > .elm-card, .wp-block-column > .elm-card-orange, .wp-block-column > .elm-card-white { height: 100%; box-sizing: border-box; }
.elm-card-orange .elm-eyebrow { color: var(--wp--preset--color--navy) !important; }
.elm-card-orange .elm-form { box-shadow: none; border: 0; }
.wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }
main.wp-block-group > .wp-block-post-content > :first-child { margin-block-start: 0; }
.wp-block-post-content > .alignfull + .alignfull { margin-block-start: 0; }
.elm-author-box .wp-block-post-author__bio { color: var(--wp--preset--color--ink); }
.elm-search { max-width: 640px; margin-left: auto !important; margin-right: auto !important; }
.elm-calc em { font-style: normal; }
.elm-form button { white-space: nowrap; }
.elm-price { font-size: 1.6rem !important; }
.wp-block-column:has(> .elm-fill) { display: flex; flex-direction: column; }
.elm-fill { flex: 1; margin: 0; }
.elm-fill img { height: 100%; width: 100%; object-fit: cover; }
.wp-block-post-author__byline { font-size: 0.8rem; font-weight: 700; color: var(--wp--preset--color--muted); }
.wp-block-post-author__name { font-weight: 800; }
.elm-author-box .wp-block-post-author__bio { font-size: 1rem; }
