/*
 * Mobile and tablet overrides.
 * This file is intentionally loaded after page-specific styles so the
 * desktop styles can stay untouched while narrow screens use fluid layouts.
 */

.header__nav-account {
    display: none;
}

.mobile-member-center {
    display: none;
}

@media (max-width: 1024px) {
    .mobile-member-center {
        position: fixed;
        right: 16px;
        bottom: 18px;
        bottom: max(18px, env(safe-area-inset-bottom));
        z-index: 1100;
        display: flex;
        width: 62px;
        height: 62px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0;
        border-radius: 50%;
        color: #fff;
        background: #CF5D2C;
        box-shadow: 0 5px 18px rgba(72, 43, 32, .32);
        font-size: 0;
        line-height: 1.1;
    }

    .mobile-member-center:hover,
    .mobile-member-center:focus {
        color: #fff;
    }

    .mobile-member-center svg {
        width: 21px;
        height: 21px;
    }

    .page-container {
        width: calc(100% - 40px);
        max-width: none;
    }

    .header {
        position: relative;
        z-index: 1000;
    }

    .header__content {
        min-height: 78px;
        padding: 10px 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header__logo {
        margin: 0;
    }

    .header__logo a,
    .header__logo a img {
        display: block;
    }

    .header__logo a img {
        width: auto;
        height: 58px;
        max-width: min(62vw, 250px);
        object-fit: contain;
    }

    .header__mobile {
        position: absolute;
        top: 50%;
        right: 20px;
        margin: 0;
        padding: 8px;
        border-radius: 4px;
        transform: translateY(-50%);
        cursor: pointer;
    }

    .header__mobile-btn {
        min-width: 24px;
        min-height: 24px;
        align-items: center;
        justify-content: center;
    }

    .header__mobile-btn--menu {
        display: flex;
    }

    .header__mobile-btn--close {
        display: none;
    }

    .header__nav {
        top: 100%;
        max-height: calc(100dvh - 78px);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        box-shadow: 0 12px 24px rgba(0, 0, 0, .18);
    }

    .header__nav-list {
        width: 100%;
        padding: 8px 0 max(16px, env(safe-area-inset-bottom));
    }

    .header__nav-item {
        padding: 0;
    }

    .header__nav-item > a {
        display: block;
        padding: 10px 20px;
    }

    .header__nav-item a p {
        font-size: 16px;
        line-height: 1.45;
    }

    .header__nav-item a span {
        margin-top: 2px;
        font-size: 10px;
    }

    .header__nav-account {
        display: block;
        margin-top: 8px;
        padding: 14px 20px 8px;
        border-top: 1px solid rgba(255, 255, 255, .18);
    }

    .header__mobile-account {
        display: flex;
        gap: 12px;
        width: min(100%, 360px);
        margin: 0 auto;
    }

    .header__mobile-account > a {
        flex: 1;
        display: flex;
        min-height: 44px;
        align-items: center;
        justify-content: center;
        padding: 9px 16px;
        border: 1px solid rgba(255, 255, 255, .75);
        border-radius: 24px;
        color: #fff;
        font-size: 15px;
        line-height: 1.4;
    }

    .header__mobile-account > a:first-child {
        border-color: #CF5D2C;
        background-color: #CF5D2C;
    }

    .header__mobile-account--user > a:first-child {
        max-width: 68%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Shared two-column pages */
    .listnews .page-container,
    .shownews .page-container,
    .listsocial .page-container,
    .course-detail__content,
    .showshop_container,
    .listcustom .process,
    .listcustom .donation,
    .listcustom .contact,
    .listdonation .main,
    .prayer,
    .listabout .about,
    .listdoot .listdoot_contact {
        flex-direction: column;
    }

    .listnews .main,
    .shownews article,
    .listsocial .main,
    .video-player,
    .showshop_main,
    .prayer__desc {
        width: 100%;
        min-width: 0;
        flex: none;
    }

    .listnews .aside,
    .shownews .aside,
    .listsocial .aside,
    .video-sidebar,
    .prayer__list,
    .listcustom .process .pic,
    .listdonation .main .planting,
    .listdoot .listdoot_contact .listdoot_contact_info,
    .listdoot .listdoot_contact .listdoot_contact_pic {
        position: static;
        width: 100%;
        max-width: none;
    }

    .listnews,
    .shownews {
        padding-top: 56px;
        padding-bottom: 72px;
    }

    .listnews .page-container,
    .shownews .page-container {
        gap: 56px;
    }

    .listnews .aside,
    .shownews .aside {
        padding-top: 36px;
        border-top: 1px solid #D9D2CD;
    }

    /* Product detail */
    .showshop {
        padding: 48px 0 64px;
    }

    .showshop_container {
        gap: 40px;
    }

    .showshop__gallery {
        position: static;
        width: 100%;
        justify-content: center;
    }

    .showshop__gallery-main {
        flex: 1;
        max-width: 620px;
    }

    .showshop__gallery-main img {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }

    .showshop__tabs {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .showshop__tabs::-webkit-scrollbar {
        display: none;
    }

    .showshop .showshop_desc img,
    .showshop__panel img {
        width: auto;
        height: auto;
    }

    /* Course detail */
    .course-detail {
        padding-top: 36px;
    }

    .course-detail__content {
        gap: 36px;
    }

    .video-sidebar__list {
        height: auto;
        max-height: 520px;
    }

    .recs__list::after {
        width: 100%;
    }

    .recs__list .swiper-slide,
    .recs__item-pic {
        width: min(76vw, 420px);
    }

    .recs__item-pic {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    /* Course list */
    .list-course__intro {
        gap: 48px;
        margin-bottom: 80px;
    }

    .list-course__intro-text,
    .list-course__intro-pic,
    .list-course__intro-pic img {
        width: 100%;
    }

    .list-course__intro-pic img {
        height: auto;
        max-height: 440px;
        object-fit: cover;
        border-radius: 0;
    }

    /* Doot and about pages */
    .listdoot .listdoot_intro {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .listdoot .listdoot_intro > * {
        min-width: 0;
    }

    .listdoot .listdoot_intro .listdoot_intro_pic {
        grid-column: 1 / -1;
        max-height: 520px;
        overflow: hidden;
    }

    .listdoot .listdoot_intro .listdoot_intro_pic img {
        object-fit: cover;
    }

    .listdoot .listdoot_contact {
        gap: 48px;
        padding-top: 72px;
        padding-bottom: 72px;
    }

    .listabout .about {
        align-items: stretch;
        padding-top: 72px;
        padding-bottom: 80px;
    }

    .listabout .about .about_pics {
        justify-content: center;
    }

    .listabout .about .about_pics img {
        width: 100%;
        height: auto;
    }

    .listabout .service {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .listabout .service .service_intro {
        padding: 64px 5vw;
    }

    /* Donation pages */
    .listdonation .main,
    .prayer {
        gap: 48px;
        margin-bottom: 72px;
    }

    .prayer__desc {
        position: static;
    }

    .show-donation {
        padding-right: 20px;
        padding-left: 20px;
    }

    .show-donation__form {
        width: 100%;
    }

    .show-donation__list {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Custom service page */
    .listcustom .process {
        gap: 48px;
        margin-bottom: 80px;
    }

    .listcustom .process .pic {
        height: auto;
        aspect-ratio: 1;
    }

    .listcustom .intro .list {
        gap: 40px;
    }

    .listcustom .project .list {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .listcustom .donation {
        gap: 32px;
    }

    .listcustom .contact form {
        width: 100%;
        padding: 64px 7vw 80px;
    }

    .custom-service-cards {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 20px;
    }

    .custom-service-card {
        min-height: 0;
    }

    .custom-faq {
        width: 100%;
        margin: 72px 0 0;
        transform: none;
        grid-template-columns: minmax(0, 1fr);
        gap: 48px;
    }

    .custom-faq__pic {
        max-height: 520px;
    }

    .custom-faq__content {
        padding: 0 20px;
    }

    .custom-story__head {
        width: calc(100% - 40px);
        align-items: flex-start;
        flex-direction: column;
        gap: 24px;
        margin-bottom: 72px;
    }

    .custom-story__head p {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .page-container {
        width: calc(100% - 32px);
    }

    .header__content {
        min-height: 66px;
        padding: 8px 16px;
    }

    .header__logo a img {
        height: 50px;
        max-width: min(60vw, 210px);
    }

    .header__mobile {
        right: 16px;
    }

    .header__nav {
        max-height: calc(100dvh - 66px);
    }

    .banner {
        min-height: 160px;
        height: 44vw;
        max-height: 210px;
    }

    .banner__content h1 {
        font-size: clamp(32px, 10vw, 40px);
    }

    .btn1,
    .btn2 {
        padding: 9px 24px;
    }

    .common_pagination {
        gap: 6px;
    }

    .common_pagination .pager {
        gap: 6px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .common_pagination button,
    .common_pagination .pager li {
        width: 38px;
        height: 38px;
    }

    .footer__container {
        padding-top: 48px;
    }

    .footer__grid {
        padding-bottom: 36px;
    }

    .footer__contact {
        margin-bottom: 28px;
    }

    /* News */
    .listnews,
    .shownews {
        padding-top: 36px;
        padding-bottom: 52px;
    }

    .listnews .main .list .item {
        margin-bottom: 36px;
    }

    .listnews .main .list .item h2,
    .shownews article h2 {
        font-size: 21px;
    }

    .aside form input {
        width: 0;
        min-width: 0;
    }

    .aside .newest .list .item .pic {
        width: 110px;
        height: 74px;
    }

    .aside .newest .list .item .info h3 {
        font-size: 17px;
    }

    /* Product */
    .showshop {
        padding: 30px 0 48px;
    }

    .showshop__gallery {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .showshop__gallery-thumbs {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .showshop__gallery-thumb {
        flex: 0 0 58px;
        width: 58px;
        height: 58px;
        margin: 0;
    }

    .goods__title {
        margin-top: 0;
    }

    .goods__title h2 {
        font-size: 26px;
    }

    .goods__price p {
        font-size: 28px;
    }

    .goods__params-list {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .goods__params-item:nth-last-child(-n+2) {
        margin-bottom: 10px;
    }

    .goods__params-item:last-child {
        margin-bottom: 0;
    }

    .schedule__list,
    .goods__actions {
        flex-wrap: wrap;
        gap: 12px;
    }

    .showshop__tabs {
        gap: 24px;
    }

    .showshop__tab a {
        font-size: 18px;
        white-space: nowrap;
    }

    .showshop .showshop_container .showshop_main .showshop_related .showshop_related_list {
        grid-template-columns: 1fr;
    }

    /* Course */
    .course-detail {
        padding-top: 24px;
    }

    .my-video-container {
        aspect-ratio: 16 / 9;
        margin-bottom: 20px;
    }

    .video-player__meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .video-meta__actions {
        width: 100%;
        gap: 8px;
    }

    .video-meta__action {
        flex: 1;
        justify-content: center;
        min-width: 0;
        padding: 7px;
    }

    .video-player__danmaku {
        flex-wrap: wrap;
        gap: 10px 0;
    }

    .video-player__danmaku p {
        margin-right: 10px;
    }

    .danmaku__form {
        flex-basis: 100%;
    }

    .video-sidebar {
        padding: 18px 14px;
    }

    .video-sidebar__item {
        gap: 12px;
        padding: 10px;
    }

    .video-sidebar__thumb {
        width: 112px;
        height: 64px;
        flex-shrink: 0;
    }

    .list-course {
        padding-top: 48px;
    }

    .list-course__intro {
        gap: 32px;
        margin-bottom: 56px;
    }

    .list-course__intro-text > h1 {
        font-size: 32px;
    }

    .list-course__intro-text > .btn1 {
        margin-top: 28px;
    }

    .chanting__list {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Social */
    .listsocial {
        padding-top: 20px;
        padding-bottom: 52px;
    }

    .listsocial .main .hot .pic {
        height: auto;
        aspect-ratio: 16 / 10;
    }

    .listsocial .main .hot .title {
        bottom: 18px;
        padding: 0 18px;
    }

    .listsocial .main .hot .title p {
        padding-right: 60px;
        font-size: 17px;
    }

    .listsocial .main .hot .pagination {
        right: 18px !important;
        bottom: 18px !important;
    }

    .listsocial .main .menu {
        gap: 12px 20px;
    }

    .listsocial .main .menu li a {
        font-size: 18px;
    }

    .listsocial .checkin--mobile {
        display: flex;
        margin-bottom: 20px;
        padding: 22px 18px;
    }

    .listsocial .aside > .checkin {
        display: none;
    }

    .listsocial .main > .list {
        padding-bottom: 28px;
    }

    .listsocial .main > .list > .item {
        padding: 22px 16px 0;
    }

    .listsocial .main > .list > .item .meta {
        flex-wrap: wrap;
        gap: 8px 0;
    }

    .listsocial .main > .list > .item .meta .status {
        margin-left: 12px;
    }

    .listsocial .aside .checkin,
    .ranking {
        padding: 24px 18px;
    }

    /* Doot and about */
    .listdoot {
        padding: 20px 16px 0;
    }

    .listdoot .listdoot_intro {
        grid-template-columns: 1fr;
    }

    .listdoot .listdoot_intro .listdoot_intro_pic {
        grid-column: auto;
        max-height: 360px;
    }

    .listdoot .listdoot_intro .listdoot_intro_item {
        padding: 40px 24px;
    }

    .listdoot .listdoot_contact {
        padding-top: 52px;
        padding-bottom: 52px;
    }

    .listdoot .listdoot_contact .listdoot_contact_info h3,
    .listabout .service .service_intro h2,
    .listcustom .process .main > h2,
    .listcustom .donation .title h2,
    .prayer__desc h2,
    .show-donation__title,
    .custom-section-title h2,
    .custom-faq__content h2,
    .custom-story__title h2 {
        font-size: 32px;
    }

    .listdoot .listdoot_contact .listdoot_contact_info h3 {
        margin-bottom: 32px;
    }

    .listdoot .listdoot_contact .listdoot_contact_info .listdoot_contact_list {
        margin-bottom: 48px;
    }

    .listabout .about {
        gap: 36px;
        padding-top: 48px;
        padding-bottom: 56px;
    }

    .listabout .about .about_pics {
        gap: 10px;
    }

    .listabout .about .about_main .about_list {
        gap: 32px;
        margin-bottom: 44px;
    }

    .listabout .about .about_main .about_list .about_item {
        gap: 16px;
    }

    .listabout .service .service_intro {
        padding: 48px 20px;
    }

    .listabout .service .service_pics {
        min-height: 220px;
    }

    /* Donation */
    .listdonation {
        padding: 36px 0 52px;
    }

    .listdonation .main,
    .prayer {
        margin-bottom: 52px;
    }

    .listdonation .main .everyday,
    .listdonation .main .planting {
        padding: 28px 22px;
    }

    .prayer__item {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .prayer__item-pic {
        width: 64px;
        height: 64px;
        margin-right: 14px;
    }

    .prayer__item-info {
        width: calc(100% - 78px);
        margin: 0;
    }

    .prayer__item-status {
        width: 100%;
        margin-top: 18px;
        text-align: right;
    }

    .show-donation {
        padding-top: 44px;
        padding-bottom: 60px;
    }

    .show-donation__title {
        margin-bottom: 32px;
        text-align: center;
    }

    .show-donation__list {
        gap: 12px;
        margin-bottom: 40px;
    }

    .show-donation__item {
        padding: 9px 20px;
    }

    /* Custom service */
    .listcustom {
        padding-top: 48px;
    }

    .listcustom .process {
        gap: 30px;
        margin-bottom: 56px;
    }

    .listcustom .intro .list {
        align-items: stretch;
        flex-direction: column;
        gap: 36px;
    }

    .listcustom .project {
        padding: 0;
        margin-bottom: 72px;
    }

    .listcustom .project .list .item > img {
        min-height: 360px;
    }

    .listcustom .project .list .item .main {
        top: auto;
        bottom: 0;
        width: 100%;
        height: auto;
        padding: 24px 20px;
    }

    .listcustom .project .list .item .main img {
        width: 52px;
        height: 52px;
        margin-bottom: 12px;
    }

    .listcustom .project .list .item .main h2 {
        margin-bottom: 10px;
        font-size: 21px;
    }

    .listcustom .donation {
        margin-bottom: 64px;
    }

    .listcustom .donation .list .item {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
        padding: 28px 0;
    }

    .listcustom .contact .pic {
        max-height: 320px;
        overflow: hidden;
    }

    .listcustom .contact form {
        padding: 48px 16px 64px;
    }

    .listcustom .contact form h2 {
        font-size: 30px;
    }

    .listcustom .contact form .group {
        flex-direction: column;
        gap: 0;
    }

    .listcustom .contact form input,
    .listcustom .contact form textarea {
        width: 100%;
        flex: none;
    }

    .custom-section-title {
        margin-bottom: 48px;
    }

    .custom-service-cards {
        gap: 16px;
        padding: 0 16px;
    }

    .custom-service-card {
        height: auto;
        padding-bottom: 0;
    }

    .custom-service-card__footer {
        position: static;
        margin: 0 16px 16px;
    }

    .custom-service-card__footer .custom-service-note {
        margin: 0;
    }

    .custom-service-card__link {
        width: 100%;
    }

    .custom-service-card__media {
        height: 230px;
    }

    .custom-service-card__body {
        padding: 0 24px 26px;
    }

    .custom-service-note {
        position: static;
        margin: 0 16px 16px;
    }

    .custom-faq {
        margin-top: 56px;
        gap: 36px;
    }

    .custom-faq__content {
        padding: 0 16px;
    }

    .custom-faq__content h2 {
        margin-bottom: 32px;
    }

    .custom-story {
        margin-top: 64px;
        padding-top: 56px;
    }

    .custom-story__head {
        width: calc(100% - 32px);
        margin-bottom: 48px;
    }

    .custom-story__list .swiper-slide {
        max-width: calc(100vw - 32px);
    }

    .custom-story-card {
        min-height: 0;
        padding: 30px 22px 36px;
    }

    .custom-story-card__quote {
        right: 18px;
        bottom: 18px;
        width: 86px;
        opacity: .45;
    }

    /* Standalone login/search */
    .login_wrapper {
        min-height: 100dvh;
        height: auto;
        padding: 90px 16px 24px;
        position: fixed;
    }

    .login_wrapper .login_container {
        width: 100%;
        padding: 32px 20px 40px;
    }

    .login_wrapper .login_container .login_form .form_group input {
        width: 100%;
    }

    .login_wrapper .login_container .form_options {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .result {
        padding: 40px 0;
    }

    .result__item h3 {
        font-size: 20px;
    }

    .result__item p {
        font-size: 16px;
    }

    .pay-modal__content {
        width: calc(100% - 32px);
        max-height: calc(100dvh - 32px);
        overflow-y: auto;
        padding: 26px 18px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .header__nav,
    .box6_item_content,
    .custom-faq__item p,
    .custom-faq__answer {
        transition-duration: .01ms !important;
    }
}
