
/* =========================================================
   BLOGZINE — RESPONSIVE DESIGN
   Desktop / Tablet / Mobile
   Image ratio: 4:3

   Original Webestica overlay is preserved in style.css
   ========================================================= */


/* =========================================================
   1. CARD IMAGE — 4:3
   ========================================================= */

img.card-img-4x3 {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
    background: var(--bs-tertiary-bg, #f7f8f9);
}


/* =========================================================
   2. RECENT NEWS IMAGES
   ========================================================= */

.blogzine-recent-image {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bs-tertiary-bg, #f7f8f9);
}

.blogzine-recent-image > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}


/* =========================================================
   3. CARD GRID
   ========================================================= */

.card-grid .card-grid-lg,
.card-grid .card-grid-sm {
    min-width: 0;
    overflow: hidden;
}

.card-grid .card {
    width: 100%;
    min-width: 0;
}


/* =========================================================
   4. CARD BODY
   ========================================================= */

.card-body {
    min-width: 0;
    overflow-wrap: break-word;
}


/* =========================================================
   5. FEATURED CARD
   Custom gradient overlay
   ========================================================= */

.blogzine-featured-card {
    position: relative;
    width: 100%;
    min-height: 420px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow: hidden;
    border: 0;
}

.blogzine-featured-card::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80%;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.blogzine-featured-card .card-img-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
}


/* =========================================================
   6. SMALL GRID CARDS
   Without additional overlay
   ========================================================= */

.blogzine-small-card {
    position: relative;
    width: 100%;
    min-height: 250px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow: hidden;
    border: 0;
}

.blogzine-small-card::before {
    content: none;
}

.blogzine-small-card .card-img-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}


/* =========================================================
   7. EDITOR SECONDARY CARDS
   Original Blogzine overlay from style.css
   ========================================================= */

.bz-editor-secondary {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 250px;
    overflow: hidden;
    background-size: cover;
    background-position: center left;
    background-repeat: no-repeat;
    border: 0;
}

/* Original card-overlay-bottom gradient is in style.css */
/* Do not add another ::before gradient here */

.bz-editor-secondary .card-img-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.bz-editor-secondary h4 {
    overflow-wrap: break-word;
}

.bz-editor-secondary .nav {
    position: relative;
    z-index: 3;
}


/* =========================================================
   8. NEWS CARD
   ========================================================= */

.blogzine-news-card {
    width: 100%;
    min-width: 0;
}

.blogzine-news-card .position-relative {
    overflow: hidden;
}

.blogzine-news-card .position-relative > a {
    position: relative;
    z-index: 0;
}

.blogzine-news-card .card-img-overlay {
    z-index: 1;
}

.blogzine-news-card .card-body {
    min-width: 0;
}


/* =========================================================
   9. RECENT POST
   ========================================================= */

.blogzine-recent-post {
    min-width: 0;
}

.blogzine-recent-post .row {
    min-width: 0;
}

.blogzine-recent-post .col-4,
.blogzine-recent-post .col-8 {
    min-width: 0;
}

.blogzine-recent-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
}

.blogzine-recent-post h6 {
    min-width: 0;
    overflow-wrap: break-word;
}


/* =========================================================
   10. TABLET
   Up to 991.98px
   ========================================================= */

@media (max-width: 991.98px) {

    .blogzine-featured-card {
        min-height: 380px;
    }

    .blogzine-small-card,
    .bz-editor-secondary {
        min-height: 240px;
    }

}


/* =========================================================
   11. MOBILE
   Up to 575.98px
   ========================================================= */

@media (max-width: 575.98px) {

    .card,
    .card-grid .card-grid-lg,
    .card-grid .card-grid-sm {
        width: 100%;
        min-width: 0;
    }

    .card-body,
    .blogzine-news-card .card-body {
        padding-left: 0;
        padding-right: 0;
    }

    .blogzine-featured-card {
        min-height: 360px;
    }

    .blogzine-featured-card h2 {
        font-size: 1.5rem;
    }

    .blogzine-featured-card p {
        font-size: 0.9rem;
    }

    .blogzine-small-card,
    .bz-editor-secondary {
        min-height: 230px;
    }

    .blogzine-small-card h4,
    .bz-editor-secondary h4 {
        font-size: 1.1rem;
    }

}


/* =========================================================
   12. SMALL MOBILE
   Up to 375px
   ========================================================= */

@media (max-width: 375px) {

    .card-title {
        overflow-wrap: anywhere;
    }

    .blogzine-featured-card {
        min-height: 320px;
    }

    .blogzine-small-card,
    .bz-editor-secondary {
        min-height: 210px;
    }

}


/* =========================================================
   13. FEEDBACK FORM
   ========================================================= */

.feedback-page fieldset.feedback-field {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}


/* =========================================================
   14. ACCESSIBILITY — REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    img.card-img-4x3,
    .blogzine-recent-image,
    .blogzine-recent-image > img,
    .blogzine-recent-thumb {
        transition: none !important;
        animation: none !important;
    }

}

/* Цветные иконки статистики */
.news-color-views {
    color: #0d6efd !important;
}

.news-color-comments {
    color: #20c997 !important;
}

.news-color-likes {
    color: #16a34a !important;
}

.news-color-dislikes {
    color: #dc2626 !important;
}

.news-rating__button {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5em 1.1em;
    font-size: .9rem;
    font-weight: 600;
    border-radius: var(--bs-border-radius-pill);
    cursor: pointer;
    user-select: none;
    border: 0;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
    transition: transform var(--news-transition), background var(--news-transition), color var(--news-transition), box-shadow var(--news-transition);
}

.news-rating__button--like {
    background: rgba(34, 197, 94, .12);
    color: #16a34a;
}

.news-rating__button--dislike {
    background: rgba(239, 68, 68, .12);
    color: #dc2626;
}





/* Сердце */
.news-rating__icon {
    color: #dc2626 !important;
}

/* Кнопка Нравится */
.news-rating__button--like,
.news-rating__button--like i {
    color: #16a34a !important;
}

/* Кнопка Не нравится */
.news-rating__button--dislike,
.news-rating__button--dislike i {
    color: #dc2626 !important;
}






/* =========================================================
   BLOGZINE HEADER — THEME LOGOS + THEME SWITCHER
   Uses the same data-bs-theme attribute as colormode.js
   ========================================================= */

/* Logo visibility */
html:not([data-bs-theme="dark"]) .light-mode-item {
    display: block !important;
}

html:not([data-bs-theme="dark"]) .dark-mode-item {
    display: none !important;
}

html[data-bs-theme="dark"] .light-mode-item {
    display: none !important;
}

html[data-bs-theme="dark"] .dark-mode-item {
    display: block !important;
}

/* Theme icon injected by colormode.js */
.modeswitch .theme-icon-active {
    display: block;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    overflow: visible;
}

/* The active SVG replaces the legacy Font Awesome pseudo-icon */
.modeswitch::before {
    content: none !important;
}

/* Keep the switch icon centered in both themes */
.modeswitch {
    align-items: center;
    justify-content: center;
    padding: 0;
}


/* =========================================================
   BLOGZINE 2.0 — VISUAL POLISH
   Scope: typography, card consistency, category labels,
   spacing and responsive refinements.
   Brand palette and DLE templates/functionality preserved.
   ========================================================= */

:root {
    --bz-radius-card: 14px;
    --bz-radius-badge: 6px;
    --bz-card-shadow: 0 8px 24px rgba(23, 32, 51, .07);
    --bz-card-shadow-hover: 0 14px 32px rgba(23, 32, 51, .12);
    --bz-heading-line: 1.18;
}

/* Typography hierarchy */
body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.navbar .nav-link,
.navbar-brand {
    font-family: "Manrope", "Inter", sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    line-height: var(--bz-heading-line);
    letter-spacing: -.025em;
    font-weight: 750;
}

#top-news-title,
section h1,
section h2 {
    letter-spacing: -.03em;
}

/* Unified card geometry without changing the existing grid */
.card-grid .card,
.blogzine-featured-card,
.blogzine-small-card,
.bz-editor-secondary,
.blogzine-news-card,
.blogzine-recent-post {
    border-radius: var(--bz-radius-card);
}

.card-grid .card,
.blogzine-news-card,
.blogzine-recent-post {
    box-shadow: var(--bz-card-shadow);
}

.card-grid .card,
.blogzine-news-card {
    transition: box-shadow .22s ease, transform .22s ease;
}

@media (hover: hover) and (pointer: fine) {
    .card-grid .card:hover,
    .blogzine-news-card:hover {
        box-shadow: var(--bz-card-shadow-hover);
    }
}

/* Consistent category pills; retain semantic Bootstrap colors */
.card-grid .badge,
.blogzine-news-card .badge,
.bz-editor-secondary .badge {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    min-height: 27px;
    padding: .34rem .68rem;
    border-radius: var(--bz-radius-badge);
    font-family: "Inter", sans-serif;
    font-size: .76rem;
    font-weight: 650;
    line-height: 1;
    letter-spacing: .005em;
    text-decoration: none;
}

/* More readable text over photography */
.card-grid .card-img-overlay h2,
.card-grid .card-img-overlay h3,
.card-grid .card-img-overlay h4,
.card-grid .card-img-overlay p,
.bz-editor-secondary .card-img-overlay h4 {
    text-shadow: 0 2px 12px rgba(0, 0, 0, .28);
}

.card-grid .card-img-overlay h2,
.card-grid .card-img-overlay h4 {
    line-height: 1.16;
}

.card-grid .card-img-overlay p {
    line-height: 1.48;
}

/* More deliberate spacing in the header */
.navbar-logo-section .navbar-brand-item {
    max-width: 100%;
    height: auto;
}

.navbar .navbar-nav {
    column-gap: .12rem;
}

.navbar .nav-link {
    font-weight: 650;
    letter-spacing: -.01em;
}

/* Recent article blocks */
.blogzine-recent-post {
    padding: .55rem;
    border-color: rgba(23, 32, 51, .07);
}

.blogzine-recent-title {
    font-family: "Manrope", sans-serif;
    font-size: .98rem;
    font-weight: 750;
    line-height: 1.32;
    letter-spacing: -.018em;
}

.blogzine-recent-date {
    margin-top: .45rem;
    color: var(--bs-secondary-color);
    font-size: .8rem;
    line-height: 1.4;
}

/* Section headings */
#top-news-title,
h2.h4,
h2.h5 {
    font-weight: 800;
}

/* Keyboard accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(53, 106, 230, .55);
    outline-offset: 3px;
}

/* Tablet and mobile: avoid cramped overlays and headings */
@media (max-width: 991.98px) {
    .card-grid .card-grid-lg,
    .blogzine-featured-card {
        min-height: 360px;
    }

    .card-grid .card-img-overlay {
        padding: 1.15rem !important;
    }
}

@media (max-width: 575.98px) {
    :root {
        --bz-radius-card: 12px;
    }

    .card-grid .card-grid-lg,
    .blogzine-featured-card {
        min-height: 330px;
    }

    .card-grid .card-img-overlay h2 {
        font-size: clamp(1.45rem, 6vw, 2rem);
    }

    .card-grid .card-img-overlay h4 {
        font-size: 1.12rem;
    }

    .blogzine-recent-post {
        padding: .45rem;
    }

    .blogzine-recent-title {
        font-size: .9rem;
    }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .card-grid .card,
    .blogzine-news-card,
    .blogzine-recent-image img {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
