/*==============================================
    Tabbed Section Max-Width Container System
    Prevents tabbed content from spreading too wide on large screens
    Similar to ChatGPT, GitHub, and other modern websites
===============================================*/

/* Only apply max-width constraint to tabbed section */
.tabbed-section .container {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* For very large screens, add more restrictive max-width */
@media (min-width: 1600px) {
    .tabbed-section .container {
        max-width: 1200px !important;
    }
}

/* Tabbed section specific styling */
.tabbed-section {
    position: relative;
}

/* Responsive adjustments for tabbed section only */
@media (max-width: 1200px) {
    .tabbed-section .container {
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

@media (max-width: 768px) {
    .tabbed-section .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

@media (max-width: 576px) {
    .tabbed-section .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* Tabbed section specific improvements */
.tabbed-section .tab-content {
    border: 2px solid #5ba17a;
    border-top: none;
    background: white;
    padding: 40px;
    min-height: 500px;
}

/* Ensure images in tabbed section scale properly */
.tabbed-section img {
    max-width: 100%;
    height: auto;
}

/* Typography adjustments for tabbed section on large screens */
@media (min-width: 1400px) {
    .tabbed-section h3,
    .tabbed-section h4,
    .tabbed-section h5 {
        line-height: 1.4;
    }
    
    .tabbed-section p {
        font-size: 16px;
        line-height: 1.7;
        max-width: 65ch; /* Optimal reading width */
    }
}

/* Prevent horizontal overflow in tabbed section */
.tabbed-section {
    overflow-x: hidden;
}

.tabbed-section .container {
    overflow-x: hidden;
}

/* Ensure buttons in tabbed section are properly sized */
.tabbed-section .btn {
    white-space: nowrap;
}

/* Better spacing and readability for tabbed content on large screens */
@media (min-width: 1400px) {
    .tabbed-section .tab-content {
        padding: 50px;
    }
    
    .tabbed-section .table-responsive {
        margin: 20px 0;
    }
    
    .tabbed-section .row {
        margin-bottom: 30px;
    }
}

/* Fix table responsiveness in tabbed section */
.tabbed-section .table-responsive {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Better mobile experience for tabbed section */
@media (max-width: 768px) {
    .tabbed-section .tab-content {
        padding: 20px;
    }
    
    .tabbed-section .nav-tabs .nav-link h4 {
        font-size: 12px;
    }
}

/* Additional improvements for tabbed section content presentation */

/* Improve readability of text content in tabbed section */
@media (min-width: 1200px) {
    .tabbed-section p {
        max-width: 65ch; /* Optimal reading width */
        line-height: 1.7;
    }
}

/* Prevent excessive white space on ultra-wide screens */
@media (min-width: 1800px) {
    .tabbed-section .container {
        max-width: 1200px !important;
    }
}

/* Smooth transitions for responsive changes in tabbed section */
.tabbed-section .container {
    transition: max-width 0.3s ease, padding 0.3s ease;
}

/* Schedule Tab Specific Improvements */
#schedule-tab .table-responsive {
    margin: 0 auto;
    max-width: 800px; /* Optimal width for schedule table */
}

#schedule-tab .table {
    margin-bottom: 30px;
}

#schedule-tab .table th {
    background-color: #5ba17a;
    color: white;
    font-weight: 600;
    text-align: center;
    padding: 15px 10px;
}

#schedule-tab .table td {
    padding: 12px 10px;
    vertical-align: middle;
}

#schedule-tab .table td:first-child {
    font-weight: 600;
    color: #5ba17a;
    white-space: nowrap;
    width: 30%;
}

#schedule-tab .table td:last-child {
    width: 70%;
}

#schedule-tab .table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Center the note text */
#schedule-tab p {
    text-align: center;
    font-style: italic;
    color: #666;
    margin-top: 20px;
}

/* Responsive adjustments for schedule */
@media (max-width: 768px) {
    #schedule-tab .table-responsive {
        max-width: 100%;
    }
    
    #schedule-tab .table td:first-child {
        font-size: 14px;
        width: 35%;
    }
    
    #schedule-tab .table td:last-child {
        font-size: 14px;
        width: 65%;
    }
}