@media (max-width: 991px) {
    .navbar-collapse {
        background: #152542;
        padding: 20px;
    }

    .navbar-nav {
        gap: 10px;
    }

    .nav-link {
        height: auto !important;
        padding: 10px 0;
    }

    .logo-box {
        top: -20px;
    }
}

@media (max-width: 1400px) {
    .offcanvas-header img {
        filter: brightness(0) invert(1);
    }


    .logo-box {
        top: 0;
    }

    .logo-box {
        position: static
    }

    .fast-menu {
        padding-top: 0;
        transition: top 0.35s ease;
    }

    .scrolled .fast-menu {
        padding-top: 0 !important;
    }
}

@media (max-width: 1365.98px) {
    .header-menu-toggle {
        display: flex !important;
    }

    .navbar-expand-xl .header-desktop-nav {
        display: none !important;
    }

    header .offcanvas {
        position: fixed !important;
        top: 0;
        bottom: 0;
        height: 100vh;
        width: min(400px, 100vw);
        max-width: 100vw;
        z-index: 5200;
    }

    #mobileMenu .offcanvas-body {
        overflow-y: auto;
        overflow-anchor: none;
        overscroll-behavior: contain;
    }

    #mobileMenu .collapse,
    #mobileMenu [data-bs-toggle="collapse"] {
        overflow-anchor: none;
    }

    .offcanvas-backdrop {
        z-index: 5100;
    }
}

@media (min-width: 1200px) and (max-width: 1365.98px) {
    .main-navbar > .col-11,
    .topbar > .col-11 {
        width: calc(100% - 32px);
        max-width: none;
    }
}

.mobile-social-links {
    display: none;
}

@media (max-width: 991px) {
    .mobile-social-links {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 24px;
        padding: 16px 0 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.25);
    }

        .mobile-social-links a {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 35px;
            height: 35px;
            flex: 0 0 35px;
            border-radius: 50%;
            color: #fff;
            background: rgba(0, 119, 191, 0.78);
            text-decoration: none;
        }

            .mobile-social-links a:hover,
            .mobile-social-links a:focus-visible {
                color: #fff;
                background: #0077bf;
            }

    html,
    body {
        max-width: 100%;
        overflow-x: clip;
    }

    body {
        --header-height: 80px !important;
        padding-top: var(--header-height);
    }

    main {
        margin-top: 0;
        padding-top: 0;
    }

    header {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: var(--header-height);
        min-height: var(--header-height);
        backface-visibility: hidden;
        overflow: visible;
    }

        header,
        header .main-navbar,
        header .logo-box img,
        header .topbar {
            transition: none !important;
        }

            header .topbar,
            header.scrolled .topbar {
                display: none !important;
            }

            header .nav-wrapper {
                height: 100%;
            }

            header .main-navbar,
            header.scrolled .main-navbar {
                height: 100%;
                padding: 0 !important;
                box-shadow: var(--bs-box-shadow-sm) !important;
                transform: translateZ(0);
                backface-visibility: hidden;
            }

                header .main-navbar > .col-11 {
                    height: 100%;
                }

            header .logo-box img,
            header.scrolled .logo-box img {
                max-height: 80px !important;
                transform: translateZ(0);
                backface-visibility: hidden;
            }

            header .offcanvas {
                position: fixed !important;
                top: 0;
                bottom: 0;
                height: 100vh;
                width: min(400px, 100vw);
                max-width: 100vw;
                z-index: 5200;
            }

    .hero-slider,
    .hero-boxes,
    .sea-section,
    .vakif-banner,
    .works,
    .news,
    .goals,
    .books,
    .monthly-book,
    .projects,
    .partners,
    .footer {
        max-width: 100%;
        overflow-x: hidden;
    }

        .goals > .row,
        .footer .row {
            margin-left: 0;
            margin-right: 0;
        }

        .hero-boxes h2 {
            font-size: 1.2rem;
        }

        .hero-boxes p {
            font-size: 0.95px;
        }

    .hero-box.blue {
        margin-top: 0;
    }

    .hero-box {
        min-height: auto;
        padding: 35px 20px;
    }

        .hero-box.blue {
            margin-top: 0;
            min-height: auto;
        }

    .hero-boxes h2 {
        font-size: 1.2rem;
    }

    .hero-box p {
        font-size: 0.95rem;
    }

    .box-icon {
        margin-bottom: 15px;
    }

    .vakif-title h3 {
        font-size: 1.4rem;
    }

    .vakif-content p {
        font-size: 1rem;
    }

    .goals-content {
        background: #f6f6f6;
        padding: 1rem;
    }

    .link-list li {
        width: 100%;
    }

    .filter-area {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .custom-select {
        width: 100%;
    }

    .select-btn {
        width: 100%;
        text-align: left;
    }

    .fast-menu > div {
        gap: 4px;
    }

    .mobile-site-search {
        width: calc(100% - 1rem);
    }

    .search-page-form {
        width: 100%;
    }

        .search-page-form button {
            padding: 0 0.9rem;
        }


    .book-image {
        float: none;
        width: 100%;
        margin: 0 0 15px 0;
    }

    .book-content {
        width: 100%;
    }

    .monthly-book {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 20px;
        margin-top: 2rem;
        margin-bottom: 4rem;
    }

    .monthly-book__image {
        width: 140px;
    }

    .monthly-book__content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .monthly-book__title {
        font-size: 1.5rem;
    }

    .monthly-book__subtitle {
        font-size: 1rem;
    }

    .monthly-book__text {
        font-size: 0.95rem;
    }

    .monthly-book__link {
        justify-content: center;
        font-size: 1rem;
    }
}

@media (max-width: 568px) {
    header .logo-box img {
        max-height: 80px !important;
    }

    header.scrolled .logo-box img {
        max-height: 80px !important;
    }
}

@media (max-width: 992px) {
    .hero-slider img {
        height: 500px;
    }

    .hero-content h1 {
        font-size: 40px;
    }
}

@media (max-width: 576px) {
    .hero-slider img {
        height: 420px;
    }

    .hero-content h1 {
        font-size: 28px;
    }
}

@media (max-width: 992px) {
    .hero-box {
        min-height: auto;
        padding: 40px 25px;
    }

        .hero-box.blue {
            margin-top: 0;
            min-height: 0;
        }

    .hero-boxes h2 {
        min-height: auto;
        font-size: 1.3rem;
    }

    .footer-menu {
        margin: 0;
        max-width: auto !important;
    }

    html,
    body {
        font-size: 14px;
    }
}

@media (max-width: 575px) {
    main {
        margin-top: 0;
        padding-top: 0;
    }

    .donation-card {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .board-item {
        flex-direction: column !important;
        align-items: center;
        text-align: center;
    }

    .board-content h4::after {
        left: 50%;
        transform: translateX(-50%) rotate(45deg);
    }
}

@media (max-width: 1399px) {
    header .col-11 .d-flex.align-items-center {
        width: 100%;
    }
}

@media (max-width: 1400px) {
    .board-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

        .board-list ul::after {
            display: none;
        }
}

@media (max-width: 576px) {
    .board-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .board-note {
        font-size: 1rem;
        margin: 1rem 0;
    }

    .board-list li {
        font-size: 1rem;
    }
}
