/* --- 1. GLOBAL SETTINGS & TYPOGRAPHY --- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-blue: #3498db;
    --dark-navy: #0d3b66;
    --school-yellow: #f4d35e;
    --text-main: #1a1c1e;
    --text-gray: #4a5568;
    --white: #ffffff;
    --light-bg: #f8f9fa;
    --shadow-md: 0 10px 25px rgba(0,0,0,0.08);
    --shadow-bold: 0 15px 35px rgba(0,0,0,0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.8;
    color: var(--text-main);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
/* ==========================================================================
   BLOG SECTION - INTEGRATED WITH GLOBAL SETTINGS
   ========================================================================== */

.blog-container {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.blog-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--dark-navy);
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.blog-title span {
    color: var(--primary-blue);
}

.title-underline {
    width: 60px;
    height: 5px;
    background: var(--school-yellow);
    margin: 0 auto 20px;
    border-radius: 10px;
}

.blog-subtitle {
    color: var(--text-gray);
    font-size: 1.1rem;
    font-weight: 500;
}

/* --- GRID SYSTEM --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* --- THE CARD --- */
.blog-card {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%; /* Forces all cards in a row to be equal height */
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-bold);
}

/* Image Handling */
.card-img-wrapper {
    width: 100%;
    height: 230px;
    overflow: hidden;
    background-color: #eee;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover .card-img-wrapper img {
    transform: scale(1.1);
}

/* --- CARD CONTENT --- */
.card-body {
    padding: 30px;
    flex-grow: 1; /* Pushes the footer to the bottom */
    display: flex;
    flex-direction: column;
}

.item-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: 15px;
    line-height: 1.3;
    /* Prevent title overlap */
    word-wrap: break-word;
    word-break: break-word;
}

.description {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 25px;
    
    /* FIX: Prevents long words/URLs from bleeding out */
    word-wrap: break-word;
    overflow-wrap: break-word;
    
    /* OPTIONAL: Limit description to 3 lines for a clean look */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Button Styling */
.load-btn {
    align-self: flex-start; /* Keeps button on the left */
    margin-top: auto;      /* Pushes button to bottom of content area */
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.load-btn:hover {
    background: var(--primary-blue);
    color: var(--white);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

/* --- CARD FOOTER --- */
.card-footer {
    padding: 20px 30px;
    background: #fcfdfe;
    border-top: 1px solid #f1f4f8;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-gray);
    white-space: nowrap;
}

.meta-item i {
    color: var(--primary-blue);
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .blog-title {
        font-size: 2.2rem;
    }
}