/* ==========================================================================
   Public site - home, about, sources
   ========================================================================== */

/* ---- Hero ---- */
.hero {
    padding: 4.5rem 0 3.5rem;
    border-bottom: 1px solid var(--line-200);
    background: radial-gradient(1100px 380px at 12% -10%, var(--brand-100), transparent 70%),
    var(--paper-0);
}

/* ---- About page intro hero (photo background) ---- */
.about-hero {
    position: relative;
    padding: 4.5rem 0 4rem;
    border-bottom-color: rgba(255, 255, 255, .12) !important;
    background: linear-gradient(90deg, rgba(20, 12, 20, .92) 0%, rgba(20, 12, 20, .80) 42%, rgba(20, 12, 20, .45) 72%, rgba(20, 12, 20, .24) 100%),
    url("../images/hero.jpg") right center / cover no-repeat;
}

.about-hero .eyebrow {
    color: var(--brand-300);
}

.about-hero .eyebrow::before {
    background: var(--brand-300);
}

.about-hero h1 {
    color: #fff;
}

.about-hero .section-lead {
    color: rgba(255, 255, 255, .88);
}

@media (max-width: 991.98px) {
    .about-hero {
        background: linear-gradient(rgba(20, 12, 20, .86), rgba(20, 12, 20, .78)),
        url("../images/hero.jpg") right center / cover no-repeat;
    }
}

.hero-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--paper-0);
    border: 1.5px solid var(--line-300);
    border-radius: var(--r-md);
    padding: 0.5rem 0.5rem 0.5rem 1.1rem;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--dur) var(--ease);
}

.hero-search {
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.hero-search:focus-within {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 4px rgba(177, 0, 93, 0.10);
}

.hero-search input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 1rem;
    background: transparent;
    min-width: 0;
}

.suggested-q {
    border: 1px solid var(--line-200);
    background: var(--paper-0);
    color: var(--text-700);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    transition: transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease), background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
    cursor: pointer;
}

.suggested-q:hover {
    border-color: var(--brand-500);
    color: var(--brand-600);
    background: var(--brand-100);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.suggested-q:active {
    transform: translateY(0);
}

/* ---- Mock conversation panel ---- */
.mock-convo {
    position: relative;
    background: radial-gradient(420px 200px at 100% 0%, rgba(177, 0, 93, .35), transparent 70%),
    var(--ink-900);
    border-radius: var(--r-lg);
    padding: 1.5rem;
    color: #fff;
    box-shadow: var(--shadow-lg);
}

@media (prefers-reduced-motion: no-preference) {
    .mock-convo {
        animation: fade-up .6s var(--ease-out) both, float-y 7s ease-in-out 1.6s infinite;
    }

    .mock-convo .bubble {
        animation: fade-up .5s var(--ease-out) both;
    }

    .mock-convo .bubble-user {
        animation-delay: .2s;
    }

    .mock-convo .bubble-ai {
        animation-delay: .38s;
    }
}

.mock-convo .bubble {
    border-radius: var(--r-md);
    padding: 0.9rem 1.1rem;
    margin-bottom: 0.9rem;
    font-size: 0.925rem;
    line-height: 1.5;
}

.mock-convo .bubble-user {
    background: rgba(255, 255, 255, 0.08);
    margin-left: 2rem;
}

.mock-convo .bubble-ai {
    background: var(--paper-0);
    color: var(--text-900);
    margin-right: 1rem;
}

.mock-convo .bubble-ai .source-chip {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.mock-convo-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gold-400);
    font-weight: 700;
    margin-bottom: 0.9rem;
}

/* ---- Card headings (consistent, sans, quiet) ---- */
.step-item h3, .source-card h3, .why-card h3 {
    font-family: var(--font-sans);
    font-size: var(--fs-h4);
    font-weight: 600;
    color: var(--ink-800);
    line-height: 1.3;
    margin: 0 0 0.35rem;
}

/* ---- How it works ---- */
.step-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-num {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1.5px solid var(--brand-500);
    color: var(--brand-600);
    background: var(--brand-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-weight: 700;
    transition: transform var(--dur) var(--ease-out), background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.step-item:hover .step-num {
    background: var(--brand-500);
    color: #fff;
    transform: scale(1.08);
}

/* ---- Source card (public) ---- */
.source-card {
    padding: 1.5rem;
    height: 100%;
}

.source-card .domain {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8rem;
    color: var(--text-500);
}

.source-card .icon-wrap {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--r-sm);
    background: var(--brand-100);
    color: var(--brand-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin-bottom: 0.9rem;
    transition: transform var(--dur) var(--ease-out), background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.source-card:hover .icon-wrap {
    background: var(--brand-500);
    color: #fff;
    transform: scale(1.06) rotate(-3deg);
}

/* ---- Why cards ---- */
.why-card {
    padding: 1.5rem;
    height: 100%;
}

.why-card i {
    color: var(--brand-600);
    font-size: 1.35rem;
    margin-bottom: 0.6rem;
    display: block;
    transition: transform var(--dur) var(--ease-out);
}

.why-card:hover i {
    transform: translateY(-3px) scale(1.1);
}

/* ---- CTA band ---- */
.cta-band {
    background: radial-gradient(600px 240px at 85% 120%, rgba(177, 0, 93, .5), transparent 70%),
    linear-gradient(rgba(22, 16, 22, .82), rgba(22, 16, 22, .88)),
    url("../images/cta-bg.jpg") center / cover no-repeat,
    var(--ink-900);
    color: #fff;
    border-radius: var(--r-lg);
    padding: 3rem 2rem;
    text-align: center;
}

.cta-band {
    position: relative;
    overflow: hidden;
}

.cta-band h2 {
    color: #fff;
}

.cta-band-lead {
    color: rgba(255, 255, 255, .78);
}

.cta-band .btn-gold {
    background: #fff;
    border-color: #fff;
    color: var(--brand-600);
}

.cta-band .btn-gold:hover {
    background: var(--brand-100);
    border-color: var(--brand-100);
    color: var(--brand-700);
}

/* ---- Stat band ---- */
.stat-grid {
    display: grid;
    grid-template-columns:repeat(4, 1fr);
    gap: 1.5rem;
}

.stat {
    text-align: center;
    padding: 1.25rem 0.5rem;
    border-radius: var(--r-md);
    border: 1px solid var(--line-200);
    background: var(--paper-0);
}

.stat .stat-num {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 2rem;
    color: var(--brand-600);
    line-height: 1;
    display: block;
}

.stat .stat-label {
    font-size: 0.85rem;
    color: var(--text-500);
    margin-top: 0.4rem;
    display: block;
}

@media (max-width: 767.98px) {
    .stat-grid {
        grid-template-columns:repeat(2, 1fr);
        gap: 1rem;
    }
}

/* ---- Breadcrumb ---- */
.breadcrumb-bar {
    font-size: 0.85rem;
    color: var(--text-500);
    padding: 0.9rem 0;
}

.breadcrumb-bar a {
    color: var(--text-500);
}

.breadcrumb-bar a:hover {
    color: var(--brand-600);
}

.breadcrumb-bar [aria-current] {
    color: var(--text-700);
    font-weight: 600;
}

/* ---- Legal / long-form prose ---- */
.legal-prose {
    max-width: 70ch;
}

.legal-prose h2 {
    font-size: var(--fs-h3);
    margin: 2.25rem 0 0.75rem;
}

.legal-prose h2:first-child {
    margin-top: 0;
}

.legal-prose p, .legal-prose li {
    color: var(--text-700);
}

.legal-prose ul {
    padding-left: 1.25rem;
}

.legal-prose li {
    margin-bottom: 0.4rem;
}

.legal-prose .updated {
    font-size: 0.85rem;
    color: var(--text-500);
}

/* ---- FAQ (native disclosure) ---- */
.faq-item {
    border: 1px solid var(--line-200);
    border-radius: var(--r-md);
    background: var(--paper-0);
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--heading);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "\F282";
    font-family: "bootstrap-icons";
    color: var(--brand-500);
    transition: transform var(--dur) var(--ease);
}

.faq-item[open] summary::after {
    transform: rotate(180deg);
}

.faq-item .faq-body {
    padding: 0 1.25rem 1.15rem;
    color: var(--text-700);
}

/* ---- About architecture diagram ---- */
.panel {
    background: var(--paper-0);
    border: 1px solid var(--line-200);
    border-radius: var(--r-md);
}

.arch-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.arch-box {
    border: 1.5px solid var(--line-300);
    border-radius: var(--r-md);
    padding: 1.1rem 2rem;
    background: var(--paper-0);
    text-align: center;
    width: 100%;
    max-width: 340px;
    transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.arch-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: var(--brand-300);
}

.arch-box.emphasis {
    border-color: var(--brand-500);
    background: var(--brand-500);
    color: #fff;
    box-shadow: var(--shadow-brand);
}

.arch-box.emphasis:hover {
    border-color: var(--brand-600);
}

.arch-box.emphasis small {
    color: rgba(255, 255, 255, .85);
}

.arch-arrow {
    color: var(--brand-400);
    font-size: 1.5rem;
    line-height: 1;
}

/* ---- Filter bar ---- */
.filter-bar {
    background: var(--paper-0);
    border: 1px solid var(--line-200);
    border-radius: var(--r-md);
    padding: 1rem;
}

@media (max-width: 767.98px) {
    .hero {
        padding: 2.75rem 0 2rem;
        text-align: left;
    }

    section {
        padding: 3rem 0;
    }

    .mock-convo .bubble-user {
        margin-left: 0.75rem;
    }
}

/* ==========================================================================
   Phone polish (public pages)
   ========================================================================== */
@media (max-width: 575.98px) {
    .hero {
        padding: 2.25rem 0 1.75rem;
    }

    .about-hero {
        padding: 2.75rem 0 2.5rem;
    }

    /* Kërkimi në hero: input + buton në një rresht, të rehatshëm */
    .hero-search {
        padding: 0.4rem 0.4rem 0.4rem 0.9rem;
    }

    .hero-search input {
        font-size: 0.95rem;
    }

    .hero-search .btn {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
        white-space: nowrap;
    }

    .suggested-q {
        padding: 0.4rem 0.8rem;
        font-size: 0.82rem;
    }

    /* Kartat: hapësirë e rehatshme, jo e ngjeshur */
    .source-card,
    .why-card {
        padding: 1.2rem;
    }

    .stat {
        padding: 1rem 0.4rem;
    }

    .stat .stat-num {
        font-size: 1.7rem;
    }

    .mock-convo {
        padding: 1.15rem;
    }

    .mock-convo .bubble {
        padding: 0.8rem 0.95rem;
        font-size: 0.9rem;
    }

    /* CTA band */
    .cta-band {
        padding: 2.25rem 1.25rem;
        border-radius: var(--r-md);
    }

    /* Hapat "Si funksionon" */
    .step-num {
        width: 2.15rem;
        height: 2.15rem;
    }

    /* FAQ + dokumente ligjore: prekje e mirë, tipografi e qetë */
    .faq-item summary {
        padding: 0.9rem 1rem;
    }

    .faq-item .faq-body {
        padding: 0 1rem 1rem;
    }

    .legal-prose h2 {
        font-size: 1.2rem;
        margin: 1.9rem 0 0.6rem;
    }

    .legal-prose {
        font-size: 0.975rem;
    }

    /* Diagrami i arkitekturës */
    .arch-box {
        padding: 0.9rem 1rem;
    }

    .breadcrumb-bar {
        padding: 0.7rem 0;
        font-size: 0.8rem;
    }
}

/* ---- Dokumentacioni për zhvilluesit (/developers.html) ---- */
.dev-lead {
    max-width: 70ch;
    color: var(--text-700);
    font-size: 1.05rem;
}

.dev-personal {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    max-width: 70ch;
    margin-bottom: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--r-md);
    background: var(--brand-100);
    color: var(--ink-900);
    font-size: 0.92rem;
}

.dev-personal i {
    color: var(--brand-500);
    font-size: 1.1rem;
}

.dev-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 992px) {
    .dev-layout {
        grid-template-columns: 15rem minmax(0, 1fr);
        gap: 3rem;
    }

    .dev-toc {
        position: sticky;
        top: calc(var(--header-h, 72px) + 1.5rem);
        align-self: start;
        max-height: calc(100vh - var(--header-h, 72px) - 3rem);
        overflow-y: auto;
    }
}

.dev-toc {
    font-size: 0.9rem;
    border: 1px solid var(--line-200);
    border-radius: var(--r-md);
    padding: 1rem 1.1rem;
    background: var(--paper-0);
}

.dev-toc-title {
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-500);
    margin-bottom: 0.5rem;
}

.dev-toc ol {
    padding-left: 1.1rem;
    margin: 0;
}

.dev-toc li {
    margin-bottom: 0.35rem;
}

.dev-toc a {
    color: var(--text-700);
    text-decoration: none;
}

.dev-toc a:hover,
.dev-toc a.active {
    color: var(--brand-500);
}

.dev-toc a.active {
    font-weight: 600;
}

.dev-content.legal-prose {
    max-width: 78ch;
    min-width: 0;
}

.dev-content h2 {
    scroll-margin-top: calc(var(--header-h, 72px) + 1rem);
}

.dev-h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 1.75rem 0 0.6rem;
}

.dev-content code {
    font-size: 0.85em;
    color: var(--brand-600);
    background: var(--paper-50);
    padding: 0.1em 0.2em;
    border-radius: var(--r-sm);
    word-break: break-word;
}

.dev-table td:first-child code {
    white-space: nowrap;
}

.dev-code-wrap {
    position: relative;
    margin: 0.75rem 0 1.25rem;
}

.dev-code {
    margin: 0;
    /* hapësirë sipër për butonin "Kopjo" - rreshtat e gjatë rrëshqasin horizontalisht poshtë tij */
    padding: 2.4rem 1.1rem 1rem;
    background: #1d1720;
    border-radius: var(--r-md);
    overflow-x: auto;
    font-size: 0.82rem;
    line-height: 1.55;
}

.dev-code code,
.dev-content .dev-code code {
    color: #f4eef6;
    background: transparent;
    padding: 0;
    font-size: inherit;
    white-space: pre;
    word-break: normal;
}

.dev-copy {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #f4eef6;
    font-size: 0.75rem;
    border-radius: var(--r-sm);
    padding: 0.2rem 0.55rem;
    transition: background 0.15s ease;
}

.dev-copy:hover,
.dev-copy.copied {
    background: var(--brand-500);
    border-color: var(--brand-500);
}

.dev-copy:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.dev-table {
    font-size: 0.88rem;
    margin: 0.5rem 0 1.25rem;
}

.dev-table th {
    white-space: nowrap;
    font-weight: 600;
    color: var(--ink-900);
}

.dev-table td,
.dev-table th {
    vertical-align: top;
}

.dev-callout {
    display: flex;
    gap: 0.7rem;
    padding: 0.85rem 1rem;
    border-left: 3px solid var(--brand-500);
    background: var(--paper-50);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    margin: 1rem 0 1.25rem;
    font-size: 0.92rem;
    color: var(--text-700);
}

.dev-callout > i {
    color: var(--brand-500);
    font-size: 1.1rem;
}

.dev-callout-warn {
    border-left-color: #c77700;
    background: #fff7ea;
}

.dev-callout-warn > i {
    color: #c77700;
}

.dev-tabs {
    gap: 0.35rem;
    flex-wrap: wrap;
    margin: 0.75rem 0 0.5rem;
    padding-left: 0 !important;
}

.dev-tabs .nav-item {
    margin: 0;
}

.dev-tabs .nav-link {
    font-size: 0.82rem;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--line-200);
    color: var(--text-700);
    border-radius: 999px;
}

.dev-tabs .nav-link.active {
    background: var(--brand-500);
    border-color: var(--brand-500);
    color: #fff;
}

.dev-tab-content {
    margin-bottom: 1.25rem;
}

.dev-method {
    display: inline-block;
    min-width: 3.2rem;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: var(--r-sm);
    padding: 0.1rem 0.4rem;
    color: #fff;
}

.dev-method.get {
    background: #1f7a4d;
}

.dev-method.post {
    background: #2456a8;
}
