/* ===== Brand ===== */
/* Exact colours sampled from the Horseed business card & logo */
:root {
  --brand-navy: #2E3192;       /* logo globe, company name */
  --brand-green: #00A651;      /* laurel wreath, card swoosh */
  --brand-blue: #1747A0;       /* card's bottom band */
  --brand-navy-dark: #23266F;
  --brand-green-ink: #00803E;  /* brand green darkened for small text on white (5:1 contrast) */
  --brand-green-tint: #E8F6EE;
  --brand-navy-tint: #EEEFF8;
}

/* ===== Theme tokens ===== */
/* Both designs use only the brand palette; they differ in hero style and shape. */
.theme-heritage, .theme-fresh {
  --primary: var(--brand-navy);
  --primary-ink: #fff;
  --primary-dark: var(--brand-navy-dark);
  --accent: var(--brand-green);
  --accent-ink: #fff;
  --accent-text: var(--brand-green-ink);
  --navy: var(--brand-navy);
  --surface: #fff;
  --ink: #1C1E4A;
  --muted: #565A78;
  --font-head: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', Arial, sans-serif;
  --footer-bg: var(--brand-blue);
}
/* Heritage: navy hero with the green card swoosh */
.theme-heritage {
  --bg: #fff;
  --bg-alt: var(--brand-navy-tint);
  --line: #DCDEEF;
  --radius: 4px;
  --radius-lg: 8px;
  --hero-bg: var(--brand-navy);
  --hero-ink: #fff;
  --hero-muted: rgba(255, 255, 255, .85);
  --hero-em: #6FE0A0;
  --shadow: 0 1px 2px rgba(46, 49, 146, .06), 0 6px 20px rgba(46, 49, 146, .08);
}
/* Fresh: white hero like the front of the card, green swoosh below */
.theme-fresh {
  --bg: #fff;
  --bg-alt: var(--brand-green-tint);
  --line: #D6EEDF;
  --radius: 12px;
  --radius-lg: 20px;
  --hero-bg: #fff;
  --hero-ink: var(--ink);
  --hero-muted: var(--muted);
  --hero-em: var(--brand-green);
  --shadow: 0 2px 4px rgba(0, 166, 81, .05), 0 12px 32px rgba(46, 49, 146, .08);
}
/* Arabic: Arabic-first fonts, and no letter-spacing (it breaks letter joining) */
.lang-ar { --font-head: 'Cairo', 'Oswald', sans-serif; --font-body: 'Tajawal', 'Inter', Arial, sans-serif; }
.lang-ar :is(.eyebrow, h1, h2, h3, h4, .site-footer h4) { letter-spacing: 0; }
.lang-ar body, .lang-ar { line-height: 1.75; }

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; color: var(--navy); }
:is(h1, h2) { text-transform: uppercase; letter-spacing: .01em; }
.lang-ar :is(h1, h2, h3) { font-weight: 800; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.2rem; }
.lang-ar h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 640px; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); margin-bottom: .5rem; }
.lang-ar .eyebrow { font-size: .9rem; }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: 2.5rem; max-width: 640px; }
.section-head.row { display: flex; justify-content: space-between; align-items: end; gap: 1rem; max-width: none; flex-wrap: wrap; }
.link-arrow { font-weight: 600; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem 1.4rem; border-radius: var(--radius); font-weight: 700; font-size: .95rem; border: 2px solid transparent; cursor: pointer; transition: transform .15s, background .15s; font-family: inherit; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: #fff; color: var(--navy); }
.btn-accent:hover { background: var(--brand-green-tint); }
.btn-ghost { border-color: currentColor; color: inherit; }
.btn-sm { padding: .5rem 1rem; font-size: .875rem; }
.btn-block { width: 100%; }
.theme-fresh .btn { border-radius: 999px; }

/* ===== Header ===== */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar { background: var(--brand-navy); color: rgba(255, 255, 255, .9); font-size: .8rem; border-bottom: 3px solid var(--brand-green); }
.lang-switch { font-weight: 700; }
.topbar-inner { display: flex; gap: 1.5rem; justify-content: flex-end; padding: .4rem 0; flex-wrap: wrap; }
.topbar a { color: inherit; }
.nav { display: flex; align-items: center; justify-content: space-between; padding: .8rem 0; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-logo { height: 52px; width: auto; flex: none; }
.brand-logo-wrap { background: #fff; border-radius: 50%; padding: 6px; display: grid; place-items: center; }
.brand-logo-wrap .brand-logo { height: 44px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: 'Oswald', 'Cairo', sans-serif; font-weight: 700; font-size: 1.25rem; text-transform: uppercase; letter-spacing: .01em; color: var(--brand-navy); }
.brand-text small { font-family: 'Tajawal', 'Inter', sans-serif; font-size: .85rem; font-weight: 700; color: var(--brand-navy); }
.lang-ar .brand-text strong { font-family: 'Cairo', 'Tajawal', sans-serif; font-weight: 800; font-size: 1.25rem; letter-spacing: 0; }
.lang-ar .brand-text small { font-family: 'Oswald', sans-serif; font-weight: 500; font-size: .72rem; letter-spacing: .04em; }
.brand-light { color: #fff; }
.brand-light .brand-text strong { color: #fff; }
.brand-light .brand-text small { color: rgba(255, 255, 255, .85); }
.nav-links { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-links > li > a:not(.btn) { display: block; padding: .5rem .85rem; color: var(--ink); font-weight: 500; font-size: .95rem; border-radius: var(--radius); }
.nav-links > li > a:not(.btn):hover, .nav-links a.active { color: var(--primary); text-decoration: none; }
.nav-links .btn { margin-inline-start: .5rem; }
.has-menu { position: relative; }
.menu { position: absolute; top: 100%; inset-inline-start: 0; min-width: 240px; list-style: none; margin: 0; padding: .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s; }
.has-menu:hover .menu, .has-menu:focus-within .menu { opacity: 1; visibility: visible; transform: none; }
.menu a { display: block; padding: .45rem .75rem; color: var(--ink); border-radius: var(--radius); font-size: .9rem; }
.menu a:hover { background: var(--bg-alt); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--ink); }

/* ===== Hero ===== */
.hero, .page-hero { position: relative; overflow: hidden; }
.hero { background: var(--hero-bg); color: var(--hero-ink); padding: clamp(56px, 9vw, 110px) 0 clamp(120px, 14vw, 180px); }
/* Green swoosh along the bottom edge, rising left to right like the card */
.hero::after, .page-hero::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: clamp(50px, 7vw, 100px); pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0 100V86Q860 104 1440 0V100Z' fill='%2300A651'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
}
.lang-ar .hero::after, .lang-ar .page-hero::after { transform: scaleX(-1); }
.hero > .container, .page-hero > .container { position: relative; z-index: 1; }
.hero h1 { color: var(--hero-ink); }
.theme-heritage .hero .btn-primary { background: #fff; color: var(--brand-navy); }
.theme-heritage .hero .btn-primary:hover { background: var(--brand-green-tint); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.hero-grid > *, .catalog > *, .about-split > *, .contact-grid > * { min-width: 0; }
.hero h1 em { font-style: normal; color: var(--hero-em); }
.hero .lead { color: var(--hero-muted); }
.pill { display: inline-block; padding: .35rem .9rem; border-radius: 999px; font-size: .8rem; font-weight: 600; margin-bottom: 1.25rem; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); }
.theme-fresh .pill { background: var(--brand-green-tint); border-color: var(--line); color: var(--brand-green-ink); }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.75rem; }
.hero-visual { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hero-tile { aspect-ratio: 1; border-radius: var(--radius-lg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; background: color-mix(in srgb, var(--tile) 28%, var(--surface)); color: var(--ink); box-shadow: var(--shadow); animation: float 6s ease-in-out infinite; animation-delay: calc(var(--i) * -1s); }
.theme-heritage .hero-tile { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); color: #fff; }
.hero-tile span { font-size: clamp(2rem, 4vw, 3rem); }
.hero-tile small { font-size: .75rem; font-weight: 600; text-align: center; padding: 0 .4rem; }
.hero-badge { position: absolute; bottom: -56px; inset-inline-start: -18px; background: var(--brand-green); color: #fff; border: 3px solid #fff; padding: 1rem 1.25rem; border-radius: var(--radius-lg); box-shadow: var(--shadow); display: flex; flex-direction: column; line-height: 1.1; }
.hero-badge strong { font-family: var(--font-head); font-size: 2.2rem; }
.hero-badge span { font-size: .8rem; font-weight: 600; }
@keyframes float { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .hero-tile { animation: none; } }

/* ===== Stats ===== */
.stats { background: var(--surface); border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 2rem 1rem; text-align: center; border-inline-end: 1px solid var(--line); }
.stat:last-child { border-inline-end: 0; }
.stat strong { display: block; font-family: var(--font-head); font-size: 2rem; font-weight: 700; color: var(--brand-navy); }
.stat:nth-child(even) strong { color: var(--brand-green); }
.stat span { font-size: .85rem; color: var(--muted); }

/* ===== Cards & grids ===== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.category-card { display: flex; flex-direction: column; gap: .35rem; padding: 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); color: var(--ink); transition: transform .15s, border-color .15s; position: relative; overflow: hidden; }
.category-card::after { content: ''; position: absolute; inset: auto 0 0 0; height: 4px; background: var(--tile); }
.category-card:hover { transform: translateY(-3px); border-color: var(--tile); text-decoration: none; }
.category-icon { font-size: 2rem; width: 56px; height: 56px; display: grid; place-items: center; border-radius: var(--radius); background: color-mix(in srgb, var(--tile) 22%, transparent); margin-bottom: .4rem; }
.category-card small { color: var(--muted); font-size: .85rem; line-height: 1.45; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.product-card { display: flex; flex-direction: column; overflow: hidden; color: var(--ink); transition: transform .15s; }
.product-card:hover { transform: translateY(-3px); text-decoration: none; }
.product-thumb { aspect-ratio: 4 / 3; display: grid; place-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--tile) 35%, #fff), color-mix(in srgb, var(--tile) 12%, #fff)); }
.product-thumb span { font-size: 3.5rem; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb.large { border-radius: var(--radius-lg); aspect-ratio: 1; }
.product-thumb.large span { font-size: 8rem; }
.card-body { padding: 1rem 1.15rem 1.25rem; }
.card-body h3 { margin-bottom: .25rem; }
.card-body .eyebrow { font-size: .7rem; margin-bottom: .25rem; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.news-card { padding: 1.5rem; color: var(--ink); display: flex; flex-direction: column; }
.news-card:hover { text-decoration: none; border-color: var(--primary); }
.news-card time { font-size: .8rem; color: var(--accent-text); font-weight: 600; margin-bottom: .5rem; }
.news-card .link-arrow { margin-top: auto; color: var(--primary); }

/* ===== About ===== */
.about-split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: start; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checklist li { background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--accent); border-radius: var(--radius); padding: 1rem 1.25rem; display: flex; flex-direction: column; }
.theme-fresh .checklist li { border-inline-start-color: var(--primary); }
.checklist span { color: var(--muted); font-size: .9rem; }
.page-hero { background: var(--hero-bg); color: var(--hero-ink); padding: clamp(48px, 7vw, 80px) 0 clamp(80px, 10vw, 130px); }
.theme-fresh .page-hero { background: linear-gradient(180deg, #fff, var(--brand-green-tint)); }
.page-hero h1 { color: var(--hero-ink); }
.theme-heritage .page-hero .eyebrow { color: #6FE0A0; }
.page-hero .lead { color: var(--hero-muted); }
.prose h2 { margin-top: 1.5rem; }
.prose ul { padding-inline-start: 1.2rem; }
.info-logo { margin-bottom: 1rem; }
.prose li { margin-bottom: .4rem; }
.info-card { padding: 1.75rem; position: sticky; top: 120px; }
.info-card dl, .specs { display: grid; grid-template-columns: auto 1fr; gap: .6rem 1.25rem; margin: 0 0 1.5rem; }
.info-card dt, .specs dt { font-weight: 600; color: var(--muted); font-size: .875rem; }
.info-card dd, .specs dd { margin: 0; }
.values-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.value { padding: 1.5rem; }
.value > span { font-size: 2rem; display: block; margin-bottom: .5rem; }

/* ===== Catalog ===== */
.catalog { display: grid; grid-template-columns: 250px 1fr; gap: 2.5rem; align-items: start; }
.filters { position: sticky; top: 120px; }
.filters ul { list-style: none; padding: 0; margin: 1rem 0 0; }
.filters li a { display: block; padding: .45rem .75rem; border-radius: var(--radius); color: var(--ink); font-size: .92rem; }
.filters li a:hover { background: var(--bg-alt); text-decoration: none; }
.filters li a.active { background: var(--brand-navy); color: #fff; }
.search input, .newsletter-form input, .form input, .form select, .form textarea { width: 100%; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; background: var(--surface); color: var(--ink); }
.search input:focus, .form :is(input, select, textarea):focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: transparent; }
.empty { padding: 2rem; text-align: center; }
.crumbs { font-size: .875rem; color: var(--muted); margin-bottom: 1.5rem; }
.product-detail { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: center; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; align-items: start; }
.form { padding: 2rem; display: grid; gap: 1rem; }
.form label { display: grid; gap: .35rem; font-weight: 500; font-size: .9rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form .btn { justify-self: start; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; }
.alert { background: #fdecea; color: #8a1c12; border-radius: var(--radius); padding: .75rem 1rem; }
.alert p { margin: 0; }
.contact-info { display: grid; gap: 16px; }
.contact-info .card { padding: 1.4rem; }
.contact-info p { margin: 0 0 .3rem; }
.map { margin-top: 2.5rem; }
.map iframe { width: 100%; height: 380px; border: 0; border-radius: var(--radius-lg); }

/* ===== CTA / Newsletter / Footer ===== */
.cta-band { background: var(--brand-navy); color: #fff; padding: 3rem 0; border-top: 6px solid var(--brand-green); }
.cta-band h2 { color: #fff; }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.cta-inner h2, .cta-inner p { margin: 0; }
.cta-inner p { opacity: .85; }
.newsletter { background: var(--bg-alt); padding: 2.5rem 0; border-top: 1px solid var(--line); }
.newsletter-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.newsletter h3 { margin: 0; }
.newsletter p { margin: 0; color: var(--muted); }
.newsletter-form { display: flex; gap: .5rem; flex: 1; max-width: 460px; min-width: 260px; }
.site-footer { position: relative; background: var(--footer-bg); color: rgba(255, 255, 255, .88); padding: 6rem 0 0; font-size: .92rem; }
/* green swoosh across the top of the blue band, as on the card */
.site-footer::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 56px; background: var(--brand-green); border-radius: 0 0 60% 40% / 0 0 100% 100%; }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; }
.site-footer a { color: rgba(255, 255, 255, .85); }
.site-footer .muted { color: rgba(255, 255, 255, .75); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1.2fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer-grid .brand { margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.social { display: flex; gap: 1rem; text-transform: capitalize; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .1); padding: 1.25rem 0; font-size: .8rem; }
.theme-switch a { margin-inline-start: .5rem; text-transform: capitalize; opacity: .6; }
.theme-switch a.active { opacity: 1; font-weight: 700; color: #fff; text-decoration: underline; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--brand-navy); color: #fff; border-bottom: 4px solid var(--brand-green); padding: .85rem 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); font-weight: 600; z-index: 100; animation: toast 5s forwards; }
@keyframes toast { 0%, 85% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-grid, .about-split, .product-detail, .contact-grid, .catalog { grid-template-columns: 1fr; }
  .hero-visual { max-width: 460px; width: 100%; }
  .hero-badge { position: static; grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: .5rem; justify-self: start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-inline-end: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .filters, .info-card { position: static; }
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--line); padding: .5rem 16px 1rem; }
  .nav-links.open { display: flex; }
  .menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; display: none; padding: 0; padding-inline-start: 1rem; }
  .has-menu.open .menu { display: block; }
  .nav-links .btn { margin: .5rem 0 0; }
  .topbar-inner { justify-content: center; gap: .75rem; }
  .topbar-inner span:nth-child(2) { display: none; }
  .brand-text strong { font-size: 1rem; }
  .brand-logo { height: 44px; }
}
@media (max-width: 600px) {
  .form-row, .footer-grid { grid-template-columns: 1fr; }
  .stat strong { font-size: 1.4rem; }
  .newsletter-form { flex-direction: column; }
}
.newsletter .btn-accent { background: var(--brand-navy); color: #fff; }
.newsletter .btn-accent:hover { background: var(--brand-navy-dark); }
