/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Child theme for GeneratePress
 Author:       Your Name
 Author URI:   https://example.com
 Template:     generatepress
 Version:      1.0.0
*/

/* You can add your custom CSS below */

/* ============================
   Homepage Updates Grid CSS
   ============================ */

/* Main grid container */
.updates-grid {
    display: grid;
    /* Sets up a responsive grid with a minimum column width of 280px. */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 40px auto; /* Centers the grid and adds vertical margin. */
    max-width: 1200px; /* Limits the grid width on large screens. */
    padding: 0 1rem; /* Adds padding for smaller screens. */
}

/* Individual update boxes */
.update-box {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    padding: 20px;
    transition: all 0.3s ease;
}

.update-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

/* Header for each box */
.update-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.update-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

/* View all link */
.update-header .view-all {
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
}

/* List styling */
.update-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.update-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
}

.update-list li:last-child {
    border-bottom: none;
}

.update-list span {
    font-size: 14px;
    color: #333;
    flex: 1;
    margin-right: 10px;
    /* Prevents long titles from pushing the button off-screen. */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Apply button */
.apply-btn {
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    color: #fff;
}

/* ============================
    Section Colors
   ============================ */

/* All Update - Neutral Gray */
.update-box.category-all-update .update-header h3 { color: #444; }
.update-box.category-all-update .update-header .view-all { color: #666; }
.update-box.category-all-update .apply-btn { background: #666; }
.update-box.category-all-update .apply-btn:hover { background: #444; }

/* Latest Jobs - Blue */
.update-box.category-latest-jobs .update-header h3 { color: #0073e6; }
.update-box.category-latest-jobs .update-header .view-all { color: #0073e6; }
.update-box.category-latest-jobs .apply-btn { background: #0073e6; }
.update-box.category-latest-jobs .apply-btn:hover { background: #005bb5; }

/* Answer Keys - Orange */
.update-box.category-answer-keys .update-header h3 { color: #ff8800; }
.update-box.category-answer-keys .update-header .view-all { color: #ff8800; }
.update-box.category-answer-keys .apply-btn { background: #ff8800; }
.update-box.category-answer-keys .apply-btn:hover { background: #cc6d00; }

/* Admit Cards - Green */
.update-box.category-admit-cards .update-header h3 { color: #28a745; }
.update-box.category-admit-cards .update-header .view-all { color: #28a745; }
.update-box.category-admit-cards .apply-btn { background: #28a745; }
.update-box.category-admit-cards .apply-btn:hover { background: #1e7e34; }

/* Results - Purple */
.update-box.category-results .update-header h3 { color: #6f42c1; }    
.update-box.category-results .update-header .view-all { color: #6f42c1; }    
.update-box.category-results .apply-btn { background: #6f42c1; }    
.update-box.category-results .apply-btn:hover { background: #5936a2; }

/* Syllabus - Pink */
.update-box.category-syllabus .update-header h3 { color: #e83e8c; }
.update-box.category-syllabus .update-header .view-all { color: #e83e8c; }
.update-box.category-syllabus .apply-btn { background: #e83e8c; }
.update-box.category-syllabus .apply-btn:hover { background: #c82368; }

/* ============================
   Card style for Results section
   ============================ */

.update-box.card-style {
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fafafa;
}

.update-box.card-style .update-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.update-box.card-style .update-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.update-box.card-style .result-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-align: center;
}

.update-box.card-style .result-card h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
    /* Prevents long titles from overflowing. */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.update-box.card-style .apply-btn {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    transition: 0.3s;
}

/* ============================
   Responsive Adjustments
   ============================ */

@media (max-width: 768px) {
    .updates-grid {
        /* Stacks boxes vertically on smaller screens for better readability. */
        grid-template-columns: 1fr;
    }
}