img {
    max-width: 100%;
    max-height: 100%;
}

p {
    text-align: justify;
}

.portrait {
    height: 80px;
    width: 30px;
}

.landscape {
    height: 30px;
    width: 80px;
}

.square {
    height: 75px;
    width: 75px;
}

/* New styles for SDG images and labels */
.centered-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        max-width: 1400px;
        margin: 0 auto;
        padding: 2rem 1rem;
    }
    .title-header {
        color: #800000;
        font-size: 1.2rem;
        font-weight: 700;
        text-align: center;
    }
    h4.title-header {
        color: #800000;
        font-size: 2.0rem;
        font-weight: 700;
        text-align: center;
    }

    #search-article.modern-search {
        width: 100% !important;
        padding: 0.2rem 0.5rem 0.2rem 1.1rem !important;
        border-radius: 12px !important;
        border: none !important;
        background: #f7f7fa !important;
        font-size: 1.05rem !important;
        outline: none !important;
        box-shadow: 0 2px 12px rgba(128,0,0,0.07) !important;
        transition: border 0.2s, box-shadow 0.2s, background 0.2s !important;
        color: #333 !important;
        margin: 0 !important;
    }

    #search-article.modern-search:focus {
        background: #fff !important;
        box-shadow: 0 4px 18px rgba(128,0,0,0.13) !important;
        border: 1.5px solid #800000 !important;
    }
    
    .filter-bar {
        display: flex;
        gap: 1.5rem;
        width: 100%;
        max-width: 900px;
        margin-bottom: 2.5rem;
        justify-content: center;
        align-items: center;
    }
    .filter-select {
        padding: 0.7rem 1rem;
        border-radius: 8px;
        border: 1px solid #ddd;
        background: #fff;
        font-size: 1rem;
        min-width: 180px;
        outline: none;
        transition: border 0.2s;
    }
    .filter-select:focus {
        border: 1.5px solid #800000;
    }
    .search-wrapper {
        position: relative;
        width: 100%;
        max-width: 260px;
    }
    .modern-search {
        width: 100%;
        padding: 0.7rem 2.5rem 0.7rem 1rem;
        border-radius: 8px;
        border: 1px solid #ddd;
        background: #fff;
        font-size: 1rem;
        outline: none;
        box-shadow: 0 2px 8px rgba(128,0,0,0.04);
        transition: border 0.2s, box-shadow 0.2s;
    }
    .modern-search:focus {
        border: 1.5px solid #800000;
        box-shadow: 0 2px 8px rgba(128,0,0,0.10);
    }
    .search-icon {
        position: absolute;
        right: 0.8rem;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
        opacity: 0.7;
    }
    .stories-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 2rem;
        justify-content: center;
        width: 100%;
        max-width: 1400px;
    }
    .story-card {
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(128,0,0,0.06);
        width: 320px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border: 1px solid #e0d1d1;
        transition: box-shadow 0.2s, transform 0.2s;
    }
    .story-card:hover {
        box-shadow: 0 6px 24px rgba(128,0,0,0.13);
        transform: translateY(-4px) scale(1.02);
    }
    .story-img {
        width: 100%;
        height: 180px;
        object-fit: cover;
        background: #f5f3f8;
    }
    .story-content {
        padding: 1.2rem 1.2rem 1rem 1.2rem;
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    .story-meta {
        font-size: 0.95rem;
        color: #888;
        margin-bottom: 0.5rem;
    }
    .story-date {
        font-size: 13px;
        font-style: italic;
        margin-bottom: 0.5rem;
        color: #888;
    }
    .story-snippet {
        margin-top: 0.5rem;
        color: #333;
        font-size: 1rem;
    }
    @media (max-width: 1100px) {
        .stories-grid {
            gap: 1rem;
        }
        .story-card {
            width: 95vw;
            max-width: 400px;
        }
    }
    @media (max-width: 900px) {
        .stories-grid {
            flex-direction: column;
            align-items: center;
        }
        .story-card {
            width: 100% !important;
            max-width: 100vw;
        }
        .filter-bar {
            flex-direction: column;
            gap: 1rem;
            max-width: 100%;
        }
        .search-wrapper {
            max-width: 100%;
        }
    }

    /* SDG Row Styles */
	.sdg-row {
		display: flex;
		align-items: center;
		justify-content: flex-start;
		gap: 0.5rem;
		margin: 0.5rem 0 0.2rem 0;
		min-height: 36px;
	}
	.sdg-img {
		width: 32px;
		height: 32px;
		object-fit: contain;
		border-radius: 5px;
		background: #f5f3f8;
	}
	.sdg-label {
		font-size: 1rem;
		color: #800000;
		font-weight: 600;
		letter-spacing: 0.5px;
	}

    .sdg-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap:03px 0px;
        width: 100%;
    }
    .sdg-icon-wrap {
        display: flex;
        flex-direction: column;
        align-items: center;
        transition: transform 0.18s, box-shadow 0.18s;
        cursor: pointer;
    }
    .sdg-img-hover {
        width: 200px;
        border-radius: 10px;
        transition: transform 0.18s, box-shadow 0.18s;
        box-shadow: 0 8px 18px rgba(0,0,0,0.08);
    }
    .sdg-icon-wrap:hover .sdg-img-hover {
        transform: scale(1.08);
        box-shadow: 0 6px 18px rgba(22,107,60,0.18);
    }
    .sdg-label {
        margin-top: 6px;
        font-size: 1rem;
        color: #666;
        font-weight: 500;
        text-align: center;
    }

    .sdg-shadow {
        box-shadow: 0 4px 16px rgba(0,0,0,0.18), 0 1.5px 6px rgba(128,0,0,0.12);
        border-radius: 15px;
    }

    .form-row-gap {
        display: flex;
        flex-wrap: wrap;
        gap: 20px; 
    }
