/* --- Hero Section --- */
.hero {
    background-image: url('../images/homepagehero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 75vh;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 2rem;
    position: relative;
    color: white;
    text-align: left;
    isolation: isolate;
}

/* Hero content - starts hidden */
.hero-content {
    max-width: 600px;
    margin-left: 4rem;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

/* When visible on scroll */
.hero-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 4rem;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.hero h1 strong {
    font-weight: 700; 
}

.hero h1 em {
    font-style: italic;
}

.hero-buttons {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    font-family: 'Open Sans', sans-serif;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
}

.donate-btn {
    background-color: #8dc442;
    color: white;
}

.learn-btn {
    background-color: white;
    color: rgb(0, 0, 0);
}



/* --- About Section --- */
.about {
    padding: 4rem 2rem;
    background-color: #ffffff;
}

.about-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap; 
}

/* --- Text Section --- */
.about-text {
    flex: 1;
    max-width: 650px; 
    min-width: 300px;
    text-align: justify; 
    font-family: 'Open Sans', sans-serif;
    font-weight: 500; 

    /* Hidden by default */
    opacity: 0;
    transform: translateX(-60px);
}

/* Show animation when in view */
.about-text.show {
    animation: slideInLeft 1.2s ease-out forwards;
}

.about-text h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 550; 
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
    text-decoration: underline;
}

.about-text p {
    text-align: center;
    font-size: 1rem;
    line-height: 1.6;
}

/* Image Section */
.about-image {
    flex: 1;
    display: flex;
    justify-content: center;

    /* Hidden by default */
    opacity: 0;
    transform: translateX(60px);
}

/* Show animation when in view */
.about-image.show {
    animation: slideInRight 1.2s ease-out forwards;
}

.about-image img {
    width: 100%;
    max-width: 500px; 
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

/* Keyframes */
@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-60px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(60px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}



/* --- Help Section --- */
.help {
    padding: 0rem 2rem 4rem 2rem; 
    background-color: #f9f9f9;
    text-align: center;
}

.help h2 {
    font-size: 2rem;
    color: #2c3e50;
}

.help h3 {
    text-align: left;
    font-family: 'Montserrat', sans-serif;
    font-weight: 520;
    font-size: 2rem; 
    margin-top: 3rem;
    padding-left: 2rem; 
    margin-bottom: 0;    
}

.help-subtitle {
    text-align: left;
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    font-size: 1.5rem;
    padding-left: 0rem;  /* Match the same left padding */
    margin-top: 0rem;
    margin-bottom: 2rem;
}

.section-heading-bar {
    background-color: #8dc442; 
    width: 100vw;              /* Full screen width */
    padding: 1rem 2rem;
    margin: 0 -2rem;        
}

.section-heading-bar h2 {
    color: white;
    margin: 0;
    font-size: 3rem;
    text-align: center;    
    font-family: 'Montserrat', sans-serif;
    font-weight: 550; 
}

/* Donation Section */
.donation-header {
    text-align: center;
    opacity: 0;
    transform: translateY(40px);
    transition: transform 0.6s ease, opacity 0.6s ease;
}

.donation-header.visible {
    opacity: 1;
    transform: translateY(0);
}

.help-subtitle {
    font-size: 1.2rem;
    color: #555;
    font-weight: 400;
}  

.donation-cards-container {
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    gap: 3rem;
    flex-wrap: nowrap;
    max-width: 100%;
    box-sizing: border-box;
}

/* Base donation card style */
.donation-card {
    flex: 1;
    aspect-ratio: 3.5 / 4;
    min-width: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.6s ease, opacity 0.6s ease;
    opacity: 0;
    transform: translateY(40px); /* slide up effect */
}

/* When visible */
.donation-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.donation-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: none; /* No shade or overlay */
}

.card-label {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    font-weight: 600;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

/* Top-center label */
.card-label.top-center-label {
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    bottom: auto;
    right: auto;
    text-align: center;
    line-height: 1.1;
    margin-top: 2rem;
}

/* Bottom-center label */
.card-label.bottom-center-label {
    text-align: center;
    left: 25%;
    line-height: 1.1;
    margin-bottom: 2rem;
}

/* Center label */
.card-label.center-label {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    line-height: 1.1;
    margin: 0;
}

.donation-card:hover {
    transform: scale(1.03);
}  



/* --- News Section --- */
.news {
    padding: 4rem 5%;
    max-width: 100%;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(-40px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.news.show {
    opacity: 1;
    transform: translateY(0);
}

.news h2 {
    text-align: center;
    font-size: 2rem;
    color: #000000;
    margin-bottom: 2rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.news-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #ccc;
    margin-bottom: 1rem;
}

.news-content {
    flex-grow: 1;
    margin-right: 4rem;
    min-width: 0;
}

.news-date {
    font-family: 'Open Sans', sans-serif;
    color: #000;
    font-weight: 500;
    white-space: nowrap;
    font-size: 1rem;
}

.news-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.news-excerpt {
    font-family: 'Open Sans', sans-serif;
    color: #555;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .news-content {
        margin-right: 0;
    }
}


/* Add this to the bottom of homestyle.css */
@media (max-width: 768px) {
    
    /* Change the flex direction from horizontal to vertical */
    .about-container {
        flex-direction: column;
    }

    /* Make each column take the full width */
    .about-text, .about-image {
        width: 100%;
        max-width: 100%; /* Override any desktop max-width */
        padding: 15px 0; /* Add some space between them */
    }
    
    .donation-cards-container {
    flex-direction: column;
    align-items: center; /* Center the cards */
}

.donation-card {
    width: 90%; /* Make cards wider on mobile */
    max-width: 400px;
    margin-bottom: 20px; /* Add space between stacked cards */
}

.hero-content h1 {
    font-size: 2.5rem; /* Decrease font size from the desktop version */
}

h2 {
    font-size: 1.8rem; /* Make other headings slightly smaller too */
}
}
