/* --- General & Font Styles --- */
@font-face {
    font-family: 'Montserrat Armenian';
    src: url('../fonts/web_font/Montserratarm-Regular.woff2') format('woff2'),
         url('../fonts/web_font/Montserrat-Armenian-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat Armenian bold';
    src: url('../fonts/web_font/Montserratarm-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat Armenian semiBold';
    src: url('../fonts/web_font/Montserratarm-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat Armenian light';
    src: url('../fonts/web_font/Montserratarm-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
}

body {
    font-family: 'Montserrat Armenian', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #FFFFFF;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Main Layout Structure (Desktop First) --- */
.news-section {
    margin: 2% 4%;
}

.news-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 80px;
    align-items: flex-start;
}

.news-column {
    width: calc(50% - 14px); /* Main content column */
}

.read-also-column {
    width: calc(25% - 13px); /* Middle "Read Also" column */
}

.ads-right-sidebar {
    width: 25%; /* Right ads column */
}

.vertical-divider {
    width: 1.5px;
    background-color: #EAEAEA;
    align-self: stretch;
}

/* --- News Column (Left) --- */
.information {
    background-color: #F9F9F9;
    padding: 20px;
    padding-top: 77px; /* Top padding to make space for the overlapping image */
    border-radius: 10px;
    position: relative;
}

.information .news-image-and-title {
    margin-top: -67px; /* Pulls the image up to overlap the top padding */
    margin-bottom: 20px;
}

.information .news-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.information .news-heading h1 {
    font-size: 24px;
    color: #1E1E1E;
    font-family: 'Montserrat Armenian semiBold';
    margin: 0;
}

.information .news-content {
    font-size: 14px;
    line-height: 1.5;
    color: #6C6C6C;
}

.information .news-content ul {
    list-style-type: disc;
    padding-inline-start: 40px;
}

.postDate {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 11px;
    color: #AFAFAF;
    font-family: 'Montserrat Armenian light';
}

/* --- Media Gallery (Inside News Column) --- */
.media-gallery-wrapper {
    position: relative;
    width: 100%;
    margin-top: 20px;
}

.media-gallery {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
    gap: 10px;
    padding-bottom: 10px; /* Space for potential scrollbar without layout shift */
}

.media-gallery::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.media-item {
    flex: 0 0 calc(33.333% - 7px); /* Shows 3 items by default */
    min-width: 150px;
}

.media-item img,
.media-item video,
.media-item iframe {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    display: block;
    object-fit: cover;
}

.media-scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.media-scroll-arrow.left {
    left: -20px;
    display: none; /* Hidden by default, shown by JS */
}

.media-scroll-arrow.left.visible {
    display: flex;
}

.media-scroll-arrow.right {
    right: -20px;
}

.media-scroll-arrow img {
    width: 20px;
    height: 20px;
}

/* --- Read Also Column (Middle) --- */
.read-also-column {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 12px;
    height: fit-content;
}

.read-also-column h3 {
    font-family: 'Montserrat Armenian semiBold';
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 20px;
    color: #833F6D;
}

.read-also-card {
    display: flex;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
    text-decoration: none;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.read-also-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.read-also-image img {
    width: 98px;
    height: 96px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin: 7px;
}

.read-also-content {
    /* FIXED: Added flex: 1 to ensure this container takes up available space. */
    flex: 1;
    min-width: 0; /* Prevents text overflow issues in flex containers */
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.read-also-content h4,
.read-also-content p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.read-also-content h4 {
    margin-bottom: 6px;
    font-size: 14px;
    font-family: 'Montserrat Armenian semiBold';
    color: #1E1E1E;
    -webkit-line-clamp: 2; /* Limit title to 2 lines */
}

.read-also-content p {
    font-size: 13px;
    color: #6C6C6C;
    -webkit-line-clamp: 2; /* Limit description to 2 lines */
}

/* --- Ads Column (Right) --- */
.ads-right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ad-box {
    overflow: hidden;
    border-radius: 12px;
}

.ad-box img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

.ad-box.rotator a {
    display: none; /* JS will manage visibility */
}

/* === ԳՈՎԱԶԴԱՅԻՆ ԲԱՆՆԵՐ (Սա պետք է լինի ՄԻԱԿ կոդը) === */

.ad-banner {
    position: relative;
    max-width: 100%;
    margin: 20px 4%;
    border-radius: 10px;
    overflow: hidden; /* Սա կարևոր է, որպեսզի նկարի կլորացված անկյունները ճիշտ երևան */
    box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.05);
    /* ՈՉ ՄԻ `height` հատկություն այստեղ */
}

.ad-banner .ad-slide {
    display: none; /* Սկզբից բոլոր սլայդերը թաքնված են */
}

.ad-banner .ad-slide.active {
    display: block; /* JavaScript-ը ակտիվ սլայդին տալիս է այս կլասը, և այն երևում է */
}

/* ✨ ԱՄԵՆԱԿԱՐԵՎՈՐ ՄԱՍԸ ✨ */
.ad-banner img {
    display: block; /* Հեռացնում է նկարի տակի ավելորդ տարածությունը */
    width: 100%;    /* Նկարի լայնությունը հավասարեցնում է կոնտեյների լայնությանը */
    height: auto;   /* ԲԱՐՁՐՈՒԹՅՈՒՆԸ ԱՎՏՈՄԱՏ Է՝ սա պահպանում է նկարի ճիշտ համամասնությունները */
}
/*
================================================================================
--- Responsive Styles (for screens 800px and below) ---
================================================================================
*/
@media (max-width: 800px) {
    .news-section {
        width: calc(100vw - 20px);
        margin: 20px 10px;
    }

    .news-container {
        flex-direction: column;
        gap: 30px;
        margin-top: 20px;
    }

    .news-column,
    .read-also-column,
    .ads-right-sidebar {
        width: 100%;
    }
    
    .vertical-divider {
        display: none;
    }

    .information {
        padding: 20px;
    }

    .information .news-image-and-title {
        margin-top: 0;
    }

    .news-img {
        margin-bottom: 20px;
    }

    .news-heading h1 {
        font-size: 20px;
    }

    .news-content {
        font-size: 13px;
        margin-top: 15px;
    }

    .postDate {
        position: static; /* Let the date flow naturally at the end of the content */
        text-align: right;
        margin-top: 20px;
        font-size: 10px;
    }

    /* Adjust media gallery for touch scrolling */
    .media-item {
        flex: 0 0 80%; /* Show one full item and a part of the next one to encourage scrolling */
    }

    .media-item img,
    .media-item video,
    .media-item iframe {
        height: 180px;
    }
    
    .media-scroll-arrow {
        display: none !important; /* Hide scroll arrows on mobile */
    }
    
    .read-also-column h3 {
        text-align: left; /* Align header to the left on mobile for better readability */
    }
    
    /* Center sidebar ad boxes */
    .ads-right-sidebar {
        align-items: center;
    }
    
    .ad-box {
        width: 90%;
        max-width: 400px; /* Set a max-width for consistency */
        height: auto;
    }

    /* Swap visibility of desktop and mobile ad banners */
    #ad-banner {
        display: none;
    }
    #mobile-ad-banner {
        display: block;
        margin: 20px auto;
        width: calc(100vw - 20px);
    }
}