/* =============================================
   JMERAK Homepage - Responsive Stylesheet (v2)
   Breakpoints:
   - Large desktop: > 1280px
   - Desktop: 1024px - 1280px
   - Tablet: 768px - 1023px
   - Mobile: < 768px
   - Small Mobile: < 480px
   ============================================= */

/* ===== Desktop medium ===== */
@media (max-width: 1280px) {
    .container { padding: 0 32px; }
    .section { padding: 120px 0; }
    .hero-title { font-size: 60px; }
    .section-title { font-size: 44px; }
    .service-grid { gap: 16px; }
    .service-card { padding: 32px 22px; }
}

/* ===== Tablet ===== */
@media (max-width: 1024px) {
    .section { padding: 100px 0; }

    /* Hero */
    .hero {
        padding: 120px 0 80px;
        min-height: auto;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
    }

    .hero-content {
        max-width: 720px;
        margin: 0 auto;
    }

    .hero-buttons,
    .hero-tag {
        justify-content: center;
    }

    .hero-tag {
        display: inline-flex;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-visual {
        height: 440px;
        max-width: 500px;
        margin: 0 auto;
    }

    .hero-center-disc {
        width: 320px;
        height: 320px;
    }

    .hero-center-logo-wrap {
        width: 170px;
        height: 170px;
    }

    .hero-title { font-size: 56px; }

    .section-title { font-size: 40px; }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .about-stats {
        max-width: 600px;
        margin: 0 auto;
        width: 100%;
    }

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

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

    .clients-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
    body { font-size: 15px; }

    .container { padding: 0 20px; }
    .section { padding: 80px 0; }

    /* Header */
    .header-inner { height: 64px; }
    .logo-img { height: 26px; }

    .menu-toggle { display: flex; }

    .nav-menu {
        position: fixed;
        top: 64px;
        left: 0; right: 0;
        background: #fff;
        padding: 16px;
        box-shadow: var(--sh-md);
        transform: translateY(-150%);
        transition: transform var(--transition);
        border-top: 1px solid var(--c-line);
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }

    .nav-menu.active { transform: translateY(0); }

    .nav-menu ul {
        flex-direction: column;
        gap: 2px;
        align-items: stretch;
    }

    .nav-link {
        display: block !important;
        padding: 14px 18px !important;
        font-size: 16px !important;
        color: var(--c-text) !important;
        border-radius: 8px;
        text-align: left;
    }

    /* Hero */
    .hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 42px;
        line-height: 1.1;
    }

    .hero-tag {
        font-size: 11px;
        letter-spacing: 2px;
        padding: 6px 12px;
    }

    .hero-desc {
        font-size: 15px;
        margin-bottom: 32px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .hero-visual {
        height: 340px;
    }

    .hero-center-disc {
        width: 260px;
        height: 260px;
    }

    .hero-center-disc::before { inset: 24px; }
    .hero-center-disc::after { inset: 48px; }

    .hero-center-logo-wrap {
        width: 140px;
        height: 140px;
    }

    .service-badge {
        padding: 8px 14px;
        font-size: 12px;
    }

    .service-badge .badge-icon {
        width: 14px;
        height: 14px;
    }

    .scroll-down { display: none; }

    .shape-1, .shape-2, .shape-3 {
        width: 280px;
        height: 280px;
    }

    /* Scale bars for mobile - still dramatic but fit screen */
    .deco-bar-1 {
        width: 1400px;
        height: 220px;
        left: -300px;
        top: 50%;
    }

    .deco-bar-2 {
        width: 1200px;
        height: 200px;
        right: -300px;
        top: -5%;
    }

    /* Scale down decorations on mobile */
    .deco-square-1 {
        width: 320px;
        height: 320px;
        left: -25%;
    }

    .deco-square-2 {
        width: 360px;
        height: 360px;
        right: -25%;
    }

    .deco-square-3,
    .deco-circle-4,
    .deco-triangle-3,
    .deco-dot-2,
    .deco-dot-4,
    .deco-plus-1,
    .deco-plus-2,
    .deco-line-1,
    .deco-line-2 {
        display: none;
    }

    .deco-circle-2 {
        width: 48px;
        height: 48px;
    }

    .deco-circle-1,
    .deco-circle-3 {
        width: 32px;
        height: 32px;
    }

    /* Section header */
    .section-header { margin-bottom: 56px; }

    .section-tag {
        font-size: 11px;
        letter-spacing: 3px;
        padding-left: 28px;
    }

    .section-tag::before { width: 20px; }

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

    .section-subtitle { font-size: 15px; }

    .section-subtitle br { display: none; }

    /* About */
    .about-text h3 { font-size: 28px; }
    .about-info { padding: 24px 20px; }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .info-label {
        width: auto;
        font-size: 12px;
        letter-spacing: 1px;
        color: var(--c-cyan);
        text-transform: uppercase;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-card { padding: 28px 20px; }
    .stat-number { font-size: 40px; }
    .stat-suffix { font-size: 22px; }

    /* Service */
    .service-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .service-card { padding: 28px 22px; }

    .service-icon {
        width: 52px;
        height: 52px;
        margin-bottom: 20px;
    }

    .service-icon svg {
        width: 24px;
        height: 24px;
    }

    .service-card h3 { font-size: 19px; }

    /* Portfolio */
    .portfolio-filter {
        gap: 6px;
        margin-bottom: 32px;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    .portfolio-filter::-webkit-scrollbar { height: 0; }

    .filter-btn {
        padding: 8px 16px;
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .portfolio-info { padding: 20px; }
    .portfolio-info h4 { font-size: 17px; }

    .portfolio-cta {
        padding: 48px 24px;
        margin-top: 48px;
    }

    .portfolio-cta p { font-size: 16px; }

    /* Clients */
    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-bottom: 48px;
    }

    .contact-card { padding: 28px 22px; }

    .contact-icon {
        width: 50px;
        height: 50px;
    }

    .contact-detail { font-size: 17px; }

    .contact-cta {
        padding: 52px 24px;
    }

    .contact-cta h3 { font-size: 26px; }
    .contact-cta p { font-size: 15px; }

    .contact-cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .contact-cta-buttons .btn { width: 100%; }

    /* Footer */
    #footer { padding: 72px 0 24px; }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 36px;
        padding-bottom: 40px;
    }

    .footer-info h5,
    .footer-contact h5,
    .footer-links h5 {
        margin-bottom: 16px;
    }

    .placeholder-label { font-size: 12px; }
    .placeholder-sublabel { font-size: 10px; }
}

/* ===== Small mobile ===== */
@media (max-width: 480px) {
    .hero-title { font-size: 34px; }
    .section-title { font-size: 24px; }
    .stat-number { font-size: 34px; }
    .contact-cta h3 { font-size: 22px; }

    .service-badge {
        padding: 6px 12px;
        font-size: 11px;
    }

    .badge-1 { top: 8%; left: 0; }
    .badge-2 { top: 18%; right: 0; }
    .badge-3 { bottom: 24%; left: -4%; }
    .badge-4 { bottom: 8%; right: -4%; }
}
