/* --- 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.7;
    color: var(--text-main);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- 2. COMMON COMPONENTS --- */
.page-header {
    background: linear-gradient(rgba(13, 59, 102, 0.85), rgba(13, 59, 102, 0.85)), 
                url('/static/course/images/header-bg.jpg') center/cover;
    padding: 90px 0 60px;
    text-align: center;
    color: var(--white);
    margin-bottom: 50px;
}

.page-header h1 { font-size: 3rem; margin-bottom: 10px; color: var(--white); }
.section-header { text-align: center; margin-bottom: 50px; width: 100%; }
.section-header h2 { font-size: 2.25rem; color: var(--dark-navy); margin-bottom: 10px; }

/* --- 3. THE 3-COLUMN "BLOCK" GRID --- */
/* Forces 3 items per row for Support, Activities, and Contact Cards */
.support-grid, 
.activities-grid, 
.contact-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px;
    margin-bottom: 60px;
}

/* --- 4. CARD STYLING & DYNAMIC IMAGES --- */
.support-card, .activity-card, .contact-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 100%; /* Ensures all cards in a row are same height */
    display: flex;
    flex-direction: column;
}

.support-card:hover, .activity-card:hover, .contact-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-bold);
}

/* Dynamic Image Handling */
.activity-image {
    width: 100%;
    height: 240px; /* Uniform height for the block look */
    overflow: hidden;
}

.activity-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Prevents stretching of database images */
    transition: transform 0.5s ease;
}

.activity-card:hover .activity-image img { transform: scale(1.05); }

.activity-content, .support-card, .contact-card {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* --- 5. CONTACT FORM & INPUTS --- */
.contact-form-section { background: var(--light-bg); padding: 80px 0; }
.contact-form-container {
    max-width: 850px; margin: 0 auto; background: var(--white);
    padding: 40px; border-radius: 24px; box-shadow: var(--shadow-bold);
}

.form-intro { text-align: center; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group { margin-bottom: 20px; display: flex; flex-direction: column; }
.form-group label { font-weight: 600; margin-bottom: 8px; color: var(--dark-navy); }

input, select, textarea {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    transition: var(--transition);
}

input:focus, textarea:focus {
    outline: none; border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
    padding: 15px 35px;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover { background: var(--dark-navy); transform: scale(1.02); }

/* --- 6. EMERGENCY SECTION --- */
.emergency-contact { background: #fff5f5; padding: 50px 0; border-radius: 20px; margin: 40px 0; }
.emergency-content { display: flex; align-items: center; gap: 30px; padding: 0 40px; }
.emergency-icon i { font-size: 3rem; color: #f56565; }
.emergency-numbers { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px 40px; margin-top: 15px; }
.number { font-weight: 800; color: #f56565; font-size: 1.2rem; }

/* --- 7. ACCOMMODATION LAYOUT --- */
.accommodation-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 50px;
}

.accommodation-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    height: 350px;
    object-fit: cover;
}

/* --- 8. RESPONSIVE DESIGN --- */
@media (max-width: 1024px) {
    .support-grid, .activities-grid, .contact-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .support-grid, .activities-grid, .contact-grid, 
    .form-row, .accommodation-content {
        grid-template-columns: 1fr !important;
    }
    .page-header h1 { font-size: 2.2rem; }
    .emergency-content { flex-direction: column; text-align: center; }
}