/* ==========================================================================
   Donghe Science - Responsive Adjustments
   ========================================================================== */

/* Large desktops and down */
@media (max-width: 1199.98px) {
    .hero-title { font-size: 48px; }
    .section-title { font-size: 32px; }
    .products-menu { min-width: 640px; }
    .about-big-title { font-size: 48px; }
    .video-hero-title { font-size: 38px; }
    .global-big-title { font-size: 32px; }
}

/* Tablets and down */
@media (max-width: 991.98px) {
    .section-pad { padding: 64px 0; }
    .topbar { font-size: 12px; }
    .topbar .col-md-6:first-child { display: none; }
    .topbar-contact { text-align: center !important; }
    .hero-title { font-size: 38px; }
    .hero-sub { font-size: 16px; }
    .section-title { font-size: 28px; }
    /* Dropdown falls back to Bootstrap default (click) on mobile */
    .products-menu { min-width: auto; padding: 16px; }

    .about-head-row { margin-bottom: 40px; }
    .about-big-title { font-size: 40px; }
    .about-slide { flex-basis: 420px; height: 300px; }

    .video-hero-card { min-height: 400px; }
    .video-hero-title { font-size: 30px; }
    .video-bottom-media img { height: 300px; }

    .products-head { margin-bottom: 32px; }

    /* stats: two per row, restore dividers */
    .stats-bar { margin-top: 48px; padding: 28px 16px; }
    .stat-item { padding: 12px 20px; margin-bottom: 8px; }
    .stat-num { font-size: 40px; }
    .stat-item:nth-child(odd) { border-left: none; padding-left: 0; }

    /* solutions accordion becomes vertical stack */
    .solution-accordion {
        flex-direction: column;
        height: auto;
        gap: 12px;
    }
    .solution-panel { height: 200px; flex: none; }
    .solution-panel.is-active { flex: none; height: 340px; }
    .sp-collapsed { flex-direction: row; }
    .sp-vertical-title { writing-mode: horizontal-tb; letter-spacing: 1px; }

    .global-head { margin-bottom: 28px; }
    .marker-name { display: none; }

    .news-title { min-height: auto; }
}

/* Small devices */
@media (max-width: 767.98px) {
    .hero-banner .carousel-item { height: 82vh; min-height: 520px; }
    .hero-title { font-size: 30px; }
    .hero-sub { font-size: 14px; margin-bottom: 22px; }
    .hero-actions .btn { padding: 12px 22px; font-size: 13px; }

    .about-big-title { font-size: 34px; }
    .about-slide { flex-basis: 320px; height: 240px; }
    .slider-arrow { width: 44px; height: 44px; }

    .video-hero-card { min-height: 320px; }
    .video-hero-title { font-size: 24px; }
    .video-play-btn { width: 68px; height: 68px; font-size: 20px; }
    .video-bottom-row { margin-top: 44px; }
    .video-bottom-media img { height: 240px; }
    .video-bottom-title { font-size: 24px; }

    /* product card: image on top, text below */
    .product-center-card { flex-direction: column; min-height: 0; }
    .pcc-text { flex: none; padding: 24px; order: 2; }
    .pcc-media { width: 100%; min-height: 200px; order: 1; }

    .application-footer { padding: 14px 16px; }
    .application-title { font-size: 14px; }

    .map-popup { width: 250px; }
    .global-big-title { font-size: 28px; }
    .news-big-title { font-size: 30px; }
}

/* Extra small */
@media (max-width: 575.98px) {
    .topbar-contact .lang-switch { margin-right: 10px; }
    .topbar-item { margin-left: 10px; }
    .hero-title { font-size: 26px; }
    .hero-actions .btn { display: block; margin: 0 0 12px; }
    .section-pad { padding: 52px 0; }
    .news-tabs { gap: 0; }
    .news-tabs .nav-link { padding: 8px 18px; font-size: 12px; }
    .stat-num { font-size: 32px; }
}

/* Products mega dropdown: stack panes under each category on mobile */
@media (max-width: 991.98px) {
    .products-menu {
        width: 100%;
        max-width: 100%;
        border-top: none;
        box-shadow: none;
        border-radius: 0;
    }
    .products-mega { display: block; }
    .products-cat-list {
        width: 100%;
        flex: none;
        border-right: none;
        padding: 0;
    }
    .products-cat-link { padding: 12px 18px; }
    .products-cat-link::after { transform: rotate(90deg); }
    .products-cat-list > li.is-active .products-cat-link::after { transform: rotate(-90deg); }
    .products-pane {
        position: static;
        padding: 12px 16px 16px;
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        border-bottom: 1px solid var(--dh-line);
        background: var(--dh-light);
    }
    .products-pane-item img { height: 100px; }
}

/* Mobile: hide decorative structures, keep it practical */
@media (max-width: 991.98px) {
    /* hide the utility topbar, nav only */
    .topbar { display: none; }
    :root { --dh-header-h: 74px; }

    /* hero: tighter type, smaller indicators */
    .hero-title { font-size: 34px; }
    .hero-sub { font-size: 15px; margin-bottom: 22px; }
    .hero-tagline { letter-spacing: 2.5px; font-size: 11px; }
    .hero-actions .btn { padding: 11px 22px; font-size: 13px; margin-right: 8px; }
    .hero-banner .carousel-indicators { margin-bottom: 18px; }
    .hero-banner .carousel-indicators button { width: 22px; height: 3px; }

    /* about slider: hide arrows, native touch swipe is enough */
    .slider-arrows { display: none; }
    .about-slider { cursor: default; }

    /* tighter sections */
    .section-pad { padding: 56px 0; }
    .section-title { font-size: 28px; }
    .about-big-title { font-size: 38px; }
    .video-hero-title { font-size: 26px; }
}
