Template:IndexPage/styles.css: Difference between revisions

From AbhiprayaVedi
mNo edit summary
mNo edit summary
Line 1: Line 1:
/* ================ INDEX PAGE STYLES ================ */
/* ================ MAIN PAGE STYLES ================ */


.main-hero {
.main-hero {
     background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
     background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
     color: white;
     color: white;
     padding: 60px 20px;
     padding: 70px 20px;
     text-align: center;
     text-align: center;
     border-radius: 12px;
     border-radius: 12px;
     margin-bottom: 40px;
     margin-bottom: 45px;
}
}


.main-hero h1 {
.main-hero h1 {
     font-size: 2.8em;
     font-size: 2.9em;
     margin: 0 0 12px 0;
     margin: 0 0 14px 0;
     font-weight: 700;
     font-weight: 700;
}
}


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


/* Featured Grid */
/* Featured & Top Stories Grids */
.featured-grid {
.featured-grid,
.top-stories-grid {
     display: grid;
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
     grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
     gap: 24px;
     gap: 24px;
     margin-bottom: 50px;
     margin-bottom: 55px;
}
}


/* Top Stories Grid */
/* Card Styles */
.top-stories-grid {
.index-card {
    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;
     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);
     transition: transform 0.2s, box-shadow 0.2s;
     transition: all 0.25s ease;
    height: 100%;
}
}


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


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


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


.index-card h3,
.index-card h3 {
.story-card h4 {
     margin: 0 0 10px 0;
     margin: 0 0 10px 0;
     font-size: 1.28em;
     font-size: 1.32em;
     line-height: 1.35;
     line-height: 1.35;
}
}
Line 77: Line 64:
.index-card-intro {
.index-card-intro {
     color: #555;
     color: #555;
     font-size: 0.96em;
     font-size: 0.97em;
     line-height: 1.55;
     line-height: 1.55;
     margin-bottom: 12px;
     margin-bottom: 12px;
    display: block;
     max-height: 4.8em;           /* Approx 3 lines */
     max-height: 4.65em;       /* Approx 3 lines */
     overflow: hidden;
     overflow: hidden;
}
}


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


Line 95: Line 80:
     display: grid;
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
     grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
     gap: 12px;
     gap: 14px;
     margin: 30px 0;
     margin: 35px 0;
}
}


.category-grid a {
.category-grid a {
     display: block;
     display: block;
     padding: 16px 20px;
     padding: 18px 20px;
     background: #f8fafc;
     background: #f8fafc;
     border-radius: 8px;
     border-radius: 8px;
Line 116: Line 101:
}
}


/* Responsive Adjustments */
/* Responsive */
@media (max-width: 768px) {
@media (max-width: 768px) {
    .main-hero {
     .main-hero h1 {  
        padding: 40px 15px;
         font-size: 2.3em;  
    }
   
     .main-hero h1 {
         font-size: 2.2em;
     }
     }
   
     .featured-grid,  
     .featured-grid,
     .top-stories-grid {
     .top-stories-grid {
         grid-template-columns: 1fr;
         grid-template-columns: 1fr;
Line 132: Line 112:
}
}


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

Revision as of 12:01, 31 May 2026

/* ================ MAIN 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.9em;
    margin: 0 0 14px 0;
    font-weight: 700;
}

.main-hero p {
    font-size: 1.28em;
    margin-bottom: 28px;
    opacity: 0.95;
}

/* Featured & Top Stories Grids */
.featured-grid,
.top-stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
    margin-bottom: 55px;
}

/* 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 ease;
    height: 100%;
}

.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;
}

.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;           /* Approx 3 lines */
    overflow: hidden;
}

.index-card-meta {
    color: #666;
    font-size: 0.92em;
}

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

.category-grid a {
    display: block;
    padding: 18px 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 */
@media (max-width: 768px) {
    .main-hero h1 { 
        font-size: 2.3em; 
    }
    .featured-grid, 
    .top-stories-grid {
        grid-template-columns: 1fr;
    }
}

/* Section Titles */
.section-title {
    font-size: 1.65em;
    margin: 45px 0 22px 0;
    color: #1e3a8a;
    border-bottom: 3px solid #bfdbfe;
    padding-bottom: 10px;
}