/* AI Course Finder specific styles */
.course-finder-hero {
    background: var(--gradient-primary);
    color: white;
    padding: 80px 20px;
    text-align: center;
    margin-top: 0px;
}

.course-finder-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: white;

}

.course-finder-hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 30px;
}

.ai-form-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.ai-form-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.ai-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.full-width {
    grid-column: 1 / -1;
}

.interests-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.interest-tag {
    background: rgba(93, 63, 211, 0.1);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.interest-tag:hover {
    background: rgba(93, 63, 211, 0.2);
}

.interest-tag.selected {
    background: var(--primary-color);
    color: white;
}

.find-courses-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    display: block;
    margin: 30px auto 0;
    width: 220px;
}

.find-courses-btn:hover {
    background: #4a2eb8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ai-benefits {
    background: #f8f9fa;
    padding: 60px 20px;
    text-align: center;
}

.benefits-title {
    margin-bottom: 50px;
    color: var(--text-primary);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.benefit-card {
    background: white;
    border-radius: var(--border-radius-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.benefit-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.benefit-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.benefit-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

.how-it-works {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.how-it-works h2 {
    text-align: center;
    margin-bottom: 50px;
}

.steps {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.step {
    text-align: center;
    flex: 1;
    position: relative;
    padding: 0 20px;
}

.step:not(:last-child):after {
    content: '';
    position: absolute;
    top: 40px;
    right: -50px;
    width: 100px;
    height: 2px;
    background: #ddd;
}

.step-number {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto 20px;
}

.step-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.step-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Results section - initially hidden */
.results-section {
    display: none;
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
}

.results-title {
    text-align: center;
    margin-bottom: 30px;
}

.course-card {
    background: white;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
    display: flex;
    transition: all 0.3s;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.course-image {
    width: 250px;
    height: 180px;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.course-card:hover .course-image img {
    transform: scale(1.05);
}

.course-details {
    padding: 20px;
    flex: 1;
}

.course-university {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 5px;
}

.course-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.course-description {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.5;
}

.course-meta {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.meta-item {
    margin-right: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.meta-item i {
    margin-right: 5px;
    color: var(--primary-color);
}

.course-actions {
    display: flex;
    gap: 15px;
}

.course-btn {
    padding: 8px 15px;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.details-btn {
    background: rgba(93, 63, 211, 0.1);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.details-btn:hover {
    background: rgba(93, 63, 211, 0.2);
}

.apply-btn {
    background: var(--primary-color);
    color: white;
    border: none;
}

.apply-btn:hover {
    background: #4a2eb8;
}

.match-badge {
    background: #28a745;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    position: absolute;
    top: 15px;
    right: 15px;
}

/* Enhanced Country Checkboxes Styling */
.country-checkboxes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.checkbox-group {
    position: relative;
    padding: 10px 12px;
    background-color: #f8f9fa;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
    border: 1px solid #eaeaea;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.checkbox-group:hover {
    background-color: rgba(93, 63, 211, 0.05);
    border-color: rgba(93, 63, 211, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

/* Custom checkbox style */
.checkbox-group input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    font-size: 0.95rem;
    cursor: pointer;
    color: var(--text-primary);
    font-weight: 500;
    padding-left: 28px;
    position: relative;
}

/* Create custom checkbox */
.checkbox-group label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    opacity: 0.7;
    transition: all 0.2s;
}

/* Flag icon beside country name */
.checkbox-group label:after {
    font-family: 'Font Awesome 5 Free';
    content: '\f00c';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 12px;
    opacity: 0;
    transition: all 0.2s;
}

/* Add country flag icon */
.checkbox-group label span {
    position: relative;
    padding-left: 24px;
}

.checkbox-group label span:before {
    font-family: 'Font Awesome 5 Free';
    content: '\f024';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    opacity: 0.7;
    font-size: 0.85rem;
}

/* When checkbox is checked */
.checkbox-group input[type="checkbox"]:checked+label:before {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    opacity: 1;
}

.checkbox-group input[type="checkbox"]:checked+label:after {
    opacity: 1;
}

.checkbox-group input[type="checkbox"]:checked+label {
    color: var(--primary-color);
    font-weight: 600;
}

.checkbox-group:has(input[type="checkbox"]:checked) {
    background-color: rgba(93, 63, 211, 0.08);
    border-color: rgba(93, 63, 211, 0.3);
    box-shadow: 0 3px 8px rgba(93, 63, 211, 0.12);
}

/* Focus state for accessibility */
.checkbox-group input[type="checkbox"]:focus+label:before {
    box-shadow: 0 0 0 3px rgba(93, 63, 211, 0.25);
}

/* Currency and Budget Styling */
.budget-container {
    position: relative;
}

.budget-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.currency-selector {
    min-width: 120px;
    flex-shrink: 0;
}

.currency-selector select {
    padding: 14px 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    background-color: #f9f9f9;
    font-size: 0.95rem;
    width: 100%;
    transition: all 0.3s;
    cursor: pointer;
}

.currency-selector select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(93, 63, 211, 0.1);
    background-color: #fff;
}

/* Budget dropdown styling */
#budget {
    flex: 1;
    cursor: pointer;
}

.currency-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 8px;
    margin-bottom: 0;
    font-style: italic;
    transition: all 0.3s;
}

/* Transitions for currency changes */
.budget-input-group select option {
    transition: background-color 0.3s;
}

/* Animation for currency change */
@keyframes highlight {
    0% {
        background-color: rgba(93, 63, 211, 0.1);
    }

    100% {
        background-color: transparent;
    }
}

.budget-input-group.changed {
    animation: highlight 1.5s ease;
}

/* Add this after your existing currency styling */

/* Animation for currency change */
@keyframes highlightChange {
    0% {
        background-color: rgba(93, 63, 211, 0);
    }

    50% {
        background-color: rgba(93, 63, 211, 0.1);
    }

    100% {
        background-color: rgba(93, 63, 211, 0);
    }
}

.highlight-change {
    animation: highlightChange 1.5s ease;
}

/* Budget value display */
.budget-display {
    display: none;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--primary-color);
    background: rgba(93, 63, 211, 0.08);
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    text-align: center;
}

.budget-display.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .country-checkboxes {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .country-checkboxes {
        grid-template-columns: 1fr;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ai-form {
        grid-template-columns: 1fr;
    }

    .steps {
        flex-direction: column;
        gap: 40px;
    }

    .step:not(:last-child):after {
        display: none;
    }

    .course-card {
        flex-direction: column;
    }

    .course-image {
        width: 100%;
        height: 200px;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .course-finder-hero h1 {
        font-size: 2rem;
    }

    .interests-container {
        justify-content: center;
    }

    .course-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .find-courses-btn {
        width: 100%;
    }
}