:root {
    --primary-green: #1b5e20;
    --dark-green: #0d3311;
    --accent-gold: #c5a059;
    --light-gray: #f8f9fa;
    /* Softer gray */
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #ffffff;
    --text-muted: #6c757d;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    background-color: var(--light-gray);
    font-family: 'Inter', 'Roboto', sans-serif;
    /* Prefer Inter if available */
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    background: url('../images/555.JPG') no-repeat center center;
    background-size: cover;
    height: 320px;
    /* Increased height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: -30px;
    /* Overlap effect */
    z-index: 10;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(13, 51, 17, 0.9) 0%, rgba(27, 94, 32, 0.8) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--text-light);
    padding: 20px;
    width: 100%;
}

.hero-logo {
    height: 90px;
    width: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.9;
}

/* --- Controls Section --- */
.controls-section {
    background: transparent;
    /* Transparent to let grid show through or handle differently */
    padding: 0 0 30px 0;
    box-shadow: none;
    position: relative;
    z-index: 100;
    border-bottom: none;
    margin-top: -25px;
    /* Pull up into hero */
}

.search-container {
    max-width: 650px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 18px 25px;
    padding-left: 55px;
    border: none;
    border-radius: 50px;
    /* Pill shape */
    font-size: 1.1rem;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    color: var(--text-dark);
}

.search-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
    outline: none;
}

.search-icon {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-green);
    font-size: 1.2rem;
    pointer-events: none;
}

/* --- Exams Section --- */
.exams-section {
    padding: 40px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
}

.section-title {
    font-size: 1.5rem;
    color: var(--primary-green);
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
    padding-right: 15px;
}



.exam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

/* --- Exam Card --- */
.exam-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    border-top: 4px solid var(--primary-green);
    display: flex;
    flex-direction: column;
}

.exam-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-meta {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.btn-start {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: var(--primary-green);
    color: var(--white);
    text-align: center;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: background 0.3s;
}

.btn-start:hover {
    background-color: var(--dark-green);
    color: var(--white);
    text-decoration: none;
}

/* --- Footer --- */
.footer {
    background-color: var(--dark-green);
    color: var(--white);
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
    margin-top: auto;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-section {
        height: 220px;
    }

    .exam-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Exam Flag Styles --- */
.card-header-flex {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    /* Spacing below the header block */
}

/* Override default title margin since flex handles spacing */
.card-header-flex .card-title {
    margin-bottom: 0;
}

.exam-flag {
    width: 40px;
    height: auto;
    /* Maintain aspect ratio */
    max-height: 30px;
    /* Cap height for weird ratios */
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    object-fit: contain;
    background-color: #f0f0f0;
    /* Fallback for transparency */
}