Template:IndexPage/styles.css
From AbhiprayaVedi
/* ================ INDEX PAGE STYLES ================ */
.main-hero {
background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
color: white;
padding: 70px 20px;
text-align: center;
border-radius: 12px;
margin-bottom: 45px;
}
.main-hero h1 {
font-size: 2.8em;
margin: 0 0 14px 0;
font-weight: 700;
}
.main-hero p {
font-size: 1.25em;
margin-bottom: 28px;
opacity: 0.95;
}
/* Grid Fixes - Force better distribution */
.featured-grid,
.top-stories-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
gap: 28px;
margin-bottom: 50px;
width: 100%;
}
/* Card Styles */
.index-card {
background: white;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 4px 12px rgba(0,0,0,0.08);
transition: all 0.25s;
height: 100%;
display: flex;
flex-direction: column;
}
.index-card:hover {
transform: translateY(-6px);
box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}
.index-card-image img {
width: 100%;
height: 210px;
object-fit: cover;
}
.index-card-text {
padding: 20px;
flex-grow: 1;
}
.index-card h3 {
margin: 0 0 10px 0;
font-size: 1.32em;
line-height: 1.35;
}
.index-card-intro {
color: #555;
font-size: 0.97em;
line-height: 1.55;
margin-bottom: 12px;
max-height: 4.8em;
overflow: hidden;
}
.index-card-meta {
color: #666;
font-size: 0.92em;
margin-top: auto;
}
/* Responsive */
@media (max-width: 768px) {
.featured-grid, .top-stories-grid {
grid-template-columns: 1fr;
}
}
/* Remove unwanted empty paragraphs that break grid layout */
.mw-parser-output .featured-grid > p:empty,
.mw-parser-output .top-stories-grid > p:empty,
.mw-parser-output .featured-grid p:empty,
.mw-parser-output .top-stories-grid p:empty {
display: none !important;
margin: 0 !important;
padding: 0 !important;
height: 0 !important;
visibility: hidden;
}
/* Make sure cards stretch evenly */
.featured-grid .index-card,
.top-stories-grid .index-card {
height: 100%;
display: flex;
flex-direction: column;
}