/* ═══════════════════════════════════════════════════════════
   JAMAYAAI PORTAL — RESPONSIVE CSS  (FIXED v2)
   Add this file as: /wp-content/themes/Theme/templates/responsive.css
   Then add in header.php:
   <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/templates/responsive.css">
   ═══════════════════════════════════════════════════════════ */

/* ── MOBILE NAV TOGGLE BUTTONS (hidden on desktop) ─────────── */

/* LEFT toggle — opens sidebar-avatar */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 10000;
    background: rgba(108, 69, 235, 0.9);
    border: 1px solid rgba(0, 255, 255, 0.4);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    backdrop-filter: blur(6px);
}
.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}
.mobile-menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* RIGHT toggle — opens sidebar-business (Settings panel) */
.mobile-settings-btn {
    display: none;
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 10000;
    background: rgba(108, 69, 235, 0.9);
    border: 1px solid rgba(0, 255, 255, 0.4);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.mobile-settings-btn svg {
    width: 18px;
    height: 18px;
    stroke: #fff;
    fill: none;
    flex-shrink: 0;
}

/* ── OVERLAY when any mobile sidebar is open ─────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9000;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ════════════════════════════════════════════════════════════
   BREAKPOINT 1: TABLET  ≤ 1200px
   ════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {

    .h-stats .stat-box:nth-child(n+6) { display: none; }

    .stat-box {
        min-width: 80px;
        padding: 4px 8px;
    }
    .s-num { font-size: 17px; }
    .s-lbl { font-size: 7.5px; }
    .stat-icons { gap: 3px; }
    .stat-icon svg { width: 13px; height: 13px; }
    .icon-count { font-size: 7px; }

    .sidebar-avatar { width: 160px; }
    .sidebar-business { width: 140px; padding: 10px; }
}

/* ════════════════════════════════════════════════════════════
   BREAKPOINT 2: SMALL TABLET  ≤ 992px
   ════════════════════════════════════════════════════════════ */
@media (max-width: 992px) {

    .h-stats .stat-box:nth-child(n+4) { display: none; }
    .h-contact .lbl { display: none; }
    .logo-text { font-size: 16px; }

    .portal-container { padding: 0; position: relative; }

    /* sidebar-avatar: slides in from LEFT */
    .sidebar-avatar {
        position: fixed;
        left: -260px;
        top: 110px;
        bottom: 0;
        width: 240px;
        z-index: 9500;
        transition: left 0.3s ease;
        overflow-y: auto;
        height: calc(100vh - 110px);
    }
    .sidebar-avatar.open { left: 0; }

    /* sidebar-business: slides in from RIGHT — FIXED */
    .sidebar-business {
        position: fixed;
        right: -260px;      /* off-screen to the RIGHT */
        left: auto !important;
        top: 110px;
        bottom: 0;
        width: 240px;
        z-index: 9500;      /* same level as avatar sidebar */
        transition: right 0.3s ease;
        overflow-y: auto;
        height: calc(100vh - 110px);
    }
    .sidebar-business.open {
        right: 0;           /* slides in from right edge */
        left: auto !important;
    }

    .main-area { width: 100%; }

    /* Show both mobile toggles */
    .mobile-menu-btn { display: flex; }
    .mobile-settings-btn { display: flex; }

    header { padding-left: 52px; padding-right: 52px; }
    .h-logo { padding-left: 8px; }

    .footer-inner { flex-direction: column; gap: 0; }
    .footer-left { width: 100%; justify-content: center; padding: 16px; border-bottom: 1px solid rgba(0,255,255,0.1); }
    .footer-right { padding: 16px; }
    .fsf-grid, .fsf-row2, .fsf-row { flex-direction: column; gap: 10px; }
    .fsf-field.w1, .fsf-field.w2, .fsf-field.w3 { max-width: 100%; }
    .fsf-name-logo { flex-direction: row; }

    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

/* ════════════════════════════════════════════════════════════
   BREAKPOINT 3: MOBILE  ≤ 768px
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    header {
        height: 70px;
        padding-left: 52px;
        padding-right: 52px;
    }
    .h-logo .logo img { height: 44px; }
    .logo-text { font-size: 14px; letter-spacing: 0; }
    .h-sep { display: none; }
    .h-contact { padding: 0 10px; }
    .h-contact .val { font-size: 11px; }

    .h-stats { display: none; }
    .h-spacer { display: none; }

    .h-avatar { width: 38px; height: 38px; }
    .h-icon { width: 28px; height: 28px; }
    .h-icon svg { width: 14px; height: 14px; }

    /* sidebar-avatar: full-width from LEFT */
    .sidebar-avatar {
        top: 70px;
        height: calc(100vh - 70px);
        left: -100vw;
        width: 80vw;
        max-width: 280px;
    }
    .sidebar-avatar.open { left: 0; }

    /* sidebar-business: full-width from RIGHT — FIXED */
    .sidebar-business {
        top: 70px;
        height: calc(100vh - 70px);
        right: -100vw !important;
        left: auto !important;
        width: 80vw;
        max-width: 280px;
        transition: right 0.3s ease !important;
    }
    .sidebar-business.open {
        right: 0 !important;
        left: auto !important;
    }

    .product-main-content { padding: 16px; }

    .hero_agent { padding: 40px 20px 36px; }
    .hero_agent h1 { font-size: clamp(1.5rem, 6vw, 2.4rem); }
    .hero-sub { font-size: 0.92rem; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn-primary,
    .hero-actions .btn-secondary,
    .hero-actions button { width: 100%; text-align: center; }

    .value-strip { flex-wrap: wrap; }
    .value-item { flex: 1 1 calc(50% - 1px); min-width: 0; padding: 16px 12px; }
    .value-num { font-size: 1.5rem; }

    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table { min-width: 600px; }

    .features-grid { grid-template-columns: 1fr; }

    .guarantee { padding: 28px 20px; }

    .team-grid { gap: 14px; }
    .team-card { padding: 20px 24px; min-width: 130px; }

    .cta-section { padding: 50px 20px; }
    .cta-section h2 { font-size: clamp(1.5rem, 5vw, 2.4rem); }

    .section { padding: 48px 20px; }

    .footer { padding: 24px 16px 16px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .ai-footer { padding: 0; }
    .footer-right { padding: 12px; }

    .agent-details-header { padding: 28px 16px; }
    .agent-details-content { padding: 20px 16px; }
    .agent-hero { flex-direction: column; text-align: center; }
    .agent-hero-icon { width: 100px; height: 100px; font-size: 60px; }
    .agent-hero-info h1 { font-size: 28px; }
    .agent-meta { justify-content: center; }
    .action-buttons { flex-direction: column; }
    .btn-primary-agent,
    .btn-secondary-agent,
    .btn-trial-agent { width: 100%; justify-content: center; }
    .benefits-grid { grid-template-columns: 1fr; }
    .cta-box { padding: 32px 16px; }
    .cta-box h2 { font-size: 26px; }
    .btn-cta-large { width: 100%; justify-content: center; font-size: 16px; }

    .employee-form-container { padding: 20px; }
    .form-wrapper { padding: 16px; }
    .form-grid { grid-template-columns: 1fr; }

    #home-content { height: calc(100vh - 70px); }
}

/* ════════════════════════════════════════════════════════════
   BREAKPOINT 4: SMALL MOBILE  ≤ 480px
   ════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {

    .logo-text { display: none; }
    .h-logo .logo img { height: 38px; }
    .h-contact { display: none; }
    .h-actions { gap: 6px; padding: 0 8px; }

    .value-item { flex: 1 1 100%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.06); }
    .value-item:last-child { border-bottom: none; }

    .footer-grid { grid-template-columns: 1fr; }

    .team-card { min-width: 100px; padding: 16px; }
    .team-avatar { width: 48px; height: 48px; font-size: 1.1rem; }

    .section { padding: 36px 16px; }
    .section-title { font-size: 1.6rem; }
}

/* ════════════════════════════════════════════════════════════
   UTILITY
   ════════════════════════════════════════════════════════════ */
img { max-width: 100%; height: auto; }
iframe.content-view { max-width: 100%; }
