:root {
    --ink: #16202a;
    --muted: #647282;
    --line: #dce3ea;
    --brand: #0f766e;
    --brand-dark: #0b4f4a;
    --surface: #f5f7f9;
}

body {
    color: var(--ink);
    background: #fff;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

a {
    color: #173b63;
    text-decoration: none;
}

a:hover {
    color: #0f766e;
    text-decoration: none;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1 0 auto;
}

.site-footer {
    flex-shrink: 0;
}

.site-nav {
    background: #152331;
    box-shadow: 0 10px 30px rgba(8, 24, 38, .16);
}

.hero {
    min-height: 560px;
    background:
        linear-gradient(90deg, rgba(13, 31, 45, .88), rgba(13, 31, 45, .58), rgba(13, 31, 45, .22)),
        url("../../images/banner.png") center / cover no-repeat;
    color: #fff;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 720px;
    padding: 84px 0;
}

.hero h1 {
    font-size: clamp(2.25rem, 5vw, 4.75rem);
    line-height: 1;
    letter-spacing: 0;
}

.hero p {
    color: rgba(255,255,255,.86);
    font-size: 1.1rem;
    max-width: 640px;
}

.section {
    padding: 72px 0;
}

.section-muted {
    background: var(--surface);
}

.listing-page-section {
    min-height: calc(100vh - 170px);
}

.home-top-section {
    padding-top: 36px;
}

.install-app-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(22, 32, 42, .07);
}

.home-intro-panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(22, 32, 42, .07);
}

.home-intro-panel .content-body > :last-child {
    margin-bottom: 0;
}

.install-app-panel.is-installed {
    display: none;
}

.install-app-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    color: var(--brand);
    border-radius: 8px;
    background: #eef7f6;
    font-size: 1.8rem;
}

.install-app-copy p:first-child {
    color: var(--brand);
    font-size: .78rem;
    letter-spacing: .05em;
}

.install-app-actions {
    display: grid;
    gap: 10px;
    justify-items: end;
}

.install-app-actions .btn {
    min-width: 142px;
}

.install-app-actions .btn.is-waiting {
    opacity: .78;
}

.install-app-help {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: .84rem;
    text-align: right;
}

.install-app-help span {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.feature-card,
.listing-card,
.auth-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(22, 32, 42, .07);
}

.captcha-image {
    width: 145px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8fafc;
    flex: 0 0 auto;
}

.member-tabs {
    gap: 6px;
    scrollbar-width: thin;
}

.member-tabs .nav-link {
    border-radius: 6px;
    color: var(--ink);
}

.member-tabs .nav-link.active {
    background: var(--brand);
}

.keyword-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.keyword-pills span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 10px;
    border: 1px solid #cbd8e4;
    border-radius: 999px;
    background: #f8fafc;
    color: #173b63;
    font-size: .86rem;
    font-weight: 600;
}

.profile-password-form {
    max-width: 100%;
}

.profile-password-grid .form-control {
    max-width: 100%;
}

.profile-danger-zone {
    border-color: #f1b8b8;
    box-shadow: 0 12px 28px rgba(127, 29, 29, .06);
}

.profile-security-stack {
    display: grid;
    gap: 30px;
}

.profile-security-section {
    max-width: 100%;
    padding: 4px 0;
}

.profile-section-divider {
    height: 1px;
    margin: 2px 0;
    background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.pre-wrap {
    white-space: pre-wrap;
}

.product-view-link {
    color: var(--ink);
    text-decoration: none;
}

.product-view-link:hover {
    color: var(--brand);
}

.admin-shell {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.admin-sidebar {
    position: sticky;
    top: 86px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(22, 32, 42, .07);
}

.admin-sidebar-title {
    padding: 4px 8px 10px;
    color: #34495d;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.admin-nav-group {
    border-top: 1px solid #edf2f7;
}

.admin-nav-group:first-of-type {
    border-top: 0;
}

.admin-nav-group summary {
    cursor: pointer;
    padding: 10px 8px;
    color: #34495d;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    list-style: none;
}

.admin-nav-group summary::-webkit-details-marker {
    display: none;
}

.admin-nav-group summary::after {
    content: "+";
    float: right;
    color: var(--muted);
}

.admin-nav-group[open] summary::after {
    content: "-";
}

.admin-nav {
    display: grid;
    gap: 4px;
    padding: 0 0 10px;
}

.admin-nav a {
    display: block;
    padding: 8px 10px;
    color: var(--ink);
    border-radius: 6px;
    font-size: .94rem;
}

.admin-nav a:hover {
    background: #eef3f7;
}

.admin-nav a.active {
    color: #fff;
    background: var(--brand);
}

.admin-main {
    min-width: 0;
}

.admin-soft-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    color: #526273;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(22, 32, 42, .05);
    font-size: .86rem;
}

.admin-soft-count strong {
    color: var(--ink);
    font-size: .95rem;
}

.admin-conversation-panel {
    min-height: 420px;
}

.admin-conversation-posts {
    max-height: 520px;
    overflow: auto;
    padding-right: 4px;
}

.admin-table {
    font-size: .94rem;
}

.admin-table thead th {
    background: #eef3f7;
    color: #34495d;
    font-size: .78rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--line);
}

.admin-table tbody tr:hover {
    background: #f8fafc;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: .78rem;
    font-weight: 700;
}

.rich-editor {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.rich-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
}

.rich-editor-align {
    width: 34px;
    height: 31px;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 6px 7px;
}

.rich-editor-align span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.rich-editor-align span:nth-child(1) {
    width: 18px;
}

.rich-editor-align span:nth-child(2) {
    width: 13px;
}

.rich-editor-align span:nth-child(3) {
    width: 16px;
}

.rich-editor-align-center {
    align-items: center;
}

.rich-editor-align-right {
    align-items: flex-end;
}

.rich-editor-align-justify span,
.rich-editor-align-justify span:nth-child(1),
.rich-editor-align-justify span:nth-child(2),
.rich-editor-align-justify span:nth-child(3) {
    width: 18px;
}

.rich-editor-area {
    min-height: 320px;
    padding: 14px;
    outline: 0;
    line-height: 1.6;
}

.rich-editor-area:focus {
    box-shadow: inset 0 0 0 2px rgba(15, 118, 110, .18);
}

.rich-editor-area blockquote {
    margin: 0 0 1rem;
    padding: 10px 14px;
    border-left: 4px solid var(--brand);
    background: #f8fafc;
    color: #34495d;
}

.rich-editor-source {
    display: none;
}

.admin-gallery-thumb {
    width: 100%;
    max-width: 100%;
    height: 105px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.gallery-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.gallery-admin-item .listing-card {
    box-shadow: 0 8px 22px rgba(22, 32, 42, .06);
}

.gallery-admin-item .p-3 {
    padding: 10px !important;
}

@media (min-width: 768px) {
    .gallery-admin-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .gallery-admin-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.feature-card {
    height: 100%;
    padding: 28px;
}

.feature-card i {
    color: var(--brand);
    font-size: 1.8rem;
}

.fixed-content-card {
    display: flex;
    flex-direction: column;
}

.fixed-content-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    background: #e8edf2;
}

.fixed-content-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    color: var(--brand);
    border-radius: 8px;
    background: #eef3f7;
}

.fixed-content-icon i {
    font-size: 2.4rem;
}

.main-page-media,
.main-page-video img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.main-page-video {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    background: #0f1720;
    box-shadow: 0 16px 38px rgba(22, 32, 42, .16);
}

.main-page-video span {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    color: #fff;
    background: rgba(15, 118, 110, .92);
    border-radius: 999px;
    transform: translate(-50%, -50%);
    font-size: 2.25rem;
}

.listing-card {
    height: 100%;
    overflow: hidden;
}

.listing-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #e8edf2;
}

.content-media {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    border-radius: 8px;
}

.content-body {
    font-size: 1.04rem;
    line-height: 1.72;
}

.content-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
    gap: 12px;
}

.content-file-list,
.content-file-admin-list {
    display: grid;
    gap: 10px;
}

.content-file-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(22, 32, 42, .05);
}

a.content-file-card:hover {
    color: var(--ink);
    border-color: #b7c7d6;
    background: #f8fafc;
}

.content-file-card > .bi {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #173b63;
    background: #eef3f7;
    border-radius: 8px;
    font-size: 1.75rem;
}

.content-file-card-body {
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
    gap: 2px;
}

.content-file-card-body .fw-semibold {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-file-download {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--brand);
    border-radius: 999px;
    background: #ecfdf5;
}

.content-video-grid,
.content-video-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.content-video-card {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    color: var(--ink);
    text-align: left;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(22, 32, 42, .05);
}

button.content-video-card:hover,
a.content-video-card:hover {
    color: var(--ink);
    border-color: #b7c7d6;
    background: #f8fafc;
}

.content-video-thumb {
    position: relative;
    display: block;
    background: #0f1720;
}

.content-video-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.content-video-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    color: #fff;
    background: rgba(15, 118, 110, .92);
    border-radius: 999px;
    transform: translate(-50%, -50%);
    font-size: 2rem;
}

.content-video-title {
    display: block;
    padding: 12px;
    font-weight: 700;
}

.content-video-admin-grid .content-video-card img {
    aspect-ratio: 16 / 9;
}

.content-video-modal .modal-content {
    background: #0f1720;
    color: #fff;
}

.content-video-modal .modal-header {
    border-bottom-color: rgba(255, 255, 255, .14);
}

.content-video-modal .btn-close {
    filter: invert(1) grayscale(100%);
}

.content-video-modal .modal-body {
    padding: 0;
}

.content-gallery-thumb {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #eef3f7;
}

.content-gallery-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform .2s ease;
}

.content-gallery-thumb span {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #fff;
    background: rgba(21, 35, 49, .82);
    border-radius: 999px;
}

.content-gallery-thumb:hover img {
    transform: scale(1.04);
}

.content-gallery-modal .modal-content {
    background: #0f1720;
    color: #fff;
}

.content-gallery-modal .modal-header {
    border-bottom-color: rgba(255, 255, 255, .14);
}

.content-gallery-modal .btn-close {
    filter: invert(1) grayscale(100%);
}

.content-gallery-modal .modal-body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 68vh;
    padding: 18px 64px;
}

.content-gallery-modal img {
    max-width: 100%;
    max-height: 72vh;
    object-fit: contain;
    border-radius: 8px;
}

.content-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
}

.content-gallery-nav:hover {
    background: rgba(255, 255, 255, .22);
}

.content-gallery-prev {
    left: 14px;
}

.content-gallery-next {
    right: 14px;
}

.btn-primary {
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand-dark);
    --bs-btn-hover-border-color: var(--brand-dark);
}

.site-footer {
    color: #cfd8df;
    background: #152331;
}

.site-footer-grid {
    display: grid;
    grid-template-columns: max-content minmax(180px, 1fr) minmax(0, 1fr);
    gap: 34px;
    align-items: start;
}

.site-footer-links {
    display: grid;
    gap: 6px;
    text-align: left;
    justify-self: start;
}

.site-footer a {
    color: #edf2f7;
    margin-left: 16px;
    text-decoration: none;
}

.site-footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 0;
    color: #c8d3dd;
    font-size: .86rem;
}

.site-footer-links a:hover {
    color: #e7eef5;
}

.site-footer-links i {
    color: #aebdca;
    font-size: .95rem;
}

.site-footer-legal {
    text-align: right;
}

.cookie-consent {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 1050;
    display: none;
    align-items: center;
    gap: 14px;
    max-width: calc(100% - 24px);
    padding: 12px 14px;
    color: #fff;
    background: #17212b;
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(0,0,0,.22);
}

@media (max-width: 767.98px) {
    .hero {
        min-height: 500px;
        align-items: flex-end;
        background-color: #152331;
        background-image:
            linear-gradient(180deg, rgba(13, 31, 45, .12) 0%, rgba(13, 31, 45, .62) 38%, rgba(13, 31, 45, .96) 100%),
            url("../../images/banner.png");
        background-position: top center, top center;
        background-size: 100% 100%, 100% auto;
        background-repeat: no-repeat;
    }

    .hero-copy {
        padding: 230px 0 24px;
    }

    .section {
        padding: 48px 0;
    }

    .home-top-section {
        padding-top: 12px;
    }

    .install-app-panel {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .install-app-actions,
    .install-app-help {
        justify-items: start;
        text-align: left;
    }

    .install-app-help span {
        justify-content: flex-start;
    }

    .admin-shell {
        display: block;
    }

    .admin-sidebar {
        position: static;
        margin-bottom: 18px;
    }

    .admin-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-footer a {
        margin-left: 0;
        margin-right: 12px;
    }

    .site-footer-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .site-footer-links {
        text-align: left;
    }

    .site-footer-legal {
        text-align: left;
    }

    .content-gallery-modal .modal-body {
        min-height: 60vh;
        padding: 14px 54px;
    }

    .content-gallery-nav {
        width: 38px;
        height: 38px;
    }
}
