/* Header mobile menu/hamburger */
.mobile-action-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 8px; background: rgba(15,23,42,0.04); border: 1px solid rgba(15,23,42,0.06); cursor: pointer; color: var(--primary-color); margin-left: 12px; }
.mobile-action-toggle .bar { width: 20px; height: 2px; background: currentColor; display: block; position: relative; }
.mobile-action-toggle .bar::before, .mobile-action-toggle .bar::after { content: ''; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; }
.mobile-action-toggle .bar::before { top: -6px; }
.mobile-action-toggle .bar::after { top: 6px; }
.mobile-action-menu { position: absolute; top: 70px; right: 24px; background: white; border: 1px solid var(--border-color); border-radius: 10px; box-shadow: 0 10px 30px rgba(2,6,23,0.08); padding: 8px; display: none; min-width: 200px; z-index: 1200; }
.mobile-action-menu.open { display: block; }
.mobile-action-menu a { display: flex; gap: 12px; padding: 10px 12px; align-items: center; border-radius: 8px; color: var(--text-dark); text-decoration: none; font-weight: 600; }
.mobile-action-menu a:hover { background: #F8FAFC; }
@media (min-width: 992px) {
    .mobile-action-toggle, .mobile-action-menu { display: none !important; }
}
/* Mobile-first responsive overrides for Festly Landing */
:root {
    --hero-padding-mobile: 36px;
}

/* Base (mobile-first) */
.hero-saas { padding: var(--hero-padding-mobile) !important; overflow: visible; }
.hero-grid { display: grid !important; grid-template-columns: 1fr; gap: 18px !important; align-items: center; }
.hero-content h1 { font-size: 1.9rem !important; line-height: 1.12 !important; margin-bottom: 12px !important; }
.hero-content p { font-size: 1rem !important; line-height: 1.5 !important; margin-bottom: 16px !important; }
.hero-actions { display: flex !important; flex-direction: column; gap: 12px; margin-bottom: 18px !important; }
.hero-actions .btn-festly-primary { width: 100% !important; display: inline-flex; justify-content: center; }
.hero-actions .btn-festly-outline { width: 100% !important; display: inline-flex; justify-content: center; }
.mockup-wrapper { transform: none !important; box-shadow: none !important; max-width: 100% !important; margin: 0 auto; }
.mockup-wrapper img { width: 100% !important; height: auto !important; display: block !important; }
.hero-visual { order: 2 !important; }
.hero-content { order: 1 !important; }
.section-padding { padding: 60px 16px !important; }
.section-header h2 { font-size: 1.6rem !important; }
.pain-grid, .feature-list { grid-template-columns: 1fr !important; }
.testimonial-slide { flex: 0 0 100% !important; }
.mobile-sticky-cta { display: block !important; }

/* Improved sticky CTA behaviour to avoid horizontal overflow and adapt to desktop */
.mobile-sticky-cta {
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .mobile-sticky-cta {
        position: fixed !important;
        left: 50% !important;
        right: auto !important;
        bottom: 16px !important;
        padding: 0 !important;
        border-radius: 12px !important;
        transform: translate(-50%, 120%);
        transition: transform 0.36s cubic-bezier(0.16,1,0.3,1) !important;
        overflow: hidden !important;
        width: calc(100% - 32px) !important;
        max-width: 720px !important;
        box-shadow: 0 20px 40px rgba(2,6,23,0.08) !important;
    }
    .mobile-sticky-cta.visible { transform: translate(-50%, 0) !important; }
    .mobile-sticky-cta .container { padding: 0 !important; max-width: none !important; }
    .mobile-sticky-cta .btn-festly { border-radius: 10px; margin: 0 !important; display: block; width: 100% !important; box-sizing: border-box !important; }
    /* Prevent horizontal scroll when sticky is visible */
    body.has-sticky-cta { overflow-x: hidden !important; }
}

@media (min-width: 769px) {
    /* hide sticky on larger screens and keep button in flow */
    .mobile-sticky-cta { display: none !important; position: static !important; transform: none !important; }
}

/* Mobile actions toggle/menu */
.mobile-action-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 8px; background: rgba(15,23,42,0.04); border: 1px solid rgba(15,23,42,0.06); cursor: pointer; }
.mobile-action-toggle .bar { width: 20px; height: 2px; background: currentColor; display: block; position: relative; }
.mobile-action-toggle .bar::before, .mobile-action-toggle .bar::after { content: ''; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; }
.mobile-action-toggle .bar::before { top: -6px; }
.mobile-action-toggle .bar::after { top: 6px; }
.mobile-action-toggle { color: var(--primary-color); }

.mobile-action-menu { position: absolute; top: 56px; right: 16px; background: white; border: 1px solid var(--border-color); border-radius: 10px; box-shadow: 0 10px 30px rgba(2,6,23,0.08); padding: 8px; display: none; min-width: 180px; z-index: 1200; }
.mobile-action-menu.open { display: block; }
.mobile-action-menu a { display: flex; gap: 12px; padding: 10px 12px; align-items: center; border-radius: 8px; color: var(--text-dark); text-decoration: none; font-weight: 600; }
.mobile-action-menu a:hover { background: #F8FAFC; }

@media (min-width: 769px) {
    .mobile-action-toggle, .mobile-action-menu { display: none !important; }
}

/* Touch targets */
.btn-festly, .btn-festly-primary, .btn-festly-outline { min-height: 48px !important; padding: 12px 16px !important; font-size: 1rem !important; }

/* Image defaults to avoid CLS */
img { max-width: 100%; height: auto; display: block; }

/* Defensive: prevent horizontal overflow on small viewports caused by absolute/fixed elements */
html, body { max-width: 100%; overflow-x: hidden; }

/* Larger screens */
@media (min-width: 640px) {
    .hero-content h1 { font-size: 2.4rem !important; }
    .section-padding { padding: 72px 24px !important; }
}

@media (min-width: 768px) {
    .hero-grid { grid-template-columns: 1.2fr 1fr !important; gap: 40px !important; }
    .hero-content h1 { font-size: 3rem !important; }
    .hero-actions { flex-direction: row !important; justify-content: flex-start !important; }
    .hero-actions .btn-festly-primary, .hero-actions .btn-festly-outline { width: auto !important; }
}

@media (min-width: 1024px) {
    .hero-saas { padding: 100px 0 120px !important; }
    .hero-content h1 { font-size: 3.8rem !important; }
    .hero-visual { order: initial !important; }
}
