@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

.landing-container {
    --primary-color: #2563eb;
    --text-color: #1f2937;
    --background-color: #ffffff;
    --card-background: #f8fafc;
    --accent-color: #3b82f6;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

.landing-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.hero {
    min-height: 50vh;
    background: url('https://res.cloudinary.com/the-water-project/image/upload/w_auto/c_fill,dpr_auto,q_auto:eco,w_1600,h_600,f_auto/site/impact-stories.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 800px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-content h3 {
    margin-bottom: 4rem!important;
}

.cta-button {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.card {
    background: var(--card-background);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e5e7eb;
    padding: 0;
}

@keyframes landing-fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    margin: 0;
}

.card-content {
    padding: 1.2rem 1.5rem;
    background-color: white;
    transition: background-color 0.3s ease;
    text-align: left;
}

.card:hover .card-content {
    background-color: white;
}

.card-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: #1f2937;
    line-height: 1.4;
}

.card-content p {
    color: #6b7280;
    font-size: 1.35rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.card-meta {
    display: none;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1.26rem;
    margin-top: 1rem;
}

.read-more::after {
    content: "→";
    margin-left: 0.25rem;
    transition: transform 0.2s ease;
}

.card-link:hover .read-more::after {
    transform: translateX(3px);
}

.loading-spinner {
    text-align: center;
    padding: 0;
    margin: 0;
    max-width: 200px;
    clear: both;
    height: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    margin: 0 auto;
}

.loading-spinner.visible {
    height: 120px;
    padding: 20px;
    margin: 10px auto;
}

.loading-spinner .spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner .loading-text {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
}

#scroll-trigger {
    height: 20px;
    margin: 20px 0;
    width: 100%;
    position: relative;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.05));
    visibility: visible;
}

.load-more-button {
    display: none;
    width: 100%;
    padding: 15px;
    margin: 20px 0;
    background-color: #2D6484;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.load-more-button:hover {
    background-color: #1e4d6b;
}

.load-more-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

@media (max-width: 767px) {
    .loading-spinner {
        width: 100%;
        max-width: 100%;
    }
    #scroll-trigger {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
}

.lazy {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.lazy.loaded {
    opacity: 1;
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-link:hover {
    text-decoration: none;
}

.image-container {
    position: relative;
    width: 100%;
    height: 280px;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
    padding: 2rem 1.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-size: 0.875rem;
}

.date, .subject {
    font-size: 1.17rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

@media (max-width: 1100px) {
    .cards-container {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.scroll-trigger {
    height: 20px;
    margin: 20px 0;
    width: 100%;
    display: none;
}

@media (min-width: 768px) {
    .scroll-trigger {
        display: block;
    }
    
    .load-more-button {
        display: none;
    }
}

@media (max-width: 767px) {
    .scroll-trigger {
        display: none;
    }
    
    .load-more-button {
        display: block;
    }
    
    .loading-spinner {
        max-width: 100%;
    }
}