/* new_home.css */

/* Ensure styles are scoped to the homepage */
.home-container {
    /* You can add general styles for the homepage container if needed */
}

/* Hero Section */
.home-hero-section {
    background: url('/images/hero-background.jpg') center center/cover no-repeat;
    color: white;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.home-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Overlay for better text visibility */
}

.home-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    text-align: center;
}

.home-hero-content h1 {
    font-size: 3em;
    margin-bottom: 0.5em;
}

.home-hero-content p {
    font-size: 1.2em;
    margin-bottom: 1em;
}

.home-cta-button {
    background-color: #ff6f61;
    color: white;
    padding: 0.75em 1.5em;
    border: none;
    border-radius: 50px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.home-cta-button:hover {
    background-color: #e65b50;
}

/* Featured Articles Section */
.home-featured-articles-section {
    padding: 3em 2em;
    background-color: #f9f9f9;
}

.home-featured-articles-section h2 {
    font-size: 2em;
    margin-bottom: 1em;
}

.home-featured-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2em;
    margin-top: 1.5em;
}

.home-featured-article {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.home-featured-article:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
}

.home-featured-article img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.home-featured-article h3 {
    margin: 1em 0 0.5em 0;
    font-size: 1.5em;
}

.home-featured-article p {
    font-size: 1em;
    color: #555;
    padding: 0 1em 1em 1em;
}

/* Latest Articles Section */
.home-latest-articles-section {
    padding: 3em 2em;
}

.home-latest-articles-section h2 {
    font-size: 2em;
    margin-bottom: 1em;
}

.home-latest-articles-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5em;
    justify-content: center;
    margin-top: 1.5em;
}

.home-latest-article {
    flex: 1 1 calc(33% - 2em);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
    background-color: #fff;
    transition: transform 0.3s, box-shadow 0.3s;
}

.home-latest-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.home-latest-article img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.home-latest-article h3 {
    font-size: 1.2em;
    margin: 0.5em 0;
    padding: 0 0.5em;
}

.home-latest-article p {
    font-size: 0.9em;
    color: #666;
    padding: 0 0.5em 1em 0.5em;
}

/* Popular Categories Section */
.home-popular-categories-section {
    padding: 3em 2em;
    background-color: #f9f9f9;
}

.home-popular-categories-section h2 {
    font-size: 2em;
    margin-bottom: 1em;
}

.home-categories-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2em;
    justify-content: center;
    margin-top: 1.5em;
}

.home-category-card {
    flex: 1 1 calc(25% - 2em);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
    background-color: #fff;
    transition: transform 0.3s, box-shadow 0.3s;
}

.home-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.home-category-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.home-category-card h3 {
    font-size: 1.2em;
    margin: 0.5em 0;
}

.home-category-card p {
    font-size: 0.9em;
    color: #666;
    padding: 0 0.5em 1em 0.5em;
}

/* Subscribe Section */
.home-subscribe-section, .subscribe-section {
    padding: 3em 2em;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: center;
    width: 100%;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.home-subscribe-section h2 {
    font-size: 2em;
    margin-bottom: 0.5em;
}

.home-subscribe-section p {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 1.5em;
}

.home-subscribe-form {
    display: flex;
    justify-content: center;
    gap: 1em;
    margin-bottom: 1.5em;
}

.home-subscribe-form input[type="email"] {
    padding: 0.75em 1em;
    border: 1px solid #ccc;
    border-radius: 50px;
    width: 300px;
    font-size: 1em;
}

.home-subscribe-button {
    padding: 0.75em 1.5em;
    border: none;
    border-radius: 50px;
    background-color: #ff6f61;
    color: white;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.home-subscribe-button:hover {
    background-color: #e65b50;
}

/* Subscription Benefits */
.home-subscription-benefits {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 1.5em;
    flex-wrap: wrap;
}

.home-subscription-benefits li {
    position: relative;
    padding-left: 25px;
    font-size: 1em;
    color: #333;
}

.home-subscription-benefits li::before {
    content: '\2713';
    color: green;
    font-size: 1.2em;
    position: absolute;
    left: 0;
    top: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .home-latest-article {
        flex: 1 1 80%;
    }

    .home-category-card {
        flex: 1 1 80%;
    }
}

@media (max-width: 768px) {
    /* Adjust Hero Section */
    .home-hero-section {
        height: 40vh;
    }

    .home-hero-content h1 {
        font-size: 2em;
    }

    .home-hero-content p {
        font-size: 1em;
    }

    .home-cta-button,
    .home-subscribe-button {
        font-size: 0.9em;
        padding: 0.5em 1em;
    }

    .home-subscribe-form {
        flex-direction: column;
        align-items: center;
    }

    .home-subscribe-form input[type="email"] {
        width: 80%;
    }

    /* Adjust Grids */
    .home-featured-articles-grid,
    .home-latest-articles-grid,
    .home-categories-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .home-featured-article,
    .home-latest-article,
    .home-category-card {
        flex: 1 1 100%;
    }
    .subscribe-section, .home-subscription-section {
	display: inline-block;	
    }
}

@media (max-width: 480px) {
    /* Further adjustments for very small screens */
    .home-hero-section {
        height: 30vh;
    }

    .home-hero-content h1 {
        font-size: 1.5em;
    }

    .home-featured-articles-grid,
    .home-latest-articles-grid,
    .home-categories-grid {
        gap: 1em;
    }

    .home-featured-article img,
    .home-latest-article img,
    .home-category-card img {
        height: 120px;
    }

    .home-subscription-benefits {
        flex-direction: column;
        align-items: center;
    }

    .subscribe-section, .home-subscription-section {
    } 
}

/* Fade-in Animation for Sections */
.home-container section {
    opacity: 0;
    transform: translateY(20px);
    animation: home-fadeIn 1s forwards;
}

@keyframes home-fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover Effects Already Included in the Above Styles */

/* Section Styling */
.bento-box-section, .latest-articles-section, .popular-categories-section {
  padding: 2em;
  text-align: center;
  align: center;
  width: 90vw;
  margin-right: auto;
  margin-bottom: 1.5rem;
  gap: 1rem;
  box-sizing: border-box;
}

.bento-box-section {
	padding-bottom: 80px;
}

/* Bento Box Layout */
.bento-box {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1.5em;
  max-height: 85vh;
}
.feature-article {
  grid-column 1 /2;
}
.secondary-articles {
  grid-column: 2 / 3;
}

.secondary-article {
  display: flex;
  flex-direction: row;
  gap: 5px; /* Space between text and image */
  align-items: center; /* Align items vertically in the middle */
}

.feature-article, .secondary-article, .article-card, .category-card {
  border: 0px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background-color: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 20px;
  margin-bottom: 20px;
  overflow: hidden;
}

.feature-article h3, .secondary-article h3 {
  font-size: 1.5em;
  font-family: "Archivo";
  font: bold;
}

.feature-article p, .secondary-article p {
  font-family: "Archivo";
  font-weight: 200;
}

.feature-article:hover, .secondary-article:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(120, 0, 0, 0.6);
}

.feature-article img, .secondary-article img, .article-card img, .category-card img {
  height: auto;
  max-height: 60vh;
  object-fit: contain;
  margin: 0 0 0 0;
}

.secondary-article .text {
  flex: 1; /* Take available space */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Vertically center the text */
}

.secondary-article .text h3 {
  font-size: 1.8em;
  text-align: left;
}

.secondary-article .text p {
  display: none;
}

.secondary-article img {
  height: 100%;
  width: auto;
  max-width: 10vw;
  aspect-ratio: 0.5;
  object-fit: cover; /* Cover the space without distortion */
  border-radius: 10px; /* Optional: Rounding corners for visual appeal */
}  

/* Subscription Benefits */
.subscription-benefits {
  list-style: none;
  padding: 0;
}

.subscription-benefits li {
  margin: 10px 0;
}

/* new_home.css */

/* Latest Articles Section */
.home-latest-articles-section {
    padding: 40px 20px;
    background-color: #f9f9f9; /* Optional: Background color */
}

/* Latest Articles Grid using Flexbox */
.home-latest-articles-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

/* Latest Article Card */
.latest-article-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: calc(33.333% - 20px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.latest-article-card:hover {
    transform: translateY(-5px);
}

/* Image Container */
.article-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Article Content */
.latest-article-card h3 {
    font-size: 1.2em;
    margin: 15px;
    color: #333;
}

.latest-article-card p {
    font-size: 1em;
    margin: 0 15px 15px 15px;
    color: #666;
    flex-grow: 1; /* Ensures content stretches to fill the card */
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .latest-article-card {
        width: calc(33.333% - 20px);
    }
}

@media (max-width: 800px) {
    .latest-article-card {
        width: calc(50% - 20px);
    }
    .bento-box-section, .bento-box, .subscribe-section {
        height: auto;
	overflow-x: hidden;
	overflow-y: visible;
    }
}

@media (max-width: 500px) {
    .latest-article-card {
        width: 100%;
    }
    .bento-box-section, .bento-box, .subscribe-section {
        height: auto;
	overflow-x: hidden;
	overflow-y: visible;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .bento-box {
    display: grid;
    grid-template-columns: 3fr 2fr;
  }

  .feature-article {
    grid-column: 1/2;
  }

  .secondary-articles {
    grid-column: 2 / 3;
    gap: 20px;
  }

  .feature-article, .secondary-article {
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .bento-box {
    grid-template-columns: 1fr;
    overflow-x: hidden;
    overflow-y: visible; 
  }

  .bento-box-section {
    overflow-x: hidden;
    overflow-y: visible;
  }

  .feature-article, .secondary-articles {
    grid-column: 1/-1;
  }
}

@media (max-width: 480px) {
  .bento-box, .feature-article, .secondary-articles {
    grid-template-columns: 1fr;
  }

  .bento-box {
    gap: 10px;
  }

}

