/**
 * Mobile Reordering for Single Program Pages
 * 
 * Reorders content for mobile devices to improve user experience
 * Order: description -> weekly focus -> CTA -> teacher -> related programs
 * 
 * @package YogaElementorWidgets
 * @since 1.0.0
 */

/* Mobile Reordering for Single Program Pages */
@media (max-width: 991.98px) {
    
    /* Simple and effective mobile reordering using column-reverse */
    .page-service-single .container .row {
        flex-direction: column-reverse;
        display: flex !important;
    }
    
    /* Ensure columns take full width on mobile */
    .page-service-single .col-lg-4,
    .page-service-single .col-lg-8 {
        width: 100% !important;
        padding: 0 15px !important;
        margin: 0 !important;
        float: none !important;
    }
    
    /* Add spacing between sections */
    .page-service-single .col-lg-8 {
        margin-bottom: 30px !important;
    }
    
    .page-service-single .col-lg-4 {
        margin-bottom: 20px !important;
    }
    
    /* Mobile-specific styling improvements */
    .program-join-button .btn-default {
        width: 100%;
        max-width: 300px;
        padding: 15px 30px;
        font-size: 16px;
        font-weight: 600;
    }
    
    /* Improve spacing for mobile */
    .program-content-section p {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 15px;
    }
    
    /* Mobile-friendly accordion */
    .program-content-accordion .section-title h2 {
        font-size: 18px !important;
        margin-bottom: 15px;
    }
    
    .program-content-accordion .section-title h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    /* Mobile-friendly journey cards */
    .journey-cards-container .section-title h2 {
        font-size: 18px !important;
        margin-bottom: 15px;
    }
    
    .journey-cards-container .section-title h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    /* Mobile-friendly journey cards layout */
    .journey-cards-wrapper {
        padding-left: 0;
    }
    
    .journey-card {
        margin-bottom: 20px;
        background: white;
        border-radius: 8px;
        padding: 20px;
        border: 1px solid #e9ecef;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .journey-card-header h4 {
        font-size: 16px;
        margin-bottom: 15px;
        color: #333;
    }
    
    .journey-lesson-item {
        display: flex;
        align-items: flex-start;
        margin-bottom: 15px;
        padding: 10px;
        background: #f8f9fa;
        border-radius: 5px;
    }
    
    .lesson-icon {
        margin-right: 10px;
        color: #007cba;
        font-size: 18px;
    }
    
    .lesson-info h5 {
        font-size: 14px;
        margin-bottom: 5px;
        color: #333;
    }
    
    .lesson-info p {
        font-size: 13px;
        color: #666;
        margin-bottom: 8px;
    }
    
    .lesson-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .lesson-meta span {
        font-size: 12px;
        padding: 3px 8px;
        background: white;
        border-radius: 10px;
        border: 1px solid #e9ecef;
    }
    
    /* Mobile-friendly additional info */
    .class-additional-info {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .class-additional-info span {
        background: #f8f9fa;
        padding: 8px 12px;
        border-radius: 20px;
        font-size: 14px;
        border: 1px solid #e9ecef;
    }
    
    /* Mobile-friendly sidebar */
    .page-single-sidebar {
        background: #f8f9fa;
        padding: 20px;
        border-radius: 8px;
        margin-top: 20px;
    }
    
    /* Mobile-friendly related programs */
    .page-catagery-list h3 {
        font-size: 18px;
        margin-bottom: 15px;
        text-align: center;
    }
    
    .page-catagery-list ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .page-catagery-list li {
        margin-bottom: 10px;
    }
    
    .page-catagery-list li a {
        display: block;
        padding: 10px 15px;
        background: white;
        border-radius: 5px;
        text-decoration: none;
        color: #333;
        border: 1px solid #e9ecef;
        transition: all 0.3s ease;
    }
    
    .page-catagery-list li a:hover {
        background: #007cba;
        color: white;
        transform: translateY(-2px);
    }
    
    /* Mobile-friendly teacher section */
    .sidebar-teacher-section,
    .sidebar-cta-box {
        background: white;
        padding: 20px;
        border-radius: 8px;
        border: 1px solid #e9ecef;
        text-align: center;
    }
    
    .sidebar-cta-box h3 {
        font-size: 16px;
        margin-bottom: 15px;
        color: #333;
    }
    
    .sidebar-cta-box .btn-default {
        width: 100%;
        max-width: 200px;
        padding: 12px 20px;
    }
}

/* Extra small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    
    /* Further optimize for very small screens */
    .page-service-single .container {
        padding: 0 15px;
    }
    
    .program-join-button .btn-default {
        padding: 12px 25px;
        font-size: 15px;
    }
    
    .class-additional-info span {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    .program-content-section p {
        font-size: 15px;
    }
    
    .page-single-sidebar {
        padding: 15px;
    }
    
    .sidebar-cta-box,
    .sidebar-teacher-section {
        padding: 15px;
    }
}

/* Ensure proper spacing between sections */
@media (max-width: 991.98px) {
    .service-entry > * {
        margin-bottom: 20px;
    }
    
    .service-entry > *:last-child {
        margin-bottom: 0;
    }
    
    /* Add visual separation between major sections */
    .program-content-section::after,
    .program-content-accordion::after,
    .journey-cards-container::after,
    .program-join-button::after {
        content: '';
        display: block;
        height: 1px;
        background: #e9ecef;
        margin: 20px 0;
    }
    
    .program-join-button::after {
        margin-bottom: 0;
    }
}