:root {
    --brand: #2d6a4f;
    --brand-2: #1b4332;
    --accent: #52b788;
    --bg: #f8fafc;
    --text: #0f172a;
}

* {
    box-sizing: border-box;
}


/* زرار القائمة */

.menu-toggle {
    display: none;
    font-size: 26px;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
}


/* الوضع الطبيعي (كمبيوتر) */

#navbar {
    display: flex;
    gap: 10px;
    /* تقليل المسافة بين روابط الناف */
    align-items: center;
    justify-content: center;
    /* وسط الناف */
    flex-wrap: wrap;
    /* الموبايل ممكن يلف */
}


/* الوضع على الموبايل */

@media (max-width: 768px) {
    /* Make header items in one row on mobile */
    .nav {
        position: relative;
        flex-direction: row;
        justify-content: space-between;
        padding: 12px 0;
        gap: 10px;
        flex-wrap: nowrap;
    }
    .logo {
        flex: 1;
        min-width: 0;
    }
    .logo img {
        height: 48px !important;
    }
    /* Dropdown menu under header */
    #navbar {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1200;
        display: flex;
        flex-direction: column;
        gap: 6px;
        /* Glass effect background */
        background: rgba(255, 255, 255, 0.70);
        color: var(--text);
        border: 1px solid rgba(148, 163, 184, 0.45);
        border-top: none;
        border-bottom-left-radius: 12px;
        border-bottom-right-radius: 12px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
        backdrop-filter: blur(14px) saturate(140%);
        -webkit-backdrop-filter: blur(14px) saturate(140%);
        max-height: 0;
        overflow: hidden;
        transition: max-height .25s ease;
        padding: 0 12px;
    }
    #navbar.show {
        max-height: 70vh;
        padding: 10px 12px;
    }
    #navbar a,
    #navbar button {
        text-align: left;
        padding: 10px 8px;
        border-radius: 8px;
        gap: 8px;
        color: var(--text);
        font-size: 16px;
        font-weight: 600;
        text-decoration: none;
    }
    #navbar a:hover,
    #navbar button:hover {
        background: rgba(255, 255, 255, 0.5);
    }
    #navbar a:focus-visible,
    #navbar button:focus-visible {
        outline: 3px solid #cbd5e1;
        outline-offset: 2px;
    }
    /* Hide close button for dropdown mode */
    #navbar .nav-close {
        display: none !important;
    }
    .menu-toggle {
        display: block;
        font-size: 24px;
    }
    .logo {
        font-size: 20px;
    }
    /* No overlay in dropdown mode */
    .nav-overlay {
        display: none !important;
    }
}


/* Overlay for mobile drawer */

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 1100;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.nav-overlay.show {
    opacity: 1;
    pointer-events: auto;
}


/* Lock scroll when nav open */

body[data-nav-open="true"] {
    overflow: hidden;
}

.nav {
    display: flex;
    flex-direction: column;
    /* الوضع الافتراضي للموبايل */
    align-items: center;
    justify-content: center;
    padding: 12px 0;
    /* تقليل مساحة الناف على الموبايل */
    gap: 8px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    color: var(--brand-2);
}

.logo .badge {
    background: var(--accent);
    color: #053;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    -webkit-border-radius: 999px;
    -moz-border-radius: 999px;
    -ms-border-radius: 999px;
    -o-border-radius: 999px;
}

.nav a.btn {
    padding: 16px 16px;
    border-radius: 12px;
    background: var(--brand);
    color: #fff;
    display: inline-block;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    -ms-border-radius: 12px;
    -o-border-radius: 12px;
}

.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: center;
    padding: 48px 0;
}


/* Hero media: make the right-side image responsive and styled */

.hero .hero-media {
    display: block;
}

.hero .hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.hero h1 {
    font-size: 40px;
    line-height: 1.2;
    margin: 0 0 12px
}

.hero p {
    font-size: 18px;
    margin: 0 0 16px
}

.kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px
}

.kpi {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px;
    text-align: center;
    -webkit-border-radius: 16px;
    -moz-border-radius: 16px;
    -ms-border-radius: 16px;
    -o-border-radius: 16px;
}

.section {
    padding: 48px 0;
    margin: 15px;
}

.section h2 {
    font-size: 28px;
    margin: 0 0 16px
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px
}


/* 4-column grid variant for desktop, stacks on mobile via existing media query */

.grid.grid-4 {
    grid-template-columns: repeat(4, 1fr);
    display: grid;
    gap: 16px;
}


/* Show More Button */

.show-more-container {
    grid-column: 1 / -1;
    text-align: center;
    margin: 2rem 0;
    width: 100%;
}

.show-more-btn {
    background-color: var(--brand);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.show-more-btn:hover {
    background-color: var(--brand-2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.show-more-btn:active {
    transform: translateY(0);
}

.show-more-btn.hidden {
    display: none;
}


/* Initially hide all cards beyond the first 8 */

#catalog .grid .card:nth-child(n+9) {
    display: none;
}


/* Product header split: image + description */

.product-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}

.card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    -webkit-border-radius: 16px;
    -moz-border-radius: 16px;
    -ms-border-radius: 16px;
    -o-border-radius: 16px;
}

.card img {
    width: 100%;
    height: auto;
    display: block;
}

.card .body {
    padding: 14px
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px
}

.chip {
    background: #eef6f1;
    color: #064e3b;
    border: 1px solid #cdebd6;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    -webkit-border-radius: 999px;
    -moz-border-radius: 999px;
    -ms-border-radius: 999px;
    -o-border-radius: 999px;
}

.cta {
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #fff;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    margin: 15px;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    -ms-border-radius: 20px;
    -o-border-radius: 20px;
}


/* Ensure inner headings and paragraphs inside CTA have consistent spacing */

.cta h3,
.cta p {
    margin: 15px !important;
}

.cta .actions a {
    background: #fff;
    color: #053;
    padding: 12px 16px;
    border-radius: 12px;
    gap: 6px;
    margin: 8px;
    display: inline-block;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    -ms-border-radius: 12px;
    -o-border-radius: 12px;
}

.badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.badges img {
    height: 36px;
    background: #fff;
    border-radius: 8px;
    padding: 6px;
    border: 1px solid #e2e8f0;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    -ms-border-radius: 8px;
    -o-border-radius: 8px;
}


/* Compact certificate badges inside the hero section */

.hero .badges.certs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 8px 0 12px;
}

.hero .badges.certs img {
    height: 28px;
    padding: 4px 6px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

@media (min-width: 768px) {
    .hero .badges.certs img {
        height: 34px;
    }
}


/* Tidy KPIs for a cleaner compact look in this hero block */

.hero .kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.hero .kpi {
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
}

.contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px
}

form {
    display: grid;
    gap: 10px
}

input,
select,
textarea {
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font: inherit;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    -ms-border-radius: 12px;
    -o-border-radius: 12px;
}

button {
    margin: 5px;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--brand);
    color: #fff;
    border: 0;
    cursor: pointer;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    -ms-border-radius: 12px;
    -o-border-radius: 12px;
}

button:hover {
    filter: brightness(0.95);
    -webkit-filter: brightness(0.95);
}

footer {
    border-top: 1px solid #e2e8f0;
    padding: 24px 0;
    color: #475569
}

.note {
    font-size: 13px;
    color: #475569
}

.lang-toggle {
    display: flex;
    gap: 8px
}

.lang-toggle button {
    background: #eef2ff;
    color: #1e293b;
    border: 1px solid #c7d2fe;
    padding: 6px 10px;
    border-radius: 10px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
}


/* Modern theme toggle (dark/light) */

#theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}

#theme-toggle [data-icon] {
    width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
}

#theme-toggle [data-text] {
    display: inline-block;
}

#theme-toggle:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

#theme-toggle:active {
    transform: translateY(1px);
}

#theme-toggle:focus-visible {
    outline: 3px solid #a7f3d0;
    outline-offset: 2px;
}


/* Dark theme variant */

html[data-theme="dark"] #theme-toggle {
    background: #0b1220;
    color: #e2e8f0;
    border-color: #334155;
}

html[data-theme="dark"] #theme-toggle:hover {
    background: #0f172a;
    border-color: #475569;
}


/* Compact on mobile */

@media (max-width: 768px) {
    #theme-toggle {
        padding: 8px 10px;
    }
    #theme-toggle [data-text] {
        display: none;
    }
}

.whatsapp-fab {
    position: fixed;
    right: 16px;
    bottom: 16px;
    /* Visual */
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    width: clamp(52px, 6.5vw, 60px);
    height: clamp(52px, 6.5vw, 60px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .22), 0 4px 8px rgba(0, 0, 0, .12);
    border: none;
    /* Layout */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    /* Typography (hide label visually, aria-label remains for a11y) */
    font-size: 0;
    text-decoration: none;
    /* Interaction */
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
    z-index: 1100;
}

.whatsapp-fab::before {
    content: "";
    display: block;
    width: clamp(24px, 3vw, 28px);
    height: clamp(24px, 3vw, 28px);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    /* Inline SVG icon (white WhatsApp logo) */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="white"><path d="M19.11 17.57c-.26-.13-1.53-.76-1.77-.85-.24-.09-.42-.13-.6.13-.18.26-.69.85-.85 1.02-.16.18-.31.2-.57.07-.26-.13-1.08-.4-2.06-1.28-.76-.68-1.27-1.52-1.42-1.78-.15-.26-.02-.4.11-.53.11-.11.26-.29.38-.44.13-.15.17-.24.26-.4.09-.18.04-.33-.02-.46-.06-.13-.6-1.45-.82-1.98-.22-.53-.44-.45-.6-.46-.15-.01-.33-.01-.51-.01s-.46.07-.7.33c-.24.26-.92.9-.92 2.2 0 1.3.94 2.56 1.07 2.74.13.18 1.86 2.85 4.51 3.99.63.27 1.12.43 1.5.55.63.2 1.2.17 1.65.1.5-.08 1.53-.62 1.75-1.22.22-.6.22-1.12.15-1.22-.07-.1-.24-.16-.5-.29z"/><path d="M26.66 5.34C24.2 2.88 20.86 1.5 17.3 1.5 9.72 1.5 3.5 7.72 3.5 15.3c0 2.41.64 4.76 1.85 6.83L3.5 30.5l8.56-1.79c1.99 1.09 4.23 1.66 6.54 1.66 7.58 0 13.8-6.22 13.8-13.8 0-3.56-1.38-6.9-3.84-9.36zM17.6 27.5c-2.13 0-4.2-.57-6.02-1.66l-.43-.25-5.08 1.06 1.08-4.95-.26-.45c-1.14-1.93-1.74-4.15-1.74-6.4 0-6.9 5.61-12.5 12.5-12.5 3.34 0 6.47 1.3 8.83 3.66 2.36 2.36 3.66 5.49 3.66 8.83 0 6.9-5.61 12.5-12.5 12.5z"/></svg>');
}

.whatsapp-fab:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .25), 0 6px 12px rgba(0, 0, 0, .14);
    background-color: #1ebe5d;
}

.whatsapp-fab:active {
    transform: translateY(0) scale(0.98);
}

.whatsapp-fab:focus-visible {
    outline: 3px solid rgba(37, 211, 102, 0.5);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .whatsapp-fab {
        transition: none;
    }
    .whatsapp-fab:hover,
    .whatsapp-fab:active {
        transform: none;
    }
}

@media (max-width: 768px) {
    .whatsapp-fab {
        right: 12px;
    }
}

.btn-outline {
    display: inline-block;
    border: 1px solid #2d6a4f;
    color: #2d6a4f;
    border-radius: 12px;
    padding: 8px 12px;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    -ms-border-radius: 12px;
    -o-border-radius: 12px;
}


/* ==========================
   Full-screen Responsive Hero
   ========================== */

.hero-viewport {
    position: relative;
    width: 100%;
    height: 100vh;
    /* fallback */
    min-height: 100dvh;
    /* more stable on mobile to avoid bottom browser bar issues */
    overflow: hidden;
    display: grid;
    place-items: center;
    /* center content both axes */
    isolation: isolate;
    /* overlay stacking */
    /* Let letterbox adopt page theme */
    background: inherit;
    /* fallback under image */
}

/* Fallbacks if parent doesn't provide background via variables */
html[data-theme="light"] .hero-viewport { background: var(--bg, #ffffff); }
html[data-theme="dark"] .hero-viewport { background: var(--bg, #0b1220); }

@media (max-width: 900px) {
  /* Ensure mobile letterbox follows theme */
  .hero-viewport { background: inherit !important; }
}

.hero-viewport .hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-viewport .hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* keep proportions, fill */
    object-position: center;
    /* center crop */
    display: block;
}

.hero-viewport::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
    /* default dark overlay for readability; themed below */
    z-index: 1;
}

/* Theme-specific overlay tint for readability */
html[data-theme="light"] .hero-viewport::after {
  background: rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .hero-viewport::after {
  background: rgba(0, 0, 0, 0.32);
}

/* Ensure readability in light theme */
html[data-theme="light"] .hero-content {
  color: #0f172a;
  text-shadow: none;
}
html[data-theme="dark"] .hero-content {
  color: #ffffff;
}

/* Header brand visibility across themes */
html[data-theme="light"] header .logo,
html[data-theme="light"] header .brand-left {
  color: #0f172a;
}
html[data-theme="dark"] header .logo,
html[data-theme="dark"] header .brand-left {
  color: #e2e8f0;
}
html[data-theme="light"] .logo .badge,
html[data-theme="light"] .brand-left .brand-badge {
  background: #e6f4ea;
  color: #065f46;
  border-color: #bbf7d0;
}
html[data-theme="dark"] .logo .badge,
html[data-theme="dark"] .brand-left .brand-badge {
  background: rgba(255,255,255,0.08);
  color: #e2e8f0;
  border-color: rgba(255,255,255,0.18);
}

/* Make KPI chips and actions visible in light mode */
html[data-theme="light"] .hero-counters .kpi,
html[data-theme="light"] .hero-counters .actions a {
  background: rgba(15,23,42,0.08) !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06) !important;
}
html[data-theme="light"] .hero-counters .actions .btn-outline {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: clamp(12px, 3vw, 32px);
    color: #fff;
}

.hero-content h1 {
    margin: 0 0 10px;
    font-weight: 800;
    font-size: clamp(26px, 5.5vw, 52px);
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    letter-spacing: 0.2px;
}

.hero-content p {
    margin: 0;
    font-size: clamp(14px, 2.2vw, 20px);
    opacity: 0.95;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}


/* ==========================
   KPI overlay on hero image
   ========================== */

.hero-counters {
    position: absolute;
    left: 50%;
    bottom: clamp(16px, 6vh, 56px);
    transform: translateX(-50%);
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: min(92vw, 1100px);
}

.hero-counters .kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.hero-counters .kpi,
.hero-counters .actions a {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 10px 14px;
    text-align: center;
    backdrop-filter: blur(4px) saturate(120%);
    -webkit-backdrop-filter: blur(4px) saturate(120%);
}

.hero-counters .actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.hero-counters .actions .btn-outline {
    background: var(--brand);
    border-color: var(--brand);
    font-weight: 700;
}

.hero-counters .actions .btn-outline:hover {
    background: var(--brand-2);
    border-color: var(--brand-2);
}

@media (max-width: 900px) {
    .hero-counters {
        bottom: clamp(12px, 4vh, 36px);
    }
    .hero-counters .kpis {
        grid-template-columns: 1fr 1fr 1fr;
    }
}


/* ==========================
   Inline Hero Strip Layout
   ========================== */

.hero-inline {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    /* certs | kpis | side (note/actions) */
    align-items: center;
    gap: 16px;
    padding: 18px 0 8px;
    margin-top: clamp(12px, 3vw, 28px);
    /* space from the hero above */
}

.hero-inline .kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    /* override */
}

.hero-inline .side {
    justify-self: end;
    text-align: right;
}

.hero-inline .actions a {
    margin: 0 6px;
}


/* Add clear spacing between action buttons */

.hero-inline .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    /* space between buttons */
    justify-content: center;
}


/* Solid brand buttons inside the inline hero only */

.hero-inline .actions .btn-outline {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
    font-weight: 700;
}

.hero-inline .actions .btn-outline:hover {
    background: var(--brand-2);
    border-color: var(--brand-2);
}


/* Slightly more breathing room between KPI chips */

.hero-inline .kpis {
    gap: 12px;
}

@media (max-width: 900px) {
    .hero-inline {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-inline .side {
        justify-self: center;
        text-align: center;
    }
}

.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px
}

.filter-btn {
    border: 1px solid #cbd5e1;
    background: #2cb100;
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
}

.filter-btn.active {
    background: #2d6a4f;
    color: #fff;
    border-color: #2d6a4f;
    border: none;
    cursor: pointer;
    display: inline-block;
    opacity: 1;
    visibility: visible;
}

@media(max-width:900px) {
    .hero {
        grid-template-columns: 1fr
    }
    .grid {
        grid-template-columns: 1fr
    }
    /* Ensure 4-col grids also stack on mobile */
    .grid.grid-4 {
        grid-template-columns: 1fr
    }
    .contact {
        grid-template-columns: 1fr
    }
    /* Stack product image above description on smaller screens */
    .product-split {
        grid-template-columns: 1fr
    }
    /* Safety override for legacy inline grid blocks (two columns) */
    main .section>div[style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    /* Make hero not exceed viewport height beneath sticky header */
    .hero-viewport {
        height: auto;
        min-height: 85dvh;
    }
    /* Respect safe-area on mobile for FAB */
    .whatsapp-fab {
        bottom: max(16px, env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
    }
    /* Create breathing room so FAB doesn't overlap last content */
    body {
        padding-bottom: calc(16px + clamp(52px, 6.5vw, 60px) + env(safe-area-inset-bottom));
    }
}


/* Hide placeholder "Download Spec Sheet" blocks site-wide without editing each page */

.section p:has(>a[href="#"]) {
    display: none;
}

.section h3:has(+p:has(> a[href="#"])) {
    display: none;
}

.section hr:has(+h3+p:has(> a[href="#"])) {
    display: none;
}


/* تخطيط الديسكتوب: اسم الشركة يسار، الشعار (الصورة) في المنتصف، والقائمة يمين */

@media (min-width: 769px) {
    .nav {
        position: sticky;
        /* موجود بالفعل، يحافظ على السلوك */
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        padding: 10px 0;
        /* تقليل مساحة الناف على الديسكتوب */
    }
    /* Hide mobile-only close button on desktop */
    #navbar .nav-close {
        display: none !important;
    }
    /* عنصر على اليسار يحوي الاسم والشارة */
    .brand-left {
        grid-column: 1;
        justify-self: start;
        display: flex;
        align-items: center;
        gap: 10px;
        padding-left: 16px;
    }
    .brand-left .brand-name {
        font-weight: 800;
        color: var(--brand-2);
        font-size: 22px;
    }
    .brand-left .brand-badge {
        background: var(--accent);
        color: #053;
        padding: 2px 8px;
        border-radius: 999px;
        font-weight: 800;
        font-size: 12px;
        text-decoration: underline;
    }
    /* الشعار (الصورة) في المنتصف */
    .logo {
        grid-column: 2;
        justify-self: center;
    }
    .logo img {
        display: block;
        height: 72px !important;
        border-radius: 10px;
    }
    /* تكبير الشعار على الديسكتوب ليكون أوضح */
    /* إخفاء النص والشارة داخل اللوجو على الديسكتوب حتى تظهر الصورة فقط في الوسط */
    .logo span,
    .logo .badge {
        display: none;
    }
    /* القائمة يمين */
    #navbar {
        grid-column: 3;
        justify-self: end;
    }
    .menu-toggle {
        grid-column: 3;
        justify-self: end;
    }
    /* إبقاء روابط الناف في سطر واحد على الديسكتوب وعدم نزول زر الثيم/الترجمة */
    #navbar {
        display: flex;
        flex-wrap: nowrap;
        gap: 10px;
    }
    #navbar a,
    #navbar button {
        white-space: nowrap;
    }
}

/* Modern header nav link pills */
header #navbar {
  gap: 10px;
}
header #navbar a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  color: var(--text, inherit);
  border: 1px solid transparent;
  background: transparent;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .1s ease;
}
header #navbar a:hover {
  transform: translateY(-1px);
}
/* Theme-aware hover */
html[data-theme="light"] header #navbar a:hover {
  background: rgba(15, 23, 42, 0.06);
  border-color: #cbd5e1;
}
html[data-theme="dark"] header #navbar a:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}
/* Keyboard focus */
header #navbar a:focus-visible {
  outline: 3px solid #a7f3d0;
  outline-offset: 2px;
}
/* Active/current page hint if aria-current is set */
header #navbar a[aria-current="page"] {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(0,0,0,.10);
}

@media (max-width: 768px) {
  /* Better look in dropdown */
  header #navbar a {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
  }
}

/* Tighter header nav on desktop to keep logo centered visually */
@media (min-width: 769px) {
  header #navbar { gap: 4px; }
  header #navbar a { padding: 4px 8px; font-size: .9rem; }
}


/* على الموبايل: إظهار الاسم والشارة الأصليين وإخفاء pseudo */

@media (max-width: 768px) {
    .brand-left {
        display: none;
    }
    /* Keep logo parts (image + text + badge) on one line */
    .logo span,
    .logo .badge {
        display: inline;
    }
    .logo {
        font-size: 20px;
        max-width: calc(100% - 60px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .logo img {
        height: 48px !important;
    }
    .logo .badge {
        font-size: 12px;
        padding: 2px 8px;
    }
    /* Force header items to stay on one row on mobile (override earlier column layout) */
    .nav {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        padding: 12px 0;
        flex-wrap: nowrap;
    }
    .logo {
        flex: 1 1 auto;
        min-width: 0;
        gap: 8px;
        font-size: 20px;
    }
    .logo img {
        height: 48px !important;
    }
    .menu-toggle {
        flex: 0 0 auto;
        background: transparent !important;
        color: var(--text) !important;
        border: 1px solid #cbd5e1;
        padding: 8px 10px;
        border-radius: 12px;
        line-height: 1;
        box-shadow: none;
        font-size: 24px;
        margin: 0 !important;
        width: 44px;
        height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}


/* Reserve space for menu button on mobile */

@media (max-width: 768px) {
    .nav {
        padding-right: 48px;
    }
    /* Prevent children from wrapping to next line */
    .nav>* {
        flex-shrink: 0;
    }
}

/* Minimal anti-crop override for hero image on small screens */
@media (max-width: 768px) {
    .hero-viewport { height: 80dvh; min-height: 80dvh; padding-top: 0; }
    .hero-viewport .hero-bg { margin: 0; }
    .hero-viewport .hero-bg img {
        object-fit: contain !important;
        object-position: top center !important;
    }
    .hero-content { padding-top: 8px; }
}