/* === Responsive CSS for 992px, 768px, 576px Breakpoints === */

/* --- 992px Breakpoint --- */
@media (max-width: 992px) {

    /* General */
    body {
        padding-bottom: 0;
        /* Reset padding for larger screens */
    }

    /* Navigation */
    .topbar__nav--desktop {
        display: none;
        /* Hidden as hamburger menu takes over */
    }

    /* Event Page */
    .event-details-layout {
        grid-template-columns: 1fr;
    }

    .event-sidebar {
        margin-top: 50px;
    }

    .sidebar-sticky-panel {
        position: static;
        /* Disable sticky on smaller screens */
    }

    .event-title {
        font-size: 2.5rem;
    }

    .price {
        padding-left: 15px;
    }

    /* Event Details Page */
    .section-title {
        font-size: 2.2rem;
    }

    .hero-title {
        font-size: 3rem;
    }

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

    .intro-image {
        order: 1;
    }

    .intro-text {
        order: 2;
        text-align: center;
    }

    .intro-text h2 {
        text-align: center;
    }

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

    /* About Page */
    .about-page-title {
        font-size: 2.8rem;
    }

    .mission-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
        padding: 40px;
    }

    /* Course Page */
    .hero-grid,
    .app-download-card,
    .course-hero-grid,
    .curriculum-grid,
    .community-container {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .hero-image-wrapper,
    .hero-video-content {
        margin-top: 40px;
    }

    .hero-text-content,
    .community-text {
        text-align: center;
    }

    .hero-actions,
    .course-rating {
        display: flex;
        justify-content: center;
    }

    .course-nav-container {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .testimonial-grid {
        column-count: 2;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        /* 2-column layout */
    }

    /* Shop Page */
    .voucher-content-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .zoom-box .viewer-box {
        width: 300px !important;
        height: 200px !important;
        left: 0 !important;
        right: 0 !important;
    }
}

/* --- 768px Breakpoint --- */

@media (min-width: 768px) {
    .chat-sidebar {
        width: 320px;
        flex-shrink: 0;
    }

    .chat-window {
        position: static;
        transform: none;
    }

    .chat-header .back-btn {
        display: none;
    }

    .profile-stats {
        justify-content: flex-start;
        /* Align left on larger screens */
    }

    .auth-form-panel {
        padding: 3rem;
    }

    .ticket-meta {
        flex-direction: column;
        align-items: flex-end;
        margin-top: 0;
    }

    .ticket-card {
        flex-direction: row;
        align-items: center;
    }


}

@media (max-width: 768px) {

    /* General */
    body {
        padding-bottom: 70px;
        /* Space for bottom nav */
    }

    /* Navigation */
    #bottom-nav {
        display: flex;
    }

    /* Event Page */
    .page-title {
        font-size: 2.5rem;
    }

    .page-section {
        padding: 40px 0;
    }

    .events-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .event-search,
    #event-search-input {
        width: 100%;
    }

    .time-block span {
        font-size: 2.5rem;
    }

    .time-block small {
        font-size: 0.8rem;
    }

    #timer {
        gap: 15px;
    }

    .countdown-title,
    .live-title {
        font-size: 1.4rem;
    }

    .speaker-info {
        flex-direction: column;
        text-align: center;
    }

    /* Calendar */
    .calendar-wrapper {
        padding: 20px;
    }

    .weekdays {
        display: none;
        font-size: 0.8rem;
    }

    .calendar-body {
        max-height: 125px;
    }

    .days {
        display: flex;
        overflow-x: auto;
        padding-bottom: 15px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .days div {
        flex: 0 0 calc(100% / 5);
        /* Show 5 days at a time */
        height: 90px;
        scroll-snap-align: start;
        padding: 3px;
    }

    .date-num {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }

    .event-title-text {
        font-size: 0.65rem;
    }

    #month-year {
        font-size: 1.2rem;
    }

    /* About Page */
    .about-page-section {
        padding: 80px 0;
    }

    .about-page-title {
        font-size: 2.2rem;
    }

    .about-page-subtitle {
        font-size: 1rem;
    }

    /* Timeline */
    .timeline::after {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 60px;
        padding-right: 15px;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 11px;
        /* 20px (line pos) - 9px (half of dot width) */
    }

    /* Course Page */
    .section-title,
    .hero-title,
    .app-download-content h3 {
        font-size: 2.2rem;
    }

    .hero-text-content h1 {
        font-size: 2rem;
    }

    /* #course-hero {
        padding-top: 90px;
    } */

    #course-nav-sticky.is-sticky {
        top: 70px;
    }

    .instructor-grid,
    .courses-grid {
        grid-template-columns: 1fr;
    }

    .testimonial-grid {
        column-count: 1;
    }

    .app-download-card {
        padding: 30px;
        text-align: center;
    }

    .download-buttons {
        justify-content: center;
    }

    .course-tabs-slider-wrapper {
        padding: 0;
        /* No padding on mobile */
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        /* Single column */
        text-align: center;
    }

    .footer-tagline {
        margin: 0 auto 30px auto;
        /* Center tagline */
    }

    .social-icons,
    .footer-bottom {
        justify-content: center;
        flex-direction: column;
        gap: 15px;
    }

    .footer-contact-section,
    .footer-container {
        display: none;
        flex-direction: column;
        text-align: center;
    }

    /* Miscellaneous */
    .donate-banner {
        padding: 40px 20px;
    }

    .profile-dropdown-wrapper .dropdown-menu {
        min-width: 180px;
    }

    .profile-dropdown-wrapper .dropdown-toggle img {
        width: 40px;
        height: 40px;
    }

    .profile-dropdown-wrapper .dropdown-item {
        font-size: 14px;
        padding: 0.4rem 0.8rem;
    }


}

/* --- 576px Breakpoint --- */
@media (max-width: 576px) {

    /* General */
    body {
        padding-bottom: 80px;
        /* Increased padding for smaller screens */
    }

    /* Course Page */
    .community-card {
        flex-direction: column;
        text-align: center;
    }

    .sticky-enroll-footer {
        padding: 10px 0;
    }

    .footer-price-section .price {
        font-size: 1.4rem;
    }

    .promo-code-link {
        font-size: 0.8rem;
    }

    .btn-enroll-sticky {
        padding: 10px 15px;
        font-size: 1rem;
    }

    /* Shop Page */
    .voucher-ticket {
        flex-direction: column;
        text-align: center;
    }

    .voucher-separator {
        height: 2px;
        width: 80%;
        border-left: none;
        border-top: 2px dashed #e0e0e0;
        margin: 15px auto;
    }

    .category-icon {
        width: 90px;
        height: 90px;
    }


    .video-player-container {
        height: auto;
        max-height: 250px;
        position: relative;
    }

    video#custom-player {
        height: auto;
        /* fixed height না দিয়ে responsive রাখলাম */
        max-height: 250px;
        width: 100%;
        object-fit: cover;
    }

    /* custom controls */
    .custom-controls {
        flex-wrap: wrap;
        gap: 4px;
        padding: 4px;
        justify-content: space-between;
    }

    .progress-bar-container {
        width: 100% !important;
        height: 6px;
        margin: 4px 0;
    }

    .time-display {
        font-size: 0.75rem;
        width: 50px;
        flex-shrink: 0;
    }

    .volume-group {
        display: flex;
        align-items: center;
        gap: 4px;
        overflow: visible;
        /* hidden থেকে visible */
    }

    .volume-group input.volume-slider {
        opacity: 1;
        /* hover ছাড়াই দেখা যাবে */
        width: 80px;
        /* small screen friendly */
        transition: width 0.2s ease;
        pointer-events: auto;
    }

    /* control buttons touch-friendly */
    .control-btn {
        font-size: 1.1rem;
        padding: 0.3rem 0.5rem;
    }

    .course-content-sidebar {
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }

    .zoom-box .viewer-box {
        width: 100% !important;
        height: 217px !important;
        left: auto !important;
        right: 0 !important;
        top: 100% !important;
    }

    .current-price {
        font-size: 1.6rem;
    }

}

/* --- Styles Outside Media Queries --- */
#related-events {
    background-color: #1a1a1d;
    /* Slightly different dark shade */
}

/* --- Sticky Elements (min-width for larger screens) --- */
@media (min-width: 992px) {

    .filter-sidebar,
    .order-summary-card {
        position: sticky;
        top: 100px;
    }

    .order-summary-card {
        top: 120px;
        /* Specific for order summary */
    }

    .topbar__nav--desktop {
        display: flex;
    }

    .hamburger-menu,
    .bottom-nav {
        display: none;
    }
}


@media(max-width: 420px) {
    .topbar__logo img {
        max-height: 30px;
    }

    .cart-icon {
        display: none;
    }


}
