/**
 * text-page.css
 * Mūsdienīgs, kopts un ar DIO identitāti saskaņots noformējums
 * teksta un juridiskajām lapām (Privātuma politika, Lietošanas noteikumi u.c.)
 */

/* --- 1. BANERIS --- */
.text-page-banner {
    background-color: #eef5e3;
    padding: 130px 0 40px 0;
    border-bottom: 1px solid rgba(82, 85, 132, 0.08);
    position: relative;
}

.text-page-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13.5px;
    font-family: 'Noto Sans', Arial, sans-serif;
    margin-bottom: 14px;
}

.breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #525584;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: #76bc21;
}

.breadcrumb-separator {
    color: #9ea4b5;
    user-select: none;
}

.breadcrumb-current {
    color: #717688;
    font-weight: 400;
}



.text-page-banner__title {
    font-family: 'AtypDisplay Semibold', Arial, sans-serif;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.18;
    color: #525584;
    margin: 0;
}

/* --- 2. PAMATA SEKCIJA UN IETVARS --- */
.text-page-section {
    background-color: #f8faf5;
    padding: 40px 0 80px 0;
    min-height: 60vh;
}

.text-page-container {
    max-width: 1280px;
}

/* --- 3. DOKUMENTA KARTĪTE --- */
.text-page-card {
    background-color: #ffffff;
    border-radius: 24px;
    border: 1px solid rgba(82, 85, 132, 0.08);
    box-shadow: 0 8px 30px rgba(82, 85, 132, 0.05);
    padding: 40px 48px;
    position: relative;
}

.text-page-card__toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding-bottom: 20px;
    margin-bottom: 28px;
    border-bottom: 1px solid #edf1e8;
}

.text-page-card__tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #6a6f82;
    background-color: #f2f5ed;
    padding: 5px 12px;
    border-radius: 0;
}

.text-page-card__actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background-color: #ffffff;
    border: 1px solid #dbe2d4;
    border-radius: 0;
    font-size: 13px;
    font-weight: 600;
    color: #525584;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action:hover {
    background-color: #eef5e3;
    border-color: #76bc21;
    color: #2d3139;
}

.btn-action.is-copied {
    border-color: #76bc21;
    background-color: #f1f7ea;
    color: #436b13;
}

/* --- 4. FORMATĒTĀ SATURA TIPOGRĀFIJA (.formatedtext) --- */
.text-page-body {
    font-family: 'Noto Sans', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.72;
    color: #2e323b;
    word-break: break-word;
}

.text-page-body p:first-child em {
    display: inline-block;
    padding: 6px 14px;
    background-color: #eef5e3;
    color: #494e68;
    border-radius: 0;
    font-style: normal;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 16px;
    border-left: 3px solid #76bc21;
}

.text-page-body h2 {
    font-family: 'AtypDisplay Semibold', Arial, sans-serif;
    font-size: 25px;
    font-weight: 700;
    color: #525584;
    line-height: 1.28;
    margin-top: 38px;
    margin-bottom: 16px;
    padding-left: 14px;
    border-left: 4px solid #76bc21;
    scroll-margin-top: 95px;
}

.text-page-body h3 {
    font-family: 'AtypDisplay Semibold', Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #525584;
    line-height: 1.35;
    margin-top: 26px;
    margin-bottom: 12px;
}

.text-page-body h4 {
    font-family: 'AtypDisplay Semibold', Arial, sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: #525584;
    margin-top: 20px;
    margin-bottom: 10px;
}

.text-page-body p {
    margin-bottom: 18px;
}

.text-page-body strong {
    font-weight: 600;
    color: #1f2229;
}

.text-page-body ul {
    list-style: none;
    padding-left: 0;
    margin-top: 10px;
    margin-bottom: 22px;
}

.text-page-body ul li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 10px;
    line-height: 1.65;
}

.text-page-body ul li::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #76bc21;
}

.text-page-body ol {
    padding-left: 20px;
    margin-bottom: 22px;
}

.text-page-body ol li {
    margin-bottom: 10px;
    line-height: 1.65;
}

.text-page-body a {
    color: #525584;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.text-page-body a:hover {
    color: #76bc21;
}

.text-page-body .btn-cookie-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    background-color: #eef5e3;
    color: #525584;
    border: 1.5px solid #76bc21;
    border-radius: 0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    margin: 4px 0;
}

.text-page-body .btn-cookie-link:hover {
    background-color: #76bc21;
    color: #ffffff;
    text-decoration: none;
}

/* --- 5. TABULAS RESPONSIVITĀTE UN DIZAINS --- */
.text-page-body .table-responsive {
    overflow-x: auto;
    margin: 28px 0;
    border-radius: 0;
    border: 1px solid #dce5d2;
    box-shadow: 0 3px 12px rgba(82, 85, 132, 0.03);
    background-color: #ffffff;
}

.text-page-body table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14.5px;
    border: none;
}

.text-page-body thead th {
    background-color: #eff5e4;
    color: #525584;
    font-family: 'AtypDisplay Semibold', Arial, sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    padding: 14px 18px;
    border-bottom: 2px solid #dce5d2;
    text-align: left;
    white-space: nowrap;
}

.text-page-body tbody td {
    padding: 13px 18px;
    border-bottom: 1px solid #edf1ea;
    color: #2e323b;
    vertical-align: top;
    line-height: 1.55;
}

.text-page-body tbody tr:last-child td {
    border-bottom: none;
}

.text-page-body tbody tr:nth-child(even) {
    background-color: #fafcf8;
}

.text-page-body tbody tr:hover {
    background-color: #f3f8ee;
    transition: background-color 0.15s ease;
}

/* --- 6. SĀNU JOSLA (DESKTOP) --- */
.text-page-sidebar-sticky {
    position: sticky;
    top: 85px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background-color: #ffffff;
    border-radius: 20px;
    padding: 22px 24px;
    border: 1px solid rgba(82, 85, 132, 0.08);
    box-shadow: 0 4px 20px rgba(82, 85, 132, 0.04);
}

.sidebar-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #edf1e8;
}

.sidebar-card__header h3 {
    font-family: 'AtypDisplay Semibold', Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #525584;
    margin: 0;
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: calc(100vh - 360px);
    overflow-y: auto;
    padding-right: 4px;
}

.toc-nav::-webkit-scrollbar {
    width: 4px;
}

.toc-nav::-webkit-scrollbar-thumb {
    background-color: #dbe4d2;
    border-radius: 4px;
}

.toc-link {
    display: block;
    padding: 7px 12px;
    font-size: 13.5px;
    line-height: 1.4;
    color: #5c6074;
    border-radius: 8px;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
}

.toc-link:hover {
    color: #525584;
    background-color: #f4f7f0;
}

.toc-link.is-active {
    color: #3b600e;
    background-color: #eef5e3;
    font-weight: 600;
    border-left-color: #76bc21;
}

.sidebar-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #eef5e3;
    border-radius: 12px;
    margin-bottom: 12px;
}

.sidebar-card h4 {
    font-family: 'AtypDisplay Semibold', Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #525584;
    margin-top: 0;
    margin-bottom: 8px;
}

.sidebar-card p {
    font-size: 13px;
    line-height: 1.5;
    color: #6a6e80;
    margin-bottom: 14px;
}

.btn-sidebar-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #525584;
    background-color: transparent;
    border: 1.5px solid #525584;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-sidebar-outline:hover {
    background-color: #525584;
    color: #ffffff;
}

.contact-card__email {
    display: inline-block;
    color: #525584;
    font-weight: 700;
    font-size: 14px;
    text-decoration: underline;
    margin-bottom: 8px;
}

.contact-card__email:hover {
    color: #76bc21;
}

.contact-card__address {
    font-size: 12px;
    line-height: 1.45;
    color: #878c9d;
}

/* --- 7. MOBILĀ SATURA RĀDĪTĀJA JOSLA --- */
.mobile-toc-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #ffffff;
    border-bottom: 1px solid #dce5d2;
    padding: 10px 0;
    box-shadow: 0 4px 14px rgba(82, 85, 132, 0.05);
}

.mobile-toc-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 16px;
    background-color: #eef5e3;
    border: 1px solid #d8e5cc;
    border-radius: 0;
    font-family: 'AtypDisplay Semibold', Arial, sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    color: #525584;
    cursor: pointer;
}

.mobile-toc-toggle__left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mobile-toc-toggle__chevron {
    transition: transform 0.2s ease;
}

.mobile-toc-toggle.is-open .mobile-toc-toggle__chevron {
    transform: rotate(180deg);
}

.mobile-toc-dropdown {
    background-color: #ffffff;
    border: 1px solid #dce5d2;
    border-radius: 0;
    margin-top: 8px;
    padding: 8px;
    max-height: 55vh;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.mobile-toc-link {
    display: block;
    padding: 9px 12px;
    font-size: 13.5px;
    color: #525584;
    text-decoration: none;
    border-radius: 0;
    border-bottom: 1px solid #f0f4ec;
}

.mobile-toc-link:last-child {
    border-bottom: none;
}

.mobile-toc-link:hover,
.mobile-toc-link.is-active {
    background-color: #eef5e3;
    color: #3b600e;
    font-weight: 600;
}

/* --- 8. ADAPTĪVAIS NOFORMĒJUMS (RESPONSIVE) --- */
@media (max-width: 991.98px) {
    .text-page-banner {
        padding: 105px 0 28px 0;
    }

    .text-page-banner__title {
        font-size: 32px;
    }

    .text-page-card {
        padding: 28px 24px;
        border-radius: 20px;
    }

    .text-page-section {
        padding: 24px 0 50px 0;
    }
}

@media (max-width: 575.98px) {
    .text-page-banner {
        padding: 95px 0 24px 0;
    }

    .text-page-banner__title {
        font-size: 26px;
    }

    .text-page-card {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .text-page-body h2 {
        font-size: 21px;
        margin-top: 28px;
        padding-left: 10px;
    }

    .text-page-card__toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .text-page-card__actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* --- 9. DRUKAS STILI --- */
@media print {
    .header,
    footer,
    .text-page-banner,
    .text-page-card__toolbar,
    .mobile-toc-bar,
    aside {
        display: none !important;
    }

    .text-page-section {
        background: #ffffff !important;
        padding: 0 !important;
    }

    .text-page-card {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
    }
}
