﻿/* SIBNE Public Website — shared home/article theme
   Save as: wwwroot/css/sibne-public-home.css
*/
:root {
    --sibne-orange: #ff641f;
    --sibne-orange-dark: #e94f10;
    --sibne-ink: #101316;
    --sibne-muted: #697078;
    --sibne-bg: #f7f7f5;
    --sibne-surface: #ffffff;
    --sibne-border: #e6e7e8;
    --sibne-header-bg: rgba(255,255,255,.94);
    --sibne-shadow: 0 18px 55px rgba(16,19,22,.09);
    --sibne-radius: 18px;
    color-scheme: light;
}

body[data-theme="dark"] {
    --sibne-ink: #f4f5f6;
    --sibne-muted: #b3bac1;
    --sibne-bg: #111315;
    --sibne-surface: #1a1d20;
    --sibne-border: #30353a;
    --sibne-header-bg: rgba(17,19,21,.94);
    --sibne-shadow: 0 18px 55px rgba(0,0,0,.25);
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 95px;
}

body {
    margin: 0;
    background: var(--sibne-bg);
    color: var(--sibne-ink);
    font-family: "DM Sans", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.7;
    transition: background-color .2s ease, color .2s ease;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
}

button, input, textarea, select {
    font: inherit;
}

button, a {
    -webkit-tap-highlight-color: transparent;
}

::selection {
    background: rgba(255,100,31,.22);
}

/* Header */
.sibne-public-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    width: 100%;
    min-height: 82px;
    padding: 13px clamp(20px, 5vw, 76px);
    background: var(--sibne-header-bg);
    border-bottom: 1px solid var(--sibne-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.sibne-public-logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    color: var(--sibne-ink);
    text-decoration: none;
    line-height: 1;
}

.logo-fallback {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    font-size: 31px;
    font-weight: 800;
    letter-spacing: -1.7px;
}

    .logo-fallback::first-letter {
        color: var(--sibne-orange);
    }

    .logo-fallback small {
        font-size: 9px;
        font-weight: 800;
        letter-spacing: 2.6px;
        color: var(--sibne-muted);
    }

.sibne-header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sibne-public-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(16px, 2.4vw, 34px);
}

    .sibne-public-nav a {
        color: var(--sibne-ink);
        font-size: 14px;
        font-weight: 650;
        text-decoration: none;
        white-space: nowrap;
        transition: color .18s ease, background .18s ease, transform .18s ease;
    }

        .sibne-public-nav a:hover {
            color: var(--sibne-orange);
        }

    .sibne-public-nav .sibne-agent-login {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 43px;
        padding: 9px 19px;
        color: #fff;
        background: var(--sibne-orange);
        border: 1px solid var(--sibne-orange);
        border-radius: 999px;
    }

        .sibne-public-nav .sibne-agent-login:hover {
            color: #fff;
            background: var(--sibne-orange-dark);
            transform: translateY(-1px);
        }

.sibne-theme-toggle, .sibne-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 12px;
    color: var(--sibne-ink);
    background: var(--sibne-surface);
    border: 1px solid var(--sibne-border);
    border-radius: 999px;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease;
}

    .sibne-theme-toggle:hover, .sibne-menu-toggle:hover {
        border-color: var(--sibne-orange);
    }

    .sibne-theme-toggle i {
        color: var(--sibne-orange);
    }

.theme-toggle-label {
    font-size: 12px;
    font-weight: 700;
}

.sibne-menu-toggle {
    display: none;
    width: 42px;
    padding: 0;
    font-size: 17px;
}

/* Shared buttons and content */
.sibne-orange-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 50px;
    padding: 13px 24px;
    color: #fff !important;
    background: var(--sibne-orange);
    border: 1px solid var(--sibne-orange);
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(255,100,31,.2);
    font-size: 15px;
    font-weight: 750;
    text-decoration: none;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

    .sibne-orange-cta:hover {
        background: var(--sibne-orange-dark);
        transform: translateY(-2px);
        box-shadow: 0 12px 28px rgba(255,100,31,.25);
    }

.sibne-dark-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 24px;
    color: var(--sibne-muted);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

    .sibne-dark-link:hover {
        color: var(--sibne-orange);
    }

    .sibne-dark-link i {
        color: var(--sibne-orange);
    }

/* Article page */
.sibne-article-page {
    width: min(100% - 40px, 960px);
    margin: 0 auto;
    padding: clamp(28px, 5vw, 64px) 0 76px;
}

    .sibne-article-page .article-meta {
        display: flex;
        align-items: center;
        gap: 9px;
        margin: 0 0 13px;
        color: var(--sibne-orange);
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 1.4px;
        line-height: 1.5;
        text-transform: uppercase;
    }

    .sibne-article-page h1 {
        max-width: 900px;
        margin: 0 0 20px;
        color: var(--sibne-ink);
        font-size: clamp(34px, 5.2vw, 64px);
        font-weight: 800;
        letter-spacing: -2.4px;
        line-height: 1.08;
        overflow-wrap: anywhere;
    }

    .sibne-article-page > p:not(.article-meta) {
        color: var(--sibne-muted);
    }

    .sibne-article-page > p[style*="font-size:20px"] {
        max-width: 780px;
        margin: 0 0 30px;
        font-size: clamp(17px, 2vw, 21px) !important;
        line-height: 1.65;
    }

.article-featured {
    display: block;
    width: 100%;
    max-height: 560px;
    margin: 32px 0 42px;
    object-fit: cover;
    aspect-ratio: 16 / 9;
    background: var(--sibne-surface);
    border: 1px solid var(--sibne-border);
    border-radius: var(--sibne-radius);
    box-shadow: var(--sibne-shadow);
}

.sibne-article-content {
    color: var(--sibne-ink);
    font-size: 17px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

    .sibne-article-content > *:first-child {
        margin-top: 0;
    }

    .sibne-article-content p {
        margin: 0 0 1.35em;
    }

    .sibne-article-content h2 {
        margin: 1.8em 0 .65em;
        font-size: clamp(25px, 3.2vw, 36px);
        font-weight: 800;
        letter-spacing: -.8px;
        line-height: 1.2;
    }

    .sibne-article-content h3 {
        margin: 1.6em 0 .6em;
        font-size: clamp(20px, 2.4vw, 27px);
        font-weight: 750;
        line-height: 1.3;
    }

    .sibne-article-content a {
        color: var(--sibne-orange);
        text-underline-offset: 3px;
    }

    .sibne-article-content ul, .sibne-article-content ol {
        padding-left: 1.5em;
        margin: 0 0 1.4em;
    }

    .sibne-article-content li {
        margin: .35em 0;
        padding-left: .2em;
    }

    .sibne-article-content blockquote {
        margin: 28px 0;
        padding: 18px 24px;
        color: var(--sibne-muted);
        background: var(--sibne-surface);
        border-left: 4px solid var(--sibne-orange);
        border-radius: 0 12px 12px 0;
    }

    .sibne-article-content img {
        display: block;
        max-width: 100%;
        height: auto;
        margin: 26px auto;
        border-radius: 12px;
    }

    .sibne-article-content table {
        display: block;
        width: 100%;
        overflow-x: auto;
        border-collapse: collapse;
    }

    .sibne-article-content th, .sibne-article-content td {
        padding: 11px 14px;
        border: 1px solid var(--sibne-border);
        text-align: left;
    }

    .sibne-article-content th {
        background: var(--sibne-surface);
    }

    .sibne-article-content hr {
        margin: 34px 0;
        border: 0;
        border-top: 1px solid var(--sibne-border);
    }

.sibne-article-page > p:last-child {
    margin-bottom: 0;
}

/* Footer */
.sibne-public-footer {
    padding: 24px clamp(20px, 5vw, 76px);
    color: var(--sibne-muted);
    background: var(--sibne-surface);
    border-top: 1px solid var(--sibne-border);
}

.sibne-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: min(100%, 1200px);
    margin: 0 auto;
    font-size: 13px;
}

    .sibne-footer-bottom a {
        color: var(--sibne-muted);
        text-decoration: none;
    }

        .sibne-footer-bottom a:hover {
            color: var(--sibne-orange);
        }

/* Responsive navigation and article spacing */
@media (max-width: 900px) {
    .sibne-public-header {
        min-height: 72px;
        gap: 14px;
        padding: 12px 22px;
    }

    .sibne-menu-toggle {
        display: inline-flex;
    }

    .sibne-public-nav {
        position: absolute;
        top: calc(100% + 1px);
        left: 0;
        right: 0;
        display: none;
        align-items: stretch;
        gap: 0;
        padding: 10px 22px 20px;
        background: var(--sibne-header-bg);
        border-bottom: 1px solid var(--sibne-border);
        box-shadow: var(--sibne-shadow);
    }

        .sibne-public-nav.is-open {
            display: flex;
            flex-direction: column;
        }

        .sibne-public-nav a {
            padding: 13px 5px;
        }

        .sibne-public-nav .sibne-agent-login {
            align-self: flex-start;
            margin-top: 8px;
            padding: 10px 18px;
        }

    .sibne-article-page {
        width: min(100% - 36px, 760px);
        padding-top: 34px;
    }
}

@media (max-width: 520px) {
    .sibne-public-header {
        padding: 11px 15px;
    }

    .logo-fallback {
        font-size: 27px;
    }

        .logo-fallback small {
            font-size: 8px;
            letter-spacing: 2px;
        }

    .sibne-theme-toggle {
        width: 40px;
        min-width: 40px;
        padding: 0;
    }

    .theme-toggle-label {
        display: none;
    }

    .sibne-header-controls {
        gap: 7px;
    }

    .sibne-article-page {
        width: calc(100% - 30px);
        padding: 27px 0 48px;
    }

        .sibne-article-page h1 {
            letter-spacing: -1.3px;
        }

    .article-featured {
        margin: 24px 0 30px;
        border-radius: 13px;
    }

    .sibne-article-content {
        font-size: 16px;
        line-height: 1.8;
    }

        .sibne-article-content blockquote {
            padding: 15px 17px;
        }

    .sibne-orange-cta {
        width: 100%;
    }

    .sibne-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}
