/**
 * State Courses Section - Option B Design (100px images)
 * Displays state-specific courses in blog posts and learn articles
 */

/* ========================================
   Main Section Container
   ======================================== */

.state-courses-section {
    margin: 40px 0 60px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #ffb606;
}

/* Section Header */
.state-courses-section .section-header {
    margin-bottom: 30px;
}

.state-courses-section .section-header h2 {
    margin: 0 0 15px;
    font-size: 28px;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
}

.state-courses-section .section-intro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.state-courses-section .section-intro p {
    margin: 0;
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    flex: 1;
}

.state-courses-section .state-landing-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    color: #0073e6;
    text-decoration: none;
    border: 2px solid #0073e6;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.state-courses-section .state-landing-link:hover {
    background: #0073e6;
    color: #fff;
}

.state-courses-section .state-landing-link svg {
    width: 16px;
    height: 16px;
}

/* ========================================
   Course Cards Container (Option B)
   ======================================== */

.state-courses-section .courses-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Individual Course Card - Balanced Horizontal */
.state-course-balanced {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.state-course-balanced:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: #ffb606;
}

/* Course Image - 100px (State Map) */
.state-course-balanced .course-image {
    flex: 0 0 100px;
}

.state-course-balanced .course-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

/* Course Information */
.state-course-balanced .course-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Course Title */
.state-course-balanced .course-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.state-course-balanced .course-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.state-course-balanced .course-title a:hover {
    color: #ffb606;
}

/* Course Badges */
.state-course-balanced .course-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.state-course-balanced .badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    white-space: nowrap;
}

.state-course-balanced .badge.course-num {
    background: #e0e0e0;
    color: #555;
}

.state-course-balanced .badge.credits {
    background: #e3f2fd;
    color: #0073e6;
}

.state-course-balanced .badge.approved {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Course Buy Section */
.state-course-balanced .course-buy {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: auto;
}

/* Pricing */
.state-course-balanced .pricing {
    display: flex;
    align-items: center;
    gap: 10px;
}

.state-course-balanced .pricing .was {
    font-size: 16px;
    color: #dc3545;
    text-decoration: line-through;
}

.state-course-balanced .pricing .now {
    font-size: 22px;
    font-weight: 700;
    color: #0073e6;
}

/* Enroll Button */
.state-course-balanced .btn-enroll {
    padding: 10px 24px;
    background: #ffb606;
    color: #000;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.state-course-balanced .btn-enroll:hover {
    background: #ffc933;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 182, 6, 0.3);
}

/* ========================================
   View All Footer Button
   ======================================== */

.state-courses-section .view-all-footer {
    margin-top: 30px;
    text-align: center;
}

.state-courses-section .btn-view-all {
    display: inline-block;
    padding: 12px 32px;
    background: #0073e6;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.state-courses-section .btn-view-all:hover {
    background: #005bb5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 230, 0.3);
}

/* ========================================
   National States Grid View
   ======================================== */

.national-states-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.state-card {
    padding: 24px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.state-card:hover {
    border-color: #ffb606;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.state-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.state-card h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #333;
}

.course-count-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #0073e6;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
}

.state-card-description {
    margin: 0 0 16px;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    flex: 1;
}

.state-card-link {
    color: #0073e6;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.state-card:hover .state-card-link {
    gap: 10px;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablets (768px - 1024px) */
@media (max-width: 1024px) {
    .national-states-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .state-courses-section .section-intro {
        flex-direction: column;
        align-items: flex-start;
    }

    .state-courses-section .state-landing-link {
        align-self: flex-start;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .state-courses-section {
        padding: 20px;
        margin: 30px 0 40px;
    }

    .state-courses-section .section-header h2 {
        font-size: 24px;
    }

    .state-courses-section .section-intro p {
        font-size: 14px;
    }

    /* Stack course cards vertically */
    .state-course-balanced {
        flex-direction: column;
        padding: 16px;
    }

    .state-course-balanced .course-image {
        flex: 0 0 auto;
        align-self: center;
    }

    .state-course-balanced .course-buy {
        flex-direction: column;
        align-items: stretch;
    }

    .state-course-balanced .btn-enroll {
        text-align: center;
        width: 100%;
    }

    /* National grid - single column on mobile */
    .national-states-grid {
        grid-template-columns: 1fr;
    }

    .state-courses-section .btn-view-all {
        width: 100%;
        padding: 14px 24px;
    }
}

/* Small mobile (max-width: 480px) */
@media (max-width: 480px) {
    .state-courses-section {
        padding: 16px;
        margin: 20px 0 30px;
    }

    .state-courses-section .section-header h2 {
        font-size: 20px;
    }

    .state-course-balanced .course-title {
        font-size: 16px;
    }

    .state-course-balanced .pricing .now {
        font-size: 20px;
    }

    .state-card {
        padding: 16px;
    }

    .state-card h3 {
        font-size: 18px;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .state-courses-section {
        border-left: 2px solid #000;
        page-break-inside: avoid;
    }

    .state-course-balanced {
        page-break-inside: avoid;
    }

    .state-course-balanced .btn-enroll,
    .state-courses-section .btn-view-all,
    .state-courses-section .state-landing-link {
        border: 1px solid #000;
        background: transparent;
        color: #000;
    }
}
