/* EF Wood design system. Mobile-first. Logical properties throughout, so RTL (Arabic) works. */
:root {
  --c-forest: #263B2E;
  --c-gold: #8A6A3C;           /* darkened from #B38A56 for text contrast on ivory (WCAG AA) */
  --c-gold-accent: #B38A56;    /* decorative use only */
  --c-bamboo: #D8C5A5;
  --c-ivory: #F5F3ED;
  --c-char: #292C28;
  --c-sage: #8C9785;
  --c-white: #FFFFFF;
  --f-display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --f-body: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --max: 1200px;
  --r: 6px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --space: clamp(3rem, 7vw, 6rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--c-ivory);
  color: var(--c-char);
  font: 400 1rem/1.65 var(--f-body);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; height: auto; display: block; }
img { background: var(--c-bamboo); }
a { color: var(--c-forest); text-underline-offset: 3px; }
a:hover { color: var(--c-gold); }
:focus-visible { outline: 3px solid var(--c-gold-accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.1; color: var(--c-forest); margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
h3, .efw-h3 { font-size: 1.4rem; }
p { margin: 0 0 1em; }
address { font-style: normal; }
.efw-muted { color: #5a5f58; }

.efw-container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.efw-section { padding-block: var(--space); }
.efw-article { max-width: 100%; }
.efw-main { display: block; outline: none; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.efw-skip { position: absolute; inset-inline-start: 1rem; top: -100px; background: var(--c-forest); color: var(--c-white); padding: .6rem 1rem; z-index: 100; border-radius: var(--r); }
.efw-skip:focus { top: 1rem; }

/* Header */
.efw-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 243, 237, .97);
  border-block-end: 1px solid rgba(38, 59, 46, .12);
  padding-top: env(safe-area-inset-top, 0px);
}
.efw-header__inner { display: flex; align-items: center; gap: 1.25rem; min-height: 72px; }
.efw-brand__name { font-family: var(--f-display); font-size: 1.6rem; color: var(--c-forest); text-decoration: none; }
.efw-brand .custom-logo { max-height: 48px; width: auto; }
.efw-nav { margin-inline-start: auto; position: static; }
.efw-nav__toggle {
  display: none; background: none; border: 1px solid var(--c-forest); color: var(--c-forest);
  padding: .45rem .95rem; border-radius: var(--r); font: inherit; cursor: pointer; min-height: 44px;
}
.efw-nav__list { list-style: none; display: flex; gap: 1.3rem; margin: 0; padding: 0; flex-wrap: wrap; }
.efw-nav__list a { text-decoration: none; color: var(--c-char); font-size: .95rem; font-weight: 500; }
.efw-nav__list a:hover, .efw-nav__list .current-menu-item > a { color: var(--c-gold); }
.efw-header__tools { display: flex; align-items: center; gap: .9rem; }

/* Language switcher */
.efw-lang { position: relative; }
.efw-lang summary {
  list-style: none; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center;
  padding: .4rem .8rem; border: 1px solid rgba(38, 59, 46, .3); border-radius: var(--r); font-size: .9rem;
}
.efw-lang summary::-webkit-details-marker { display: none; }
.efw-lang summary::after { content: ""; border: 5px solid transparent; border-block-start-color: currentColor; margin-inline-start: .5rem; }
.efw-lang__list {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px); min-width: 210px; z-index: 60;
  background: var(--c-white); border: 1px solid rgba(38, 59, 46, .15); border-radius: var(--r);
  box-shadow: 0 12px 30px rgba(41, 44, 40, .12); list-style: none; margin: 0; padding: .4rem;
  max-height: 70vh; overflow: auto;
}
.efw-lang__list a { display: block; padding: .6rem .8rem; border-radius: 4px; color: var(--c-char); text-decoration: none; min-height: 44px; }
.efw-lang__list a:hover, .efw-lang__list a[aria-current="true"] { background: var(--c-bamboo); }

/* Social icons */
.efw-social { list-style: none; display: flex; gap: .5rem; margin: 0; padding: 0; flex-wrap: wrap; }
.efw-social a {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 50%; color: var(--c-forest); border: 1px solid rgba(38, 59, 46, .2); transition: background .2s var(--ease), color .2s var(--ease);
}
.efw-social a:hover { background: var(--c-forest); color: var(--c-ivory); }
.efw-social svg, .efw-social img { width: 20px; height: 20px; }
.efw-footer .efw-social a { border-color: rgba(245, 243, 237, .3); color: var(--c-ivory); }
.efw-footer .efw-social a:hover { background: var(--c-ivory); color: var(--c-forest); }

/* Buttons */
.efw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px;
  padding: .7rem 1.3rem; border: 1px solid var(--c-forest); border-radius: var(--r);
  background: transparent; color: var(--c-forest); font: 600 .95rem/1.2 var(--f-body);
  text-decoration: none; cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease);
}
.efw-btn:hover { background: var(--c-forest); color: var(--c-ivory); }
.efw-btn--primary { background: var(--c-forest); color: var(--c-ivory); }
.efw-btn--primary:hover { background: var(--c-gold); border-color: var(--c-gold); color: var(--c-white); }
.efw-btn--light { border-color: var(--c-ivory); color: var(--c-ivory); }
.efw-btn--light:hover { background: var(--c-ivory); color: var(--c-forest); }
.efw-btn--sm { min-height: 40px; padding: .5rem .9rem; font-size: .88rem; }
.efw-link-btn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; min-height: 44px; }
.efw-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-block: 1.5rem; }

/* Hero and sections */
.efw-hero { background: var(--c-forest); color: var(--c-ivory); padding-block: clamp(4rem, 12vw, 9rem); }
.efw-hero h1 { color: var(--c-ivory); max-width: 16ch; }
.efw-hero .efw-eyebrow { color: var(--c-bamboo); }
.efw-lead { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 60ch; }
.efw-hero .efw-lead { color: rgba(245, 243, 237, .9); }
.efw-eyebrow { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--c-gold); font-weight: 600; margin-bottom: .75rem; }
.efw-split { display: grid; gap: 2.5rem; align-items: start; }
.efw-split--top { margin-block-start: 1.5rem; }
.efw-band { background: var(--c-bamboo); padding-block: var(--space); }
.efw-band__inner h2 { color: var(--c-forest); }
.efw-band__inner .efw-btn--light { border-color: var(--c-forest); color: var(--c-forest); }
.efw-band__inner .efw-btn--light:hover { background: var(--c-forest); color: var(--c-ivory); }
.efw-tiles { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; grid-template-columns: 1fr; }
.efw-tile { display: block; padding: 1.25rem; border: 1px solid rgba(38, 59, 46, .2); border-radius: var(--r); text-decoration: none; color: var(--c-forest); font-weight: 600; background: var(--c-white); }
.efw-tile:hover { border-color: var(--c-gold); }

/* Cards */
.efw-cards { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.efw-card { background: var(--c-white); border-radius: var(--r); overflow: hidden; border: 1px solid rgba(38, 59, 46, .1); }
.efw-card__media img, .efw-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.efw-card > :not(.efw-card__media) { margin-inline: 1.25rem; }
.efw-card > :first-child:not(.efw-card__media) { margin-block-start: 1.25rem; }
.efw-card h3 { font-size: 1.4rem; margin-block-end: .4rem; }
.efw-card h3 a { color: var(--c-forest); text-decoration: none; }
.efw-card h3 a:hover { text-decoration: underline; }
.efw-card p:last-child { margin-block-end: 1.25rem; }

/* Product, project, prose */
.efw-img { border-radius: var(--r); }
.efw-img--wide { width: 100%; margin-block: 1.5rem; }
.efw-gallery { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
.efw-prose { max-width: 70ch; }
.efw-prose > * + * { margin-block-start: 1em; }
.efw-block { margin-block: 2rem; }
.efw-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.efw-table th, .efw-table td { text-align: start; padding: .7rem .5rem; border-block-end: 1px solid rgba(38, 59, 46, .15); vertical-align: top; }
.efw-table th { color: var(--c-forest); width: 40%; font-weight: 600; }
.efw-list { padding-inline-start: 1.2rem; }
.efw-list li { margin-block-end: .45rem; }
.efw-list--plain { list-style: none; padding: 0; }
.efw-list--plain li { margin-block-end: .6rem; }
.efw-downloads { list-style: none; padding: 0; display: grid; gap: .6rem; }
.efw-download { display: inline-flex; align-items: center; min-height: 44px; padding: .5rem .8rem; border: 1px solid rgba(38, 59, 46, .25); border-radius: var(--r); color: var(--c-forest); text-decoration: none; background: var(--c-white); }
.efw-download:hover { border-color: var(--c-gold); }
.efw-facts { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 1.5rem 0; padding: 1.25rem; background: var(--c-white); border-radius: var(--r); }
.efw-facts dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #5a5f58; }
.efw-facts dd { margin: 0; font-weight: 600; color: var(--c-forest); }
.efw-filter ul { display: flex; gap: .6rem; flex-wrap: wrap; list-style: none; padding: 0; margin: 1rem 0 2rem; }
.efw-filter a { display: inline-flex; align-items: center; min-height: 44px; padding: .4rem .9rem; border: 1px solid rgba(38, 59, 46, .25); border-radius: 999px; text-decoration: none; color: var(--c-forest); }
.efw-filter a:hover { background: var(--c-bamboo); }
.efw-breadcrumbs ol { display: flex; gap: .5rem; list-style: none; padding: 0; margin: 1rem 0 0; flex-wrap: wrap; font-size: .85rem; color: #5a5f58; }
.efw-breadcrumbs li + li::before { content: "/"; margin-inline-end: .5rem; }
.efw-page-head { margin-block-end: 1.5rem; }
.efw-aside .efw-block { border-block-end: 1px solid rgba(38, 59, 46, .12); padding-block-end: 1.5rem; }

/* Accordion (native details) */
.efw-accordion details { border-block-end: 1px solid rgba(38, 59, 46, .18); padding-block: .25rem; }
.efw-accordion summary { cursor: pointer; list-style: none; min-height: 52px; display: flex; align-items: center; justify-content: space-between; font-weight: 600; color: var(--c-forest); font-size: 1.05rem; }
.efw-accordion summary::-webkit-details-marker { display: none; }
.efw-accordion summary::after { content: "+"; font-size: 1.4rem; margin-inline-start: 1rem; }
.efw-accordion details[open] summary::after { content: "−"; }
.efw-accordion details > div { padding-block-end: 1rem; }

/* Share */
.efw-share { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-block: 2rem; padding-block-start: 1.25rem; border-block-start: 1px solid rgba(38, 59, 46, .15); }
.efw-share ul { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.efw-share__label { font-weight: 600; font-size: .9rem; }

/* Forms */
.efw-form p { margin-block-end: 1rem; }
.efw-form label { display: block; font-weight: 600; font-size: .92rem; margin-block-end: .35rem; color: var(--c-forest); }
.efw-form input:not([type="checkbox"]):not([type="file"]), .efw-form select, .efw-form textarea {
  width: 100%; min-height: 48px; padding: .7rem .85rem; font: inherit; color: var(--c-char);
  background: var(--c-white); border: 1px solid #8c9785; border-radius: var(--r);
}
.efw-form textarea { min-height: 120px; }
.efw-form input:focus, .efw-form select:focus, .efw-form textarea:focus { outline: 3px solid var(--c-gold-accent); outline-offset: 1px; border-color: var(--c-forest); }
.efw-form input:invalid:not(:placeholder-shown):not(:focus) { border-color: #9b2c2c; }
.efw-grid { display: grid; gap: 0 1.25rem; grid-template-columns: 1fr; }
.efw-req { color: #9b2c2c; }
.efw-phone__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: .5rem; }
.efw-phone label { margin-block-end: .35rem; }
.efw-consent-check label { font-weight: 400; color: var(--c-char); display: flex; gap: .6rem; align-items: flex-start; }
.efw-consent-check input { width: 22px; height: 22px; margin-block-start: .15rem; flex: none; }
.efw-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.efw-notice { padding: 1rem 1.2rem; border-radius: var(--r); border: 1px solid; margin-block: 1.25rem; }
.efw-notice--success { border-color: #3d6b4d; background: #e7f0e9; color: #1f3d2a; }
.efw-notice--error { border-color: #9b2c2c; background: #fbeaea; color: #6b1d1d; }
.efw-notice:not(.efw-notice--success):not(.efw-notice--error) { background: var(--c-white); border-color: rgba(38, 59, 46, .25); }

/* Maps and video facades */
.efw-map, .efw-video { margin-block: 1rem; }
.efw-map__frame, .efw-video__frame { margin-block-start: .75rem; }
.efw-map__frame iframe, .efw-video__frame iframe { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--r); }
.efw-video__frame iframe { aspect-ratio: 16 / 9; }

/* Footer */
.efw-footer { background: var(--c-forest); color: var(--c-ivory); padding-block: 3.5rem 1.5rem; margin-block-start: var(--space); }
.efw-footer a { color: var(--c-ivory); }
.efw-footer a:hover { color: var(--c-bamboo); }
.efw-footer .efw-muted { color: rgba(245, 243, 237, .8); }
.efw-footer__grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
.efw-footer__title { font-family: var(--f-body); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--c-bamboo); margin-block-end: .75rem; }
.efw-footer__brand { font-family: var(--f-display); font-size: 1.7rem; margin-block-end: .25rem; color: var(--c-ivory); }
.efw-footer address { color: rgba(245, 243, 237, .9); }
.efw-footer__links { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; padding: 0; margin: 0; }
.efw-footer__nav { border-block: 1px solid rgba(245, 243, 237, .15); padding-block: 1.25rem; margin-block-start: 2.5rem; }
.efw-footer__legal { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; padding-block-start: 1.25rem; font-size: .9rem; }
.efw-footer .efw-btn--sm { color: var(--c-ivory); border-color: var(--c-ivory); }
.efw-footer .efw-btn--sm:hover { background: var(--c-ivory); color: var(--c-forest); }

/* Pagination */
.efw-pagination .nav-links { display: flex; gap: .5rem; flex-wrap: wrap; margin-block-start: 2rem; }
.efw-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 .8rem; border: 1px solid rgba(38, 59, 46, .25); border-radius: var(--r); color: var(--c-forest); text-decoration: none; }
.efw-pagination .current { background: var(--c-forest); color: var(--c-ivory); }

/* Consent banner */
.efw-consent {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 200;
  background: var(--c-white); color: var(--c-char);
  border-block-start: 3px solid var(--c-gold-accent); box-shadow: 0 -10px 30px rgba(41, 44, 40, .15);
  padding: 1.25rem 0 calc(1.25rem + env(safe-area-inset-bottom, 0px));
  max-height: 80vh; overflow: auto;
}
.efw-consent__inner { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.efw-consent__title { font-size: 1.5rem; }
.efw-consent__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-block: .75rem; }
.efw-consent__prefs fieldset { border: 1px solid rgba(38, 59, 46, .2); border-radius: var(--r); padding: .75rem 1rem; margin: .5rem 0 1rem; }
.efw-consent__prefs legend { font-weight: 600; padding: 0 .3rem; }
.efw-consent__prefs label { display: flex; gap: .6rem; align-items: flex-start; min-height: 44px; padding-block: .3rem; }
.efw-consent__prefs input[type="checkbox"] { width: 22px; height: 22px; flex: none; margin-block-start: .15rem; }
.efw-consent .efw-btn { min-height: 44px; }

/* WhatsApp */
.efw-whatsapp {
  position: fixed; inset-inline-end: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 150;
  display: inline-flex; align-items: center; gap: .5rem; min-height: 52px; padding: .6rem 1rem;
  background: #1f6f4a; color: var(--c-white); border-radius: 999px; text-decoration: none;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .2); font-weight: 600;
}
.efw-whatsapp:hover { background: #185a3c; color: var(--c-white); }

/* Reveal (disabled for reduced motion) */
.efw-reveal { opacity: 1; transform: none; }
.js .efw-reveal.is-pending { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .efw-reveal.is-visible { opacity: 1; transform: none; }

/* Tablet and desktop */
@media (min-width: 640px) {
  .efw-grid { grid-template-columns: 1fr 1fr; }
  .efw-cards { grid-template-columns: repeat(2, 1fr); }
  .efw-tiles { grid-template-columns: repeat(2, 1fr); }
  .efw-facts { grid-template-columns: repeat(2, 1fr); }
  .efw-footer__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .efw-split { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .efw-split--top { grid-template-columns: 1.1fr 1fr; }
  .efw-cards { grid-template-columns: repeat(3, 1fr); }
  .efw-tiles { grid-template-columns: repeat(3, 1fr); }
  .efw-footer__grid { grid-template-columns: repeat(4, 1fr); }
  .efw-facts { grid-template-columns: repeat(4, 1fr); }
}

/* Mobile navigation */
@media (max-width: 959px) {
  .efw-nav__toggle { display: inline-flex; align-items: center; }
  .efw-nav__list {
    display: none; position: absolute; inset-inline: 0; top: 100%; z-index: 55;
    background: var(--c-ivory); flex-direction: column; gap: 0; padding: .5rem 1.25rem 1rem;
    border-block-end: 1px solid rgba(38, 59, 46, .15); box-shadow: 0 14px 24px rgba(41, 44, 40, .08);
  }
  .efw-nav__list.is-open { display: flex; }
  .efw-nav__list a { display: block; padding: .85rem 0; min-height: 44px; border-block-end: 1px solid rgba(38, 59, 46, .08); }
  .efw-header__tools .efw-social { display: none; }
}
@media (max-width: 480px) {
  .efw-header__tools .efw-lang summary span { max-width: 9ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
  .efw-whatsapp span { display: none; }
  .efw-whatsapp { padding: .7rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .efw-reveal.is-pending { opacity: 1; transform: none; }
}

/* Forced colours / high contrast */
@media (forced-colors: active) {
  .efw-btn, .efw-social a { border: 1px solid ButtonText; }
}

/* Right-to-left (Arabic) adjustments */
.efw-rtl .efw-table th, .efw-rtl .efw-table td { text-align: start; }
.efw-rtl .efw-form input, .efw-rtl .efw-form textarea { direction: rtl; }
.efw-rtl .efw-form input[type="email"], .efw-rtl .efw-form input[type="tel"], .efw-rtl .efw-form input[type="url"] { direction: ltr; text-align: start; }

/* Catalogue templates */
.efw-table-wrap { overflow-x: auto; margin-block: 1rem; }
.efw-table--compare th[scope="row"] { width: 28%; }
.efw-table--compare thead th { color: var(--c-forest); border-block-end: 2px solid var(--c-gold-accent); }
.efw-steps { padding-inline-start: 1.4rem; }
.efw-steps li { margin-block-end: .55rem; }
.efw-cert { border-inline-start: 4px solid var(--c-gold-accent); }
.efw-chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.efw-chips li { padding: .4rem .8rem; background: var(--c-white); border: 1px solid rgba(38,59,46,.2); border-radius: 999px; font-size: .9rem; }
