/* AI News Publisher - Version 3.0.2 Typography Refinement */

/* --- GLOBAL RESET & FEED WRAPPER --- */

.ainp-unified-feed {
    max-width: 1100px !important;
    /* Slightly narrower for better focus */
    margin: 40px auto !important;
    padding: 0 20px !important;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    display: flex !important;
    flex-direction: column !important;
    gap: 60px !important;
}

.ainp-feed-item {
    border-bottom: 1px solid #f0f4f8 !important;
    padding-bottom: 50px !important;
}

.ainp-feed-item:last-child {
    border-bottom: none !important;
}

/* --- THE INTERNAL POST LAYOUT --- */

body .ainp-post-layout-wrapper {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

body .ainp-post-top-section {
    display: flex !important;
    flex-direction: column !important;
    gap: 35px !important;
    width: 100% !important;
}

@media (min-width: 900px) {
    body .ainp-post-top-section {
        flex-direction: row !important;
        align-items: flex-start !important;
        flex-wrap: nowrap !important;
    }
}

/* Left Column: Newspaper Image */
body .ainp-paper-column {
    flex: 0 0 35% !important;
    /* More balanced ratio */
    max-width: 100% !important;
}

body .ainp-paper-column img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    border: 1px solid #ddd !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06) !important;
    border-radius: 8px !important;
}

/* Right Column: Content Column */
body .ainp-content-column {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    min-width: 320px !important;
}

body .ainp-post-date {
    color: #e53935 !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    /* Decreased from 1.1rem */
    margin: 0 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

body .ainp-post-headline {
    color: #1a202c !important;
    font-size: 1.8rem !important;
    /* Decreased significantly from 2.4rem for better fit */
    font-weight: 800 !important;
    line-height: 1.2 !important;
    margin: 4px 0 !important;
    padding: 0 !important;
    border: none !important;
}

body .ainp-post-text {
    color: #4a5568 !important;
    line-height: 1.6 !important;
    /* Tighter line height */
    font-size: 1rem !important;
    /* Decreased from 1.15rem */
}

body .ainp-post-text p {
    margin-bottom: 15px !important;
}

/* Mobile Adjustments */
@media (max-width: 899px) {
    body .ainp-post-headline {
        font-size: 1.5rem !important;
    }

    body .ainp-paper-column {
        flex: 0 0 100% !important;
    }

    body .ainp-content-column {
        min-width: 0 !important;
    }
}

/* --- ROW 2: GALLERY CAROUSEL --- */
body .ainp-gallery-carousel-wrapper {
    position: relative !important;
    margin-top: 30px !important;
    padding-top: 25px !important;
    border-top: 1px solid #f0f4f8 !important;
    width: 100% !important;
}

body .ainp-carousel-track-container {
    overflow: hidden !important;
}

body .ainp-carousel-track {
    display: flex !important;
    gap: 15px !important;
    overflow-x: auto !important;
    scroll-behavior: smooth !important;
    padding-bottom: 15px !important;
}

body .ainp-carousel-slide {
    flex: 0 0 300px !important;
}

body .ainp-carousel-slide img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04) !important;
}

/* Hide legacy elements */
.ainp-news-grid,
.ainp-grid-card,
.ainp-modal-overlay,
.ainp-reader-container {
    display: none !important;
}