Template:IndexPage/styles.css: Difference between revisions

From AbhiprayaVedi
No edit summary
mNo edit summary
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* ===== Global ===== */
/* ================ INDEX PAGE STYLES (OVERHAULED) ================ */
.index-container {
  max-width: 1200px;
  margin: 0 auto;
  font-family: 'Noto Sans', 'Noto Sans Malayalam', sans-serif;
  padding: 10px 15px 20px;      /* top 10px, sides 15px, bottom 20px */
}


.section-title {
/* Hero Section Banner */
  font-size: 1.8em;
.main-hero {
  margin: 20px 0 20px;        
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  padding-bottom: 8px;
    color: white;
  border-bottom: 3px solid #3498db;
    padding: 60px 20px;
  color: #2c3e50;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 40px;
}
}


/* Reset h3 margins in cards */
.main-hero h1 {
.index-card-text h3 {
    font-family: 'Manjari', 'Meera', sans-serif !important;
  margin: 0 0 8px;
    font-size: 2.8em;
  font-size: 1.3em;           /* slightly smaller overall */
    margin: 0 0 14px 0;
  line-height: 1.3;
    font-weight: 700;
}
}


/* Specific overrides for featured (larger cards) */
.main-hero p {
.featured-card .index-card-text h3 {
    font-family: 'Manjari', 'Meera', sans-serif !important;
  font-size: 1.5em;
    font-size: 1.25em;
    margin-bottom: 28px;
    opacity: 0.95;
}
}


/* Intro text */
/* Modern Layout Grids - 100% Flex and Alignment Fix */
.index-card-intro {
.featured-grid,
  color: #555;
.top-stories-grid,
  line-height: 1.6;
.recent-articles-grid {
  margin-bottom: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-bottom: 45px;
    width: 100%;
}
}


/* Author name */
/*  
.index-card-author {
* Force MediaWiki Parser output to stretch cards evenly inside the grid.
  font-size: 0.95em;
* This fixes the height mismatch visible in your screenshot.
  color: #7f8c8d;
*/
  margin-top: auto;           /* Push author to bottom if intro is short */
.featured-grid > div,
.top-stories-grid > div,
.recent-articles-grid > div,
.article-card {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}
}


/* ===== Featured Section ===== */
/*  
.featured-grid {
* Alignment Fix: This forces the metadata row (Author and Date)
  display: grid;
* to always anchor at the absolute bottom of the card, regardless of intro length.
  grid-template-columns: 1fr 1fr;
*/
  gap: 25px;
.article-info {
  align-items: stretch;       /* Force both cards to equal height */
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important; /* Forces layout box to expand fully */
}
}


.featured-card {
.article-meta-row {
  background: #fff;
    margin-top: auto !important; /* Pushes author line to the base layout */
  border-radius: 10px;
    padding-top: 12px;
  overflow: hidden;
    border-top: 1px solid #edf2f7;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  height: 100%;                /* Fill the grid cell */
}
}


.featured-card:hover {
/* Smooth hover effects on standard Article Cards */
  transform: translateY(-3px);
.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;
}
}


.featured-image {
.article-card:hover {
  width: 100%;
    transform: translateY(-4px);
  aspect-ratio: 16 / 9;        /* uniform 16:9 box */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}
}


.featured-image img {
/* ================ RECENT PUBLICATIONS COMPACT STYLES ================ */
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.featured-text {
/* 4 കോളങ്ങളുള്ള വളരെ ഒതുക്കമുള്ള ഒരു ഗ്രിഡ് ലേഔട്ട് */
  padding: 20px;
.recent-articles-grid {
  flex: 1;                     /* Take remaining vertical space */
    display: grid;
  display: flex;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  flex-direction: column;
    gap: 16px; /* ഗ്യാപ്പ് 24px-ൽ നിന്നും 16px ആയി കുറച്ചു */
    margin-bottom: 40px;
    width: 100%;
}
}


.featured-text h3 {
/* ഈ സെക്ഷനിലെ ഇമേജ് കണ്ടെയ്നറിന്റെ ഉയരം കുറയ്ക്കുന്നു */
  margin: 0 0 8px;
.recent-articles-grid .article-thumbnail {
  font-size: 1.5em;
    max-height: 130px; /* ചെറിയ ഇമേജ് ലുക്കിനായി നിയന്ത്രിച്ചത് */
  line-height: 1.3;
}
}


.featured-text h3 a {
/* ഈ സെക്ഷനിലെ തലക്കെട്ടിന്റെ വലുപ്പം കുറയ്ക്കുന്നു */
  color: #2c3e50;
.recent-articles-grid .article-title {
  text-decoration: none;
    font-size: 1.1em !important;
    line-height: 1.3;
    margin-bottom: 4px !important;
}
}


/*.featured-meta {
/* ഇൻട്രോ ടെക്സ്റ്റ് കൃത്യമായി 2 വരികളിൽ ഒതുക്കുന്നു */
  font-size: 0.9em;
.recent-articles-grid .article-intro-wrapper {
  color: #7f8c8d;
    max-height: 3.2em !important; /* 2 വരികൾ മാത്രം (1.6em * 2) */
  margin-bottom: 10px;
    margin-bottom: 4px !important;
}*/
 
.featured-intro {
  color: #555;
  line-height: 1.6;
  margin-bottom: 10px;
  /* Let the intro be its natural height.
    The equal‑height grid will keep both cards aligned. */
}
}


/* ===== Top Stories ===== */
/* ഇൻഫോ ബോക്സിന്റെ പാഡിങ് കുറച്ച് കൂടുതൽ ഒതുക്കമുള്ളതാക്കുന്നു */
.top-stories-grid {
.recent-articles-grid .article-info {
  display: grid;
    padding: 12px !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}
}


.story-card {
/* ഓതർ/ഡേറ്റ് ലൈൻ കൂടുതൽ ചെറുതാക്കുന്നു */
  background: #fff;
.recent-articles-grid .article-meta-row {
  border-radius: 8px;
    padding-top: 4px !important;
  overflow: hidden;
    font-size: 0.9em;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
  transition: transform 0.2s;
}
}


.story-card:hover {
/* മൊബൈൽ ഫോണുകൾക്കുള്ള ക്രമീകരണം */
  transform: translateY(-2px);
@media (max-width: 576px) {
    .recent-articles-grid {
        grid-template-columns: 1fr; /* മൊബൈലിൽ ഒറ്റ കോളം */
        gap: 12px;
    }
}
}


.story-image img {
/* ================ CATEGORY BUTTONS COMPACT STYLES ================ */
  width: 100%;
.category-grid {
  height: 180px;
    display: grid;
  object-fit: cover;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
    width: 100%;
}
}


.story-card h4 {
.category-box {
  margin: 15px 15px 5px;
    background: #f8fafc;
  font-size: 1.2em;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s ease-in-out;
}
}


.story-card h4 a {
.category-box a {
  color: #2c3e50;
    display: block;
  text-decoration: none;
    padding: 14px 10px;
    font-family: 'Manjari', 'Meera', sans-serif !important;
    font-size: 1.1em;
    font-weight: bold;
    color: #2d3748 !important;
    text-decoration: none !important;
}
}


.story-meta {
.category-box:hover {
  margin: 0 15px 15px;
    background: #3182ce;
  font-size: 0.85em;
    border-color: #3182ce;
  color: #7f8c8d;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
}


.lang-badge {
.category-box:hover a {
  display: inline-block;
    color: #ffffff !important;
  background: #3498db;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8em;
  text-transform: uppercase;
}
}


/* ===== Recent Articles ===== */
/* കാറ്റഗറി ഗ്രിഡിനുള്ളിലെ അനാവശ്യ മീഡിയവിക്കി പാരഗ്രാഫ് ടാഗുകളെ ഒഴിവാക്കുന്നു */
.recent-list {
.category-grid p,
  list-style: none;
.category-grid br {
  padding: 0;
    display: none !important;
  margin: 0;
    margin: 0 !important;
    padding: 0 !important;
}
}


.recent-item {
.category-box {
  display: flex;
    display: inline-block;
  align-items: center;
    width: 100%;
  gap: 12px;
    background: #f8fafc;
  padding: 12px 0;
    border: 1px solid #e2e8f0;
  border-bottom: 1px solid #eee;
    border-radius: 8px;
    text-align: center;
    box-sizing: border-box;
}
}


.recent-thumb {
  flex-shrink: 0;
  width: 80px;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
}


.recent-thumb img {
/* Responsive Overrides for Mobile Views */
  width: 100%;
@media (max-width: 768px) {
  height: 100%;
    .featured-grid,
  object-fit: cover;
    .top-stories-grid,
}
    .recent-articles-grid {
 
        grid-template-columns: 1fr;
.recent-details {
        gap: 16px;
  flex: 1;
    }
  min-width: 0;
   
    .main-hero {
        padding: 40px 15px;
        margin-bottom: 25px;
    }
   
    .main-hero h1 {
        font-size: 2em;
    }
}
}


.recent-title {
/* Strict Cleanup: Target MediaWiki's auto-generated empty paragraph tags */
  font-weight: bold;
.mw-parser-output .featured-grid p:empty,
  display: block;
.mw-parser-output .top-stories-grid p:empty,
  margin-bottom: 4px;
.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;
}
}


.recent-title a {
/* ================ CATEGORY PAGE SPECIFIC STYLES ================ */
  color: #2c3e50;
.category-page-header {
  text-decoration: none;
    background: #edf2f7;
    padding: 30px 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 5px solid #3182ce;
}
}
 
.category-page-header h1 {
.recent-meta {
    font-family: 'Manjari', 'Meera', sans-serif !important;
  font-size: 0.85em;
    margin: 0 0 8px 0;
  color: #7f8c8d;
    color: #1a202c;
}
}
 
.category-page-header p {
/* ===== Category Directory ===== */
    margin: 0;
.category-grid {
    color: #4a5568;
  columns: 3;
  column-gap: 30px;
  margin-top: 15px;
}
}
 
.older-articles-section {
.category-grid ul {
    margin-top: 40px;
  list-style: none;
    padding-top: 20px;
  padding: 0;
    border-top: 2px dashed #e2e8f0;
  margin: 0;
}
}
 
.older-articles-section h3 {
.category-grid li {
    font-family: 'Manjari', sans-serif !important;
  break-inside: avoid;
    color: #2d3748;
  margin-bottom: 8px;
    margin-bottom: 15px;
}
}
 
.older-articles-list ul {
.category-grid a {
    list-style-type: square;
  text-decoration: none;
    padding-left: 20px;
  color: #2980b9;
}
}
 
.older-articles-list li {
/* ===== Responsive ===== */
     font-family: 'Manjari', sans-serif !important;
@media (max-width: 768px) {
    font-size: 1.05em;
  .featured-grid {
     margin-bottom: 10px;
     grid-template-columns: 1fr;
     color: #4a5568;
  }
  .top-stories-grid {
     grid-template-columns: 1fr;
  }
  .category-grid {
     columns: 2;
  }
}
}

Latest revision as of 14:01, 11 June 2026

/* ================ 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;
    }
}

/* ================ CATEGORY BUTTONS COMPACT STYLES ================ */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
    width: 100%;
}

.category-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s ease-in-out;
}

.category-box a {
    display: block;
    padding: 14px 10px;
    font-family: 'Manjari', 'Meera', sans-serif !important;
    font-size: 1.1em;
    font-weight: bold;
    color: #2d3748 !important;
    text-decoration: none !important;
}

.category-box:hover {
    background: #3182ce;
    border-color: #3182ce;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.category-box:hover a {
    color: #ffffff !important;
}

/* കാറ്റഗറി ഗ്രിഡിനുള്ളിലെ അനാവശ്യ മീഡിയവിക്കി പാരഗ്രാഫ് ടാഗുകളെ ഒഴിവാക്കുന്നു */
.category-grid p,
.category-grid br {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.category-box {
    display: inline-block;
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    box-sizing: border-box;
}


/* 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;
}

/* ================ CATEGORY PAGE SPECIFIC STYLES ================ */
.category-page-header {
    background: #edf2f7;
    padding: 30px 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 5px solid #3182ce;
}
.category-page-header h1 {
    font-family: 'Manjari', 'Meera', sans-serif !important;
    margin: 0 0 8px 0;
    color: #1a202c;
}
.category-page-header p {
    margin: 0;
    color: #4a5568;
}
.older-articles-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px dashed #e2e8f0;
}
.older-articles-section h3 {
    font-family: 'Manjari', sans-serif !important;
    color: #2d3748;
    margin-bottom: 15px;
}
.older-articles-list ul {
    list-style-type: square;
    padding-left: 20px;
}
.older-articles-list li {
    font-family: 'Manjari', sans-serif !important;
    font-size: 1.05em;
    margin-bottom: 10px;
    color: #4a5568;
}