* {
    box-sizing: border-box; /* Makes sure padding and border are accounted for in the element's width */
}

html, body {
    overflow-x: hidden; /* Prevent horizontal scroll */
    font-family: "Ubuntu", sans-serif;  
    background-color: var(--bg-color);

}

.featured-section {
    padding-top: 8rem;
    margin-bottom: 4rem;
}

.blog-container {
    box-sizing: border-box;
    display: flex;          /* Use flexbox */
    justify-content: center; /* Center children horizontally */
    align-items: flex-start; /* Align children at the top (or modify as needed) */
    flex-wrap: wrap;        /* Allow wrapping of child elements */
    margin-left: auto;
    margin-right: auto;
    width: 100%;            /* You can adjust this width as needed */
    
}

/* Mobile Style (default) */
.featured-article {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--sm-margin);
}

.featured-article-link {
    text-decoration: none;
    margin-left: auto;
    margin-right: auto;
    gap: 0.75rem;
    max-width: 100%;
    display: block; /* Stack items vertically on mobile */
}

.featured-article-image-container {
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 0.25rem;
    position: relative;
    width: 100%;
    aspect-ratio: 3/2;
    grid-column: span 7 / span 7; /* Take up 7 columns in desktop */

}

.featured-article-image {
    position: absolute;
    /* Position the image inside the container */
    top: 0;
    left: 0;
    width: 100%;
    /* Make sure the image covers the container */
    height: 100%;
    /* Ensure the image fills the container vertically */
    object-fit: cover;
    /* Maintain aspect ratio without stretching */
}

.featured-article-text-container {
    padding: 0;
    width: 100%;
    color: var(--primary-text-color);
}

.featured-article-title {
    margin-bottom: var(--xs-margin);
    font-weight: 600;
    font-size: var(--lg-font); /* Adjust font size for mobile */
    line-height: 2rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
}

.article-category {
    display: block;
    font-size: var(--xxs-font); /* Adjusted for mobile */
    color: var(--primary);
    font-weight: 600;
    margin-bottom: var(--sm-margin);
}

.article-category:hover { 
    color: var(--primary-highlight);   
}
.recent-articles-container {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat( 1, minmax(0, 1fr)); /* mobile, by default one column */
}

.recent-article-card {
    box-sizing: border-box;
    width: 100%;
}

.recent-article-img-container {
    margin-bottom: 0.75rem;
    overflow: hidden;
    border-radius: 0.25rem;
    position: relative; /* To allow the padding trick to work */
    width: 100%; /* Make sure the container is responsive */
    padding-bottom: 56.25%; /* 16:9 aspect ratio (adjust this value to your needs) */
}

.recent-article-img-container img {
    position: absolute; /* Position the image inside the container */
    top: 0;
    left: 0;
    width: 100%; /* Make sure the image covers the container */
    height: 100%; /* Ensure the image fills the container vertically */
    object-fit: cover; /* Maintain aspect ratio without stretching */
}


.recent-articles-category-container {
    margin-top: 0;
    display: flex;
    align-items: baseline;
    column-gap: var(--md-margin);
    font-size: 0.68rem;
    
}
.recent-article-date {
    margin: 0;
    padding: 0;
    border: 0 solid;
    color: var(---primary-text-color);
}

.recent-article-excerpt{
    color: var(--primary-text-color);
}

.recent-article-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: .5rem;
    display: inline-block;
    line-height: 1.25rem;
    color: var(--primary-text-color);
}

.recent-article-link {
    text-decoration: none;
}



.recent-article-link:hover {
    color: var(--primary-text-color);
    
}

.image-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 2.25rem; /* Equivalent to Tailwind's mb-9 */
}

.image-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 2; /* Maintains the 3:2 aspect ratio */
    border-radius: 1rem; /* Equivalent to Tailwind's rounded-2xl */
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the container */
    object-position: center; /* Centers the image both horizontally & vertically */
    position: absolute;
}


/* ----------- LOAD MORE BTN ---------- */

.load-more-container {
    text-align: center;
    margin-top: 1.75rem;
}
.load-more-link {
    font-size: 1.1rem;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    position: relative;
    display: inline-block;
    padding-right: 30px;
    transition: all 0.3s ease;
}

/* Hover effect on the link */
.load-more-link:hover {
    color: var(--primary-highlight);
}

.load-more-icon {
    height: 16px;
    width: 16px;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
    font-size: 1.2rem;
    color: var(--primary);
    transition: transform 0.3s ease; /* Transition for the transform effect */
}



/* Hover effect on the icon when the link is hovered */
.load-more-link:hover .load-more-icon {
    transform: translateY(-50%) translateX(5px); /* Adjust the translation as needed */
    color: var(--primary-highlight);
}


.load-more-icon:hover {
    transform: translateY(-50%) translateX(5px);
    /* Slightly move the arrow to the right on hover */
}

/* ---------------------- CATEGORIES SECTION ----------------- */

.category-section {
    margin-bottom: 4rem;
}

.category-title-section {
    color: var(--primary-text-color);
}

.category-title {
    font-weight: 800;
    color: #fcfcfc;
    text-shadow: 0 0 4px #000000;
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
  
  .category-description {
    margin-top: 0.5rem;
    color: #fcfcfc;
    font-weight: 600;
    text-shadow: 0 0 2px #000000;
  
  }

  #category-slider-btn-right {
    background-color:var(--primary);
    color: #fcfcfc   
  }

  #category-slider-btn-left {
  background-color: var(--primary);
  color: #fcfcfc 
  }

  #category-slider-btn-right:hover {
  background-color: var(--primary-highlight)
  }

  #category-slider-btn-left:hover {
  background-color: var(--primary-highlight)
  }
  
  

@media (min-width: 480px) {
    .blog-container {
        padding-left: 32px;
        padding-right: 32px;
    } 

}

@media (min-width: 768px) {

    .featured-section {
        margin-bottom: 6rem;
    }

    .featured-article {
        margin-bottom: var(--lg-margin);
    }

    .featured-article-link {
        display: grid;
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .featured-article-text-container {
        padding: 1.5rem;
        grid-column: span 5 / span 5; /* Take up 5 columns in desktop */
    }

    .recent-article-title {
        font-size: 1.25rem;
    }

    .featured-article-title {
        font-size: var(--xl-font); /* Adjusted font size for desktop */
        line-height: 2.5rem;
    }

    .article-category {
        font-size: var(--xxs-font); /* Adjusted for desktop */
    }

    .recent-articles-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
    }

    .blog-container {
        padding-left: 64px;
        padding-right: 64px;
    }

    .recent-articles-category-container {
        font-size: .75rem;
    }

    .recent-article-img-container {
        margin-bottom: 1rem;
    }

    .picks-section {
        margin-bottom: 6rem;
    }

    .category-section {
        margin-bottom: 6rem;
    }
}

@media (min-width: 1024px) {    

    .featured-section {
        margin-bottom: 7.5rem;
    }

    .recent-articles-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.5rem
    }

    .blog-container {
        padding-left: 80px;
        padding-right: 80px;
    }

    .picks-section {
        margin-bottom: 7.5rem;
    }

    .category-section {
        margin-bottom: 7.5rem;
    }

}

@media (min-width: 1536px) {
    .blog-container {
        padding-left: 0;
        padding-right: 0;
        max-width: 1280px;
    }
}