/* --- BLOG UP SECTION LAYOUT --- */
.blog-up-section {
    padding: var(--space-xl) var(--space-md);
    /* Fallback color + Image path */
    background-color: var(--bg-light); 
    background-image: url('../../assets/backgrounds/Speakup_BG.jpg');
    
    /* Critical Scaling Properties */
    background-repeat: no-repeat;
    background-size: cover; /* Ensures the image fills the section */
    background-position: center center; /* Keeps the focal point central */
    
    /* Optional: Fixed background for a parallax effect */
    background-attachment: fixed; 
    min-height: 100vh;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.blog-main-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--brand-lilac); 
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.purple-accent {
    color: var(--brand-red);
}

.blog-subtitle {
    font-size: 1.1rem;
    color: var(--brand-lilac);
    font-weight: 500;
}

/* --- BLOG GRID --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    width: 100%;
}

/* --- BLOG CARD --- */
.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0,0,0,0.03);
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(74, 20, 140, 0.1);
}

.blog-content {
    padding: 40px;
    flex-grow: 1;
}

.blog-tag {
    display: inline-block;
    color: var(--brand-dark, #4a148c);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: rgba(74, 20, 140, 0.05);
    padding: 6px 12px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.blog-title {
    font-size: 1.6rem;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #1a1a1a;
}

/* --- EXPANDABLE CONTENT LOGIC --- */
.expandable-wrapper {
    max-height: 100px; /* Adjust this to show exactly the amount of excerpt you want initially */
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin-bottom: 15px;
}

/* Optional fade effect at the bottom when collapsed */
.expandable-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(transparent, white);
    transition: opacity 0.3s ease;
}

.blog-card.is-expanded .expandable-wrapper {
    max-height: 6000px; /* Large enough to fit the full content */
}

.blog-card.is-expanded .expandable-wrapper::after {
    opacity: 0; /* Hide the fade effect when expanded */
    pointer-events: none;
}

.blog-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 25px;
}

/* --- READ MORE BUTTON --- */
.read-more-btn {
    background: transparent;
    border: 2px solid var(--brand-red, #ff0000);
    color: var(--brand-red, #ff0000);
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
    display: inline-block;
}

.read-more-btn:hover {
    background: var(--brand-red, #ff0000);
    color: white;
}

/* --- HIGHLIGHTS LIST --- */
.blog-highlights {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.blog-highlights li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
}

.blog-highlights li::before {
    content: "\f00c"; 
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
    color: #4caf50;
    font-size: 0.85rem;
}

/* --- YOUTUBE LINK --- */
.video-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ff0000;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 10px 0;
    transition: opacity 0.3s ease;
}

.video-link:hover {
    opacity: 0.7;
}

/* --- FOOTER SECTION --- */
.blog-footer {
    padding: 20px 40px;
    background: #f9f9ff;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.blog-date {
    font-size: 0.85rem;
    color: #888;
    font-weight: 600;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .blog-up-section {
        margin-top: -30px;
        padding: 40px 15px;
    }

    .blog-main-title {
        font-size: 2.2rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-content {
        padding: 30px;
    }
}

@media (max-width: 991px) {
  .blog-up-section {
    background-attachment: scroll; /* required for iOS quality */
    background-image: none;         
    background-color: var(--brand-lilac); 
  }

  .blog-main-title{
    color: var(--color-primary-deep);
  }
   /* .purple-accent{
    color: var(--color-primary-deep);
  } */
  .blog-subtitle{
    color: var(--color-primary-deep);
  }



}

