Template:IndexPage/styles.css: Difference between revisions

From AbhiprayaVedi
No edit summary
mNo edit summary
Line 1: Line 1:
/* ===== Global ===== */
/* ================ INDEX PAGE STYLES ================ */
.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 */
}
#contentSub {
  display: none !important;
}


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


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


/* Specific overrides for featured (larger cards) */
.main-hero p {
.featured-card .index-card-text h3 {
    font-size: 1.25em;
  font-size: 1.5em;
    margin: 0 0 25px 0;
    opacity: 0.95;
}
}


/* Intro text */
/* Featured Grid */
.index-card-intro {
.featured-grid {
  color: #555;
    display: grid;
  line-height: 1.6;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  margin-bottom: 10px;
    gap: 24px;
    margin-bottom: 50px;
}
}


/* Author name */
/* Top Stories Grid */
.index-card-author {
.top-stories-grid {
  font-size: 0.95em;
    display: grid;
  color: #7f8c8d;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: auto;            /* Push author to bottom if intro is short */
    gap: 20px;
}
    margin-bottom: 50px;
 
/* ===== Featured Section ===== */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  align-items: stretch;       /* Force both cards to equal height */
}
}


/* General Card Styles */
.index-card,
.story-card,
.featured-card {
.featured-card {
  background: #fff;
    background: white;
  border-radius: 10px;
    border-radius: 10px;
  overflow: hidden;
    overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  display: flex;
    transition: transform 0.2s, box-shadow 0.2s;
  flex-direction: column;
  height: 100%;               /* Fill the grid cell */
}
}


.index-card:hover,
.story-card:hover,
.featured-card:hover {
.featured-card:hover {
  transform: translateY(-3px);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}
}


.featured-image {
.index-card-image img,
  width: 100%;
.story-image img {
  aspect-ratio: 16 / 9;       /* uniform 16:9 box */
    width: 100%;
  overflow: hidden;
    height: 200px;
    object-fit: cover;
}
}


.featured-image img {
.index-card-text,
  width: 100%;
.story-card-text {
  height: 100%;
    padding: 18px;
  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;
}
}


.index-card h3,
.story-card h4 {
.story-card h4 {
  margin: 15px 15px 5px;
    margin: 0 0 10px 0;
  font-size: 1.2em;
    font-size: 1.25em;
    line-height: 1.35;
}
}


.story-card h4 a {
.index-card-intro {
  color: #2c3e50;
    color: #555;
  text-decoration: none;
    font-size: 0.97em;
    line-height: 1.55;
    margin-bottom: 12px;
}
}


.index-card-meta,
.story-meta {
.story-meta {
  margin: 0 15px 15px;
    color: #666;
  font-size: 0.85em;
    font-size: 0.9em;
  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 {
/* Category Grid */
  color: #2c3e50;
  text-decoration: none;
}
 
.recent-meta {
  font-size: 0.85em;
  color: #7f8c8d;
}
 
/* ===== Category Directory ===== */
.category-grid {
.category-grid {
  columns: 3;
    display: grid;
  column-gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-top: 15px;
    gap: 12px;
    margin: 30px 0;
}
}


.category-grid ul {
.category-grid a {
  list-style: none;
    display: block;
  padding: 0;
    padding: 16px 20px;
  margin: 0;
    background: #f8fafc;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: #1e40af;
    text-decoration: none;
    transition: all 0.2s;
}
}


.category-grid li {
.category-grid a:hover {
  break-inside: avoid;
    background: #dbeafe;
  margin-bottom: 8px;
    transform: translateY(-2px);
}
}


.category-grid a {
/* Responsive Adjustments */
  text-decoration: none;
@media (max-width: 768px) {
  color: #2980b9;
    .main-hero {
        padding: 40px 15px;
    }
   
    .main-hero h1 {
        font-size: 2.2em;
    }
   
    .featured-grid,
    .top-stories-grid {
        grid-template-columns: 1fr;
    }
   
    .article-sidebar {
        float: none;
        width: 100%;
        margin: 25px 0;
    }
}
}


/* ===== Responsive ===== */
/* Clean spacing */
@media (max-width: 768px) {
.section-title {
  .featured-grid {
     font-size: 1.6em;
     grid-template-columns: 1fr;
    margin: 40px 0 20px 0;
  }
    color: #1e3a8a;
  .top-stories-grid {
     border-bottom: 3px solid #bfdbfe;
     grid-template-columns: 1fr;
    padding-bottom: 8px;
  }
  .category-grid {
    columns: 2;
  }
}
}

Revision as of 23:39, 28 May 2026

/* ================ INDEX PAGE STYLES ================ */

.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-size: 2.8em;
    margin: 0 0 12px 0;
    font-weight: 700;
}

.main-hero p {
    font-size: 1.25em;
    margin: 0 0 25px 0;
    opacity: 0.95;
}

/* Featured Grid */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

/* Top Stories Grid */
.top-stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

/* General Card Styles */
.index-card,
.story-card,
.featured-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.index-card:hover,
.story-card:hover,
.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

.index-card-image img,
.story-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.index-card-text,
.story-card-text {
    padding: 18px;
}

.index-card h3,
.story-card h4 {
    margin: 0 0 10px 0;
    font-size: 1.25em;
    line-height: 1.35;
}

.index-card-intro {
    color: #555;
    font-size: 0.97em;
    line-height: 1.55;
    margin-bottom: 12px;
}

.index-card-meta,
.story-meta {
    color: #666;
    font-size: 0.9em;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 30px 0;
}

.category-grid a {
    display: block;
    padding: 16px 20px;
    background: #f8fafc;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: #1e40af;
    text-decoration: none;
    transition: all 0.2s;
}

.category-grid a:hover {
    background: #dbeafe;
    transform: translateY(-2px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .main-hero {
        padding: 40px 15px;
    }
    
    .main-hero h1 {
        font-size: 2.2em;
    }
    
    .featured-grid,
    .top-stories-grid {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar {
        float: none;
        width: 100%;
        margin: 25px 0;
    }
}

/* Clean spacing */
.section-title {
    font-size: 1.6em;
    margin: 40px 0 20px 0;
    color: #1e3a8a;
    border-bottom: 3px solid #bfdbfe;
    padding-bottom: 8px;
}