/**
 * QuickSite Custom Enhancements & Mobile Responsive Optimization
 */

/* Floating WhatsApp chat button (marketing site) — number is admin-editable via
   Admin > Settings > Support, see AdminSettingsController::FIELDS['support.whatsapp_number']. */
.wa-float-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease;
}
.wa-float-btn:hover {
    transform: scale(1.08);
    color: #fff;
}
.wa-float-btn-icon {
    width: 28px;
    height: 28px;
}

/* Prevent horizontal scroll wobble */
html, body {
    overflow-x: clip;
    max-width: 100vw;
}

/* "Why Small Businesses Choose..." highlight cards — icon+text side-by-side on mobile
   (saves vertical height / reduces scroll), reverts to the original icon-on-top stacked
   layout at desktop widths where height isn't a concern. */
.highlight-card-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}
.highlight-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}
@media (min-width: 768px) {
    .highlight-card-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }
    .highlight-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 2rem;
    }
}

#smooth-wrapper, #smooth-content {
    overflow-x: clip !important;
    max-width: 100vw;
}

/* Ensure sections target below fixed navbar */
section[id] {
    scroll-margin-top: 85px;
}

/* Fix marquee containers on mobile */
.image-marque-container {
    overflow: hidden !important;
    max-width: 100%;
}

.marquee {
    overflow: hidden !important;
    max-width: 100vw;
}

/* ============================================================
   Mobile Spacing Normalization (< 768px)
   Reduces huge desktop paddings so mobile isn't an endless scroll
   ============================================================ */
@media (max-width: 767.98px) {
    .py-15 {
        padding-top: 2.75rem !important;
        padding-bottom: 2.75rem !important;
    }
    .py-20, .py-30 {
        padding-top: 3.25rem !important;
        padding-bottom: 3.25rem !important;
    }
    .pt-15, .pt-20, .pt-25 {
        padding-top: 4.5rem !important;
    }
    .mb-10, .mb-12, .mb-15 {
        margin-bottom: 1.75rem !important;
    }
    .section-title {
        font-size: 1.85rem !important;
        line-height: 1.25 !important;
    }
    /* Compact the QR standee card on mobile */
    .qr-standee-box {
        padding: 1.25rem !important;
    }
}

/* ============================================================
   Template Showcase Cards & Progressive Reveal
   ============================================================ */
.template-card {
    background: #0f1019;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.25rem;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.template-card:hover {
    transform: translateY(-6px);
    border-color: rgba(254, 169, 58, 0.4);
    box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.6), 0 0 20px rgba(254, 169, 58, 0.15);
}

.template-card-preview {
    position: relative;
    overflow: hidden;
    background: #151624;
    aspect-ratio: 16 / 10;
}

.template-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.template-card:hover .template-card-preview img {
    transform: scale(1.04);
}

.template-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 11, 20, 0.82);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 1.5rem;
}

.template-card:hover .template-card-overlay {
    opacity: 1;
    visibility: visible;
}

.template-card-body {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.template-badge {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Progressive row reveal container */
.template-extra-rows {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.template-extra-rows.show {
    max-height: 2500px;
    opacity: 1;
}

/* Template frame responsive preview */
.preview-viewport-wrapper {
    transition: width 0.35s ease;
    margin: 0 auto;
    height: calc(100vh - 65px);
    background: #000;
}

.preview-viewport-wrapper.device-desktop {
    width: 100%;
}

.preview-viewport-wrapper.device-tablet {
    width: 768px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
    border-left: 1px solid rgba(255,255,255,0.1);
    border-right: 1px solid rgba(255,255,255,0.1);
}

.preview-viewport-wrapper.device-mobile {
    width: 390px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
    border-left: 1px solid rgba(255,255,255,0.1);
    border-right: 1px solid rgba(255,255,255,0.1);
}

.preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}
