/* ============================================================
   RESPONSIVE ACB — ALL BREAKPOINTS
   Breakpoints: ≤480 | 481–768 | 769–920 | 921–1023 | 1024–1239 | 1240–1444 | 1445+
   ============================================================ */

/* ============================================================
   GLOBAL FIXES — áp dụng mọi breakpoint
   ============================================================ */

/* Fix overflow ngang toàn trang */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Fix project-acb không tràn */
.project-acb {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

/* Fix tất cả img và video không tràn */
img, video {
    max-width: 100%;
    box-sizing: border-box;
}

/* Fix footer không tràn */
.main-footer {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.footer {
    box-sizing: border-box;
}

/* ============================================================
   ≤ 480px — MOBILE SMALL
   ============================================================ */
@media (max-width: 480px) {

    .header { padding: 12px 20px; }
    .logo-img { height: 38px; }
    .main-menu { font-size: 13px; }
    .main-menu li { margin-right: 10px; }
    .nav-actions { gap: 10px; }
    .theme-toggle { width: 17px; height: 17px; }
    .hamburger-menu { width: 20px; height: 16px; }
    .hamburger-menu.active .bar:nth-child(1) { transform: rotate(-45deg) translate(-4px, 6px); }
    .hamburger-menu.active .bar:nth-child(3) { transform: rotate(45deg) translate(-4px, -6px); }
    .dropdown-menu { top: 50px; right: 20px; min-width: 120px; padding: 6px 8px; }
    .dropdown-menu li { padding: 6px 14px; }
    .sub-item { font-size: 13px; }

    .project-acb { padding: 12px 16px; font-size: 15px; }
    .project-acb h1 { font-size: 19px; }
    .project-acb h2 { font-size: 17px; }
    .project-acb h3 { font-size: 15px; }
    .project-acb h4 { font-size: 14px; }
    .project-acb img, .image-review-wrapper img { max-width: 100%; width: 100%; border-radius: 10px; }
    .image-gradient-wrapper .project-video, .video-wrapper-portrait .project-video { width: 85%; border-radius: 10px; }

    /* Problem Grid - 1 column on mobile */
    .problem-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px 0;
    }

    .problem-grid h3 {
        font-size: 16px;
    }

    .problem-grid p {
        font-size: 14px;
    }

    /* Caption Video */
    .caption-video {
        font-size: 12px;
        margin-top: 8px;
        margin-bottom: 20px;
    }

    .back-to-top { padding: 0 20px 16px; font-size: 13px; }

    .main-footer { padding: 0 20px; margin-bottom: 20px; }
    .footer { flex-direction: column; align-items: flex-start; gap: 8px; height: auto; padding: 16px 20px; border-radius: 12px; max-width: 100%; }
    .footer-highlight { font-size: 14px; }
}


/* ============================================================
   481px – 768px — MOBILE LARGE
   ============================================================ */
@media (min-width: 481px) and (max-width: 768px) {

    .header { padding: 14px 28px; }
    .logo-img { height: 44px; }
    .main-menu { font-size: 14px; }
    .main-menu li { margin-right: 14px; }
    .nav-actions { gap: 12px; }
    .theme-toggle { width: 19px; height: 19px; }
    .hamburger-menu { width: 22px; height: 18px; }
    .hamburger-menu.active .bar:nth-child(1) { transform: rotate(-45deg) translate(-4px, 7px); }
    .hamburger-menu.active .bar:nth-child(3) { transform: rotate(45deg) translate(-4px, -7px); }
    .dropdown-menu { top: 54px; right: 28px; min-width: 130px; padding: 8px 10px; }
    .dropdown-menu li { padding: 6px 20px; }
    .sub-item { font-size: 14px; }

    .project-acb { padding: 16px 28px; font-size: 16px; }
    .project-acb h1 { font-size: 21px; }
    .project-acb h2 { font-size: 18px; }
    .project-acb h3 { font-size: 16px; }
    .project-acb img, .image-review-wrapper img { max-width: 100%; width: 100%; border-radius: 12px; }
    .image-gradient-wrapper .project-video, .video-wrapper-portrait .project-video { width: 85%; border-radius: 12px; }

    /* Problem Grid - 1 column on mobile large */
    .problem-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 16px 0;
    }

    .problem-grid h3 {
        font-size: 17px;
    }

    .problem-grid p {
        font-size: 15px;
    }

    /* Caption Video */
    .caption-video {
        font-size: 13px;
        margin-top: 10px;
        margin-bottom: 24px;
    }

    .back-to-top { padding: 0 28px 18px; font-size: 14px; }

    .main-footer { padding: 0 28px; margin-bottom: 24px; }
    .footer { flex-direction: column; align-items: flex-start; gap: 10px; height: auto; padding: 18px 24px; border-radius: 12px; max-width: 100%; }
    .footer-highlight { font-size: 15px; }
}


/* ============================================================
   769px – 920px — TABLET SMALL / LANDSCAPE MOBILE
   ============================================================ */
@media (min-width: 769px) and (max-width: 920px) {

    .header { padding: 16px 36px; }
    .logo-img { height: 50px; }
    .main-menu { font-size: 16px; }
    .main-menu li { margin-right: 20px; }
    .nav-actions { gap: 14px; }
    .theme-toggle { width: 20px; height: 20px; }
    .dropdown-menu { top: 60px; right: 36px; min-width: 135px; }
    .dropdown-menu li { padding: 7px 40px; }
    .sub-item { font-size: 15px; }

    .project-acb { padding: 20px 60px; font-size: 17px; }
    .project-acb h1 { font-size: 24px; }
    .project-acb h2 { font-size: 21px; }
    .project-acb h3 { font-size: 18px; }
    .project-acb img, .image-review-wrapper img { max-width: 88%; width: 88%; }
    .image-gradient-wrapper .project-video, .video-wrapper-portrait .project-video { width: 85%; }

    /* Problem Grid - 1 column on tablet small */
    .problem-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 18px 0;
    }

    .problem-grid h3 {
        font-size: 18px;
    }

    .problem-grid p {
        font-size: 16px;
    }

    /* Caption Video */
    .caption-video {
        font-size: 14px;
        margin-top: 10px;
        margin-bottom: 26px;
    }

    .back-to-top { padding: 0 36px 18px; font-size: 15px; }

    .main-footer { padding: 0 36px; margin-bottom: 28px; }
    .footer { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; height: auto; padding: 20px 28px; border-radius: 14px; max-width: 100%; }
    .footer-highlight { font-size: 16px; }
}


/* ============================================================
   921px – 1023px — TABLET LARGE
   ============================================================ */
@media (min-width: 921px) and (max-width: 1023px) {

    .header { padding: 18px 48px; }
    .logo-img { height: 56px; }
    .main-menu { font-size: 17px; }
    .main-menu li { margin-right: 24px; }
    .dropdown-menu { top: 64px; right: 48px; min-width: 140px; }
    .dropdown-menu li { padding: 8px 50px; }
    .sub-item { font-size: 15px; }

    /* Problem Grid - 2 columns on tablet large */
    .problem-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
        padding: 20px 0;
    }

    .problem-grid h3 {
        font-size: 19px;
    }

    .problem-grid p {
        font-size: 16px;
    }

    /* Caption Video */
    .caption-video {
        font-size: 15px;
        margin-top: 11px;
        margin-bottom: 28px;
    }

    .back-to-top { padding: 0 48px 20px; font-size: 16px; }

    .main-footer { padding: 0 48px; margin-bottom: 32px; }
    .footer { flex-direction: row; justify-content: space-between; align-items: center; gap: 20px; height: 70px; padding: 0 32px; border-radius: 14px; max-width: 100%; }
    .footer-highlight { font-size: 18px; }
}


/* ============================================================
   1024px – 1239px — DESKTOP SMALL
   ============================================================ */
@media (min-width: 1024px) and (max-width: 1239px) {

    /* Problem Grid - 3 columns on desktop */
    .problem-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 35px;
        padding: 20px 0;
    }

    .problem-grid h3 {
        font-size: 19px;
    }

    .problem-grid p {
        font-size: 16px;
    }

    /* Caption Video */
    .caption-video {
        font-size: 15px;
        margin-top: 11px;
        margin-bottom: 28px;
    }

    .back-to-top { padding: 0 50px 20px; font-size: 16px; }

    .main-footer { padding: 0; margin-top: 80px; }
    .footer { gap: 180px; width: 1140px; max-width: calc(100% - 100px); height: 80px; border-radius: 14px; }
    .footer-highlight { font-size: 20px; }
}


/* ============================================================
   1240px – 1444px — DESKTOP STANDARD (TARGET DESIGN)
   ============================================================ */
@media (min-width: 1240px) and (max-width: 1444px) {

    .header { padding: 20px 60px; }
    .logo-img { height: 65px; }
    .main-menu { font-size: 20px; }
    .main-menu li { margin-right: 30px; }
    .dropdown-menu { top: 70px; right: 60px; min-width: 150px; }
    .dropdown-menu li { padding: 8px 85px; }
    .sub-item { font-size: 16px; }

    /* Problem Grid - 3 columns */
    .problem-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
        padding: 20px 0;
    }

    .problem-grid h3 {
        font-size: 20px;
    }

    .problem-grid p {
        font-size: 17px;
    }

    /* Caption Video */
    .caption-video {
        font-size: 16px;
        margin-top: 12px;
        margin-bottom: 30px;
    }

    .back-to-top { padding: 0 60px 20px; font-size: 16px; }

    .main-footer { padding: 0 60px; margin-top: 80px; margin-bottom: 40px; }
    .footer { 
        gap: 40px; 
        width: 100%; 
        max-width: 100%; 
        height: auto; 
        padding: 24px 40px;
        border-radius: 14px;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }
    .footer-highlight { font-size: 18px; }
}


/* ============================================================
   1445px+ — WIDE DESKTOP
   ============================================================ */
@media (min-width: 1445px) {

    .header { padding: 24px 80px; }
    .logo-img { height: 70px; }
    .main-menu { font-size: 20px; }
    .main-menu li { margin-right: 36px; }
    .dropdown-menu { top: 74px; right: 80px; min-width: 155px; }
    .dropdown-menu li { padding: 8px 90px; }
    .sub-item { font-size: 16px; }

    /* Problem Grid - 3 columns */
    .problem-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 45px;
        padding: 22px 0;
    }

    .problem-grid h3 {
        font-size: 21px;
    }

    .problem-grid p {
        font-size: 18px;
    }

    /* Caption Video */
    .caption-video {
        font-size: 17px;
        margin-top: 13px;
        margin-bottom: 32px;
    }

    .back-to-top { padding: 0 80px 24px; font-size: 20px; }

    .main-footer { padding: 0; margin-top: 120px; }
    .footer { gap: 320px; width: 1600px; max-width: calc(100% - 160px); height: 70px; border-radius: 14px; }
    .footer-highlight { font-size: 26px; }
}


/* ============================================================
   PRINT
   ============================================================ */
@media print {
    .header,
    .hamburger-menu,
    .dropdown-menu,
    .back-to-top {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .main-footer {
        background: #eee;
    }
}