/* --- RESPONSIVE & MOBILE STYLES --- */

/* --- Mobile Header --- */
.mobile-nav-toggle {
    background: none;
    border: none;
    font-size: 24px;
}
.mobile-phone {
    color: white;
    font-size: 16px;
    font-weight: 700;
}
.mobile-phone i {
    color: var(--primary-green);
}
.mobile-socials a {
    color: white;
    margin-left: 12px;
    font-size: 18px;
}
@media (min-width: 1200px) {
    #service-grid-slider{
        overflow-y: auto;
        max-height: 465px;
        padding-bottom: 1.5rem;
    }
}
@media (min-width: 992px) {
    .menu-home{
        display: none;
    }
}
@media (max-width: 991.98px) {
    body{
        padding-top: 94px;
    }
    .main-header{
        position: fixed;
        left: 0;
        top: 0;
        right: 0;
    }
    .main-header .navbar-brand img{
        max-height: 90px;
    }
    .slick-prev { left: calc(var(--bs-gutter-x) * -0.5); }
    .slick-next { right: calc(var(--bs-gutter-x) * -0.5); }

    .appointment-form-section .form-container {
        padding: 20px;
    }

    /* Trên mobile, ảnh sẽ có lớp phủ màu xanh lá */
    .doctor-thumbnail::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 166, 81, 0.3); /* Màu xanh lá trong suốt */
        pointer-events: none;
    }

    .doctor-thumbnail img {
        display: block; /* Đảm bảo ảnh hiện ra trên mobile */
    }
    
    .doctor-excerpt {
        display: none; /* Ẩn excerpt trên mobile để gọn hơn */
    }
    .doctor-name {
        /* Giới hạn 2 dòng để tránh vỡ layout */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;  
        overflow: hidden;
    }

    #service-grid-slider{
        margin-left: 0;
        margin-right: 0;
    }
}
@media (max-width: 767.98px) {
    .section-basic{
        padding: 35px 0;
    }
    #service-grid-slider .service-item-wrapper{
        padding: 5px;
    }
    .commitment-block{
        padding-bottom: 0;
    }
    /* --- Page Banner with BG Image --- */
    .page-title-banner.has-bg-image {
        /* Thay bằng URL ảnh banner của bạn */
        background-image: url('https://placehold.co/800x300.png?text=Eye+Banner+Image');
        background-size: cover;
        background-position: center;
        padding: 60px 0;
        position: relative;
    }
    .page-title-banner.has-bg-image::before {
        content: '';
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        background-color: rgba(10, 35, 81, 0.5); /* Lớp phủ mờ */
    }
    .page-title-banner.has-bg-image .container {
        position: relative; /* Đảm bảo text nổi lên trên lớp phủ */
    }
    .page-title-banner .page-title{
        font-size: 1.6rem;
    }

    /* --- Mobile Filter Select --- */
    .mobile-filter-select .select-box{
        position: relative;
    }
    .mobile-filter-select .select-box span{
        background-color: #d4edda;
        border-color: #c3e6cb;
        font-weight: 500;
        color: #155724;
        padding: 12px 15px;
        border-radius: 10px;
        display: block;
    }
    .mobile-filter-select .select-box span i{
        float: right;
        margin-top: 3px;
    }
    .mobile-filter-select ul{
        list-style: none;
        padding: 0;
        position: absolute;
        background: #fff;
        left: 0;
        top: 100%;
        width: 100%;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        border-radius: 10px;
        display: none;
        padding: 10px 15px;
    }
    .mobile-filter-select ul li+li{
        margin-top: 10px;
    }
    .mobile-filter-select ul li a{
        display: block;
        padding: 6px 15px;
        border: var(--primary-green) thin solid;
        border-radius: 6px;
        color: #333;
    }
    .mobile-filter-select ul li a:hover{
        background-color: #d4edda;
        color: var(--primary-green);
    }

    /* --- Post Sliders & Items --- */
    .section-header {
        flex-direction: column;
        align-items: flex-start !important;
    }
    .section-header .btn-view-all {
        margin-top: 10px;
        background-color: transparent;
        border: 1px solid var(--primary-green);
        color: var(--primary-green);
        padding: 5px 15px;
        font-size: 14px;
    }
    .post-slider{
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    .post-item .post-title {
        font-size: 0.9rem;
        min-height: 40px;
    }
    .slick-dots {
        bottom: -25px;
    }

    /* --- Appointment Form --- */
    .appointment-form-section h2 {
        font-size: 1.5rem;
        text-align: center;
    }
    .appointment-form-section .row > div:not(:last-child) {
        margin-bottom: 1rem;
    }
    .appointment-form-section .btn-submit {
        width: 100%;
    }

    /* --- Footer --- */
    .site-footer {
        text-align: center;
    }
    .footer-widget ul {
        padding-left: 0;
    }
    .ft-menu ul{display: none;}
    .footer-contact-info p {
        justify-content: center;
    }
    .certification-seal {
        margin-top: 15px;
    }
    .footer-divider{
        margin: 10px 0;
        opacity: 0;
    }

    /* service */
    .service-banner {
        min-height: 250px;
    }

    .service-banner .banner-title {
        font-size: 1.8rem;
        padding: 15px 20px;
    }
    
    .service-card {
        border-radius: 15px;
    }

    .service-card-overlay {
        padding: 15px;
    /* end service */
    }

    .promotion-slide{
        position: relative;
    }
    .promotion-slide .slick-dots{
        position: absolute;
        bottom: 5px;
        left: 0;
        right: 0;
    }
    .promotion-slide .slick-dots li button:before{
        color: white;
        font-size: 10px;
        opacity: 0.7;
    }
    .promotion-slide .slick-dots li.slick-active button:before{
        opacity: 1;
    }
}

/* single */
@media (max-width: 991.98px) {
    #secondary {
        margin-top: 3rem;
    }
    
    .single-post-content .entry-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 767.98px) {
    .single-post-content .entry-title {
        font-size: 1.5rem;
    }
    
    .single-post-content .entry-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
/* end single */

/* Home */
@media (max-width: 1200px) {
    .video-testimonials-slider-wrapper {
        padding-left: calc((100vw - 1140px) / 2 + 0.5rem)
    }
    .section-padding { padding: 60px 0; }
}
@media (max-width: 991.98px) {
    .section-padding-alt { padding: 60px 0; }
    .section-title { font-size: 2rem; }
    
    /* .hero-slider-pc .hero-slide-item,
    .hero-slider-mobile .hero-slide-item {
        height: 500px;
    } */
    .testimonials-header{
        text-align: center;
    }
    .video-testimonials-slider-wrapper {
        padding-left: calc((100vw - 960px) / 2 + 0.5rem)
    }
}

@media (max-width: 767.98px) {
    .section-padding { padding: 40px 0; }
    .section-padding-alt { padding: 40px 0; }
    .section-title { font-size: 1.8rem; margin-bottom: 1rem;}
    
    /* .hero-slider-pc .hero-slide-item,
    .hero-slider-mobile .hero-slide-item {
        height: 70vh;
        min-height: 450px;
    } */
    /* Ẩn mũi tên trên mobile, chỉ áp dụng cho slider mobile */
    .hero-slider-mobile .slick-arrow {
        display: none !important;
    }

    /* Fix cho các card trên mobile */
    .video-testimonials-slider-wrapper {
        padding: 0 calc((100vw - 720px) / 2 + 0.5rem)
    }
    .video-testimonial-item { padding: 0; }
    .play-button-icon {
        width: 60px;
        height: 60px;
    }
    .play-button-icon i {
        font-size: 20px;
    }
    .close-popup {
        top: -35px;
        right: -10px;
        font-size: 2.5rem;
    }

    .floating-socials{
        top: unset;
        transform: none;
        bottom: 30px;
    }
}
@media (max-width: 575.98px) {
    .container{
        padding-left: 20px;
        padding-right: 20px;
    }
    .video-testimonials-slider-wrapper {
        padding: 0 20px;
        margin: 30px 0;
    }
    .video-testimonials-slider .slick-prev{
        left: -20px;
        right: unset;
        top: 50%;
        transform: translateY(-50%);
    }
    .video-testimonials-slider .slick-next{
        bottom: unset;
        right: -20px;
        top: 50%;
        transform: translateY(-50%);
    }
    .slick-prev{
        left: -20px;
    }
    .slick-next{
        right: -20px;
    }
}
/* End home */

/* Eye template */
@media (max-width: 767.98px) {
    .eyewear-banner {
        min-height: 250px;
    }
    .eyewear-banner .banner-title {
        font-size: 1.8rem;
        padding: 15px 20px;
    }

    /* --- Section Giới thiệu & Cam kết trên mobile --- */
    .eyewear-intro-section {
        padding: 40px 0;
    }
    .intro-title {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    .commitment-grid .col-lg-6 {
        order: 2; /* Đẩy khối cam kết xuống dưới */
    }
    .commitment-grid .col-lg-6.commitment-image-wrapper {
        order: 1; /* Đẩy ảnh lên trên */
    }
    .commitment-item {
        margin-bottom: 20px;
    }
    .commitment-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
        margin-right: 15px;
    }
    .commitment-text h4 {
        font-size: 1rem;
    }
    .commitment-text p {
        font-size: 0.9rem;
    }
    .commitment-image {
        margin-bottom: 30px; /* Khoảng cách giữa ảnh và khối cam kết */
    }

    /* --- Section các dòng kính trên mobile --- */
    .eyewear-types-section {
        padding: 40px 0;
    }
    .eyewear-card {
        border-radius: 15px;
    }
    .eyewear-card-overlay {
        padding: 10px;
    }
    .eyewear-card-title {
        font-size: 0.9rem;
        padding: 6px 15px;
    }
}
/* End eye template */

/* Shop */
/* --- WOOCOMMERCE SHOP PAGE STYLES (MOBILE) --- */

@media (max-width: 991.98px) {
    .filter-wrapper {
        flex-wrap: wrap; /* Cho phép các filter xuống dòng */
    }
}

@media (max-width: 767.98px) {
    .filter-wrapper {
        flex-direction: column;
        align-items: center;
    }
    .filter-wrapper .filter-info{
        justify-content: center;
    }
    .filter-label {
        text-align: center;
        margin-bottom: 10px;
    }
    .woocommerce-loop-product__title {
        font-size: 0.9rem;
    }
}
/* End shop */
/* --- SINGLE PRODUCT PAGE STYLES (MOBILE) --- */
@media (max-width: 991.98px) {
    .product-detail-page .product-summary-top {
        padding-top: 20px;
    }
    .product-gallery-wrapper {
        margin-bottom: 30px;
    }
    .product-info-wrapper .product_title {
        font-size: 1.6rem;
    }
    .product-info-wrapper .price {
        font-size: 1.6rem;
    }
    .custom-cta-buttons {
        flex-direction: column;
    }
}

@media (max-width: 767.98px) {
    .related.products {
        padding: 40px 15px;
    }
    .related.products h2 {
        font-size: 1.5rem;
    }

    .core-services-section .section-title {
        margin-bottom: 4rem;
    }
}