/**
 * Sweet Aggregator RSS - Public Styles
 * Styled to match Sweetwater Group design aesthetic
 * Rebuilt with Flexbox for robust responsive layout
 */

:root {
    --sweet-primary-color: #ca9f49;
    --sweet-primary-hover: #b08a3d;
    --sweet-text-dark: #ffffff;
    --sweet-text-medium: #cccccc;
    --sweet-border-color: #333333;
    --sweet-bg-item: transparent;
    --sweet-shadow-sm: none;
    --sweet-shadow-md: none;
    --sweet-radius: 0px;
    --sweet-transition: all 0.3s ease;
}

/* ============================================
   GRID CONTAINER - FLEXBOX LAYOUT
   ============================================ */

.sweet-news-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin: 30px auto;
    justify-content: flex-start; /* Align left as per design */
    max-width: 1400px;
    font-family: "Oswald", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; /* Assuming Oswald or similar for the uppercase style */
}

/* ============================================
   NEWS ITEM CARDS
   ============================================ */

.sweet-news-item {
    background: var(--sweet-bg-item);
    border: none;
    border-radius: 0;
    padding: 0;
    transition: var(--sweet-transition);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.sweet-news-item:hover {
    transform: translateY(-4px);
}

/* ============================================
   COLUMN CONTROL CLASSES
   ============================================ */

/* 1 Column Layout */
.sweet-cols-1 .sweet-news-item {
    flex-basis: 100%;
    max-width: 100%;
}

/* 2 Column Layout */
.sweet-cols-2 .sweet-news-item {
    flex: 0 0 calc(50% - 20px);
    max-width: calc(50% - 20px);
    min-width: 0;
}

/* 3 Column Layout */
.sweet-cols-3 .sweet-news-item {
    flex: 0 0 calc(33.333% - 27px);
    max-width: calc(33.333% - 27px);
    min-width: 0;
}

/* 4 Column Layout */
.sweet-cols-4 .sweet-news-item {
    flex: 0 0 calc(25% - 30px);
    max-width: calc(25% - 30px);
    min-width: 0;
}

/* 5 Column Layout */
.sweet-cols-5 .sweet-news-item {
    flex-basis: calc(20% - 32px);
    max-width: calc(20% - 32px);
}

/* 6 Column Layout */
.sweet-cols-6 .sweet-news-item {
    flex-basis: calc(16.666% - 34px);
    max-width: calc(16.666% - 34px);
}

/* ============================================
   CAROUSEL MODE
   ============================================ */

.sweet-news-grid.sweet-carousel {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--sweet-primary-color) var(--sweet-border-color);
}

.sweet-news-grid.sweet-carousel .sweet-news-item {
    flex: 0 0 320px;
    scroll-snap-align: start;
    min-width: 320px;
}

.sweet-news-grid.sweet-carousel::-webkit-scrollbar {
    height: 8px;
}

.sweet-news-grid.sweet-carousel::-webkit-scrollbar-track {
    background: var(--sweet-border-color);
    border-radius: 4px;
}

.sweet-news-grid.sweet-carousel::-webkit-scrollbar-thumb {
    background: var(--sweet-primary-color);
    border-radius: 4px;
}

.sweet-news-grid.sweet-carousel::-webkit-scrollbar-thumb:hover {
    background: var(--sweet-primary-hover);
}

/* ============================================
   CARD CONTENT
   ============================================ */

/* Image Container */
.sweet-news-image {
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 0;
    background: transparent;
    position: relative;
}

.sweet-news-image img {
    width: 100%;
    height: 250px; /* Slightly taller */
    object-fit: cover;
    border-radius: 0;
    transition: var(--sweet-transition);
}

.sweet-news-item:hover .sweet-news-image img {
    transform: scale(1.03);
}

/* Date */
.sweet-news-date {
    color: var(--sweet-primary-color);
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 12px;
    text-transform: uppercase;
    font-weight: 800;
}

/* Title */
.sweet-news-title {
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
    flex-grow: 0;
}

.sweet-news-title a {
    text-decoration: none;
    color: var(--sweet-text-dark);
    transition: color 0.2s ease;
}

.sweet-news-title a:hover {
    color: var(--sweet-primary-color);
}

/* Excerpt */
.sweet-news-excerpt {
    margin-bottom: 20px;
    color: var(--sweet-text-medium);
    font-size: 16px;
    line-height: 1.6;
    flex-grow: 1;
}

/* Read More Button - Styled as Text */
.sweet-news-link {
    display: inline-block;
    padding: 0;
    background: transparent;
    color: var(--sweet-text-dark) !important;
    text-decoration: none;
    border-bottom: 2px solid var(--sweet-primary-color);
    border-radius: 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    transition: var(--sweet-transition);
    align-self: flex-start;
    margin-top: auto;
}

.sweet-news-link:hover {
    background: transparent;
    color: var(--sweet-primary-color) !important;
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .sweet-news-grid {
        gap: 30px;
    }

    /* 3+ columns become 2 columns on tablet */
    .sweet-cols-3 .sweet-news-item,
    .sweet-cols-4 .sweet-news-item,
    .sweet-cols-5 .sweet-news-item,
    .sweet-cols-6 .sweet-news-item {
        flex-basis: calc(50% - 15px);
        max-width: calc(50% - 15px);
    }

    /* Carousel items slightly smaller */
    .sweet-news-grid.sweet-carousel .sweet-news-item {
        flex: 0 0 280px;
        min-width: 280px;
    }

    .sweet-news-image img {
        height: 200px;
    }

    .sweet-news-title {
        font-size: 20px;
    }

    .sweet-news-excerpt {
        font-size: 15px;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    .sweet-news-grid {
        gap: 30px;
        margin: 20px 0;
    }

    /* All columns become 1 column on mobile (except carousel) */
    .sweet-news-grid:not(.sweet-carousel) .sweet-news-item {
        flex-basis: 100%;
        max-width: 100%;
        min-width: 100%;
    }

    .sweet-news-item {
        padding: 0;
    }

    /* Carousel items on mobile */
    .sweet-news-grid.sweet-carousel .sweet-news-item {
        flex: 0 0 260px;
        min-width: 260px;
    }

    .sweet-news-image {
        margin-bottom: 15px;
    }

    .sweet-news-image img {
        height: 180px;
    }

    .sweet-news-title {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .sweet-news-excerpt {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .sweet-news-link {
        font-size: 13px;
    }
}

/* ============================================
   NO NEWS MESSAGE
   ============================================ */

.sweet-news-grid+p {
    text-align: center;
    color: var(--sweet-text-medium);
    font-size: 16px;
    padding: 40px 20px;
}