/* === BASE STYLES === */

body {
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    color: #333333;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.page-header {
    text-align: left;
    width: 80%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 0 5px 2%;
    box-sizing: border-box;
}

    .page-header h1 {
        color: #f47b20;
        font-size: 36px;
        font-weight: 600;
        margin: 0;
        padding-left: 0.5em;
    }

.content {
    display: flex;
    justify-content: center;
    padding: 20px 60px 60px 60px;
}

.text-box {
    border: 3px solid #f47b20;
    border-radius: 12px;
    width: 98%;
    padding: 30px;
    font-size: 20px;
    line-height: 1.6;
    background-color: #ffffff;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

    /* базови линкове вътре в .text-box */
    .text-box a {
        color: #f47b20;
        text-decoration: none;
    }

        .text-box a:hover {
            color: #f47b20;
            opacity: 0.85;
        }

    /* === УНИФИЦИРАНИ ЛИНКОВЕ В СЪДЪРЖАНИЕТО === */
    .text-box a,
    .text-box p a,
    .text-box li a,
    .text-box div a,
    .text-box span a {
        color: #f47b20 !important;
        text-decoration: none !important;
        font-size: 22px !important;
        line-height: 1.4em;
        word-wrap: break-word;
    }

        .text-box a:hover,
        .text-box p a:hover,
        .text-box li a:hover,
        .text-box div a:hover,
        .text-box span a:hover {
            color: #f47b20 !important;
            opacity: 1;
        }

/* === MOBILE LINK OPTIMIZATION === */
@media (max-width: 480px) {
    .text-box a,
    .text-box p a,
    .text-box li a,
    .text-box div a,
    .text-box span a {
        font-size: 18px !important;
    }
}

@media (max-width: 360px) {
    .text-box a,
    .text-box p a,
    .text-box li a,
    .text-box div a,
    .text-box span a {
        font-size: 17px !important;
    }
}

/* === MOBILE TEXT OPTIMIZATION === */
@media only screen and (max-width: 480px) and (orientation: portrait) {
    p,
    .text-box p,
    .content p {
        text-indent: 0 !important;
        margin-left: 0 !important;
        padding-left: 0.3em !important;
    }
}

/* === RESPONSIVE LAYOUT === */
@media (max-width: 768px) {
    .page-header {
        padding: 20px 25px 10px 25px;
    }

        .page-header h1 {
            font-size: 28px;
        }

    .content {
        padding: 10px 20px 40px 20px;
    }

    .text-box {
        width: 100%;
        font-size: 18px;
        padding: 20px;
        border-radius: 10px;
    }
}

/* === MOBILE H1 OPTIMIZATION === */
@media (max-width: 480px) {
    .page-header h1 {
        font-size: 30px;
    }
}

@media (max-width: 360px) {
    .page-header h1 {
        font-size: 28px;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .page-header h1 {
        font-size: 32px;
    }

    .text-box {
        width: 95%;
        font-size: 19px;
    }
}

@media (min-width: 1600px) {
    body {
        font-size: 22px;
    }

    .page-header h1 {
        font-size: 44px;
    }

    .text-box {
        width: 80%;
        font-size: 22px;
        padding: 40px;
        border-width: 3px;
    }
}

/* ===========================================================
   ====================  BREADCRUMB — FINAL  ==================
   =========================================================== */

.breadcrumb {
    width: 80%;
    max-width: 1100px;
    margin: 20px auto 10px auto;
    padding: 10px 0 10px 2%;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    color: #333;
    line-height: 1.35;
    box-sizing: border-box;
}

    .breadcrumb a {
        color: #f47b20;
        font-weight: 600;
        text-decoration: none;
    }

        .breadcrumb a:hover {
            opacity: 0.85;
        }

    .breadcrumb .separator {
        color: #b3b3b3;
        white-space: nowrap;
    }

.breadcrumb-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

    .breadcrumb-icon img {
        height: 1em;
        width: auto;
        display: block;
    }

    /* групиране: икона + Начало + "/" */
    .breadcrumb-icon,
    .breadcrumb-icon + a,
    .breadcrumb-icon + a + .separator {
        white-space: nowrap !important;
    }

.breadcrumb a + .separator {
    white-space: nowrap;
}

/* позволяваме пренасяне само на текстовите части */
.breadcrumb a:not(:first-of-type),
.breadcrumb span:not(.separator):not(.breadcrumb-icon) {
    white-space: normal;
    word-break: break-word;
}

/* landscape смартфон */
@media (max-width: 760px) and (orientation: landscape) {
    .breadcrumb {
        width: 90%;
        font-size: 14px;
        padding: 8px 0 8px 2%;
        line-height: 1.3;
    }
}

/* ===========================================================
   ==========  PATCH ЗА ЗАГЛАВИЯТА В ПОРТРЕТ НА МОБИЛНИ ======
   =========================================================== */

@media (max-width: 768px) and (orientation: portrait) {

    .page-header {
        text-align: center !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

        .page-header h1 {
            padding-left: 0 !important;
            margin-left: 0 !important;
            text-align: center !important;
            width: 100%;
        }
}


/* Breadcrumb row alignment */
.breadcrumb-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.breadcrumb-row:first-child { flex-shrink: 0; }
.breadcrumb-row:last-child { flex: 1; }

/* Divider between document and DPO information */
.content-divider {
    border: 0;
    border-top: 1px solid #dddddd;
    width: 99%;
    margin: 24px auto;
}
.section-heading {
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 20px;
}

/* === ПЛАВНО ПОВДИГАНЕ НА ТЕКСТОВИТЕ ХИПЕРВРЪЗКИ === */
.text-box a,
.breadcrumb a {
    display: inline-block;
    transition: transform 0.2s ease;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .text-box a:hover,
    .breadcrumb a:hover {
        transform: translateY(-3px);
    }
}

/* Видим фокус при навигация с клавиатура */
.text-box a:focus-visible,
.breadcrumb a:focus-visible {
    outline: 2px solid #f47b20;
    outline-offset: 3px;
}
