/* ==========================================================================
   RESPONSIVE & MOBILE OPTIMIZATIONS
   ========================================================================== */

/* Global Reset to eliminate horizontal scrolling */
html,
body {
    overflow-x: hidden !important;
    width: 100% !important;
}

/* Make home page banner smaller on desktop */
/* .gmc-hero {
    min-height: 70vh !important;
} */

/* Breakpoint for Medium/Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .gmc-hero h1 {
        font-size: 3.8rem;
    }
}

/* Breakpoint for Laptops & Small Desktops (max-width: 1199px) */
@media (max-width: 1199px) {
    .gmc-hero {
        min-height: auto;
        padding: 80px 0;
    }

    .why-features-grid {
        gap: 30px 20px;
    }

    .contact-card-info,
    .contact-form-wrapper {
        padding: 30px;
    }
}

/* Breakpoint for Tablets (max-width: 991px) */
@media (max-width: 991px) {
    body {
        font-size: 15px;
    }

    h2 {
        font-size: 1.5rem;
    }

    /* Padding Reductions */
    .gmc-about,
    .gmc-services,
    .gmc-why,
    .gmc-process,
    .gmc-testimonials,
    .gmc-faq,
    .gmc-blog,
    .gmc-contact {
        padding: 70px 0;
    }

    /* Topbar adjustments */
    .gmc-topbar {
        display: none;
        /* Hide topbar on mobile/tablet to reduce clutter */
    }

    /* Navigation */
    .gmc-navbar {
        padding: 10px 0;
    }

    .gmc-navbar .nav-link::after {
        display: none;
        /* Remove hover lines on mobile */
    }

    /* Hero */
    .gmc-hero {
        min-height: 100vh !important;
        padding: 60px 0 !important;
    }

    .gmc-hero-card-wrapper {
        margin-top: 50px;
    }

    .gmc-hero-card {
        padding: 30px;
        box-shadow: 15px 15px 0px var(--accent);
    }

    .gmc-hero-features-list {
        margin-top: 35px;
        gap: 15px 25px;
    }

    /* Trust Indicators Grid */
    .gmc-trust {
        margin-top: -50px;
        padding-bottom: 50px;
    }

    .trust-card {
        padding: 22px 15px;
    }

    .trust-card-num {
        font-size: 32px;
    }

    /* About */
    .about-img-wrapper {
        /* margin-bottom: 40px; */
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Why Choose Us Grid */
    .why-features-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    /* Process Timeline */
    .process-timeline::before {
        left: 20px;
    }

    .process-marker {
        left: 20px;
        transform: translateX(-50%);
        box-shadow: 0 0 0 6px var(--bg-light);
    }

    .process-item:hover .process-marker {
        transform: translateX(-50%) scale(1.1);
    }

    .process-content {
        width: calc(100% - 50px);
        margin-left: 50px !important;
        padding: 25px;
    }

    .process-item:nth-child(even) .process-content {
        text-align: left;
    }

    /* Testimonials */
    .testimonial-card {
        padding: 30px 20px;
    }

    .testimonial-text {
        font-size: 14px;
    }

    /* Contact */
    .contact-card-info {
        margin-bottom: 30px;
    }

    /* Company Lawyers Mobile Slider */
    .company-lawyers-wrapper .company-lawyers-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Firefox */
        scroll-behavior: smooth;
    }

    .company-lawyers-wrapper .company-lawyers-row::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .company-lawyer-col {
        flex: 0 0 100%;
        max-width: 100%;
        scroll-snap-align: center;
    }

    .gmc-partner-lawyers,
    .gmc-company-lawyers {
        padding: 50px 0px;
        background: white;
    }

    .blog-card-desc {
        padding-bottom: 10px;
    }

    /* Keep navbar background white on mobile by default */
    .gmc-navbar {
        background-color: var(--bg-white) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
        border-bottom: 1px solid var(--border) !important;
    }

    /* Show dark logo on mobile and hide white logo */
    .gmc-navbar .logo-first {
        display: none !important;
    }

    .gmc-navbar .logo-scroll {
        display: block !important;
        height: 45px !important;
        width: auto !important;
    }

    /* Make toggler icon dark on mobile */
    .gmc-navbar .navbar-toggler-icon {
        filter: none !important;
    }
}

/* Breakpoint for Mobile Devices (max-width: 767px) */
@media (max-width: 767px) {

    /* Global Bootstrap grid gutter reduction for mobile */
    .row>* {
        padding-right: 15px !important;
        padding-left: 15px !important;
    }

    /* Responsive Spacing & Typo */
    h1 {
        font-size: clamp(1.8rem, 6vw, 2.2rem) !important;
        line-height: 1.25 !important;
        margin-bottom: 15px !important;
    }

    h2 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
        margin-bottom: 12px !important;
    }

    .heading-premium-border {
        text-align: left !important;
        color: #243b63 !important;
    }

    .text-gold {
        color: var(--accent) !important;
    }

    .heading-premium-border::before {
        content: "";
        display: block;
        width: 130px;
        height: 5px;
        background-color: var(--accent);
        margin-bottom: 12px;
        margin-left: 0 !important;
        margin-right: auto !important;
    }

    h3 {
        font-size: 1.3rem !important;
        line-height: 1.3 !important;
    }

    /* img.logo-first {
        height: 40px !important;
    } */

    /* img.logo-scroll {
        height: 40px !important;
    } */

    nav.navbar.navbar-expand-lg {
        padding: 6px 0px !important;
    }

    /* Padding Reductions for tighter spacing on mobile */
    .gmc-about,
    .gmc-services,
    .gmc-why,
    .gmc-process,
    .gmc-testimonials,
    .gmc-faq,
    .gmc-blog,
    .gmc-contact {
        padding: 55px 0 !important;
    }

    .gmc-hero {
        padding: 40px 0 60px 0 !important;
    }

    .gmc-hero-features-list {
        flex-direction: column;
        gap: 12px;
        margin-top: 30px !important;
        padding-top: 20px !important;
    }

    /* Trust Indicators Section - 2x2 Grid Spacing & Perfect Spacing Padding */
    .gmc-trust,
    .about-trust {
        padding-top: 45px !important;
        padding-bottom: 45px !important;
    }

    .gmc-trust .container,
    .about-trust .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .gmc-trust .row,
    .about-trust .row {
        --bs-gutter-x: 16px !important;
        --bs-gutter-y: 16px !important;
        margin-left: -8px !important;
        margin-right: -8px !important;
    }

    .gmc-trust .row>div,
    .about-trust .row>div {
        padding-left: 8px !important;
        padding-right: 8px !important;
        margin-bottom: 0 !important;
    }

    .trust-card {
        padding: 24px 15px !important;
        height: 100% !important;
        /* Đảm bảo chiều cao các thẻ bằng nhau */
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .trust-card-num {
        font-size: 28px !important;
    }

    .trust-card-title {
        font-size: 11px !important;
        letter-spacing: 0.02em !important;
    }

    /* About Section Image Crop */
    .about-img-wrapper img {
        height: 220px !important;
    }

    .about-img-tag {
        padding: 6px 14px !important;
        font-size: 0.9rem !important;
    }

    .about-value-item {
        padding: 6px 10px !important;
        gap: 10px !important;
        margin-bottom: 6px !important;
    }

    .about-value-title {
        font-size: 14.5px !important;
    }

    .about-value-icon {
        font-size: 16px !important;
    }

    /* Practice Areas 2-Column Swiss Grid Layout */
    .services-grid-wrapper {
        margin-top: 35px !important;
    }

    .services-grid-wrapper .row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1px !important;
        background-color: var(--border) !important;
    }

    .services-grid-wrapper .row>div {
        width: 100% !important;
        max-width: 100% !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .services-grid-wrapper .row>div:last-child {
        grid-column: span 2 !important;
    }

    .service-grid-cell {
        padding: 24px 15px !important;
        border: none !important;
        height: 100% !important;
        text-align: center !important;
        align-items: center !important;
    }

    .service-cell-icon {
        font-size: 24px !important;
        margin-bottom: 12px !important;
    }

    .service-cell-title {
        font-size: 15px !important;
        margin-bottom: 8px !important;
    }

    .service-cell-desc {
        font-size: 12px !important;
        margin-bottom: 15px !important;
        line-height: 1.5 !important;
    }

    .service-cell-link {
        font-size: 11px !important;
    }

    /* Brand Banner Team Image Optimizations */
    .gmc-brand-banner {
        padding: 40px 0 !important;
    }

    .brand-image-wrapper img {
        height: 190px !important;
        box-shadow: 10px 10px 0px var(--dark-navy) !important;
    }

    /* Brand Interstitial Editorial Quote */
    .gmc-brand-interstitial {
        padding: 35px 0 !important;
    }

    .interstitial-img-wrapper img {
        height: 200px !important;
        box-shadow: 8px 8px 0px rgba(200, 169, 107, 0.2) !important;
        margin-bottom: 15px !important;
    }

    .gmc-brand-interstitial blockquote {
        font-size: 13.5px !important;
    }

    /* Footer *

    .gmc-footer .row>div:last-child .footer-widget {
        margin-bottom: 0;
    }

    .footer-bottom {
        margin-top: 30px;
        text-align: center;
    }

    .footer-bottom-links {
        justify-content: center;
        margin-top: 15px;
    }

    /* ==========================================================================
       STICKY MOBILE CTA BAR (Hidden per request)
       ========================================================================== */
    .gmc-sticky-mobile-cta {
        display: none !important;
    }

    /* Offset body padding reset */
    body {
        padding-bottom: 0px !important;
    }

    .footer-bottom {
        margin-top: 30px;
        padding-top: 0px;
    }
}

/* Extra Small Screens (max-width: 480px) */
@media (max-width: 480px) {
    .gmc-hero-card {
        padding: 25px 20px;
        box-shadow: 10px 10px 0px var(--accent);
    }

    .gmc-hero-card:hover {
        box-shadow: 12px 12px 0px var(--accent);
    }

    .about-img-tag {
        position: relative;
        bottom: 0;
        right: 0;
        display: block;
        margin-top: 15px;
        text-align: center;
        padding: 10px 20px;
        font-size: 1.25rem;
    }

    .service-grid-cell {
        padding: 20px 10px !important;
    }
}

/* Responsive adjustments for new features */
@media (max-width: 991px) {
    .partner-card {
        min-width: calc(50% - 15px);
        /* Show 2 partners on tablets */
    }

    .gmc-nav-right {
        display: none;
        /* Hide header details in mobile navigation bar */
    }
}

@media (max-width: 767px) {
    .partner-card {
        min-width: 100%;
        /* Show 1 partner on mobile */
        padding: 20px 15px !important;
    }

    .partner-name {
        font-size: 17px !important;
    }

    .partner-role {
        font-size: 12px !important;
    }

    .partner-honors {
        font-size: 13px !important;
    }

    /* Show mobile slider for team lawyers instead of 4-column grid */
    .team-grid-desktop {
        display: none;
    }

    .team-slider-mobile {
        display: block;
    }

    .team-card {
        padding: 30px 20px;
    }

    /* Stack hotline column blocks vertically on mobile with elegant borders */
    .gmc-hotline-bar .row>div {
        border-right: none !important;
        border-bottom: 1px solid rgba(36, 59, 99, 0.15) !important;
        padding: 24px 10px !important;
        margin-bottom: 0 !important;
    }

    .gmc-hotline-bar .row>div:last-child {
        border-bottom: none !important;
        padding-bottom: 0 !important;
    }

    .gmc-hotline-bar .row>div:first-child {
        padding-top: 0 !important;
    }

    .gmc-footer-hotlines {
        padding: 10px 0;
    }

    /* Mobile collapse offset override & interactive toggle restoration */
    .gmc-fixed-contact .btn-toggle {
        display: none !important;
        /* Show toggle button on mobile */
    }

    .gmc-fixed-contact .contact-btn:not(.btn-toggle) {
        opacity: 0 !important;
        pointer-events: none !important;
        transform: translateY(20px) scale(0.8) !important;
        margin-bottom: -50px !important;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    }

    .gmc-fixed-contact.active .contact-btn:not(.btn-toggle) {
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: translateY(0) scale(1) !important;
        margin-bottom: 0 !important;
    }

    /* ==========================================================================
       MOBILE OFFCANVAS WHITE THEME OVERRIDES
       ========================================================================== */
    #gmcMobileNav {
        background-color: var(--bg-white) !important;
        border-left: 1px solid var(--border) !important;
    }

    #gmcMobileNav .offcanvas-header {
        border-bottom: 1px solid var(--border) !important;
    }

    /* Convert close button from white to dark/black */
    #gmcMobileNav .btn-close-white {
        filter: none !important;
        opacity: 0.8 !important;
    }

    #gmcMobileNav .btn-close-white:hover {
        opacity: 1 !important;
    }

    #gmcMobileNav .offcanvas-body {
        background-color: var(--bg-white) !important;
    }

    /* Convert menu links to dark navy and gold on hover */
    #gmcMobileNav .nav-link {
        color: var(--dark-navy) !important;
        transition: var(--transition-fast) !important;
		display: flex;
        align-items: center;
        justify-content: space-between;
    }

    #gmcMobileNav .nav-link:hover,
    #gmcMobileNav .nav-link.active {
        color: var(--accent) !important;
    }

    /* Keep hotline style accent color */
    #gmcMobileNav .nav-item .text-accent {
        color: var(--accent) !important;
    }

    /* Mobile Language Switcher contrast overrides */
    #gmcMobileNav .border-top {
        border-top: 1px solid var(--border) !important;
    }

    #gmcMobileNav .text-white-50 {
        color: var(--text-muted) !important;
        /* Label */
    }

    /* Equal width, height, and display centering */
    #gmcMobileNav .lang-btn-mobile {
        flex: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        height: 42px !important;
        border-radius: 0px !important;
        /* Sharp Swiss Geometry */
        font-size: 13px !important;
        transition: all 0.25s ease-out !important;
    }

    /* Active State styling */
    #gmcMobileNav .lang-btn-mobile.active-lang-mobile {
        color: var(--dark-navy) !important;
        border: 1px solid var(--accent) !important;
        background-color: rgba(200, 169, 107, 0.1) !important;
        font-weight: 600 !important;
    }

    /* Check icon styling */
    #gmcMobileNav .lang-btn-mobile .check-icon {
        color: var(--accent) !important;
        display: none !important;
    }

    #gmcMobileNav .lang-btn-mobile.active-lang-mobile .check-icon {
        display: inline-block !important;
    }

    /* Inactive State styling */
    #gmcMobileNav .lang-btn-mobile:not(.active-lang-mobile) {
        color: var(--text-muted) !important;
        border: 1px solid var(--border) !important;
        background-color: transparent !important;
        font-weight: 500 !important;
    }

    /* Tối ưu hai nút bấm CTA ngang hàng trên mobile */
    .about-cta div[data-aos="fade-left"].d-flex {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        gap: 10px !important;
    }

    .about-cta div[data-aos="fade-left"].d-flex a.btn {
        flex: 1 !important;
        text-align: center !important;
        padding: 12px 8px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 48px !important;
    }

    /* Tối ưu hóa trang service-detail.html trên di động */
    .gmc-mobile-service-dropdown #mobileServiceDropdownBtn {
        background-color: var(--dark-navy) !important;
        color: var(--bg-white) !important;
        border: 1px solid var(--accent) !important;
        font-family: var(--font-heading);
        font-weight: 600 !important;
        font-size: 14px !important;
        letter-spacing: 0.05em !important;
        text-transform: none !important;
        border-radius: 0px !important;
        padding: 14px 16px !important;
        box-shadow: 0 4px 15px rgba(10, 20, 40, 0.15) !important;
    }

    .gmc-mobile-service-dropdown #mobileServiceDropdownBtn span {
        color: var(--bg-white) !important;
    }

    .gmc-mobile-service-dropdown #mobileServiceDropdownBtn .dropdown-arrow {
        font-size: 11px !important;
        transition: transform 0.3s ease !important;
        color: var(--accent) !important;
    }

    .gmc-mobile-service-dropdown #mobileServiceDropdownBtn:focus,
    .gmc-mobile-service-dropdown #mobileServiceDropdownBtn:active {
        background-color: var(--dark-navy) !important;
        border-color: var(--accent) !important;
    }

    .gmc-mobile-dropdown-menu {
        background-color: var(--dark-navy) !important;
        border: 1px solid rgba(200, 169, 107, 0.3) !important;
        border-top: none !important;
        border-radius: 0px !important;
        padding: 0 !important;
        margin-top: 0 !important;
        box-shadow: 0 10px 25px rgba(10, 20, 40, 0.25) !important;
    }

    .gmc-mobile-dropdown-menu .dropdown-item {
        color: rgba(255, 255, 255, 0.7) !important;
        padding: 12px 16px !important;
        font-size: 13.5px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        transition: all 0.2s ease !important;
        background-color: transparent !important;
    }

    .gmc-mobile-dropdown-menu li:last-child .dropdown-item {
        border-bottom: none !important;
    }

    .gmc-mobile-dropdown-menu .dropdown-item:hover,
    .gmc-mobile-dropdown-menu .dropdown-item.active {
        background-color: var(--accent) !important;
        color: var(--dark-navy) !important;
        font-weight: 600 !important;
    }

    .service-title {
        margin-bottom: 10px !important;
        line-height: 1.35 !important;
        font-size: 22px !important;
        padding-left: 5px;
    }

    .service-article img {
        height: 200px !important;
        width: 100% !important;
        object-fit: cover !important;
        border-radius: 4px !important;
    }

    .lawyer-hotline-banner {
        padding: 15px !important;
        margin-bottom: 20px !important;
        gap: 10px !important;
        display: none !important;
    }

    .lawyer-hotline-banner img {
        width: 60px !important;
        height: 60px !important;
        margin-bottom: 0 !important;
    }

    .lawyer-hotline-banner h4 {
        font-size: 15px !important;
    }

    .lawyer-hotline-banner a.hotline-pulse {
        font-size: 18px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }


    .gmc-footer {
        padding: 30px 0px;
    }

    .footer-widget {
        margin-top: 30px;
    }

    .footer-bottom .mb-0 {
        padding-top: 20px;
    }

    .col-12.col-md-6.col-lg-4.blog-item {
        margin-bottom: 20px !important;
    }

    /* Bảng chi tiết bài viết có thanh cuộn ngang mượt mà trên di động */
    .table-responsive table {
        min-width: 650px !important;
    }

    /* Thanh cuộn ngang mỏng, tinh tế cho bảng trên di động */
    .table-responsive::-webkit-scrollbar {
        height: 5px !important;
    }

    .table-responsive::-webkit-scrollbar-track {
        background: rgba(36, 59, 99, 0.05) !important;
        border-radius: 0px !important;
    }

    .table-responsive::-webkit-scrollbar-thumb {
        background: var(--accent) !important;
        border-radius: 0px !important;
    }

    .table-responsive::-webkit-scrollbar-thumb:hover {
        background: var(--accent-hover) !important;
    }

    /* Bản đồ trang liên hệ di động */
    .map-header-flex {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px !important;
    }

    .btn-map-directions {
        width: 100% !important;
        padding: 12px 20px !important;
        font-size: 13px !important;
    }
}