/* --- Shared responsive system (Namoo / Ecoville) --- */

/* Desktop ABOUT layout lock: 1200px+ */
@media (min-width: 1200px) {
    #about .about-hero-grid {
        gap: 60px;
    }
}

/* Laptop: 992px–1199px */
@media (max-width: 1199px) {
    :root {
        --section-gap: 80px;
    }

    .container {
        padding: 0 28px;
    }

    .header-inner {
        padding: 0 32px;
    }

    .nav-links {
        gap: 32px;
    }

    .ecoville-showcase {
        padding: 90px 0;
    }

    #why-namoo {
        padding: 90px 0;
    }

    .showcase-grid {
        gap: 28px;
    }

    .section-header,
    #why-namoo .section-header,
    #rd-center .section-header,
    #discovery .section-header {
        margin-bottom: 60px;
    }

    .rd-list {
        gap: 24px;
    }

    #about .about-hero-grid {
        gap: 40px;
    }

    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
        padding: 0 24px 48px;
    }
}

/* Tablet: 768px–991px */
@media (max-width: 991px) {
    :root {
        --section-gap: 70px;
    }

    .container {
        padding: 0 24px;
    }

    .header-inner {
        padding: 0 24px;
    }

    .nav-links {
        gap: 24px;
    }

    .nav-links a {
        font-size: 14px;
    }

    .logo-img {
        height: 50px;
    }

    .ecoville-showcase {
        padding: 70px 0;
    }

    .ecoville-header {
        margin-bottom: 24px;
    }

    .ecoville-logo-wrap {
        height: 120px;
        margin-bottom: 24px;
    }

    .ecoville-logo-wrap img {
        transform: translateY(-50%);
    }

    .showcase-grid,
    #insights .insights-grid,
    .why-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    .discovery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rd-list {
        grid-template-columns: 1fr;
    }

    #about .about-hero-grid {
        flex-direction: column;
        gap: 36px;
    }

    #about .about-photo-wrap {
        align-self: center;
        width: 100%;
        max-width: 260px;
    }

    #about .about-photo {
        height: auto;
        aspect-ratio: 4 / 5;
        object-fit: cover;
    }

    #about .about-services {
        margin-top: 72px;
        grid-template-columns: 1fr;
        gap: 56px;
    }

    #about .about-service-title {
        font-size: 34px;
    }

    .section-header h2,
    #why-namoo .section-header h2,
    #rd-center .section-header h2,
    #discovery .section-header h2,
    #about .section-header h2,
    #portfolio .section-header h2,
    #contact .section-header h2 {
        font-size: 42px;
    }

    .section-header p,
    #why-namoo .section-header p,
    #rd-center .section-header p {
        font-size: 18px;
    }

    .hero-content p {
        font-size: 40px;
    }

    .hero-content p.subtitle-sub {
        font-size: 18px;
    }

    .detail-header {
        margin: 60px 0 40px;
    }

    .detail-title {
        font-size: 30px;
    }

    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        padding: 0 24px 40px;
    }
}

/* Mobile: ≤767px */
@media (max-width: 767px) {
    :root {
        --section-gap: 50px;
    }

    html,
    body {
        overflow-x: hidden;
    }

    .container {
        padding: 0 16px;
    }

    .header-inner {
        padding: 0 16px;
    }

    header {
        height: 72px;
    }

    .logo-img {
        height: 44px;
    }

    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 8px 0 16px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        transform: translateY(-120%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s ease;
        z-index: 999;
        max-height: calc(100vh - 72px);
        overflow-y: auto;
    }

    header.menu-open .nav-links {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    header.menu-open .mobile-menu-toggle span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    header.menu-open .mobile-menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    header.menu-open .mobile-menu-toggle span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 14px 24px;
        font-size: 15px;
    }

    #hero {
        height: auto;
        min-height: 100svh;
        padding: 96px 0 50px;
    }

    #discovery .container {
        padding: 0 16px;
    }

    body.has-fixed-header {
        padding-top: 72px;
    }

    .hero-content {
        margin-top: 0;
    }

    .hero-content p {
        font-size: 26px;
        line-height: 1.4;
    }

    .hero-content p.subtitle-sub {
        font-size: 15px;
    }

    .hero-btns {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        margin-top: 0;
    }

    .hero-btns .btn {
        width: 100%;
        text-align: center;
        padding: 16px 24px;
    }

    .hero-btns p {
        font-size: 13px !important;
    }

    .scroll-down-icon {
        display: none;
    }

    .ecoville-showcase {
        padding: 50px 0;
    }

    .ecoville-header {
        margin-bottom: 22px;
    }

    .ecoville-logo-wrap {
        max-width: 100%;
        height: 100px;
        margin-bottom: 22px;
    }

    .ecoville-logo-wrap img {
        transform: translateY(-50%);
    }

    #why-namoo {
        padding: 50px 0;
    }

    .showcase-grid,
    #insights .insights-grid,
    .why-grid,
    .discovery-grid,
    .clients-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .section-header,
    #why-namoo .section-header,
    #rd-center .section-header,
    #discovery .section-header,
    #about .section-header,
    #portfolio .section-header,
    #contact .section-header {
        margin-bottom: 36px;
    }

    .section-header h2,
    #why-namoo .section-header h2,
    #rd-center .section-header h2,
    #discovery .section-header h2,
    #about .section-header h2,
    #portfolio .section-header h2,
    #contact .section-header h2 {
        font-size: 32px;
        margin-bottom: 12px;
    }

    .section-header p,
    #why-namoo .section-header p,
    #rd-center .section-header p,
    #contact .section-header p {
        font-size: 16px;
    }

    #contact .contact-body {
        font-size: 15px;
        margin-bottom: 28px;
    }

    #contact .contact-services {
        margin-bottom: 28px;
    }

    #contact .contact-services li {
        font-size: 15px;
        padding: 14px 0;
    }

    #contact .contact-email {
        margin-bottom: 28px;
    }

    .why-desc {
        font-size: 16px;
        margin-bottom: 36px;
    }

    .why-card {
        padding: 32px 20px;
    }

    .why-card h4 {
        font-size: 32px;
    }

    .rd-item {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .rd-img-box img {
        height: auto;
        max-height: 240px;
    }

    .rd-text-content h3 {
        font-size: 20px;
    }

    .rd-text-content .btn,
    .discovery-card .btn-read-more,
    .discovery-more .btn,
    .pdf-download-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .discovery-card .btn-read-more {
        align-self: stretch;
    }

    .discovery-more .btn {
        max-width: 100%;
    }

    #about .about-hero-grid {
        flex-direction: column;
        gap: 28px;
    }

    #about .about-photo-wrap {
        align-self: center;
        width: 100%;
        max-width: 240px;
    }

    #about .about-photo {
        height: auto;
        aspect-ratio: 4 / 5;
        object-fit: cover;
    }

    #about .about-services {
        margin-top: 56px;
        gap: 52px;
    }

    #about .about-service-title {
        font-size: 30px;
        margin-bottom: 16px;
    }

    #about .about-history-list .history-item,
    #about .about-areas-list li {
        padding: 18px 0;
        font-size: 15px;
    }

    .footer-info-grid {
        flex-direction: column;
        gap: 12px;
    }

    .portfolio-modal {
        max-height: 90vh;
    }

    .portfolio-modal-header {
        padding: 24px 48px 16px 20px;
    }

    .portfolio-modal-header h2 {
        font-size: 22px;
    }

    .portfolio-modal-body {
        padding: 20px;
    }

    #portfolio .portfolio-all-btn-wrap .btn {
        width: 100%;
        max-width: 100%;
        padding: 16px 24px;
        font-size: 14px;
    }

    .detail-header {
        margin: 40px 0 30px;
        padding-bottom: 20px;
    }

    .detail-title {
        font-size: 24px;
    }

    .abstract-box {
        padding: 24px;
        margin-bottom: 40px;
    }

    .content-body {
        margin-bottom: 50px;
    }

    .download-section {
        margin-bottom: 60px;
        padding-top: 30px;
    }

    .pdf-download-btn {
        display: flex;
        padding: 16px 24px;
    }

    .gallery {
        grid-template-columns: 1fr;
        padding: 0 16px 32px;
        gap: 12px;
    }

    .project-page h1 {
        font-size: 24px;
        padding: 16px 16px 32px;
    }

    .project-back {
        margin: 16px 0 0 16px;
        font-size: 16px;
    }

    .table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
}
