Template:IndexPage/styles.css
From AbhiprayaVedi
/* ================ INDEX PAGE STYLES (OVERHAULED) ================ */
/* Hero Section Banner */
.main-hero {
background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
color: white;
padding: 60px 20px;
text-align: center;
border-radius: 12px;
margin-bottom: 40px;
}
.main-hero h1 {
font-family: 'Manjari', 'Meera', sans-serif !important;
font-size: 2.8em;
margin: 0 0 14px 0;
font-weight: 700;
}
.main-hero p {
font-family: 'Manjari', 'Meera', sans-serif !important;
font-size: 1.25em;
margin-bottom: 28px;
opacity: 0.95;
}
/* Modern Layout Grids - 100% Flex and Alignment Fix */
.featured-grid,
.top-stories-grid,
.recent-articles-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
gap: 24px;
margin-bottom: 45px;
width: 100%;
}
/*
* Force MediaWiki Parser output to stretch cards evenly inside the grid.
* This fixes the height mismatch visible in your screenshot.
*/
.featured-grid > div,
.top-stories-grid > div,
.recent-articles-grid > div,
.article-card {
height: 100% !important;
display: flex !important;
flex-direction: column !important;
}
/*
* Alignment Fix: This forces the metadata row (Author and Date)
* to always anchor at the absolute bottom of the card, regardless of intro length.
*/
.article-info {
display: flex !important;
flex-direction: column !important;
flex-grow: 1 !important; /* Forces layout box to expand fully */
}
.article-meta-row {
margin-top: auto !important; /* Pushes author line to the base layout */
padding-top: 12px;
border-top: 1px solid #edf2f7;
}
/* Smooth hover effects on standard Article Cards */
.article-card {
background: #ffffff;
border: 1px solid #e2e8f0;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.article-card:hover {
transform: translateY(-4px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
/* ================ RECENT PUBLICATIONS COMPACT STYLES ================ */
/* 4 കോളങ്ങളുള്ള വളരെ ഒതുക്കമുള്ള ഒരു ഗ്രിഡ് ലേഔട്ട് */
.recent-articles-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
gap: 16px; /* ഗ്യാപ്പ് 24px-ൽ നിന്നും 16px ആയി കുറച്ചു */
margin-bottom: 40px;
width: 100%;
}
/* ഈ സെക്ഷനിലെ ഇമേജ് കണ്ടെയ്നറിന്റെ ഉയരം കുറയ്ക്കുന്നു */
.recent-articles-grid .article-thumbnail {
max-height: 130px; /* ചെറിയ ഇമേജ് ലുക്കിനായി നിയന്ത്രിച്ചത് */
}
/* ഈ സെക്ഷനിലെ തലക്കെട്ടിന്റെ വലുപ്പം കുറയ്ക്കുന്നു */
.recent-articles-grid .article-title {
font-size: 1.1em !important;
line-height: 1.3;
margin-bottom: 4px !important;
}
/* ഇൻട്രോ ടെക്സ്റ്റ് കൃത്യമായി 2 വരികളിൽ ഒതുക്കുന്നു */
.recent-articles-grid .article-intro-wrapper {
max-height: 3.2em !important; /* 2 വരികൾ മാത്രം (1.6em * 2) */
margin-bottom: 4px !important;
}
/* ഇൻഫോ ബോക്സിന്റെ പാഡിങ് കുറച്ച് കൂടുതൽ ഒതുക്കമുള്ളതാക്കുന്നു */
.recent-articles-grid .article-info {
padding: 12px !important;
}
/* ഓതർ/ഡേറ്റ് ലൈൻ കൂടുതൽ ചെറുതാക്കുന്നു */
.recent-articles-grid .article-meta-row {
padding-top: 4px !important;
font-size: 0.9em;
}
/* മൊബൈൽ ഫോണുകൾക്കുള്ള ക്രമീകരണം */
@media (max-width: 576px) {
.recent-articles-grid {
grid-template-columns: 1fr; /* മൊബൈലിൽ ഒറ്റ കോളം */
gap: 12px;
}
}
/* Responsive Overrides for Mobile Views */
@media (max-width: 768px) {
.featured-grid,
.top-stories-grid,
.recent-articles-grid {
grid-template-columns: 1fr;
gap: 16px;
}
.main-hero {
padding: 40px 15px;
margin-bottom: 25px;
}
.main-hero h1 {
font-size: 2em;
}
}
/* Strict Cleanup: Target MediaWiki's auto-generated empty paragraph tags */
.mw-parser-output .featured-grid p:empty,
.mw-parser-output .top-stories-grid p:empty,
.mw-parser-output .recent-articles-grid p:empty,
.mw-parser-output .featured-grid br,
.mw-parser-output .top-stories-grid br {
display: none !important;
margin: 0 !important;
padding: 0 !important;
height: 0 !important;
}