/* ======================================
   RESPONSIVE FIXES FOR NOTICE SECTION
   ====================================== */

/* Tablet and below: Full responsive layout */
@media (max-width: 768px) {
    .notice-section {
        padding: 30px 0;
    }

    .container-fluid {
        max-width: 100%;
    }

    .ns-top {
        gap: 2rem !important;
        padding: 0 15px;
    }

    .ns-top .text-center {
        width: 100% !important;
    }

    .ns-h {
        font-size: 22px !important;
        line-height: 1.3;
    }

    .ns-p {
        font-size: 13px !important;
        margin-bottom: 1rem;
    }

    .ns-label {
        justify-content: center;
    }

    .ns-count-badge {
        width: 100%;
        justify-content: center;
        margin: 1rem 0 0 0;
    }

    .ns-wrap {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        padding: 0 15px;
    }

    .ns-side {
        position: relative !important;
        top: auto !important;
        margin-bottom: 2rem;
        width: 100%;
    }

    .ns-list-wrapper {
        width: 100%;
    }

    .ns-list {
        gap: 1rem !important;
    }

    .notice-item-v2 {
        flex-direction: column !important;
        gap: 1rem;
        padding: 1rem !important;
    }

    .ni-num {
        width: 100%;
        text-align: left;
    }

    .ni-body {
        width: 100%;
    }

    .download-btn-v2,
    .ni-nolink {
        width: 100%;
        text-align: center;
    }
}

/* Small phones: Extra adjustments */
@media (max-width: 576px) {
    .notice-section {
        padding: 20px 0;
    }

    .ns-top {
        padding: 0 10px;
    }

    .ns-wrap {
        padding: 0 10px;
    }

    .ns-h {
        font-size: 18px !important;
    }

    .ns-p {
        font-size: 12px !important;
    }

    .ns-side-top {
        padding: 1.5rem 1rem !important;
    }

    .ns-side-bottom {
        padding: 1.5rem 1rem !important;
    }

    .ns-side-title {
        font-size: 14px !important;
    }

    .ns-count-badge {
        font-size: 11px !important;
        padding: 6px 12px !important;
    }

    .notice-item-v2 {
        padding: 0.75rem !important;
    }

    .ni-num {
        font-size: 14px !important;
    }

    .ni-message {
        font-size: 13px !important;
    }

    .download-btn-v2,
    .ni-nolink {
        padding: 0.5rem 1rem !important;
        font-size: 12px !important;
    }
}

/* Large desktop: Original styles preserved */
@media (min-width: 769px) {
    .ns-top {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 1rem;
        margin-bottom: 2.5rem;
    }

    .ns-wrap {
        display: grid;
        grid-template-columns: 230px 1fr;
        gap: 1.5rem;
        align-items: start;
    }

    .ns-side {
        position: sticky;
        top: 80px;
    }

    .notice-item-v2 {
        display: flex;
        align-items: center;
    }
}

/* ======================================
   RESPONSIVE FIXES FOR BANNER SECTION
   ====================================== */

/* Desktop: Optimized banner height and proper image display */
.banner-area {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.banner-slider {
    position: relative;
    overflow: visible !important;
    display: block;
    line-height: 0;
}

.swiper-wrapper {
    height: 100%;
}

.swiper-slide {
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-img {
    width: 100%;
    height: 450px;
    background-color: #f5f5f5;
    display: block;
}

/* Pagination: Fixed and visible on all devices */
.swiper-pagination {
    position: absolute !important;
    bottom: 20px !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 100 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    pointer-events: auto !important;
    gap: 0 !important;
}

.swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.6) !important;
    opacity: 1 !important;
    width: 12px !important;
    height: 12px !important;
    margin: 0 6px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    border: none !important;
    padding: 0 !important;
}

.swiper-pagination-bullet:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    transform: scale(1.2);
}

.swiper-pagination-bullet-active {
    background: #8bc34a !important;
    opacity: 1 !important;
    width: 32px !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 8px rgba(139, 195, 74, 0.4) !important;
}

/* Banner arrows - positioned above pagination */
.banner-arrow {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 49 !important;
    width: 44px !important;
    height: 44px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #333 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
    border: none !important;
    padding: 0 !important;
}

.banner-arrow:hover {
    background: #333 !important;
    color: #fff !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25) !important;
}

.banner-next {
    right: 15px !important;
}

.banner-prev {
    left: 15px !important;
}

/* Tablet: Adjust banner height */
@media (max-width: 1024px) {
    .banner-img {
        height: 380px !important;
    }

    .swiper-pagination-bullet {
        width: 10px !important;
        height: 10px !important;
        margin: 0 5px !important;
    }

    .swiper-pagination-bullet-active {
        width: 28px !important;
    }
}

/* Tablet and below */
@media (max-width: 768px) {
    .banner-slider {
        overflow: visible !important;
    }

    .banner-img {
        height: 280px !important;
    }

    .banner-arrow {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
    }

    .banner-next,
    .banner-prev {
        display: flex !important;
    }

    .swiper-pagination {
        bottom: 15px !important;
    }

    .swiper-pagination-bullet {
        width: 10px !important;
        height: 10px !important;
        margin: 0 4px !important;
    }

    .swiper-pagination-bullet-active {
        width: 28px !important;
    }
}

/* Small phones */
@media (max-width: 576px) {
    .banner-img {
        height: 220px !important;
    }

    .banner-arrow {
        width: 32px !important;
        height: 32px !important;
        font-size: 12px !important;
    }

    .swiper-pagination {
        bottom: 12px !important;
    }

    .swiper-pagination-bullet {
        width: 8px !important;
        height: 8px !important;
        margin: 0 3px !important;
    }

    .swiper-pagination-bullet-active {
        width: 24px !important;
    }
}

/* ======================================
   RESPONSIVE FIXES FOR COURSE SECTION
   ====================================== */

/* Tablet: Course tab responsive */
@media (max-width: 768px) {
    .course-tab {
        margin-bottom: 20px;
        padding: 0 15px;
    }

    .course-tab .nav {
        background-color: #fff;
        padding: 15px 10px;
        border-radius: 100px;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        box-shadow: 0px 2px 0px #E1E2E6;
        justify-content: center;
    }

    .course-tab .nav .nav-item {
        flex: 0 1 auto;
    }

    .course-tab .nav .nav-item .nav-link {
        padding: 6px 16px !important;
        border-radius: 100px;
        font-size: 13px !important;
        font-weight: 500;
        line-height: 18px;
        white-space: nowrap;
        transition: all 0.3s linear;
        color: rgba(30, 30, 30, 0.6);
    }

    .course-inner {
        padding: 0 15px;
    }

    .row.g-3 {
        gap: 1rem !important;
    }

    .row.g-md-4 {
        gap: 1.5rem !important;
    }

    .course-item {
        width: 100%;
        max-width: 100%;
    }

    .course-img img {
        height: 180px !important;
    }

    .course-content-title {
        font-size: 16px !important;
        line-height: 22px;
        margin-bottom: 15px !important;
    }

    .course-top-title h6 {
        font-size: 12px !important;
    }

    .course-bottom-info span {
        font-size: 12px !important;
    }
}

/* Small phones: Extra adjustments */
@media (max-width: 576px) {
    .course-tab {
        margin-bottom: 15px;
        padding: 0 10px;
    }

    .course-tab .nav {
        padding: 12px 8px;
        gap: 8px;
    }

    .course-tab .nav .nav-item .nav-link {
        padding: 5px 12px !important;
        font-size: 12px !important;
        line-height: 16px;
    }

    .course-inner {
        padding: 0 10px;
    }

    .row.g-3 {
        gap: 0.75rem !important;
    }

    .course-item {
        padding: 8px !important;
    }

    .course-img {
        border-radius: 8px 8px 0 0;
    }

    .course-img img {
        height: 150px !important;
    }

    .course-content {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .course-content-top {
        padding-top: 15px !important;
        padding-bottom: 15px !important;
    }

    .course-content-title {
        font-size: 14px !important;
        line-height: 20px;
        margin-bottom: 12px !important;
    }

    .course-top-title h6 {
        font-size: 11px !important;
    }

    .course-bottom-info {
        gap: 10px !important;
    }

    .course-bottom-info span {
        font-size: 11px !important;
    }

    .course-content-bottom {
        padding: 10px 0 4px !important;
    }
}

/* Extra small phones */
@media (max-width: 360px) {
    .course-tab .nav .nav-item .nav-link {
        padding: 4px 10px !important;
        font-size: 11px !important;
    }

    .course-img img {
        height: 120px !important;
    }

    .course-content-title {
        font-size: 13px !important;
    }
}

/* ======================================
   RESPONSIVE FIXES FOR HEADER/MENU
   ====================================== */

/* Header sticky position - fixed on scroll */
.header-area.header-sticky.sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99;
    background: #ffffff;
    box-shadow: 0px 6px 50px rgba(30, 30, 30, 0.1);
}

/* Header menu bar icon - always visible */
.header-menu-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.header-menu-bar-icon {
    font-size: 24px;
    display: block;
    color: var(--clr-body-heading, #333);
    cursor: pointer;
    transition: all 0.3s linear;
    padding: 8px;
    line-height: 1;
}

.header-menu-bar-icon:hover {
    color: var(--clr-theme-primary, #007bff);
}

/* Mobile responsive adjustments */
@media (max-width: 1199px) {
    .header-menu-bar {
        margin-left: auto;
        flex-shrink: 0;
        padding: 0 10px;
    }

    .header-right {
        gap: 10px !important;
    }

    .header-btn {
        padding: 10px 15px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 768px) {
    .header-menu-bar {
        padding: 0 8px;
    }

    .header-menu-bar-icon {
        font-size: 20px;
    }

    .header-logo img {
        max-height: 50px !important;
    }

    .header-right {
        gap: 8px !important;
    }
}

@media (max-width: 576px) {
    .header-menu-bar-icon {
        font-size: 18px;
    }

    .header-btn {
        padding: 8px 12px !important;
        font-size: 11px !important;
    }
}

/* Sidebar - ensure it doesn't push content */
.sidebar-info.side-info {
    z-index: 101;
}

.offcanvas-overlay {
    z-index: 100;
}

/* Utility classes for responsive helpers */
.w-md-auto {
    width: auto;
}

@media (max-width: 768px) {
    .text-md-start {
        text-align: center !important;
    }

    .text-md-end {
        text-align: center !important;
    }

    .w-md-auto {
        width: 100%;
    }

    .gap-2 {
        gap: 0.5rem !important;
    }
}

/* Ensure proper spacing on smaller devices */
@media (max-width: 480px) {
    .px-3 {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .px-md-5 {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}
