/* ==========================================================================
   Modern Policy Pages Styling (Konsultanti.bg)
   Privacy Policy, Cookie Policy, Terms of Service, Policies Hub
   Clean, human-crafted corporate legal document layout
   ========================================================================== */

:root,
[data-bs-theme="dark"],
[data-bs-theme="light"],
body[data-bs-theme="dark"],
body[data-bs-theme="light"] {
    --policy-primary: #14899a;
    --policy-primary-hover: #0f6c7a;
    --policy-primary-light: rgba(20, 137, 154, 0.08);
    --policy-primary-border: rgba(20, 137, 154, 0.2);
    --policy-text-main: #334155;
    --policy-text-dark: #0f172a;
    --policy-text-muted: #64748b;
    --policy-card-bg: #ffffff;
    --policy-border: #e2e8f0;
    color-scheme: light;
}

/* Page Container - Proper Top Spacing for Web & Mobile */
.policy-page-wrapper,
[data-bs-theme="dark"] .policy-page-wrapper {
    color-scheme: light !important;
    --bs-body-color: #334155 !important;
    --bs-body-bg: #ffffff !important;
    color: #334155 !important;
    max-width: 1060px;
    margin: 0 auto;
    padding: 5.75rem 1.25rem 4rem; /* 5.75rem clears the 60px fixed navbar on desktop */
}

@media (min-width: 992px) {
    .policy-page-wrapper,
    [data-bs-theme="dark"] .policy-page-wrapper {
        padding-top: 6.25rem; /* Generous breathing room on large screens */
    }
}

@media (max-width: 767.98px) {
    .policy-page-wrapper,
    [data-bs-theme="dark"] .policy-page-wrapper {
        padding-top: 4.5rem;
        padding-bottom: 3rem;
    }
}

/* Header Banner Card - Clean Corporate Look (No AI rainbow stripe) */
.policy-header-card,
[data-bs-theme="dark"] .policy-header-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px;
    padding: 2.25rem 2rem;
    margin-bottom: 1.75rem;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    color: #0f172a !important;
}

.policy-header-card::before {
    display: none !important;
}

.policy-badge,
[data-bs-theme="dark"] .policy-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f766e !important;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    margin-bottom: 0.85rem;
    box-shadow: none !important;
}

.policy-header-title,
[data-bs-theme="dark"] .policy-header-title {
    font-size: 2.1rem;
    font-weight: 700;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

.policy-header-card p,
.policy-header-card .text-muted,
[data-bs-theme="dark"] .policy-header-card p,
[data-bs-theme="dark"] .policy-header-card .text-muted {
    color: #64748b !important;
    -webkit-text-fill-color: #64748b !important;
}

.policy-header-meta,
[data-bs-theme="dark"] .policy-header-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
    margin-top: 1.15rem;
    font-size: 0.88rem;
    color: #64748b !important;
    -webkit-text-fill-color: #64748b !important;
}

.policy-meta-item,
[data-bs-theme="dark"] .policy-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #64748b !important;
    -webkit-text-fill-color: #64748b !important;
}

.policy-meta-item .btn,
[data-bs-theme="dark"] .policy-meta-item .btn {
    background-color: #ffffff !important;
    color: #475569 !important;
    border-color: #cbd5e1 !important;
    border-radius: 6px;
    font-size: 0.82rem;
}

.policy-meta-item .btn:hover,
[data-bs-theme="dark"] .policy-meta-item .btn:hover {
    background-color: #f8fafc !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}

/* Quick Jump Pills (Sticky on desktop) */
.policy-quicknav,
[data-bs-theme="dark"] .policy-quicknav {
    position: sticky;
    top: 75px;
    z-index: 100;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
}

.policy-quicknav-label,
[data-bs-theme="dark"] .policy-quicknav-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b !important;
    -webkit-text-fill-color: #64748b !important;
    padding: 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    letter-spacing: 0.5px;
}

.policy-quicknav a,
[data-bs-theme="dark"] .policy-quicknav a {
    font-size: 0.83rem;
    font-weight: 500;
    color: #475569 !important;
    -webkit-text-fill-color: #475569 !important;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
    background: transparent !important;
}

.policy-quicknav a:hover,
[data-bs-theme="dark"] .policy-quicknav a:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
}

/* Main Document Paper Card */
.policy-document-card,
[data-bs-theme="dark"] .policy-document-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px;
    padding: 2.75rem 2.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    line-height: 1.75;
    color: #334155 !important;
    -webkit-text-fill-color: #334155 !important;
    font-size: 0.98rem;
}

.policy-document-card h1,
.policy-document-card h2,
.policy-document-card h3,
.policy-document-card h4,
.policy-document-card h5,
.policy-document-card h6 {
    color: #0f172a;
}

.policy-document-card p,
.policy-document-card li,
.policy-document-card span {
    color: #334155;
}

.policy-document-card strong {
    color: #0f172a;
}

@media (max-width: 768px) {
    .policy-document-card {
        padding: 1.75rem 1.25rem;
    }
    .policy-header-title {
        font-size: 1.65rem;
    }
}

/* Section Headings - Clean Human Typography, NO AI side borders or gradient ribbons */
.policy-section-heading,
[data-bs-theme="dark"] .policy-section-heading {
    position: relative;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    font-weight: 700;
    font-size: 1.35rem;
    padding: 0 0 0.55rem 0 !important;
    margin-top: 2.75rem !important;
    margin-bottom: 1.25rem !important;
    border-left: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    scroll-margin-top: 100px;
    letter-spacing: -0.01em;
}

.policy-subheading,
[data-bs-theme="dark"] .policy-subheading {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e293b !important;
    -webkit-text-fill-color: #1e293b !important;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    scroll-margin-top: 100px;
}

/* Informative Callouts - Clean Subtle Notice Card, NO 4px thick left border */
.policy-callout,
[data-bs-theme="dark"] .policy-callout {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 1.15rem 1.35rem;
    margin: 1.5rem 0;
    font-size: 0.94rem;
    line-height: 1.65;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    color: #334155 !important;
    -webkit-text-fill-color: #334155 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.policy-callout i,
[data-bs-theme="dark"] .policy-callout i {
    color: #0f766e !important;
    font-size: 1.15rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.policy-callout strong,
.policy-callout span,
.policy-callout p,
[data-bs-theme="dark"] .policy-callout strong,
[data-bs-theme="dark"] .policy-callout span,
[data-bs-theme="dark"] .policy-callout p {
    color: #334155 !important;
    -webkit-text-fill-color: #334155 !important;
}

/* Modern Tables */
.policy-table-container,
[data-bs-theme="dark"] .policy-table-container {
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px;
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow: none !important;
    background: #ffffff !important;
}

.policy-table {
    margin-bottom: 0;
    width: 100%;
}

.policy-table thead th,
.policy-table-container table thead th,
[data-bs-theme="dark"] .policy-table thead th,
[data-bs-theme="dark"] .policy-table-container table thead th {
    background: #f8fafc !important;
    color: #334155 !important;
    -webkit-text-fill-color: #334155 !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 0.85rem 1.15rem !important;
    white-space: nowrap !important;
    opacity: 1 !important;
}

.policy-document-card .table tbody td,
.policy-table-container table tbody td,
.policy-table tbody td,
[data-bs-theme="dark"] .policy-document-card .table tbody td,
[data-bs-theme="dark"] .policy-table-container table tbody td,
[data-bs-theme="dark"] .policy-table tbody td {
    padding: 0.9rem 1.15rem !important;
    border-color: #f1f5f9 !important;
    vertical-align: middle !important;
    font-size: 0.93rem !important;
    color: #334155 !important;
    -webkit-text-fill-color: #334155 !important;
    background-color: #ffffff !important;
    white-space: normal !important;
}

.policy-table tbody tr:nth-child(even),
.policy-table-container table tbody tr:nth-child(even),
[data-bs-theme="dark"] .policy-table tbody tr:nth-child(even),
[data-bs-theme="dark"] .policy-table-container table tbody tr:nth-child(even) {
    background-color: #f8fafc !important;
}

.policy-table tbody tr:nth-child(even) td,
.policy-table-container table tbody tr:nth-child(even) td,
[data-bs-theme="dark"] .policy-table tbody tr:nth-child(even) td,
[data-bs-theme="dark"] .policy-table-container table tbody tr:nth-child(even) td {
    background-color: #f8fafc !important;
    color: #334155 !important;
    -webkit-text-fill-color: #334155 !important;
}

.policy-table tbody tr:hover td,
.policy-table-container table tbody tr:hover td,
[data-bs-theme="dark"] .policy-table tbody tr:hover td,
[data-bs-theme="dark"] .policy-table-container table tbody tr:hover td {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
}

.policy-document-card code,
.policy-table-container code,
.policy-table code,
[data-bs-theme="dark"] .policy-document-card code,
[data-bs-theme="dark"] .policy-table-container code,
[data-bs-theme="dark"] .policy-table code {
    background-color: #f1f5f9 !important;
    color: #0f766e !important;
    -webkit-text-fill-color: #0f766e !important;
    padding: 0.2rem 0.5rem !important;
    border-radius: 4px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    border: 1px solid #e2e8f0 !important;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
    display: inline-block !important;
}

/* Styled Lists */
.policy-list {
    padding-left: 1.25rem;
    margin-bottom: 1.25rem;
}

.policy-list li {
    margin-bottom: 0.6rem;
    padding-left: 0.35rem;
    color: #334155;
}

.policy-list li strong {
    color: #0f172a;
}

/* Target Anchor Highlight Animation */
:target {
    animation: policyHighlight 2s ease-out;
}

@keyframes policyHighlight {
    0% {
        background-color: rgba(20, 137, 154, 0.15);
    }
    100% {
        background-color: transparent;
    }
}

/* Bottom Actions Card */
.policy-footer-card,
[data-bs-theme="dark"] .policy-footer-card {
    margin-top: 2rem;
    padding: 1.25rem 1.75rem;
    border-radius: 10px;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    color: #334155 !important;
}

.policy-btn-outline,
[data-bs-theme="dark"] .policy-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #0f766e !important;
    border: 1px solid #cbd5e1 !important;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.15s ease;
    background: transparent !important;
}

.policy-btn-outline:hover,
[data-bs-theme="dark"] .policy-btn-outline:hover {
    background: #f8fafc !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}

/* Policies Hub (Index.cshtml) Cards */
.policy-card,
[data-bs-theme="dark"] .policy-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px;
}

.policy-card .card-body,
[data-bs-theme="dark"] .policy-card .card-body {
    background: #ffffff !important;
}

.policy-card-title,
[data-bs-theme="dark"] .policy-card-title {
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
}

.policy-card p,
[data-bs-theme="dark"] .policy-card p {
    color: #64748b !important;
    -webkit-text-fill-color: #64748b !important;
}
