/* Blog Section - Enhanced */
.blog-section {
    padding: 5rem 0;
    background-color: #fff8e6;
    position: relative;
    overflow: hidden;
}

.full-screen {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #4a4030;
    text-align: center;
}

.section-subtitle {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
        /* Adjust as needed */
    }

    .section-subtitle {
        font-size: 1.5rem;
    }
}

.section-divider {
    width: 80px;
    height: 3px;
    margin: 0 auto 2rem;
}

.blog-header {
    margin-bottom: 3rem;
}

.blog-grid {
    display: grid;
    /* justify-content: center; */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* ✅ Ensure blog-card is a flex container */
.blog-card {
    background-color: #f5ecd7;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-bottom: 5%;
    /* Makes all cards the same height */
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.blog-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.1);
}

.blog-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: #4a4030;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    z-index: 1;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* ✅ Ensure content expands to push the button down */
.blog-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    /* Expands to fill space */
}

.blog-date {
    color: #695c34;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.blog-date i {
    margin-right: 0.5rem;
}

.blog-title {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #4a4030;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-title {
    color: #342b1a;
}

.blog-excerpt {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    color: #6a5c42;
    line-height: 1.7;
}

.blog-link {
    color: #695c34;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;

    margin-top: auto;
    /* ✅ Pushes it to the bottom */
}


.blog-link i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.blog-link:hover {
    color: #4a4030;
}

.blog-link:hover i {
    transform: translateX(5px);
}

/* ✅ Make button stay at bottom */
.blog-cta {
    text-align: center;
    margin-top: auto;
    /* Pushes it to the bottom */
    padding: 1rem;
    /* Adds some space */
}

.hidden-blogs {
    display: none;
}


.mini-buttons .cta-btn {
    /* display: inline-flex; */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #a18d58, #695c34);
    color: #fff8e6;
    font-size: 24px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    z-index: 1;
    
}

.mini-buttons .cta-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    background: linear-gradient(135deg, #bba66c, #8a7b4d);
}

.mini-buttons .cta-btn i {
    font-size: 24px;
    pointer-events: none;
}

.mini-buttons {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 10px;
    z-index: 2;
}

/* iframe */
/* Modal background */
.iframe-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
}

/* Show when active */
.iframe-modal.active {
  display: flex;
}

/* Modal box content at 85% of screen size */
.iframe-content {
  position: relative;
  width: 95vw;
  height: 90vh;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
}

/* iFrame fills the box */
.iframe-content iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Close button */
.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  text-align: center;
  line-height: 40px;
  cursor: pointer;
  z-index: 10;
}
/* 
@media (min-width: 1000px) {
  .blog-grid {
    justify-content: center;
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }
} */

@media (min-width: 1000px) {
  .blog-grid:has(> .blog-card:nth-child(3)) {
    /* 3 or more items – default layout */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    justify-content: start;
    max-width: 100%;
  }

  .blog-grid:not(:has(> .blog-card:nth-child(3))) {
    /* 1 or 2 items – center */
    grid-template-columns: repeat(2, 1fr);
    justify-content: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }
}
