/* ================================================================
   Barcode Syria - website styles
   Same colors and look as the Android app (App.xaml).
   Bootstrap 5 (RTL) does the layout; this file adds the app's look.
   ================================================================ */

@font-face {
    font-family: "Cairo";
    src: url("../fonts/Cairo-Regular.ttf") format("truetype");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Cairo";
    src: url("../fonts/Cairo-Bold.ttf") format("truetype");
    font-weight: 700;
    font-display: swap;
}

/* ---------- Colors (shades of green, like the app) ---------- */
:root {
    --primary: #0B6B3A;
    --primary-dark: #064D29;
    --primary-light: #2E9E5B;
    --primary-soft: #E6F4EC;
    --text-dark: #12261B;
    --text-muted: #5D7268;
    --danger: #C62828;
    --warning: #B26A00;
    --page-bg: #F2F7F4;
    --card-border: #DCEBE2;
}

body {
    font-family: "Cairo", sans-serif;
    background: var(--page-bg);
    color: var(--text-dark);
    min-height: 100vh;
}

a { color: var(--primary); }

.ltr { direction: ltr; unicode-bidi: isolate; }
/* English text in an Arabic page: left-to-right, but aligned to the right like the Arabic */
.ltr-right { direction: ltr; text-align: right; }
.text-muted-app { color: var(--text-muted) !important; }

/* Limits the content width on big screens (the app is a phone screen) */
.page-width {
    max-width: 720px;
    margin-inline: auto;
}

/* ---------- Buttons ---------- */
.btn-app {
    background: var(--primary);
    border: 0;
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    border-radius: 14px;
    padding: .75rem 1rem;
}
.btn-app:hover, .btn-app:focus { background: var(--primary-dark); color: #fff; }
.btn-app:disabled { background: var(--primary-light); color: #fff; }

.btn-app-light {
    background: var(--primary-light);
}

.btn-app-soft {
    background: var(--primary-soft);
    color: var(--primary-dark);
    border: 0;
    border-radius: 14px;
    font-weight: 700;
    padding: .75rem 1rem;
}
.btn-app-soft:hover { background: #d4ecde; color: var(--primary-dark); }

/* ---------- White rounded card ---------- */
.app-card {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 16px;
}

.card-title-app {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: .5rem;
}

/* ================================================================
   Header (green, rounded bottom)
   ================================================================ */
.app-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-radius: 0 0 32px 32px;
    padding: 22px 16px 26px;
}
/* On the home page the scan card overlaps the header */
.app-header.header-tall { padding-bottom: 64px; }

/* Top row: ☰ (phones) | title | animated logo */
.header-row {
    max-width: 720px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-header .site-title {
    font-weight: 700;
    font-size: 1.5rem;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}

.app-header .subtitle {
    color: #CDEBD9;
    font-size: .85rem;
    text-align: center;
    margin: 14px 0 0;
}

.btn-menu {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 0;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
}
.btn-menu:hover { background: rgba(255, 255, 255, .25); }

/* Page title under the header (inner pages) */
.page-heading {
    font-weight: 700;
    color: #fff;
    text-align: center;
    font-size: 1.15rem;
    margin: 12px 0 0;
}

/* ---------- Small animated logo (bars waving + green laser) ---------- */
.mini-logo {
    width: 48px;
    height: 48px;
    padding: 5px;
    border-radius: 14px;
    border: 1px solid rgba(40, 199, 111, .2);
    background: radial-gradient(circle at 50% 40%, #0E3B24 0%, #06170E 100%);
    position: relative;
    overflow: hidden;
    direction: ltr;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Barcode bars: used by the mini logo and by the loading screen */
.bars {
    display: flex;
    align-items: flex-end;
    gap: 1px;
    height: 30px;
}
.bars span {
    display: block;
    background: #E8FFF1;
    border-radius: 1px;
    animation: bar-wave 1.4s ease-in-out infinite;
}

@keyframes bar-wave {
    0%, 100% { height: 30%; opacity: .55; }
    50%      { height: 100%; opacity: 1; }
}

/* Green laser that goes down and up */
.laser {
    position: absolute;
    left: 6px;
    right: 6px;
    top: 50%;
    height: 2px;
    background: #3DFF8F;
    border-radius: 1px;
    box-shadow: 0 0 6px 2px rgba(61, 255, 143, .35);
    animation: laser-move 2.4s ease-in-out infinite;
}

@keyframes laser-move {
    0%, 100% { transform: translateY(-15px); }
    50%      { transform: translateY(15px); }
}

/* ================================================================
   Side menu (Bootstrap offcanvas)
   ================================================================ */
.side-menu .offcanvas-header {
    background: var(--primary);
    color: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 28px 20px 20px;
}
.side-menu .menu-logo {
    width: 64px;
    height: 64px;
    background: #fff;
    border-radius: 16px;
    padding: 6px;
}
.side-menu .menu-title {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 2px;
    direction: ltr;
}
/* Menu header (phones and computers): green like the page header, with a small map of Syria
   (map data: Natural Earth, public domain). No logo: the page header has one */
.side-menu .offcanvas-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    height: 128px;
    padding: 18px 20px;
    justify-content: center;
    align-items: center;
}
.side-menu .menu-logo,
.side-menu .menu-title { display: none; }
.side-menu .menu-map {
    display: block;
    height: 92px;
    width: auto;
    margin: 0 auto;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .25));
}

.side-menu .nav-link {
    color: var(--text-dark);
    font-size: 1rem;
    padding: 14px 12px;
    border-radius: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
}
.side-menu .nav-link:hover,
.side-menu .nav-link.active { background: var(--primary-soft); color: var(--primary-dark); }

/* ================================================================
   Home page
   ================================================================ */
.scan-card {
    margin: -48px 16px 0;
    padding: 20px;
    border: 0;
    border-radius: 24px;
    box-shadow: 0 6px 18px rgba(6, 77, 41, .18);
    cursor: pointer;
    position: relative;
}

/* Box with corner brackets, logo and moving scan line */
.scan-frame {
    width: 190px;
    height: 120px;
    margin: 0 auto 18px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.scan-frame .corner {
    position: absolute;
    width: 28px;
    height: 28px;
    border-color: var(--primary);
    border-style: solid;
    border-width: 0;
}
.scan-frame .tl { top: 0; left: 0; border-top-width: 4px; border-left-width: 4px; border-top-left-radius: 4px; }
.scan-frame .tr { top: 0; right: 0; border-top-width: 4px; border-right-width: 4px; border-top-right-radius: 4px; }
.scan-frame .bl { bottom: 0; left: 0; border-bottom-width: 4px; border-left-width: 4px; border-bottom-left-radius: 4px; }
.scan-frame .br { bottom: 0; right: 0; border-bottom-width: 4px; border-right-width: 4px; border-bottom-right-radius: 4px; }
.scan-frame img { width: 88px; height: 88px; opacity: .9; }

.scan-line {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 50%;
    height: 3px;
    background: #1FCB6A;
    border-radius: 2px;
    box-shadow: 0 0 8px 4px rgba(46, 158, 91, .25);
    animation: scan-move 3.2s ease-in-out infinite;
}

@keyframes scan-move {
    0%, 100% { transform: translateY(-44px); }
    50%      { transform: translateY(44px); }
}

.scan-button {
    background: var(--primary-dark);
    color: #fff;
    border-radius: 14px;
    height: 46px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* "or" divider */
.divider-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 32px 14px;
    color: var(--text-muted);
    font-size: .85rem;
}
.divider-or::before,
.divider-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #D3E4DA;
}

/* On big screens there is no scan card, so the entry overlaps the header */
.search-pill {
    margin: 0 16px;
    padding: 4px 6px 4px 14px;
    border-radius: 30px;
    box-shadow: 0 3px 10px rgba(6, 77, 41, .08);
    display: flex;
    align-items: center;
    gap: 8px;
}
.search-pill input {
    border: 0;
    outline: none;
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 1.1rem;
    direction: ltr;
    background: transparent;
}
.btn-round-search {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 0;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.btn-round-search:hover { background: var(--primary-dark); }

.trust-strip {
    background: var(--primary-soft);
    color: var(--primary-dark);
    border-radius: 14px;
    padding: 8px 12px;
    font-size: .85rem;
    display: inline-block;
}

.about-box {
    margin: 16px 16px 0;
    padding: 18px 20px;
    border: 1px solid #CFE6D8;
    border-radius: 22px;
    background: linear-gradient(180deg, #FFFFFF 0%, #EAF6EF 100%);
    text-align: center;
}
.about-box h2 { font-size: 1.15rem; font-weight: 700; color: var(--primary-dark); }
.about-box .bar { width: 40px; height: 3px; background: var(--primary-light); border-radius: 2px; margin: 8px auto; }
.about-box p { color: var(--text-muted); line-height: 1.8; margin: 0; }

/* ================================================================
   Loading screen (dark, waving bars, laser, typed digits)
   ================================================================ */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: radial-gradient(circle at 50% 40%, #0E3B24 0%, #06170E 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
}
.loading-overlay.show { opacity: 1; visibility: visible; }

.loading-frame {
    width: 150px;
    height: 95px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: ltr;
}
.loading-frame .corner {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 0 solid var(--primary-light);
}
.loading-frame .tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.loading-frame .tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.loading-frame .bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.loading-frame .br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
.loading-frame .bars { height: 75px; gap: 2px; }
.loading-frame .laser { animation-name: laser-move-big; }

@keyframes laser-move-big {
    0%, 100% { transform: translateY(-40px); }
    50%      { transform: translateY(40px); }
}

.loading-digits {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 3px;
    color: #9FE8BD;
    margin-top: 18px;
    height: 30px;
    direction: ltr;
}
.loading-text { color: #D8EFE2; font-size: .9rem; }
.loading-dots { display: inline-block; width: 20px; text-align: start; }

/* ================================================================
   Result page
   ================================================================ */
.status-box {
    border-radius: 18px;
    padding: 18px;
    color: #fff;
    text-align: center;
}
.status-box img { width: 64px; height: 64px; }
.status-box h1 { font-size: 1.3rem; font-weight: 700; margin: 4px 0; }
.status-box p { margin: 0; font-size: .9rem; }
.status-box .barcode { font-size: 1rem; margin-top: 6px; direction: ltr; }

.status-success  { background: var(--primary); }
.status-frozen   { background: var(--warning); }
.status-canceled,
.status-notfound { background: var(--danger); }

.product-name { font-size: 1.3rem; font-weight: 700; color: var(--primary-dark); }
.company-ar { font-size: 1.05rem; font-weight: 700; }
.company-en { font-size: .9rem; color: var(--text-muted); direction: ltr; text-align: end; }

.tag {
    display: inline-block;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 12px;
    padding: 3px 10px;
    font-size: .78rem;
    margin: 0 0 6px 6px;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-weight: 700;
}
.contact-row .value { direction: ltr; unicode-bidi: isolate; }
.contact-row a { text-decoration: underline; }

.info-item { margin-bottom: 10px; }
.info-item .label { font-size: .78rem; color: var(--text-muted); }
.info-item .value { font-weight: 700; white-space: pre-line; }
.info-item .value.ltr { text-align: end; }

/* ---------- Drug information window ---------- */
.drug-modal .modal-content { border-radius: 20px; border: 1px solid var(--card-border); }
.drug-modal .modal-title { font-weight: 700; color: var(--primary-dark); }
.disclaimer-box {
    border: 1px solid #E0A040;
    background: #FFF6E5;
    color: #8A5300;
    border-radius: 12px;
    padding: 10px;
    font-size: .85rem;
}
.prescription-box {
    background: var(--danger);
    color: #fff;
    border-radius: 10px;
    padding: 6px 10px;
    font-weight: 700;
    text-align: center;
}

/* ================================================================
   Company directory
   ================================================================ */
.filter-label { font-size: .82rem; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; }
.form-soft {
    background: var(--primary-soft);
    border: 0;
    border-radius: 14px;
    padding: .6rem .9rem;
}
.form-soft:focus { background: var(--primary-soft); box-shadow: 0 0 0 .2rem rgba(11, 107, 58, .2); }

.company-card {
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    display: flex;
    gap: 10px;
    transition: box-shadow .15s;
}
.company-card:hover { box-shadow: 0 4px 14px rgba(6, 77, 41, .12); }

.status-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.status-icon img { width: 24px; height: 24px; }

.company-name { font-weight: 700; color: var(--primary-dark); }
.badge-status { border-radius: 10px; padding: 2px 10px; font-size: .75rem; color: #fff; font-weight: 400; }
.company-small { font-size: .82rem; color: var(--text-muted); }
.company-contact a { font-size: .88rem; display: block; }

/* ================================================================
   Camera scanner (mobile only)
   ================================================================ */
.scanner-modal .modal-content { background: #000; }
.scanner-video-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.scanner-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Guide box in the middle of the camera */
.scanner-guide {
    position: absolute;
    width: 80%;
    max-width: 340px;
    height: 160px;
    border: 3px solid #3DFF8F;
    border-radius: 16px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, .45);
}
.scanner-guide .laser { left: 8px; right: 8px; animation-name: laser-move-scanner; }

@keyframes laser-move-scanner {
    0%, 100% { transform: translateY(-65px); }
    50%      { transform: translateY(65px); }
}

.scanner-hint { color: #fff; text-align: center; padding: 14px; }

/* ---------- Footer ---------- */
.site-footer {
    color: var(--text-muted);
    font-size: .8rem;
    text-align: center;
    padding: 24px 16px;
}


/* ================================================================
   Bigger screens (768px and up): side menu always shown on the right,
   no ☰ button, bigger logo on the left of the header
   ================================================================ */
@media (min-width: 768px) {
    body { padding-right: 260px; }

    .side-menu {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 260px;
        background: #fff;
        box-shadow: -2px 0 12px rgba(6, 77, 41, .08);
        display: flex;
        flex-direction: column;
        z-index: 1000;
    }
    /* Bootstrap hides the menu header on big screens: show it */
    .side-menu .offcanvas-header { display: flex; }
    .side-menu .offcanvas-body { padding: 8px !important; }

    /* Rounded only at the bottom-left: the right side touches the menu */
    .app-header { border-radius: 0 0 0 32px; }
    .app-header .subtitle { margin-top: 26px; }

    .header-row { max-width: none; padding: 0 8px; }

    .mini-logo { width: 80px; height: 80px; border-radius: 18px; padding: 8px; }
    .mini-logo .bars { height: 50px; gap: 2px; }
}

/* ================================================================
   Pages look (phones and computers): soft background, hero cards,
   features, directory cards. Computer sizes are in the @media blocks below.
   ================================================================ */
body {
    background:
        radial-gradient(circle at 15% 20%, rgba(46, 158, 91, .08) 0, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(11, 107, 58, .06) 0, transparent 45%),
        var(--page-bg);
    background-attachment: fixed;
}

/* The page title is inside the page, not in the header */
.app-header.title-in-page .page-heading { display: none; }

.home-width { max-width: 720px; margin-inline: auto; padding: 0 14px; }

/* ---------- Hero card (home, directory, about, privacy) ---------- */
.hero,
.dir-hero {
    background: linear-gradient(135deg, #FFFFFF 0%, #F1FAF5 100%);
    border: 1px solid var(--card-border);
    border-radius: 24px !important;
    box-shadow: 0 10px 30px rgba(6, 77, 41, .08) !important;
    padding: 22px 18px !important;
}
.hero { margin-top: 16px; }
.dir-hero { margin-bottom: 16px !important; }

.hero-badge {
    display: inline-block;
    background: var(--primary-soft);
    color: var(--primary-dark);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: .8rem;
    font-weight: 700;
}
.hero-text h1 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 12px 0 6px;
    line-height: 1.5;
}
.hero-text p {
    color: var(--text-muted);
    font-size: .95rem;
    margin-bottom: 16px;
}
.hero-hint { color: var(--text-muted); font-size: .8rem; margin-top: 10px; text-align: center; }

/* Inside the hero the scan card and the search box are flat (the hero is the card) */
.hero .scan-card {
    margin: 0;
    border: 1px solid var(--card-border);
    box-shadow: 0 4px 14px rgba(6, 77, 41, .08);
}
.hero .divider-or { margin: 18px 12px 12px; }
.hero .search-pill {
    margin: 0;
    border: 2px solid var(--card-border);
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
}
.hero .search-pill:focus-within {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(46, 158, 91, .12);
}
.hero .btn-round-search { width: 44px; height: 44px; }

/* ---------- Features ---------- */
.features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 16px;
}
.feature {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 16px;
    color: var(--text-dark);
    text-decoration: none;
    transition: transform .15s, box-shadow .15s;
    /* phones: icon on the right, text beside it */
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 14px;
    align-items: start;
}
.feature:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(6, 77, 41, .1); color: var(--text-dark); }
.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    grid-row: span 3;
}
.feature h3 { font-size: 1.05rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 4px; }
.feature p { color: var(--text-muted); font-size: .9rem; margin: 0; line-height: 1.8; }
.feature-link { display: inline-block; margin-top: 6px; color: var(--primary); font-weight: 700; font-size: .9rem; }

/* ---------- Result page: phones one column, "بحث جديد" at the end like the app ---------- */
.result-layout { max-width: 720px; margin-inline: auto; display: flex; flex-direction: column; gap: 1rem; }
.result-side, .result-details { display: contents; }
.result-layout .new-search { order: 10; }

.status-box { box-shadow: 0 10px 26px rgba(6, 77, 41, .15); border-radius: 22px; }
.status-box .barcode {
    display: inline-block;
    background: rgba(255, 255, 255, .18);
    border-radius: 12px;
    padding: 4px 14px;
    margin-top: 10px;
    letter-spacing: 2px;
}
.result-details .app-card,
.result-layout > .app-card { box-shadow: 0 4px 14px rgba(6, 77, 41, .05); }

/* ---------- Directory ---------- */
.directory-layout { max-width: 720px; margin-inline: auto; }
.dir-hero .form-soft { padding: .7rem 1rem; }

#count-label {
    display: inline-block;
    background: var(--primary-soft);
    color: var(--primary-dark) !important;
    font-weight: 700;
    border-radius: 20px;
    padding: 4px 14px;
    margin-bottom: 12px !important;
}

#company-list { display: grid; gap: 10px; }
#company-list .company-card { margin-bottom: 0; }
.company-card {
    border-radius: 20px;
    gap: 14px;
    box-shadow: 0 4px 14px rgba(6, 77, 41, .05);
    transition: transform .15s, box-shadow .15s;
}
.company-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(6, 77, 41, .1); }
.company-card .status-icon { width: 44px; height: 44px; }
.company-card .status-icon img { width: 26px; height: 26px; }

/* ================================================================
   Computers (768px and up): bigger sizes and two-column layouts
   ================================================================ */
@media (min-width: 768px) {
    .home-width { max-width: 1040px; padding: 0 24px; }

    .hero {
        margin-top: 32px;
        border-radius: 28px !important;
        padding: 40px 44px !important;
        display: grid;
        grid-template-columns: 1.25fr 1fr;
        gap: 32px;
        align-items: center;
    }
    .dir-hero {
        border-radius: 28px !important;
        padding: 36px 40px !important;
        margin-bottom: 22px !important;
    }
    .hero-badge { font-size: .85rem; }
    .hero-text h1 { font-size: 2rem; margin-top: 14px; }
    .hero-text p { font-size: 1.05rem; margin-bottom: 22px; }
    .dir-hero .hero-text p { margin-bottom: 20px; }
    .hero .search-pill { max-width: 480px; }
    .hero .search-pill input { font-size: 1.05rem; }
    .hero-hint { text-align: start; }

    /* ---------- Picture: logo in a scan frame + two status chips ---------- */
    .hero-art {
        position: relative;
        justify-content: center;
        align-items: center;
        min-height: 260px;
        background: radial-gradient(circle at 50% 45%, #0E3B24 0%, #06170E 100%);
        border-radius: 24px;
    }
    .scan-frame-big { width: 230px; height: 170px; margin: 0; }
    .scan-frame-big .corner { border-color: #3DFF8F; }
    .scan-frame-big img {
        width: 120px;
        height: 120px;
        opacity: 1;
        background: #fff;
        border-radius: 22px;
        padding: 10px;
    }
    .scan-frame-big .scan-line { animation-name: scan-move-big; }

    @keyframes scan-move-big {
        0%, 100% { transform: translateY(-70px); }
        50%      { transform: translateY(70px); }
    }

    .art-chip {
        position: absolute;
        display: flex;
        align-items: center;
        gap: 6px;
        color: #fff;
        font-size: .8rem;
        font-weight: 700;
        border-radius: 20px;
        padding: 5px 12px 5px 14px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
    }
    .art-chip img { width: 18px; height: 18px; }
    .chip-ok   { background: var(--primary); top: 22px; right: 18px; }
    .chip-warn { background: var(--warning); bottom: 22px; left: 18px; }

    /* Features: three cards side by side, icon on top */
    .features { grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px; }
    .feature { display: block; padding: 24px; border-radius: 22px; }
    .feature-icon { width: 52px; height: 52px; font-size: 1.6rem; margin-bottom: 14px; }
    .feature h3 { font-size: 1.1rem; }
    .feature p { font-size: .92rem; }
    .feature-link { margin-top: 10px; }

    /* Result: status on the right, details on the left */
    .result-layout {
        max-width: 1100px;
        padding: 32px 24px !important;
        display: grid;
        grid-template-columns: 340px 1fr;
        align-items: start;
        gap: 24px;
    }
    .result-side {
        display: flex;
        flex-direction: column;
        gap: 14px;
        position: sticky;
        top: 24px;
    }
    .result-details { display: flex; flex-direction: column; gap: 16px; }
    .result-layout .new-search { order: 0; }

    .status-box { padding: 30px 20px; border-radius: 24px; }
    .status-box img { width: 84px; height: 84px; }
    .status-box h1 { font-size: 1.35rem; margin-top: 10px; }
    .status-box .barcode { margin-top: 12px; }

    .result-details .app-card { border-radius: 22px; padding: 22px 24px; }
    .product-name { font-size: 1.6rem; }

    .directory-layout { max-width: 1100px; padding: 32px 24px !important; }

    #count-label { margin-bottom: 14px !important; }
    .company-card { padding: 20px; }
    .company-card .status-icon { width: 46px; height: 46px; }
    .company-card .status-icon img { width: 28px; height: 28px; }
    .company-name { font-size: 1.05rem; }
}

/* Two companies per row when there is room */
@media (min-width: 1100px) {
    #company-list { grid-template-columns: 1fr 1fr; gap: 14px; }
}

/* ================================================================
   Moving text under the header (see CONFIG.SHOW_MARQUEE)
   ================================================================ */
.site-marquee {
    overflow: hidden;
    margin: 12px 14px 0;
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 6px;
    color: var(--primary-dark);
    font-size: .92rem;
    white-space: nowrap;
    align-items: center;
    gap: 10px;
}
/* Fixed label on the right ("موقع مجاني") */
.marquee-label {
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-weight: 700;
    border-radius: 10px;
    padding: 3px 14px;
}
/* Only the text after the label moves */
.marquee-window {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}
.marquee-track {
    display: inline-flex;
    animation: marquee-move 28s linear infinite;   /* smaller = faster */
}
.site-marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { padding-inline: 48px; }

/* Arabic reads right to left, so the text moves to the right */
@keyframes marquee-move {
    from { transform: translateX(0); }
    to   { transform: translateX(50%); }
}

@media (min-width: 768px) {
    .site-marquee { margin: 14px 24px 0; }
}
@media (max-width: 767.98px) {
    .site-marquee { font-size: .85rem; }
    .marquee-label { padding: 2px 10px; }
}

/* "إزالة الفلاتر" on one line on small phones */
#clear-button { white-space: nowrap; padding-inline: .4rem; font-size: .9rem; }
