/* Global responsive — mobile, tablet, laptop */

html {
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: clip;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

.table-scroll-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ——— Laptop / small desktop (≤1200px) ——— */
@media (max-width: 1200px) {
    .container {
        width: min(1240px, 96%);
    }

    .nav-link {
        padding: 0.45rem 0.45rem;
        font-size: 0.74rem;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .news-grid--home {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ——— Tablet landscape + mobile nav (≤1024px) ——— */
@media (max-width: 1024px) {
    :root {
        --header-h: 76px;
    }

    .top-bar-actions {
        display: none;
    }

    .top-bar-end {
        margin-inline-start: auto;
    }

    .top-bar-inner {
        flex-direction: row;
        flex-wrap: wrap;
        height: auto;
        padding: 0.35rem 0;
        gap: 0.35rem;
    }

    .top-bar {
        height: auto;
    }

    .top-bar-contact {
        gap: 0.65rem 1rem;
    }

    .nav-toggle {
        display: flex;
    }

    .site-header .header-inner {
        position: relative;
        flex-wrap: nowrap;
        min-height: var(--header-h);
    }

    .main-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
        flex: none;
        width: 100%;
    }

    .main-nav.is-open {
        max-height: min(85vh, 520px);
        overflow-y: auto;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem 1rem 1rem;
        gap: 0;
    }

    .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        white-space: normal;
    }

    .nav-link.is-active::after,
    .nav-item-dropdown.is-active-parent > .nav-link-dropdown::after {
        display: none;
    }

    .nav-link.is-active,
    .nav-item-dropdown.is-active-parent > .nav-link-dropdown {
        background: #e8f2fa;
    }

    .nav-item-dropdown {
        width: 100%;
    }

    .nav-link-dropdown {
        width: 100%;
        justify-content: space-between;
        text-align: right;
    }

    .nav-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: #f4f7fb;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        transition: max-height 0.3s ease;
        min-width: 0;
    }

    .nav-item-dropdown.is-open .nav-dropdown {
        max-height: 320px;
        padding: 0.25rem 0;
    }

    .nav-dropdown-link {
        padding: 0.65rem 1.25rem;
        white-space: normal;
    }

    .nav-toggle.is-open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle.is-open span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.is-open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .hero-slider {
        height: clamp(300px, 46vh, 440px);
    }

    .slide-content {
        padding-bottom: 4rem;
        max-width: 100%;
    }

    .slide-content p {
        font-size: 0.92rem;
    }

    .section {
        padding: 2.75rem 0;
    }

    .content-box {
        padding: 1.5rem 1.35rem;
    }

    .park-chat-box {
        padding: 1.25rem 1.15rem;
    }

    .park-chat-header h2 {
        font-size: 1.05rem;
        line-height: 1.55;
    }

    .cta-box {
        padding: 2.25rem 1.35rem;
    }

    .cta-box h2 {
        font-size: 1.25rem;
    }
}

/* ——— Tablet portrait (≤768px) ——— */
@media (max-width: 768px) {
    .container {
        width: min(1240px, 94%);
    }

    .logo-img {
        height: 52px;
        max-width: min(200px, 52vw);
    }

    .hero-slider {
        height: clamp(280px, 42vh, 380px);
    }

    .slide-content {
        padding-bottom: 3.5rem;
    }

    .slide-content h1 {
        font-size: clamp(1.15rem, 5vw, 1.5rem);
    }

    .slide-content p {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 1rem;
        font-size: 0.88rem;
    }

    .slider-controls {
        bottom: 0.85rem;
        gap: 0.65rem;
    }

    .slider-btn {
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-value {
        font-size: 1.45rem;
    }

    .section-head h2 {
        font-size: 1.35rem;
    }

    .services-grid,
    .news-grid,
    .news-grid--home {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 1.15rem;
    }

    .about-grid {
        gap: 1.75rem;
    }

    .about-content p {
        text-align: right;
    }

    .page-banner {
        padding: 1.5rem 0 1.75rem;
    }

    .page-content {
        padding: 1.75rem 0 2.5rem;
    }

    .content-box {
        padding: 1.15rem 1rem;
    }

    .park-chat-messages {
        max-height: min(50vh, 320px);
    }

    .park-chat-msg {
        max-width: 96%;
    }

    .park-chat-turnstile {
        justify-content: center;
        transform-origin: center;
    }

    .park-chat-turnstile iframe {
        max-width: 100%;
    }

    .btn {
        padding: 0.65rem 1.1rem;
        font-size: 0.88rem;
    }

    .cta-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-actions .btn {
        width: 100%;
        text-align: center;
    }

    .top-bar-contact {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
        font-size: 0.75rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem 0;
    }

    .footer-partners {
        grid-column: auto;
    }

    .footer-logo-img {
        height: 56px;
        max-width: min(260px, 88vw);
    }
}

/* ——— Mobile (≤480px) ——— */
@media (max-width: 480px) {
    .container {
        width: 94%;
    }

    .hero-slider {
        height: clamp(260px, 38vh, 320px);
    }

    .slide-content .btn {
        padding: 0.55rem 1rem;
        font-size: 0.82rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-item {
        border-left: none !important;
        border-bottom: 1px solid var(--border);
        padding: 0.85rem;
    }

    .stat-item:last-child {
        border-bottom: none;
    }

    .park-chat-box {
        padding: 1rem 0.85rem;
        border-radius: 16px;
    }

    .park-chat-input {
        font-size: 0.9rem;
        min-height: 44px;
    }

    .section {
        padding: 2.25rem 0;
    }

    .section-head {
        margin-bottom: 1.75rem;
    }

    .news-thumb {
        height: 160px;
    }

    .footer-top {
        padding: 1.25rem 0 1rem;
    }

    .footer-logo-link {
        padding: 0.55rem 0.85rem;
        width: 100%;
        text-align: center;
    }

    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-stats {
        justify-content: center;
    }
}
