/* News Section CSS - Exact measurements from Figma Design */

/* News Section */
.news-section {
    /* padding: 8px 240px 60px 240px; */
    padding: 8px 24px 60px;
    background: #F3F3F3;
}

.news-container {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 1440px;
    margin: 0 auto;
    overflow: visible;
}

/* News Title */
.news-title {
    font-family: 'SF Pro', sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 40px;
    color: #3D3D3D;
    text-align: center;
    margin: 0;
}

/* News Grid */
.news-grid {
    display: flex;
    gap: 24px;
    width: 100%;
    overflow: visible;
    /* padding: 8px 0; */
    padding: 0;
}

/* News Card Link Wrapper */
.news-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 330px;
    flex-shrink: 0;
}

/* News Card */
.news-card {
    width: 100%;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0px 4px 4px -8px rgba(0, 0, 0, 0.03),
                0px 4px 16px 10px rgba(16, 24, 40, 0.02),
                0px 2px 32px -4px rgba(16, 24, 40, 0.04);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-card-link:hover .news-card {
    transform: translateY(-4px);
    box-shadow: 0px 8px 8px -8px rgba(0, 0, 0, 0.06),
                0px 8px 24px 12px rgba(16, 24, 40, 0.04),
                0px 4px 40px -4px rgba(16, 24, 40, 0.08);
}

/* News Image */
.news-image {
    width: 100%;
    aspect-ratio: 330 / 192;
    position: relative;
    overflow: hidden;
}

.news-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
}

/* News Content */
.news-content {
    background: #FFFFFF;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* News Description */
.news-description {
    font-family: 'SF Pro', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    color: #3D3D3D;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* News Link */
.news-link {
    font-family: 'SF Pro', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    color: #4564ED;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-card-link:hover .news-link {
    text-decoration: underline;
}

/* View All Button */
.news-view-all {
    display: flex;
    justify-content: center;
    padding: 6px 0;
}

.news-view-all-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'SF Pro', sans-serif;
    font-size: 16px;
    font-weight: 410;
    line-height: 22px;
    color: #4564ED;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.news-view-all-link:hover {
    gap: 10px;
}

.news-view-all-link .arrow-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.news-view-all-link:hover .arrow-icon {
    transform: translateX(4px);
}

/* iPad Portrait - Scroll mode */
@media (min-width: 768px) and (max-width: 834px) and (orientation: portrait) {
    .news-section {
        /* padding: 12px 40px 44px 40px; */
        padding: 12px 24px 44px;
    }

    .news-container {
        padding: 24px 20px;
        gap: 20px;
    }

    .news-title {
        font-size: 24px;
        line-height: 32px;
    }

    .news-grid {
        /* gap: 16px;
        overflow-x: auto;
        overflow-y: visible;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #D1D1D1 transparent; */
    }

    .news-grid::-webkit-scrollbar {
        height: 6px;
    }

    .news-grid::-webkit-scrollbar-track {
        background: transparent;
    }

    .news-grid::-webkit-scrollbar-thumb {
        background: #D1D1D1;
        border-radius: 3px;
    }

    .news-grid::-webkit-scrollbar-thumb:hover {
        background: #B0B0B0;
    }

    .news-card-link {
        width: 280px;
        flex-shrink: 0;
    }

    .news-description {
        font-size: 15px;
    }

    .news-link {
        font-size: 15px;
    }
}

/* iPad Landscape (11" and 10.9") - Scroll mode */
@media (min-width: 835px) and (max-width: 1194px) {
    .news-section {
        /* padding: 8px 60px 44px 60px; */
        padding: 8px 24px 44px;
    }

    .news-container {
        padding: 24px 24px;
    }

    .news-title {
        font-size: 24px;
        line-height: 32px;
    }

    .news-grid {
        /* gap: 18px;
        overflow-x: auto;
        overflow-y: visible;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #D1D1D1 transparent; */
    }

    .news-grid::-webkit-scrollbar {
        height: 6px;
    }

    .news-grid::-webkit-scrollbar-track {
        background: transparent;
    }

    .news-grid::-webkit-scrollbar-thumb {
        background: #D1D1D1;
        border-radius: 3px;
    }

    .news-grid::-webkit-scrollbar-thumb:hover {
        background: #B0B0B0;
    }

    .news-card-link {
        width: 280px;
        flex-shrink: 0;
    }
}

/* iPad Pro 12.9" and Medium Desktop - Scroll mode */
@media (min-width: 1024px) and (max-width: 1440px) {
    .news-section {
        /* padding: 8px 40px 48px 40px; */
        padding: 8px 24px 48px;
    }

    .news-grid {
        /* gap: 20px;
        overflow-x: auto;
        overflow-y: visible;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #D1D1D1 transparent; */
    }

    .news-grid::-webkit-scrollbar {
        height: 6px;
    }

    .news-grid::-webkit-scrollbar-track {
        background: transparent;
    }

    .news-grid::-webkit-scrollbar-thumb {
        background: #D1D1D1;
        border-radius: 3px;
    }

    .news-grid::-webkit-scrollbar-thumb:hover {
        background: #B0B0B0;
    }

    .news-card-link {
        width: 300px;
        flex-shrink: 0;
    }
}

/* Responsive Design */
@media (max-width: 1680px) {
    .news-section {
        /* padding: 8px 120px 44px 120px; */
        padding: 8px 24px 44px;
    }
}

@media (max-width: 1440px) {
    .news-section {
        /* padding: 8px 40px 44px 40px; */
        padding: 8px 16px 44px;
    }

    .news-grid {
        /* gap: 20px;
        overflow-x: auto;
        overflow-y: visible;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #D1D1D1 transparent; */
    }

    .news-grid::-webkit-scrollbar {
        height: 6px;
    }

    .news-grid::-webkit-scrollbar-track {
        background: transparent;
    }

    .news-grid::-webkit-scrollbar-thumb {
        background: #D1D1D1;
        border-radius: 3px;
    }

    .news-grid::-webkit-scrollbar-thumb:hover {
        background: #B0B0B0;
    }

    .news-card-link {
        width: 300px;
        flex-shrink: 0;
    }
}

@media (max-width: 1200px) {
    .news-section {
        /* padding: 8px 40px 44px 40px; */
        padding: 8px 16px 44px;
    }

    .news-title {
        font-size: 24px;
        line-height: 32px;
    }

    .news-grid {
        /* gap: 16px;
        overflow-x: auto;
        overflow-y: visible;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #D1D1D1 transparent; */
    }

    .news-grid::-webkit-scrollbar {
        height: 6px;
    }

    .news-grid::-webkit-scrollbar-track {
        background: transparent;
    }

    .news-grid::-webkit-scrollbar-thumb {
        background: #D1D1D1;
        border-radius: 3px;
    }

    .news-grid::-webkit-scrollbar-thumb:hover {
        background: #B0B0B0;
    }

    .news-card-link {
        width: 280px;
        flex-shrink: 0;
    }
}

@media (max-width: 1023px) and (orientation: portrait) {
    .news-grid {
        overflow: hidden;
    }
}

@media (max-width: 991px) {
    .news-section {
        /* padding: 12px 40px 44px 40px; */
        padding: 12px 16px 44px;
    }

    .news-container {
        padding: 20px 16px;
        gap: 20px;
    }

    .news-title {
        font-size: 22px;
        line-height: 28px;
    }

    .news-grid {
        /* gap: 16px; */
        /* overflow-x: auto;
        overflow-y: visible; */
        /* scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #D1D1D1 transparent; */
    }

    .news-grid::-webkit-scrollbar {
        height: 6px;
    }

    .news-grid::-webkit-scrollbar-track {
        background: transparent;
    }

    .news-grid::-webkit-scrollbar-thumb {
        background: #D1D1D1;
        border-radius: 3px;
    }

    .news-grid::-webkit-scrollbar-thumb:hover {
        background: #B0B0B0;
    }

    .news-card-link {
        width: 280px;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .news-section {
        /* padding: 12px 20px 44px 20px; */
        /* padding: 12px 16px 44px; */
    }

    /* .news-container {
        padding: 16px;
        gap: 16px;
    } */

    /* .news-title {
        font-size: 20px;
        line-height: 28px;
    } */

    /* .news-grid {
        gap: 12px;
        overflow-x: auto;
        overflow-y: visible;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #D1D1D1 transparent;
    } */

    /* .news-grid::-webkit-scrollbar {
        height: 6px;
    }

    .news-grid::-webkit-scrollbar-track {
        background: transparent;
    }

    .news-grid::-webkit-scrollbar-thumb {
        background: #D1D1D1;
        border-radius: 3px;
    }

    .news-grid::-webkit-scrollbar-thumb:hover {
        background: #B0B0B0;
    } */

    .news-card-link {
        width: 280px;
        flex-shrink: 0;
    }

    .news-description {
        font-size: 16px;
    }

    .news-link {
        font-size: 14px;
    }

    /* ------------------------------- */
    .news-section {
        padding: 0 !important;
    }

    .news-container {
        background: transparent !important;
        border-radius: 0 !important;
        padding: 16px !important;
        gap: 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .news-title {
        font-size: 20px;
        line-height: 28px;
        font-weight: 700;
        text-align: center;
        /* margin-bottom: 16px; */
    }

    /* News grid becomes horizontal scroll */
    .news-grid {
        /* display: flex !important;
        flex-direction: row !important;
        gap: 16px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        width: 100vw !important;
        margin-left: -16px !important;
        margin-right: -16px !important;
        padding: 0 16px !important;
        box-sizing: border-box !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; 
        -ms-overflow-style: none;  */
    }

    /* .news-grid::-webkit-scrollbar {
        display: none;
    } */

    /* News card link wrapper - fixed 253px width */
    .news-card-link {
        flex: 0 0 auto !important;
        width: 253px !important;
        min-width: 253px !important;
        text-decoration: none !important;
        color: inherit !important;
        display: block !important;
    }

    /* News card - fixed 253px width */
    .news-card {
        width: 100% !important;
        border-radius: 12px;
        box-shadow: 0px 4px 4px -8px rgba(0, 0, 0, 0.03),
                    0px 4px 16px 10px rgba(16, 24, 40, 0.02),
                    0px 2px 32px -4px rgba(16, 24, 40, 0.04);
        overflow: hidden;
        background: white;
    }

    /* News image aspect ratio */
    .news-card .news-image {
        width: 100%;
        aspect-ratio: 330 / 192;
        overflow: hidden;
    }

    .news-card .news-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    /* News content padding */
    .news-content {
        padding: 12px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    /* News title text */
    .news-content h3,
    .news-content .news-card-title {
        font-family: 'SF Pro', sans-serif;
        font-size: 16px;
        font-weight: 400;
        line-height: 1.4;
        color: #3D3D3D;
        margin: 0;
    }

    /* Read more link */
    .news-content .news-link,
    .news-content a {
        font-family: 'SF Pro', sans-serif;
        font-size: 16px;
        font-weight: 400;
        line-height: 1.4;
        color: #4564ED;
        text-decoration: none;
    }

    /* View all button */
    .news-view-all {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        /* margin-top: 16px; */
        padding: 4px 0;
    }

    .news-view-all a {
        display: flex;
        align-items: center;
        gap: 6px;
        font-family: 'SF Pro', sans-serif;
        font-size: 16px;
        /* font-weight: 510; */
        line-height: 22px;
        color: #4564ED;
        text-decoration: none;
    }

    .news-view-all svg,
    .news-view-all img {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 767px) {
    .news-section {
        overflow: hidden;
    }

    .news-grid {
        overflow: visible;
    }
}

@media (max-width: 480px) {
    .news-section {
        /* padding: 12px 16px 44px 16px; */
    }

    .news-title {
        font-size: 18px;
        line-height: 24px;
    }
}
