Template:IndexPage/styles.css

From AbhiprayaVedi
/* ===== Global ===== */
.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 */
}
.mw-displaytitle-subtitle {
  display: none !important;
}

.section-title {
  font-size: 1.8em;
  margin: 20px 0 20px;          
  padding-bottom: 8px;
  border-bottom: 3px solid #3498db;
  color: #2c3e50;
}

/* Reset h3 margins in cards */
.index-card-text h3 {
  margin: 0 0 8px;
  font-size: 1.3em;            /* slightly smaller overall */
  line-height: 1.3;
}

/* Specific overrides for featured (larger cards) */
.featured-card .index-card-text h3 {
  font-size: 1.5em;
}

/* Intro text */
.index-card-intro {
  color: #555;
  line-height: 1.6;
  margin-bottom: 10px;
}

/* Author name */
.index-card-author {
  font-size: 0.95em;
  color: #7f8c8d;
  margin-top: auto;            /* Push author to bottom if intro is short */
}

/* ===== Featured Section ===== */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  align-items: stretch;        /* Force both cards to equal height */
}

.featured-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  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 {
  transform: translateY(-3px);
}

.featured-image {
  width: 100%;
  aspect-ratio: 16 / 9;        /* uniform 16:9 box */
  overflow: hidden;
}

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

.featured-text {
  padding: 20px;
  flex: 1;                     /* Take remaining vertical space */
  display: flex;
  flex-direction: column;
}

.featured-text h3 {
  margin: 0 0 8px;
  font-size: 1.5em;
  line-height: 1.3;
}

.featured-text h3 a {
  color: #2c3e50;
  text-decoration: none;
}

/*.featured-meta {
  font-size: 0.9em;
  color: #7f8c8d;
  margin-bottom: 10px;
}*/

.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 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.story-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
  transition: transform 0.2s;
}

.story-card:hover {
  transform: translateY(-2px);
}

.story-image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.story-card h4 {
  margin: 15px 15px 5px;
  font-size: 1.2em;
}

.story-card h4 a {
  color: #2c3e50;
  text-decoration: none;
}

.story-meta {
  margin: 0 15px 15px;
  font-size: 0.85em;
  color: #7f8c8d;
}

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

/* ===== Recent Articles ===== */
.recent-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

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

.recent-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-details {
  flex: 1;
  min-width: 0;
}

.recent-title {
  font-weight: bold;
  display: block;
  margin-bottom: 4px;
}

.recent-title a {
  color: #2c3e50;
  text-decoration: none;
}

.recent-meta {
  font-size: 0.85em;
  color: #7f8c8d;
}

/* ===== Category Directory ===== */
.category-grid {
  columns: 3;
  column-gap: 30px;
  margin-top: 15px;
}

.category-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-grid li {
  break-inside: avoid;
  margin-bottom: 8px;
}

.category-grid a {
  text-decoration: none;
  color: #2980b9;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }
  .top-stories-grid {
    grid-template-columns: 1fr;
  }
  .category-grid {
    columns: 2;
  }
}