/* ================================================================
   SkarduX Mobile & Responsive CSS
   Premium mobile-first SaaS experience.
   Linked AFTER style.css on every page.
   ================================================================ */

/* ── Hamburger Menu Button ─────────────────────────────────────── */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
    -webkit-tap-highlight-color: transparent;
}
.hamburger-btn svg {
    width: 26px;
    height: 26px;
    fill: var(--text-main, #1a1a2e);
}

/* ── Mobile Drawer ─────────────────────────────────────────────── */
.mobile-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mobile-drawer-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    max-width: 85vw;
    height: 100%;
    background: white;
    z-index: 9999;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.mobile-drawer.active {
    right: 0;
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color, #eee);
}
.mobile-drawer-header .logo {
    font-size: 1.1rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-main, #1a1a2e);
    display: flex;
    align-items: center;
    gap: 8px;
}
.mobile-drawer-header .logo span {
    color: var(--primary, #8B5CF6);
}
.mobile-drawer-header .logo svg {
    width: 22px;
    height: 22px;
}

.mobile-drawer-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    -webkit-tap-highlight-color: transparent;
}
.mobile-drawer-close svg {
    width: 24px;
    height: 24px;
    fill: var(--text-muted, #666);
}

.mobile-drawer-nav {
    padding: 16px 0;
}
.mobile-drawer-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main, #1a1a2e);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    border-left: 3px solid transparent;
}
.mobile-drawer-nav a:hover,
.mobile-drawer-nav a.active {
    background: var(--primary-light, #f5f0ff);
    color: var(--primary, #8B5CF6);
    border-left-color: var(--primary, #8B5CF6);
}
.mobile-drawer-nav a svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

.mobile-drawer-cta {
    padding: 16px 24px 24px;
    border-top: 1px solid var(--border-color, #eee);
}
.mobile-drawer-cta .btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 24px;
    background: var(--primary, #8B5CF6);
    color: white;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.3s ease;
}
.mobile-drawer-cta .btn:hover {
    background: #6D28D9;
}

/* ── Prevent body scroll when drawer is open ───────────────────── */
body.drawer-open {
    overflow: hidden;
}

/* ── Bottom Navigation Bar (Mobile Only) ──────────────────────── */
.mobile-bottom-nav {
    display: none;
}

/* ================================================================
   TABLET — max-width: 1024px
   ================================================================ */
@media (max-width: 1024px) {
    .page-hero h1,
    .blog-hero h1 {
        font-size: 3rem;
    }
    .page-hero p,
    .blog-hero p {
        font-size: 1.1rem;
    }
    .about-mission,
    .contact-section {
        gap: 40px;
    }
    .prefooter-card {
        gap: 40px;
    }

    /* Scale hero visual */
    .hero-visual-container {
        max-width: 800px;
        height: 340px;
    }
    .hero-main-icon {
        width: 90px;
        height: 90px;
        border-radius: 24px;
    }
    .hero-main-icon svg {
        width: 48px;
        height: 48px;
    }
    .floater {
        transform: translate(-50%, -50%) scale(0.85);
    }
    .avatar-left {
        width: 76px;
        height: 88px;
    }
    .avatar-right {
        width: 64px;
        height: 74px;
    }

    /* Core solutions */
    .core-visual-container {
        height: 480px;
    }
    .cloud-avatar {
        width: 130px !important;
        height: 160px !important;
    }
}

/* ================================================================
   MOBILE — max-width: 768px
   ================================================================ */
@media (max-width: 768px) {
    /* ── Show hamburger, hide desktop nav + demo button ─────── */
    .hamburger-btn {
        display: flex;
        align-items: center;
    }
    .nav-actions .btn {
        display: none;
    }

    /* ── Header — compact, sticky feel ─────────────────────── */
    header {
        padding: 10px 16px;
    }
    header .logo {
        font-size: 1rem;
    }

    /* ── Bottom Nav — show on mobile ───────────────────────── */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        z-index: 9990;
        justify-content: space-around;
        align-items: center;
        padding: 0 8px;
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    .mobile-bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        text-decoration: none;
        color: var(--text-muted, #999);
        font-size: 0.65rem;
        font-weight: 600;
        letter-spacing: 0.02em;
        padding: 6px 0;
        min-width: 56px;
        transition: color 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }
    .mobile-bottom-nav a svg {
        width: 22px;
        height: 22px;
        fill: currentColor;
        transition: fill 0.2s ease;
    }
    .mobile-bottom-nav a.active,
    .mobile-bottom-nav a:hover {
        color: var(--primary, #8B5CF6);
    }

    /* Add bottom padding to body so content isn't hidden behind bottom nav */
    body {
        padding-bottom: 72px;
    }

    /* ──────────────────────────────────────────────────────────
       HERO SECTION — Show ALL animations, properly scaled
       ────────────────────────────────────────────────────────── */
    .hero {
        padding: 100px 16px 40px;
        min-height: auto;
    }
    .hero-visual-container {
        max-width: 100%;
        height: 260px;
        margin-bottom: 16px;
        animation: floatY 6s ease-in-out infinite;
    }
    .hero-main-icon {
        width: 72px;
        height: 72px;
        border-radius: 20px;
        box-shadow: 0 12px 30px rgba(139, 92, 246, 0.3), inset 0 -3px 8px rgba(0,0,0,0.12);
    }
    .hero-main-icon svg {
        width: 38px;
        height: 38px;
    }

    /* Floaters — scale down proportionally, reposition for mobile */
    .floater {
        z-index: 4;
    }
    .floater-yellow {
        width: 40px !important;
        height: 40px !important;
        top: 18% !important;
        left: 15% !important;
        border-radius: 12px !important;
    }
    .floater-yellow svg {
        width: 20px !important;
        height: 20px !important;
    }
    .floater-blue {
        width: 40px !important;
        height: 40px !important;
        top: 75% !important;
        left: 18% !important;
        border-radius: 12px !important;
    }
    .floater-blue svg {
        width: 20px !important;
        height: 20px !important;
    }
    .floater-red {
        width: 40px !important;
        height: 40px !important;
        top: 20% !important;
        left: 82% !important;
        border-radius: 12px !important;
    }
    .floater-red svg {
        width: 20px !important;
        height: 20px !important;
    }
    .floater-eyes {
        width: 48px !important;
        height: 48px !important;
        top: 72% !important;
        left: 85% !important;
        border-radius: 14px !important;
    }
    .floater-eyes svg {
        width: 28px !important;
        height: 28px !important;
    }

    /* Connection lines — scale and show */
    .connection-lines {
        opacity: 0.4;
    }

    /* Hero avatars — smaller, repositioned */
    .hero-avatar {
        z-index: 3;
    }
    .avatar-left {
        width: 52px !important;
        height: 60px !important;
        border-radius: 14px !important;
        left: 5% !important;
        top: 50% !important;
        border-width: 2px !important;
    }
    .avatar-right {
        width: 44px !important;
        height: 50px !important;
        border-radius: 12px !important;
        left: 90% !important;
        top: 55% !important;
        border-width: 2px !important;
    }

    /* Hero text */
    .hero-slide h1,
    .hero h1 {
        font-size: 2.2rem !important;
        letter-spacing: -1px;
    }
    .hero-slide p,
    .hero p {
        font-size: 0.95rem !important;
        margin-bottom: 20px !important;
    }
    .hero-slide p br,
    .hero p br {
        display: none;
    }
    .hero-actions {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
    .hero-actions .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: 14px 28px !important;
        font-size: 0.95rem !important;
    }

    /* ──────────────────────────────────────────────────────────
       CORE SOLUTIONS (Growth-Driven Marketing) — Fully responsive
       ────────────────────────────────────────────────────────── */
    .core-solutions {
        min-height: auto;
        padding: 60px 16px;
    }
    .core-visual-container {
        height: 420px !important;
        perspective: 800px;
    }
    .cloud-avatar {
        width: 90px !important;
        height: 110px !important;
        border-radius: 16px !important;
        border-width: 2px !important;
    }
    .core-center-icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        margin-bottom: 16px;
    }
    .core-center-icon svg {
        width: 24px;
        height: 24px;
    }
    .core-text-block {
        max-width: 100%;
    }
    .core-text-block h1 {
        font-size: 2rem !important;
        letter-spacing: -1px;
    }
    .core-text-block p {
        font-size: 0.92rem;
        padding: 0 8px;
    }
    .core-text-block p br {
        display: none;
    }
    .core-text-block .btn,
    .core-actions .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
        display: block;
    }

    /* ──────────────────────────────────────────────────────────
       FEATURES GRID — Card-based mobile layout
       ────────────────────────────────────────────────────────── */
    .features,
    .section {
        padding: 60px 16px;
    }
    .features .section-header h2,
    .section .section-header h2 {
        font-size: 1.8rem;
    }
    .features-grid {
        gap: 16px;
    }
    .feature-card {
        min-height: auto !important;
        flex-direction: column !important;
    }
    .feature-card[style*="flex-direction: row"] {
        flex-direction: column !important;
    }
    .feature-card[style*="flex-direction: row"] .card-info {
        max-width: 100% !important;
    }
    .feature-card[style*="flex-direction: row"] .card-visual {
        width: 100% !important;
        height: 160px !important;
    }
    .card-visual {
        height: 180px !important;
    }
    .card-info h3 {
        font-size: 1.1rem;
    }
    .card-info p {
        font-size: 0.88rem;
    }

    /* Feature card inner visuals — scale for mobile */
    .attendance-card,
    .attendance-chart {
        transform: scale(0.85);
    }
    .manager-card {
        transform: scale(0.85);
    }
    .legal-doc {
        transform: scale(0.8);
    }
    .employee-card {
        transform: scale(0.8);
    }
    .teams-container {
        transform: scale(0.8);
    }

    /* ──────────────────────────────────────────────────────────
       INTEGRATIONS WHEEL — Scaled, labels visible, no overlap
       ────────────────────────────────────────────────────────── */
    .integrations {
        padding: 60px 16px;
    }
    .integrations .section-header h2 {
        font-size: 1.6rem;
    }
    .integrations-wheel {
        width: 300px !important;
        height: 300px !important;
    }
    .wheel-center {
        width: 48px;
        height: 48px;
    }
    .wheel-center svg {
        width: 22px;
        height: 22px;
    }
    .wheel-item {
        width: 44px !important;
        height: 44px !important;
        border-radius: 12px !important;
    }
    .wheel-item svg,
    .wheel-item img {
        width: 22px !important;
        height: 22px !important;
    }
    .wheel-item-label {
        font-size: 0.5rem !important;
        bottom: -16px !important;
        opacity: 0 !important;
    }
    .wheel-item.active .wheel-item-label {
        opacity: 1 !important;
    }
    .integration-detail h3 {
        font-size: 1.1rem;
    }
    .integration-detail p {
        font-size: 0.88rem;
    }

    /* ──────────────────────────────────────────────────────────
       TESTIMONIALS — Touch-friendly carousel
       ────────────────────────────────────────────────────────── */
    .testimonials {
        padding: 60px 0;
    }
    .testimonials .section-header {
        padding: 0 16px;
    }
    .testimonials .section-header h2 {
        font-size: 1.6rem;
    }
    .testimonials .section-header p {
        font-size: 0.9rem;
    }
    .testimonial-card {
        min-width: 280px !important;
        max-width: 300px !important;
        padding: 24px !important;
    }

    /* ──────────────────────────────────────────────────────────
       PRE-FOOTER CTA — Stacked, centered
       ────────────────────────────────────────────────────────── */
    .prefooter-cta {
        padding: 40px 16px !important;
    }
    .prefooter-card {
        grid-template-columns: 1fr !important;
        padding: 32px 20px !important;
        text-align: center;
        gap: 28px !important;
    }
    .prefooter-text h2 {
        font-size: 1.6rem !important;
        line-height: 1.2;
    }
    .prefooter-text h2 br {
        display: none;
    }
    .prefooter-text p {
        font-size: 0.92rem;
    }
    .prefooter-text .btn {
        width: 100%;
        display: block;
    }
    .prefooter-visual {
        max-width: 220px;
        max-height: 220px;
        margin: 0 auto;
    }
    .cta-orbit-ring {
        transform: translate(-50%, -50%) scale(0.75);
    }
    .cta-float-badge {
        font-size: 0.65rem !important;
        padding: 6px 10px !important;
        border-radius: 10px !important;
    }

    /* ──────────────────────────────────────────────────────────
       FOOTER — Stacked, centered
       ────────────────────────────────────────────────────────── */
    footer {
        padding: 60px 16px 96px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    /* ── Section Headers (global) ──────────────────────────── */
    .section-header h2 {
        font-size: 1.6rem;
        letter-spacing: -0.5px;
    }
    .section-header p {
        font-size: 0.92rem;
    }

    /* ── Page Hero (about, services, case-studies, etc.) ──── */
    .page-hero,
    .blog-hero {
        padding: 100px 16px 50px;
    }
    .page-hero h1,
    .blog-hero h1 {
        font-size: 2.2rem;
        letter-spacing: -1px;
    }
    .page-hero p,
    .blog-hero p {
        font-size: 0.95rem;
    }

    /* ── About page ────────────────────────────────────────── */
    .about-mission {
        grid-template-columns: 1fr !important;
        padding: 50px 16px;
        gap: 32px;
    }
    .about-mission-text h2 {
        font-size: 1.6rem;
    }
    .about-mission-visual {
        height: 240px;
    }

    /* ── Contact page ──────────────────────────────────────── */
    .contact-section {
        grid-template-columns: 1fr !important;
        padding: 30px 16px 60px;
        gap: 24px;
    }
    .contact-form-card {
        padding: 28px 20px;
        border-radius: 20px;
    }
    .contact-form-card h2 {
        font-size: 1.4rem;
    }

    /* ── Case Studies ──────────────────────────────────────── */
    .case-card {
        grid-template-columns: 1fr !important;
    }
    .case-card-visual {
        height: 200px;
    }

    /* ── Blog ──────────────────────────────────────────────── */
    .blog-filters {
        padding: 0 16px;
        gap: 8px;
    }
    .blog-filter {
        padding: 6px 14px;
        font-size: 0.8rem;
    }
    .blog-grid {
        padding: 0 16px 60px;
    }

    /* ── Article page ──────────────────────────────────────── */
    .article-container {
        padding: 100px 16px 60px;
    }
    .article-container h1 {
        font-size: 1.6rem;
    }
    .article-cta {
        padding: 28px 20px;
    }

    /* ── Testimonials page (standalone) ─────────────────────── */
    .testimonials-page-grid {
        grid-template-columns: 1fr !important;
        padding: 0 16px;
    }

    /* ── FAQ Hub ────────────────────────────────────────────── */
    .faq-grid {
        grid-template-columns: 1fr !important;
    }
    .faq-cats {
        flex-wrap: wrap;
    }

    /* ── Services page ─────────────────────────────────────── */
    .services-grid {
        grid-template-columns: 1fr !important;
    }
    .highlight-card {
        grid-template-columns: 1fr !important;
        padding: 32px 20px !important;
    }
    .highlight-stats {
        grid-template-columns: 1fr !important;
    }

    /* ── Trust stats ───────────────────────────────────────── */
    .trust-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px;
    }

    /* ── Values grid (about page) ──────────────────────────── */
    .values-grid {
        grid-template-columns: 1fr !important;
    }

    /* ── Founder page ──────────────────────────────────────── */
    .founder-hero {
        grid-template-columns: 1fr !important;
        text-align: center;
    }
    .founder-photo {
        max-width: 250px;
        margin: 0 auto;
    }

    /* ── Multistep Form Modal ──────────────────────────────── */
    .msf-modal {
        width: 95vw !important;
        max-height: 90vh !important;
        padding: 28px 20px !important;
        border-radius: 20px !important;
    }

    /* ── View All button ───────────────────────────────────── */
    .view-all-wrap {
        padding: 0 16px;
    }
    .view-all-btn {
        width: 100%;
        justify-content: center;
    }

    /* ── Global overflow prevention ─────────────────────────── */
    html, body {
        overflow-x: hidden;
    }
    img, video, svg, iframe {
        max-width: 100%;
        height: auto;
    }
    .ambient-glow {
        width: 280px !important;
        height: 280px !important;
    }
}

/* ================================================================
   SMALL MOBILE — max-width: 480px
   ================================================================ */
@media (max-width: 480px) {
    header {
        padding: 8px 12px;
    }
    header .logo {
        font-size: 0.95rem;
    }

    /* Hero — compact */
    .hero {
        padding: 90px 12px 32px;
    }
    .hero-visual-container {
        height: 200px;
    }
    .hero-main-icon {
        width: 56px;
        height: 56px;
        border-radius: 16px;
    }
    .hero-main-icon svg {
        width: 30px;
        height: 30px;
    }
    .hero-slide h1,
    .hero h1 {
        font-size: 1.85rem !important;
    }
    .hero-slide p,
    .hero p {
        font-size: 0.88rem !important;
    }

    /* Floaters — even smaller at 480px */
    .floater-yellow {
        width: 32px !important;
        height: 32px !important;
        border-radius: 10px !important;
    }
    .floater-yellow svg {
        width: 16px !important;
        height: 16px !important;
    }
    .floater-blue {
        width: 32px !important;
        height: 32px !important;
        border-radius: 10px !important;
    }
    .floater-blue svg {
        width: 16px !important;
        height: 16px !important;
    }
    .floater-red {
        width: 32px !important;
        height: 32px !important;
        border-radius: 10px !important;
    }
    .floater-red svg {
        width: 16px !important;
        height: 16px !important;
    }
    .floater-eyes {
        width: 36px !important;
        height: 36px !important;
        border-radius: 10px !important;
    }
    .floater-eyes svg {
        width: 22px !important;
        height: 22px !important;
    }

    /* Hero avatars — tiny */
    .avatar-left {
        width: 40px !important;
        height: 46px !important;
        border-radius: 10px !important;
    }
    .avatar-right {
        width: 34px !important;
        height: 40px !important;
        border-radius: 10px !important;
    }

    /* Core solutions */
    .core-visual-container {
        height: 360px !important;
    }
    .cloud-avatar {
        width: 70px !important;
        height: 86px !important;
        border-radius: 14px !important;
    }
    .core-text-block h1 {
        font-size: 1.65rem !important;
    }

    /* Features */
    .features .section-header h2,
    .section .section-header h2 {
        font-size: 1.5rem;
    }
    .card-visual {
        height: 150px !important;
    }

    /* Integrations wheel */
    .integrations-wheel {
        width: 260px !important;
        height: 260px !important;
    }
    .wheel-item {
        width: 38px !important;
        height: 38px !important;
    }
    .wheel-item svg,
    .wheel-item img {
        width: 18px !important;
        height: 18px !important;
    }

    /* Testimonials */
    .testimonial-card {
        min-width: 250px !important;
        max-width: 270px !important;
        padding: 20px !important;
    }

    /* Pre-footer */
    .prefooter-card {
        padding: 24px 16px !important;
    }
    .prefooter-text h2 {
        font-size: 1.4rem !important;
    }

    /* Page hero */
    .page-hero h1,
    .blog-hero h1 {
        font-size: 1.85rem;
    }

    .about-mission-text h2 {
        font-size: 1.4rem;
    }

    .section-header h2 {
        font-size: 1.4rem;
    }

    .footer-bg-text {
        font-size: 5rem !important;
    }

    .article-container h1 {
        font-size: 1.4rem;
    }
    .article-body h2 {
        font-size: 1.2rem;
    }

    .trust-stats {
        grid-template-columns: 1fr !important;
    }

    .mobile-drawer {
        width: 260px;
    }
}

/* ================================================================
   EXTRA SMALL — max-width: 375px
   ================================================================ */
@media (max-width: 375px) {
    .hero-visual-container {
        height: 180px;
    }
    .hero-main-icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }
    .hero-main-icon svg {
        width: 26px;
        height: 26px;
    }
    .hero-slide h1,
    .hero h1 {
        font-size: 1.65rem !important;
    }
    .core-text-block h1 {
        font-size: 1.5rem !important;
    }
    .core-visual-container {
        height: 320px !important;
    }
    .cloud-avatar {
        width: 60px !important;
        height: 74px !important;
    }
    .integrations-wheel {
        width: 220px !important;
        height: 220px !important;
    }
    .wheel-item {
        width: 34px !important;
        height: 34px !important;
    }
    .wheel-item svg,
    .wheel-item img {
        width: 16px !important;
        height: 16px !important;
    }
    .prefooter-visual {
        max-width: 180px;
        max-height: 180px;
    }
    .page-hero h1,
    .blog-hero h1 {
        font-size: 1.65rem;
    }

    /* Floaters — smallest */
    .floater-yellow,
    .floater-blue,
    .floater-red {
        width: 26px !important;
        height: 26px !important;
        border-radius: 8px !important;
    }
    .floater-yellow svg,
    .floater-blue svg,
    .floater-red svg {
        width: 14px !important;
        height: 14px !important;
    }
    .floater-eyes {
        width: 30px !important;
        height: 30px !important;
        border-radius: 8px !important;
    }
    .floater-eyes svg {
        width: 18px !important;
        height: 18px !important;
    }
    .avatar-left {
        width: 34px !important;
        height: 40px !important;
    }
    .avatar-right {
        width: 28px !important;
        height: 34px !important;
    }
}

/* ================================================================
   Touch & Interaction Enhancements
   ================================================================ */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .blog-filter,
    .social-icon,
    .feature-card,
    .blog-card,
    .testimonial-card,
    .case-card,
    .faq-item,
    .mobile-drawer-nav a,
    .view-all-btn,
    .mobile-bottom-nav a {
        -webkit-tap-highlight-color: transparent;
    }
    .feature-card:hover,
    .blog-card:hover,
    .case-card:hover {
        transform: none;
    }
}

/* ================================================================
   Motion: Reduce for prefers-reduced-motion
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .wheel-track {
        animation: none !important;
    }
    .infinite-testimonials-track {
        animation: none !important;
    }
}
