/* static/css/strategy.css (Final Professional Design) */

/* --- Page Background & Layout --- */
.strategy-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 3rem 1rem;
    min-height: calc(100vh - 70px); /* Adjust based on your header height */
    display: flex;
    align-items: center;
    justify-content: center;
}

.strategy-container {
    width: 100%;
    max-width: 850px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
}

/* --- Step Animation & Styling --- */
.strategy-step { display: none; }
.strategy-step.active { 
    display: block; 
    animation: slideUpIn 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.step-icon { 
    font-size: 3.5rem; 
    color: var(--primary-color); 
    margin-bottom: 1rem; 
    text-align: center;
    animation: popIn 0.5s ease-out;
}
.step-title { 
    text-align: center; 
    font-size: 2.5rem; 
    font-weight: 700;
    color: #34495e;
    margin-bottom: 0.75rem; 
}
.step-subtitle { 
    text-align: center; 
    font-size: 1.2rem; 
    color: #555; 
    margin-bottom: 3rem; 
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Selection Cards (Exam/Group) --- */
.selection-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.selection-card { 
    background: #fff; 
    border: 1px solid #ddd; 
    border-radius: 16px; 
    padding: 2rem; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    text-align: center; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.04);
}
.selection-card:hover { 
    transform: translateY(-8px) scale(1.03); 
    border-color: var(--primary-color); 
    box-shadow: 0 10px 20px rgba(0, 119, 182, 0.15); 
}
.selection-card i { font-size: 2.8rem; margin-bottom: 1rem; color: var(--primary-color); }
.selection-card h3 { font-size: 1.5rem; color: #34495e; margin: 0 0 0.5rem 0; }
.selection-card p { color: #6c757d; }

.back-btn { 
    background: transparent; 
    border: none; 
    color: var(--primary-color); 
    font-weight: 600; 
    cursor: pointer; 
    margin-bottom: 1.5rem; 
    display: flex; 
    align-items: center; 
    gap: 5px; 
    font-size: 1rem;
    transition: transform 0.2s;
}
.back-btn:hover { transform: translateX(-3px); }

/* --- Form Styling --- */
#strategy-form { display: flex; flex-direction: column; gap: 1.8rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.6rem; color: #34495e; }
.form-group input, .form-group select { 
    width: 100%; 
    padding: 0.9rem 1rem; 
    border: 2px solid #ccc; 
    border-radius: 10px; 
    font-size: 1rem; 
    transition: all 0.3s;
}
.form-group input:focus, .form-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.2);
    outline: none;
}

.generate-btn { 
    padding: 1.1rem; 
    font-size: 1.2rem; 
    font-weight: 600;
    border-radius: 10px;
    margin-top: 1rem;
    transition: all 0.3s;
}
.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(0, 119, 182, 0.2);
}

/* Choices.js multi-select styling */
.choices__inner { background: #fff; border: 2px solid #ccc; border-radius: 10px; padding: 0.6rem; font-size: 1rem; }
.choices.is-focused .choices__inner { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.2); }
.choices[data-type*="select-multiple"] .choices__button { border-left: 1px solid #ddd; }
.choices__list--multiple .choices__item { background-color: var(--primary-color); border-color: var(--primary-color); }

/* --- Results Styling --- */
.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
#pdf-download-btn { font-weight: 600; }
.loader-container { text-align: center; padding: 4rem 0; }
.result-category { margin-bottom: 3.5rem; }
.result-category h2 { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    font-size: 1.9rem; 
    color: #34495e;
    border-bottom: 3px solid; 
    padding-bottom: 0.8rem; 
    margin-bottom: 0.5rem; 
}
.result-category:nth-of-type(1) h2 { border-color: #ffc107; } /* Dream */
.result-category:nth-of-type(2) h2 { border-color: #198754; } /* Target */
.result-category:nth-of-type(3) h2 { border-color: #0d6efd; } /* Safety */

.category-desc { color: #555; font-size: 1.05rem; margin-bottom: 1.5rem; }
.result-grid { display: grid; gap: 1.2rem; }

.college-card { 
    background: #fff; 
    border-left: 6px solid; 
    border-radius: 12px; 
    padding: 1.2rem 1.5rem; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.08); 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    animation: fadeIn 0.5s ease-out backwards;
}
.college-card:hover { 
    transform: scale(1.03); 
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.college-card.dream { border-color: #ffc107; }
.college-card.target { border-color: #198754; }
.college-card.safety { border-color: #0d6efd; }

.card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 0.5rem; }
.card-header h3 { font-size: 1.2rem; font-weight: 600; color: #2c3e50; margin: 0; }
.card-percentile { 
    font-weight: 700; 
    font-size: 1.25rem; 
    white-space: nowrap;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
}
.dream .card-percentile { color: #c88f00; background-color: #fff8e1; }
.target .card-percentile { color: #146c43; background-color: #d1e7dd; }
.safety .card-percentile { color: #0a58ca; background-color: #cfe2ff; }

.card-branch { color: #555; font-weight: 500; margin-bottom: 1.2rem; }

.card-codes {
    border-top: 1px solid #eee;
    margin-top: 1rem;
    padding-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.9rem;
    color: #555;
}
.card-codes span { display: flex; align-items: center; gap: 6px; }
.card-codes .ti { font-size: 1.1rem; color: #777; }
.card-codes strong { color: #34495e; }

.error-box { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; border-radius: 8px; padding: 1.5rem; text-align: center; margin-bottom: 2rem; font-size: 1.1rem; }

/* Responsive Design */
@media (max-width: 768px) {
    .strategy-container { padding: 1.5rem; }
    .step-title { font-size: 2rem; }
    .form-grid { grid-template-columns: 1fr; }
    .card-header { flex-direction: column; align-items: flex-start; }
    .card-percentile { margin-top: 0.5rem; }
}

/* Keyframe Animations */
@keyframes slideUpIn {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    80% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}