/* =========================================
   СТОРІНКА НОВИН ТА ВІДГУКІВ
   (Вантажиться тільки на сторінці новин/відгуків)
========================================= */

.news-page-section {
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 60px;
    background-color: var(--bg-color);
    position: relative;
}

.news-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 calc(var(--grid-offset) + 30px);
}

/* --- Заголовок та хлібні крихти --- */
.news-header-block {
    margin-bottom: 50px;
}

.news-breadcrumbs {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.news-breadcrumbs a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-breadcrumbs a:hover { color: #fff; }

.news-main-title {
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.1;
}

/* --- Загальні стилі тексту карток --- */
.news-date {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.news-title {
    font-size: 22px;
    font-weight: 700;
    color: #000;
    margin-bottom: 15px;
    line-height: 1.3;
}

.news-excerpt {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
    font-weight: 400;
}

.news-read-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #000;
    border: 1px solid #ddd;
    text-decoration: none;
    transition: all 0.3s ease;
    width: fit-content;
}

.news-read-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.mt-auto { margin-top: auto; }

/* --- ГОЛОВНА НОВИНА (З ФІКСОВАНОЮ ВИСОТОЮ) --- */
.featured-news-card {
    display: flex;
    background-color: #fff;
    margin-bottom: 80px;
    height: 380px; 
    overflow: hidden;
}

.featured-img-wrap {
    width: 50%;
    height: 100%;
    flex-shrink: 0;
}

.featured-img-wrap img,
.featured-img-wrap iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.featured-img-wrap iframe {
    border: 0;
    background: #000;
}

.news-video-wrap {
    background: #000;
}

.featured-content {
    width: 50%;
    height: 100%;
    padding: 40px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.featured-content .news-title {
    font-size: 28px;
}

/* --- Секція інших новин --- */
.other-news-header {
    margin-bottom: 40px;
}

.news-subtitle {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.other-news-title {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    margin: 0;
}

/* --- Сітка новин --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 20px;
}

.news-card {
    background-color: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card-img {
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.news-card-img img,
.news-card-img iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-card-img img {
    transition: transform 0.5s ease;
}

.news-card-img iframe {
    border: 0;
    background: #000;
}

.news-card:hover .news-card-img img { transform: scale(1.05); }
.news-card:hover .news-card-img.news-video-wrap iframe { transform: none; }

.news-card-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}



/* --- РОЗГОРТАННЯ ПОВНОГО ТЕКСТУ НОВИНИ --- */
.news-excerpt p {
    margin: 0;
}

.news-excerpt-collapsible {
    width: 100%;
}

.news-excerpt-inner {
    position: relative;
    max-height: 76px;
    overflow: hidden;
    transition: max-height 0.35s ease;
    padding-right: 2px;
}

.news-excerpt-featured .news-excerpt-inner {
    max-height: 102px;
}

.news-excerpt-collapsible:not(.is-expanded) .news-excerpt-inner::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 34px;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 85%);
}

.news-excerpt-collapsible.is-expanded .news-excerpt-inner {
    max-height: 160px;
    overflow-y: auto;
    padding-right: 10px;
}

.news-excerpt-featured.is-expanded .news-excerpt-inner {
    max-height: 125px;
}

.news-excerpt-inner::-webkit-scrollbar {
    width: 4px;
}

.news-excerpt-inner::-webkit-scrollbar-track {
    background: #eee;
}

.news-excerpt-inner::-webkit-scrollbar-thumb {
    background: var(--primary);
}

.news-excerpt-toggle {
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.news-excerpt-toggle:hover {
    opacity: 0.75;
}

/* --- ОРАНЖЕВИЙ БЛОК ЗВ'ЯЗКУ (CTA) ДЛЯ НОВИН --- */
.category-cta-section {
    padding: 60px 0 80px 0;
    position: relative;
    z-index: 5;
    width: calc(100% - (var(--grid-offset, 60px) * 2));
    max-width: calc(var(--max-width, 1600px) - (var(--grid-offset, 60px) * 2));
    margin: 0 auto;
}

.cta-orange-box {
    background-color: var(--primary);
    padding: 50px 60px;
    display: flex; 
    flex-direction: row; 
    align-items: center; 
    justify-content: space-between; 
    gap: 40px;
    /* Розтягуємо чітко від лінії до лінії сітки (як на твоєму скріні) */
    width: calc(100% - (var(--grid-offset) * 2)); 
    max-width: calc(var(--max-width) - (var(--grid-offset) * 2));
    margin: 0 auto;
}

.cta-orange-box h3 { 
    color: #fff; font-size: 24px; font-weight: 600; margin: 0; line-height: 1.4; max-width: 700px; text-align: left;
}

.cta-orange-box .btn-outline {
    display: inline-flex; justify-content: center; align-items: center;
    border: 2px solid #fff; background-color: transparent; color: #fff; 
    padding: 14px 30px; height: auto;
    text-decoration: none; font-weight: 600; font-size: 13px; text-transform: none;
    transition: 0.3s; width: auto; white-space: nowrap;
}

.cta-orange-box .btn-outline:hover { 
    background: #fff; color: var(--primary); border-color: #fff; 
}


/* =========================================
   АДАПТИВНІСТЬ
========================================= */
@media (max-width: 1440px) {
    .featured-content { padding: 40px; }
    .featured-content .news-title { font-size: 24px; }
    .news-card-content { padding: 25px; }
}

@media (max-width: 1200px) {
    .featured-news-card { height: 340px; }
    .news-grid { gap: 20px; }
    .news-card-img { height: 200px; }
    .cta-orange-box { padding: 40px; }
}

@media (max-width: 1024px) {
    .featured-news-card { flex-direction: column; height: auto; }
    .featured-img-wrap { width: 100%; height: 300px; }
    .featured-content { width: 100%; padding: 40px; }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .cta-orange-box { flex-direction: column; text-align: center; gap: 30px; }
    .cta-orange-box h3 { font-size: 20px; text-align: center; }
}

@media (max-width: 768px) {
    .news-grid { grid-template-columns: 1fr; }
    .news-card-img { height: 220px; }
    .news-excerpt-collapsible.is-expanded .news-excerpt-inner { max-height: 190px; }
    .news-excerpt-featured.is-expanded .news-excerpt-inner { max-height: 190px; }
    .category-cta-section {
        width: calc(100% - (var(--grid-offset, 20px) * 2));
        padding: 40px 0 60px;
    }
    .cta-orange-box { 
        width: calc(100% - (var(--grid-offset) * 2)); 
        padding: 40px 20px; 
        align-items: center; text-align: center; gap: 15px; 
    }
    .cta-orange-box h3 { font-size: 16px; text-align: center; }
}



/* --- Лінія та хрестики (як у dynamic-category.css) --- */
.news-page-section {
    overflow: visible;
}

.section-bottom-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    z-index: 50;
}

.section-bottom-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100vw;
    right: -100vw;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.15);
    z-index: 1;
}

.section-bottom-line .cross {
    position: absolute;
    top: 0;
    width: 11px;
    height: 11px;
    z-index: 2;
}

.section-bottom-line .cross.left {
    left: 0;
    transform: translate(-50%, -50%);
}

.section-bottom-line .cross.right {
    right: 0;
    transform: translate(50%, -50%);
}




.news-page-section .section-bottom-line .cross.left {
    left: calc(var(--grid-offset, 60px) * 1);
    transform: translate(-50%, -50%);
}

.news-page-section .section-bottom-line .cross.right {
    right: calc(var(--grid-offset, 60px) * 1);
    transform: translate(50%, -50%);
}



@media (max-width: 768px) {
    .news-page-section .section-bottom-line .cross.left {
        left: var(--grid-offset, 20px);
    }
    .news-page-section .section-bottom-line .cross.right {
        right: var(--grid-offset, 20px);
    }
}