/* ============================================================================
   Kodevix — Smart Profile (public page + directory)
   Standalone sheet: these pages render without _Layout, so tokens live here.
   RTL-safe: logical properties only (margin-inline / inset-inline-*), never left/right.
   ============================================================================ */

:root {
    --pf-accent: #6a4fd6;
    --pf-font: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --pf-ink: #17151f;
    --pf-muted: #6b7090;
    --pf-bg: #f4f4f9;
    --pf-card: #ffffff;
    --pf-line: #e9e9f2;
    --pf-soft: #f6f5fc;
    --pf-shadow: 0 4px 20px rgba(24, 27, 53, .07);
    --pf-shadow-lg: 0 18px 50px rgba(24, 27, 53, .14);
    --pf-radius: 18px;
    --pf-ease: cubic-bezier(.4, 0, .2, 1);
    --pf-ok: #16a34a;
    --pf-off: #e5484d;
}

:root[data-theme="dark"] {
    --pf-ink: #f1efff;
    --pf-muted: #9fa1c4;
    --pf-bg: #0b0d18;
    --pf-card: #17172c;
    --pf-line: rgba(255, 255, 255, .10);
    --pf-soft: #101020;
    --pf-shadow: 0 6px 24px rgba(0, 0, 0, .5);
    --pf-shadow-lg: 0 24px 60px rgba(0, 0, 0, .62);
    color-scheme: dark;
}

* { box-sizing: border-box; }

.pf-body {
    margin: 0;
    background: var(--pf-bg);
    color: var(--pf-ink);
    font-family: var(--pf-font);
    -webkit-font-smoothing: antialiased;
    letter-spacing: -.01em;
    padding-block-end: 92px; /* clear the floating bar */
}

.pf-wrap { max-width: 680px; margin-inline: auto; padding-inline: 14px; }

/* ---- Preview banner ------------------------------------------------------ */
.pf-preview-bar {
    background: #f59e0b; color: #17151f; text-align: center;
    padding: .5rem 1rem; font-weight: 700; font-size: .85rem;
}

/* ---- Hero ---------------------------------------------------------------- */
.pf-hero { position: relative; margin-block-end: 16px; }
.pf-cover {
    height: 190px; border-radius: 0 0 26px 26px; margin-inline: -14px;
    background: linear-gradient(135deg, var(--pf-accent), #cf4fdb 140%);
    background-size: cover; background-position: center;
    position: relative;
}
.pf-cover::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit;
    background: linear-gradient(to bottom, rgba(0,0,0,.05), rgba(0,0,0,.35));
}

.pf-hero-top {
    position: absolute; inset-block-start: 12px; inset-inline: 4px;
    display: flex; align-items: center; gap: .5rem; z-index: 3;
}
.pf-langs { display: flex; gap: .25rem; background: rgba(0,0,0,.32); padding: .25rem; border-radius: 999px; backdrop-filter: blur(8px); }
.pf-langs a {
    color: #fff; text-decoration: none; font-size: .78rem; font-weight: 700;
    padding: .3rem .6rem; border-radius: 999px; opacity: .8; transition: background .2s, opacity .2s;
}
.pf-langs a.on, .pf-langs a:hover { background: rgba(255,255,255,.24); opacity: 1; }

.pf-icon-btn {
    margin-inline-start: auto; width: 38px; height: 38px; border: 0; border-radius: 50%;
    background: rgba(0,0,0,.32); color: #fff; display: grid; place-items: center;
    cursor: pointer; backdrop-filter: blur(8px);
}
.pf-icon-btn .fa-sun { display: none; }
:root[data-theme="dark"] .pf-icon-btn .fa-sun { display: block; }
:root[data-theme="dark"] .pf-icon-btn .fa-moon { display: none; }

.pf-id { text-align: center; margin-block-start: -58px; position: relative; z-index: 2; }
.pf-avatar {
    width: 112px; height: 112px; border-radius: 32px; margin-inline: auto;
    background: var(--pf-card); border: 4px solid var(--pf-card);
    box-shadow: var(--pf-shadow-lg); overflow: hidden;
    display: grid; place-items: center; color: var(--pf-accent); font-size: 2.4rem;
}
.pf-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-name { font-size: 1.5rem; font-weight: 800; margin: .8rem 0 .2rem; letter-spacing: -.02em; }
.pf-headline { color: var(--pf-muted); margin: 0; font-weight: 500; }

.pf-meta { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-block-start: .8rem; }
.pf-chip {
    display: inline-flex; align-items: center; gap: .35rem;
    background: var(--pf-soft); border: 1px solid var(--pf-line); color: var(--pf-muted);
    padding: .3rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 600;
}
.pf-chip.ok { color: var(--pf-ok); border-color: color-mix(in srgb, var(--pf-ok) 35%, transparent); }
.pf-chip.off { color: var(--pf-off); border-color: color-mix(in srgb, var(--pf-off) 35%, transparent); }
.pf-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pf-chip.ok .pf-dot { animation: pfPulse 2s infinite; }
@keyframes pfPulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ---- Quick actions ------------------------------------------------------- */
.pf-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: .6rem; margin-block-start: 1.2rem; }
.pf-act {
    display: flex; flex-direction: column; align-items: center; gap: .35rem;
    padding: .85rem .5rem; border-radius: 15px; text-decoration: none;
    background: var(--pf-card); border: 1px solid var(--pf-line); color: var(--pf-ink);
    box-shadow: var(--pf-shadow); font-weight: 700; font-size: .82rem;
    transition: transform .2s var(--pf-ease), box-shadow .2s var(--pf-ease);
}
.pf-act i { font-size: 1.15rem; color: var(--pf-accent); }
.pf-act.wa i { color: #25d366; }
.pf-act:hover { transform: translateY(-3px); box-shadow: var(--pf-shadow-lg); }

/* ---- Cards --------------------------------------------------------------- */
.pf-card {
    background: var(--pf-card); border: 1px solid var(--pf-line); border-radius: var(--pf-radius);
    padding: 1.15rem; margin-block-end: 14px; box-shadow: var(--pf-shadow);
}
.pf-h2 { font-size: 1rem; font-weight: 800; margin: 0 0 .9rem; display: flex; align-items: center; gap: .5rem; }
.pf-h2 i { color: var(--pf-accent); }
.pf-bio { color: var(--pf-muted); line-height: 1.7; margin: 0; white-space: pre-wrap; }
.pf-hint { color: var(--pf-muted); font-size: .85rem; margin-block-start: 0; }
.pf-address { margin: 0 0 .8rem; line-height: 1.6; }

/* ---- Socials ------------------------------------------------------------- */
.pf-socials { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .6rem; }
.pf-social {
    display: flex; align-items: center; gap: .6rem; text-decoration: none;
    padding: .7rem .8rem; border-radius: 13px; border: 1px solid var(--pf-line);
    background: var(--pf-soft); color: var(--pf-ink); transition: transform .2s var(--pf-ease), border-color .2s;
    min-width: 0;
}
.pf-social:hover { transform: translateY(-2px); border-color: var(--c); }
.pf-social i { color: var(--c); font-size: 1.1rem; width: 22px; text-align: center; flex: none; }
.pf-social-l { font-weight: 700; font-size: .85rem; }
.pf-social-h { color: var(--pf-muted); font-size: .74rem; margin-inline-start: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Contacts ------------------------------------------------------------ */
.pf-contacts { display: flex; flex-direction: column; gap: .5rem; }
.pf-contact {
    display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--pf-ink);
    padding: .7rem .85rem; border-radius: 13px; background: var(--pf-soft); border: 1px solid var(--pf-line);
    transition: transform .2s var(--pf-ease);
}
.pf-contact:hover { transform: translateX(2px); }
.pf-contact > i:first-child { color: var(--pf-accent); width: 22px; text-align: center; }
.pf-contact-t { display: flex; flex-direction: column; min-width: 0; }
.pf-contact-t b { font-size: .86rem; }
.pf-contact-t span { color: var(--pf-muted); font-size: .82rem; }
.pf-go { margin-inline-start: auto; color: var(--pf-muted); font-size: .8rem; }
html[dir="ltr"] .pf-go { transform: rotate(180deg); }

/* ---- Hours --------------------------------------------------------------- */
.pf-status {
    display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .88rem;
    padding: .6rem .8rem; border-radius: 12px; margin-block-end: .8rem;
    background: var(--pf-soft); border: 1px solid var(--pf-line);
}
.pf-status.ok { color: var(--pf-ok); }
.pf-status.off { color: var(--pf-off); }
.pf-hours { list-style: none; margin: 0; padding: 0; }
.pf-hours li {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: .55rem .2rem; border-block-end: 1px dashed var(--pf-line); font-size: .88rem;
}
.pf-hours li:last-child { border-block-end: 0; }
.pf-hours li.today { color: var(--pf-accent); font-weight: 700; }
.pf-hours b.off { color: var(--pf-off); font-weight: 600; }

/* ---- Services ------------------------------------------------------------ */
.pf-services { display: flex; flex-direction: column; gap: .7rem; }
.pf-service {
    display: flex; gap: .85rem; padding: .9rem; border-radius: 15px;
    background: var(--pf-soft); border: 1px solid var(--pf-line);
    transition: transform .2s var(--pf-ease), border-color .2s;
}
.pf-service:hover { transform: translateY(-2px); border-color: var(--pf-accent); }
.pf-service-n {
    font-size: 1.05rem; font-weight: 800; color: var(--pf-accent); opacity: .55;
    font-variant-numeric: tabular-nums; flex: none;
}
.pf-service-b { min-width: 0; flex: 1; }
.pf-eyebrow {
    display: inline-block; font-size: .68rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: .07em; color: var(--pf-accent); margin-block-end: .25rem;
}
.pf-service h3 { font-size: .98rem; margin: 0 0 .3rem; display: flex; align-items: center; gap: .45rem; }
.pf-service p { color: var(--pf-muted); font-size: .86rem; line-height: 1.6; margin: 0 0 .6rem; }

/* ---- Gallery ------------------------------------------------------------- */
.pf-gal {
    display: grid; grid-auto-flow: column; grid-auto-columns: 74%;
    gap: .6rem; overflow-x: auto; scroll-snap-type: x mandatory;
    padding-block-end: .4rem; scrollbar-width: thin;
}
@media (min-width: 560px) { .pf-gal { grid-auto-columns: 46%; } }
.pf-gal-i { margin: 0; scroll-snap-align: center; }
.pf-gal-i img, .pf-gal-i video {
    width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 14px;
    display: block; background: var(--pf-soft); cursor: zoom-in;
}
.pf-gal-i figcaption { font-size: .76rem; color: var(--pf-muted); margin-block-start: .35rem; text-align: center; }

/* ---- Forms / buttons ----------------------------------------------------- */
.pf-form { display: flex; flex-direction: column; gap: .55rem; }
.pf-form input, .pf-form textarea {
    width: 100%; padding: .7rem .85rem; border-radius: 12px;
    border: 1px solid var(--pf-line); background: var(--pf-soft); color: var(--pf-ink);
    font: inherit; font-size: .9rem;
}
.pf-form input:focus, .pf-form textarea:focus {
    outline: 0; border-color: var(--pf-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--pf-accent) 20%, transparent);
}
.pf-hp { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; }

.pf-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    padding: .68rem 1.1rem; border-radius: 12px; border: 0; cursor: pointer;
    background: var(--pf-accent); color: #fff; font: inherit; font-weight: 700; font-size: .88rem;
    text-decoration: none; transition: filter .2s, transform .15s;
}
.pf-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.pf-btn.sm { padding: .45rem .8rem; font-size: .82rem; }
.pf-btn.ghost { background: transparent; color: var(--pf-accent); border: 1px solid var(--pf-line); }

/* ---- Floating bar -------------------------------------------------------- */
.pf-bar {
    position: fixed; inset-block-end: 0; inset-inline: 0; z-index: 40;
    display: flex; justify-content: center; gap: .4rem;
    padding: .55rem .7rem calc(.55rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--pf-card) 88%, transparent);
    backdrop-filter: blur(14px); border-block-start: 1px solid var(--pf-line);
}
.pf-bar-b {
    flex: 1; max-width: 180px; display: flex; flex-direction: column; align-items: center; gap: .2rem;
    background: transparent; border: 0; cursor: pointer; text-decoration: none;
    color: var(--pf-ink); font: inherit; font-size: .7rem; font-weight: 700; padding: .35rem;
    border-radius: 12px; transition: background .2s, color .2s;
}
.pf-bar-b i { font-size: 1.1rem; color: var(--pf-accent); }
.pf-bar-b:hover { background: var(--pf-soft); }

/* ---- Modals / toast ------------------------------------------------------ */
.pf-modal {
    position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
    background: rgba(8, 8, 18, .6); padding: 1rem; backdrop-filter: blur(3px);
}
.pf-modal[hidden] { display: none !important; }
.pf-modal-b {
    position: relative; background: var(--pf-card); border-radius: 20px; padding: 1.5rem;
    width: min(420px, 100%); box-shadow: var(--pf-shadow-lg); text-align: center;
    animation: pfPop .28s var(--pf-ease) both;
}
@keyframes pfPop { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: none; } }
.pf-modal-b h3 { margin: 0 0 1rem; font-size: 1.05rem; }
.pf-modal-b img { width: 100%; max-width: 240px; border-radius: 12px; background: #fff; padding: 8px; }
.pf-url { font-size: .76rem; color: var(--pf-muted); word-break: break-all; margin-block-end: 0; }
.pf-close {
    position: absolute; inset-block-start: .6rem; inset-inline-end: .6rem;
    width: 32px; height: 32px; border: 0; border-radius: 50%; cursor: pointer;
    background: var(--pf-soft); color: var(--pf-ink);
}
.pf-modal .pf-form { text-align: start; }

.pf-toast {
    position: fixed; inset-block-end: 96px; inset-inline: 0; margin-inline: auto;
    width: fit-content; max-width: 90%; z-index: 70;
    background: var(--pf-ink); color: var(--pf-card);
    padding: .6rem 1.1rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
    box-shadow: var(--pf-shadow-lg); animation: pfPop .25s var(--pf-ease) both;
}
.pf-toast[hidden] { display: none !important; }

/* ---- Lightbox ------------------------------------------------------------ */
.pf-lightbox {
    position: fixed; inset: 0; z-index: 80; background: rgba(6, 6, 14, .92);
    display: grid; place-items: center; padding: 1rem; cursor: zoom-out;
}
.pf-lightbox img { max-width: 100%; max-height: 90vh; border-radius: 12px; }

/* ---- Footer -------------------------------------------------------------- */
.pf-footer { text-align: center; padding: 1.6rem 0 1rem; }
.pf-footer a { color: var(--pf-muted); text-decoration: none; font-size: .8rem; }
.pf-footer a:hover { color: var(--pf-accent); }

/* ---- Directory ----------------------------------------------------------- */
.pf-dir { max-width: 980px; }
.pf-dir-head { padding-block: 1.6rem 1rem; position: relative; }
.pf-dir-head .pf-hero-top { position: static; margin-block-end: 1rem; }
.pf-dir-head .pf-langs { background: var(--pf-soft); border: 1px solid var(--pf-line); }
.pf-dir-head .pf-langs a { color: var(--pf-muted); }
.pf-dir-head .pf-langs a.on { background: var(--pf-accent); color: #fff; }
.pf-dir-head .pf-icon-btn { background: var(--pf-soft); color: var(--pf-ink); border: 1px solid var(--pf-line); }
.pf-dir-head h1 { font-size: clamp(1.5rem, 5vw, 2.1rem); margin: 0 0 .3rem; }
.pf-dir-head p { color: var(--pf-muted); margin: 0 0 1rem; }

.pf-search { display: flex; align-items: center; gap: .5rem; position: relative; margin-block-end: .9rem; }
.pf-search i { position: absolute; inset-inline-start: .8rem; color: var(--pf-muted); pointer-events: none; }
.pf-search input {
    flex: 1; padding: .7rem .9rem; padding-inline-start: 2.3rem; border-radius: 12px;
    border: 1px solid var(--pf-line); background: var(--pf-card); color: var(--pf-ink); font: inherit;
}
.pf-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-block-end: .6rem; }
.pf-pill {
    display: inline-flex; align-items: center; gap: .35rem; text-decoration: none;
    padding: .38rem .8rem; border-radius: 999px; font-size: .82rem; font-weight: 600;
    background: var(--pf-card); border: 1px solid var(--pf-line); color: var(--pf-muted);
    transition: background .2s, color .2s, border-color .2s;
}
.pf-pill:hover { border-color: var(--pf-accent); color: var(--pf-accent); }
.pf-pill.on { background: var(--pf-accent); border-color: var(--pf-accent); color: #fff; }
.pf-count { opacity: .7; font-size: .74rem; }

.pf-dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .9rem; }
.pf-dir-card {
    display: flex; gap: .8rem; align-items: center; text-decoration: none; color: var(--pf-ink);
    background: var(--pf-card); border: 1px solid var(--pf-line); border-radius: 16px; padding: .9rem;
    box-shadow: var(--pf-shadow); transition: transform .22s var(--pf-ease), box-shadow .22s var(--pf-ease), border-color .22s;
}
.pf-dir-card:hover { transform: translateY(-4px); box-shadow: var(--pf-shadow-lg); border-color: var(--pf-accent); }
.pf-dir-ava {
    width: 58px; height: 58px; border-radius: 16px; flex: none; overflow: hidden;
    background: var(--pf-soft); display: grid; place-items: center; color: var(--pf-accent); font-size: 1.2rem;
}
.pf-dir-ava img { width: 100%; height: 100%; object-fit: cover; }
.pf-dir-b { min-width: 0; }
.pf-dir-b h3 { font-size: .95rem; margin: 0 0 .15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-dir-b p { font-size: .8rem; color: var(--pf-muted); margin: 0 0 .4rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-dir-m { display: flex; gap: .3rem; flex-wrap: wrap; }
.pf-dir-m .pf-chip { font-size: .7rem; padding: .18rem .5rem; }

/* ---- Reveal (matches site.css behaviour) --------------------------------- */
.reveal { transition: opacity .55s var(--pf-ease), transform .55s var(--pf-ease); }
.js .reveal { opacity: 0; transform: translateY(16px); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    *, .pf-act, .pf-service, .pf-dir-card { animation: none !important; transition: none !important; }
    .js .reveal { opacity: 1 !important; transform: none !important; }
}
