/* ==========================================================================
   Public site — shared styles (every public page)
   Loaded after theme.css by renderPublicSiteHeader() (includes/public_site.php).
   A page's own styles are in assets/css/site/<page>.css.
   ========================================================================== */

/* The site's own palette (warm, marketing). Brand colour, status colours, font: theme.css.
   Colours used on several pages are named here once — pages use the names, not the codes. */
:root {
    --ink: #171717;
    --muted: #6b6761;
    --sand: #f2ede5;
    --paper: #fcfaf7;
    --line: rgba(23, 23, 23, 0.09);
    --accent: var(--color-primary);
    --accent-soft: color-mix(in srgb, var(--color-primary) 12%, transparent);
    --copper: #b36a3c;
    --copper-soft: rgba(179, 106, 60, 0.14);
    --shadow: 0 20px 70px rgba(23, 23, 23, 0.08);
    --max: 1240px;
    /* rounder than the admin panel (theme.css has 16 / 10) */
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;

    --input-line: #d5d9e0;      /* border of form fields */
    --info-soft: #edf5ff;       /* light blue panels */
    --success-soft: #defbe6;    /* "sent" / success background */
    --success-bright: #24a148;  /* WhatsApp button, "online" dot */
    --error-bg: #fff1f1;        /* error box: background, text, border */
    --error-ink: #750e13;
    --error-line: #ffd7d9;
    --error-text: #a2191f;      /* message under a wrong field */
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at top right, rgba(179, 106, 60, 0.11), transparent 28%),
        linear-gradient(180deg, #f8f4ee 0%, var(--paper) 28%, var(--paper) 100%);
    font-family: var(--font-sans);
    line-height: 1.6;
}

a {
    color: inherit;
}

.site-shell {
    min-height: 100vh;
}

/* ── Site header ─────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow .2s ease, background .2s ease;
}
.site-header.scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 6px 24px rgba(23, 23, 23, 0.07);
}

.site-header-inner,
.site-footer-inner {
    width: min(calc(100% - 32px), var(--max));
    margin: 0 auto;
}

.site-header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    color: #fff;
    font-size: .95rem;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--color-primary) 30%, transparent);
}
.brand-name { letter-spacing: -0.02em; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-logo { height: 40px; width: auto; max-width: 140px; object-fit: contain; display: block; }

.top-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.nav-link {
    position: relative;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: .93rem;
    font-weight: 600;
    color: #3d3d3d;
    white-space: nowrap;
    transition: color .15s, background .15s;
}
.top-nav .nav-link i { display: none; }
.nav-link:hover { color: var(--accent); background: var(--accent-soft); }
.nav-link.active { color: var(--accent); }
.top-nav .nav-link.active::after {
    content: "";
    position: absolute;
    inset-inline: 14px;
    bottom: -15px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--accent);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Dropdowns (language + account) */
.hdr-menu { position: relative; }
.hdr-btn {
    height: 40px;
    min-width: 40px;
    padding: 0 12px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    font: inherit;
    font-size: .88rem;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    transition: border-color .15s, color .15s;
}
.hdr-btn:hover, .hdr-btn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.hdr-btn .fa-angle-down { font-size: .75rem; transition: transform .2s; }
.hdr-btn[aria-expanded="true"] .fa-angle-down { transform: rotate(180deg); }
.hdr-btn.icon-only { padding: 0; width: 40px; }

.hdr-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    inset-inline-end: 0;
    min-width: 190px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(23, 23, 23, 0.12);
    padding: 6px;
    display: none;
    z-index: 100;
}
.hdr-dropdown.active { display: block; animation: hdr-in .15s ease-out; }
@keyframes hdr-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.hdr-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
    color: var(--ink);
}
.hdr-dropdown a:hover { background: var(--paper); color: var(--accent); }
.hdr-dropdown a.active { color: var(--accent); }
.hdr-dropdown a .fa-check { margin-inline-start: auto; font-size: .8rem; }
.hdr-dropdown a i:first-child { width: 18px; text-align: center; color: var(--muted); }
.hdr-dropdown .sep { height: 1px; background: var(--line); margin: 4px 6px; }

.hdr-cta {
    height: 40px;
    padding: 0 18px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: .9rem;
    white-space: nowrap;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--color-primary) 25%, transparent);
    transition: background .15s, transform .15s;
}
.hdr-cta:hover { background: var(--color-primary-hover); transform: translateY(-1px); }

/* Hamburger — hidden on desktop */
.nav-toggle {
    display: none;
    margin-inline-start: auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    color: var(--ink);
    font-size: 1.1rem;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Mobile drawer */
.mobile-nav { display: none; }

.site-main {
    width: min(calc(100% - 28px), var(--max));
    margin: 0 auto;
    padding: 34px 0 80px;
}

.page-intro {
    margin-bottom: 26px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--line);
}

.page-title {
    margin: 18px 0 10px;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 0.95;
    letter-spacing: -0.055em;
    font-weight: 800;
    max-width: 10ch;
}

.page-subtitle {
    max-width: 64ch;
    font-size: 1.05rem;
    color: var(--muted);
}

/* ── Content buttons (pill): one base; a page may change only the size ─────── */
.btn-solid,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: .95rem;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
}
.btn-solid { background: var(--accent); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }

/* Read by screen readers, not shown */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Square icon tile at the top of a card */
.icon-badge {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 14px;
}

/* Footer stays at the bottom of the screen on short pages */
.site-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.site-main { flex: 1 0 auto; }
.site-shell > .site-header, .site-shell > .clients-strip, .site-shell > .site-footer { flex-shrink: 0; }
/* ── "Trusted by" client logos (Admin → Our clients) ─────────────── */
.clients-strip { border-top: 1px solid var(--line); background: #fff; padding: 34px 0 30px; }
.cs-head { text-align: center; margin-bottom: 20px; }
.cs-head h2 { margin: 0; font-size: 1.15rem; letter-spacing: -0.01em; }
.cs-head p { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.cs-viewport { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.cs-track { display: flex; align-items: center; gap: 48px; width: max-content; }
.cs-viewport.is-moving .cs-track { animation: cs-scroll var(--cs-duration, 40s) linear infinite; }
.cs-viewport.is-moving:hover .cs-track, .cs-viewport.is-moving:focus-within .cs-track { animation-play-state: paused; }
[dir="rtl"] .cs-viewport.is-moving .cs-track { animation-name: cs-scroll-rtl; }
.cs-viewport.is-static { -webkit-mask-image: none; mask-image: none; }
.cs-viewport.is-static .cs-track { width: auto; flex-wrap: wrap; justify-content: center; gap: 28px 44px; }
@keyframes cs-scroll { to { transform: translateX(-50%); } }
@keyframes cs-scroll-rtl { to { transform: translateX(50%); } }
.cs-item { display: inline-flex; align-items: center; justify-content: center; height: 56px; min-width: 110px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.cs-item img { max-height: 52px; max-width: 150px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .7; transition: filter .25s ease, opacity .25s ease; }
.cs-item:hover img, .cs-item:focus-visible img { filter: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    .cs-viewport.is-moving .cs-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
    .cs-track [aria-hidden="true"] { display: none; }
}

/* ── Footer ───────────────────────────────────────────────────────── */
.site-footer { background: #111418; color: rgba(255, 255, 255, .72); font-size: .95rem; }
.site-footer a { color: rgba(255, 255, 255, .78); text-decoration: none; transition: color .2s ease; }
.site-footer a:hover, .site-footer a:focus-visible { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.25fr; gap: 36px; padding: 48px 0 36px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; color: #fff; font-weight: 700; font-size: 1.2rem; }
.footer-brand img { height: 44px; width: auto; max-width: 150px; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px; }
.footer-brand .brand-mark { width: 40px; height: 40px; }
.footer-about { margin: 0 0 18px; line-height: 1.7; max-width: 36ch; }
.footer-col h3 { margin: 0 0 14px; color: #fff; font-size: .98rem; letter-spacing: .01em; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.footer-contact i { width: 18px; margin-top: 3px; color: var(--color-primary); filter: brightness(1.35); flex: none; text-align: center; }
.footer-social { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); }
.footer-social a:hover { background: var(--color-primary); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); }
.footer-bottom .site-footer-inner { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; align-items: center; padding: 18px 0 22px; font-size: .88rem; color: rgba(255, 255, 255, .55); }
.footer-bottom a { color: rgba(255, 255, 255, .7); }
.powered-by strong { color: #fff; font-weight: 600; }
.to-top { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; } .footer-col-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px 18px; padding: 36px 0 26px; }
    .footer-col-contact { grid-column: 1 / -1; }
    .footer-bottom .site-footer-inner { flex-direction: column; text-align: center; }
    .cs-track { gap: 34px; }
    .cs-item img { max-height: 40px; max-width: 120px; }
    .footer-col ul a { display: inline-block; padding: 6px 0; min-height: 36px; }
    .footer-bottom a { display: inline-block; padding: 8px 4px; }
}

@media (max-width: 960px) {
    .top-nav,
    .header-actions { display: none; }
    .nav-toggle { display: inline-flex; }
    .site-header-inner { height: 62px; }

    .mobile-nav {
        border-top: 1px solid var(--line);
        background: #fff;
        max-height: calc(100vh - 62px);
        overflow-y: auto;
        box-shadow: 0 18px 30px rgba(23, 23, 23, 0.08);
    }
    .mobile-nav.open { display: block; animation: hdr-in .18s ease-out; }
    .mobile-nav-inner {
        width: min(calc(100% - 32px), var(--max));
        margin: 0 auto;
        padding: 12px 0 20px;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    .mobile-nav .nav-link {
        justify-content: flex-start;
        padding: 13px 12px;
        font-size: 1rem;
        border-radius: 12px;
    }
    .mobile-nav .nav-link i { width: 22px; text-align: center; color: var(--muted); }
    .mobile-nav .nav-link.active { background: var(--accent-soft); }
    .mobile-nav .nav-link.active i { color: var(--accent); }
    .mobile-nav .hdr-cta { justify-content: center; height: 48px; margin: 10px 0 4px; font-size: 1rem; }
    .mobile-nav-divider { height: 1px; background: var(--line); margin: 10px 0; }
    .mobile-label { font-size: .78rem; font-weight: 700; color: var(--muted); padding: 0 12px 6px; }

    .mobile-lang-row { display: flex; gap: 8px; padding: 0 4px; }
    .mobile-lang-row a {
        flex: 1;
        text-align: center;
        padding: 10px 8px;
        border-radius: 10px;
        text-decoration: none;
        font-weight: 600;
        font-size: .9rem;
        border: 1px solid var(--line);
        color: var(--ink);
    }
    .mobile-lang-row a.active { background: var(--accent); color: #fff; border-color: var(--accent); }

    .mobile-nav .account-link {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px;
        border-radius: 12px;
        text-decoration: none;
        font-weight: 600;
        color: var(--muted);
    }
    .mobile-nav .account-link:hover { background: var(--paper); color: var(--accent); }
}

@media (max-width: 760px) {
    .page-title { max-width: none; }
    .site-main { padding-top: 20px; }
}

/* ── Contact button + popup (includes/contact_widget.php) ────────────────── */
.cw-fab {
    position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 900;
    display: inline-flex; align-items: center; gap: 10px;
    padding: 13px 20px 13px 18px; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--color-primary); color: #fff; font: inherit; font-weight: 700; font-size: .95rem;
    box-shadow: 0 10px 28px color-mix(in srgb, var(--color-primary) 35%, transparent), 0 2px 6px rgba(0, 0, 0, 0.12);
    transition: transform .2s, box-shadow .2s, background .2s;
}
.cw-fab:hover { transform: translateY(-2px); background: var(--color-primary-hover); box-shadow: 0 14px 34px color-mix(in srgb, var(--color-primary) 42%, transparent); }
.cw-fab:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px var(--color-primary); }
.cw-fab i { font-size: 1.15rem; }
.cw-fab .cw-dot { position: absolute; top: 6px; inset-inline-end: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--success-bright); border: 2px solid #fff; }

.cw-dialog {
    width: min(460px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 0;
    border-radius: 20px; background: #fff; color: var(--color-text); overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}
.cw-dialog[open] { animation: cw-in .22s ease-out; }
.cw-dialog::backdrop { background: rgba(17, 24, 39, 0.5); backdrop-filter: blur(3px); }
@keyframes cw-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

.cw-head { position: relative; padding: 22px 24px 18px; background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover)); color: #fff; }
.cw-head h2 { margin: 0 0 4px; font-size: 1.25rem; }
.cw-head p { margin: 0; color: rgba(255, 255, 255, 0.85); font-size: .88rem; display: flex; align-items: center; gap: 6px; }
.cw-head p::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #42be65; flex: none; }
.cw-close {
    position: absolute; top: 14px; inset-inline-end: 14px; width: 34px; height: 34px; border-radius: 50%;
    border: 0; background: rgba(255, 255, 255, 0.16); color: #fff; cursor: pointer; font-size: 1rem;
    display: grid; place-items: center; transition: background .15s;
}
.cw-close:hover { background: rgba(255, 255, 255, 0.3); }

.cw-body { padding: 18px 24px 22px; overflow-y: auto; max-height: calc(100vh - 140px); }
.cw-channels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cw-channel {
    display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px;
    border: 1px solid var(--color-border); border-radius: 14px; text-decoration: none; color: var(--color-text);
    font-size: .82rem; font-weight: 600; transition: all .15s;
}
.cw-channel i { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 1.05rem; }
.cw-channel.wa i { background: #e6f9ee; color: #128c4b; }
.cw-channel.tel i { background: var(--info-soft); color: var(--color-primary); }
.cw-channel.mail i { background: #fff4e6; color: var(--copper); }
.cw-channel:hover { border-color: var(--color-primary); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06); }

.cw-or { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; color: #6f7782; font-size: .8rem; }
.cw-or::before, .cw-or::after { content: ""; flex: 1; height: 1px; background: var(--color-border); }

.cw-form { display: grid; gap: 12px; }
.cw-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cw-field { display: grid; gap: 5px; }
.cw-field label { font-size: .82rem; font-weight: 600; }
.cw-field input, .cw-field select, .cw-field textarea {
    width: 100%; border: 1px solid var(--input-line); border-radius: 10px; background: #fff; color: inherit;
    padding: 10px 12px; font: inherit; font-size: .92rem; transition: border-color .15s, box-shadow .15s;
}
.cw-field textarea { min-height: 96px; resize: vertical; }
.cw-field input:focus, .cw-field select:focus, .cw-field textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent); }
.cw-field.invalid input, .cw-field.invalid select, .cw-field.invalid textarea { border-color: var(--color-danger); }
.cw-err { color: var(--error-text); font-size: .76rem; min-height: 0; }
.cw-err:empty { display: none; }
.cw-hint { color: #6f7782; font-size: .76rem; margin-top: -4px; }
.cw-hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cw-alert { padding: 10px 12px; border-radius: 10px; background: var(--error-bg); color: var(--error-ink); border: 1px solid var(--error-line); font-size: .84rem; }
.cw-alert:empty { display: none; }
.cw-consent { margin: 10px 0 0; font-size: .8rem; color: #6b7280; text-align: center; line-height: 1.5; } .cw-consent a { color: var(--color-primary); } .cw-submit {
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
    padding: 12px; border: 0; border-radius: 12px; cursor: pointer;
    background: var(--color-primary); color: #fff; font: inherit; font-weight: 700; font-size: .95rem; transition: background .15s;
}
.cw-submit:hover:not(:disabled) { background: var(--color-primary-hover); }
.cw-submit:disabled { opacity: .6; cursor: wait; }

.cw-success { text-align: center; padding: 26px 8px 10px; }
.cw-success .cw-check { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: var(--success-soft); color: var(--color-success); font-size: 1.7rem; }
.cw-success h3 { margin: 0 0 6px; font-size: 1.15rem; }
.cw-success p { margin: 0 0 18px; color: #6f7782; }
.cw-link { background: none; border: 0; color: var(--color-primary); font: inherit; font-weight: 600; cursor: pointer; }
.cw-dialog [hidden] { display: none !important; }

@media (max-width: 600px) {
    .cw-fab { padding: 0; width: 56px; height: 56px; justify-content: center; bottom: 16px; inset-inline-end: 16px; }
    .cw-fab .cw-label { display: none; }
    .cw-fab i { font-size: 1.35rem; }
    .cw-dialog { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
    .cw-dialog[open] { animation-name: cw-up; }
    .cw-row { grid-template-columns: 1fr; }
    .cw-body { max-height: calc(92vh - 110px); }
}
@keyframes cw-up { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cw-dialog[open], .cw-fab { animation: none; transition: none; } }
@media print { .cw-fab, .cw-dialog { display: none !important; } }
