/* assets/css/style.css - Modern responsive design */

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #f0f4f8;
    color: #1a2a3a;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== HEADER ===== */
header {
    background: linear-gradient(135deg, #003366 0%, #0055a5 100%);
    color: white;
    padding: 30px 40px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
}

header p {
    opacity: 0.8;
    font-size: 1.1rem;
}

.admin-link a {
    color: white;
    text-decoration: none;
    background: rgba(255,255,255,0.15);
    padding: 10px 20px;
    border-radius: 8px;
    transition: background 0.3s;
}

.admin-link a:hover {
    background: rgba(255,255,255,0.25);
}

/* ===== SEARCH ===== */
.search-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.search-section form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #0055a5;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #0055a5;
    color: white;
}

.btn-primary:hover {
    background: #003d7a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,85,165,0.3);
}

.btn-secondary {
    background: #e2e8f0;
    color: #1a2a3a;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.btn-apply {
    background: #00a86b;
    color: white;
    text-align: center;
    width: 100%;
    font-size: 1.1rem;
    padding: 16px;
}

.btn-apply:hover:not(:disabled) {
    background: #008f5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,168,107,0.3);
}

.btn-apply:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== COURSE GRID ===== */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.course-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    position: relative;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.course-card.full {
    opacity: 0.75;
    background: #f8f9fa;
}

.course-badge {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge.available {
    background: #d4edda;
    color: #155724;
}

.badge.full {
    background: #f8d7da;
    color: #721c24;
}

.course-card h2 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: #003366;
}

.course-dates {
    color: #4a5a6a;
    margin-bottom: 4px;
}

.course-cost {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0055a5;
    margin: 8px 0;
}

.course-description {
    color: #4a5a6a;
    font-size: 0.95rem;
    margin: 12px 0 20px;
    flex-grow: 1;
}

/* ===== NO RESULTS ===== */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    color: #4a5a6a;
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #4a5a6a;
    font-size: 0.9rem;
}

footer a {
    color: #0055a5;
    text-decoration: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    header {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .course-grid {
        grid-template-columns: 1fr;
    }
    
    .search-section form {
        flex-direction: column;
    }
    
    .search-input {
        width: 100%;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

/* ===== FORM STYLES (for apply.php) ===== */
.form-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    max-width: 800px;
    margin: 0 auto;
}

.form-container h2 {
    color: #003366;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1a2a3a;
}

.form-group .required {
    color: #dc3545;
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #0055a5;
}

.form-control.error {
    border-color: #dc3545;
}

.form-control textarea {
    min-height: 80px;
    resize: vertical;
}

.radio-group, .checkbox-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 6px;
}

.radio-group label, .checkbox-group label {
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    border-left: 4px solid #0055a5;
}

.form-section h3 {
    color: #003366;
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.help-text {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 4px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.btn-submit {
    background: #00a86b;
    color: white;
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-submit:hover {
    background: #008f5a;
}

.btn-back {
    background: #e2e8f0;
    color: #1a2a3a;
    padding: 16px 40px;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .form-container {
        padding: 16px;
    }
    
    .form-actions {
        flex-direction: column;
    }
}