/* ==========================================================================
   GLOBAL MARKETING PAGES COMMON STYLES
   Shared styles between index.blade.php and how-it-works.blade.php
   ========================================================================== */

/* Global Base Styles */
html {
    overflow-x: hidden !important;
    width: 100%;
}

body {
    overflow-x: hidden !important;
    width: 100%;
    position: relative;
    /* Fix mobile scroll blocking */
    -webkit-overflow-scrolling: touch !important;
}

body {
    background-color: #ffffff !important;
}

section {
    position: relative;
    background: #ffffff;
}

/* Hero Section - Standardized */
.hero-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

/* Hero Wave */
.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.hero-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

/* Feature Cards - Unified Definition */
.feature-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.15);
    transform: translateY(-5px);
}

/* Platform Icons */
.platform-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Background Colors */
.bg-light-blue {
    background-color: #f5f9ff !important;
}

/* Animations - Global */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* GPU acceleration for smooth transforms */
.feature-card,
.platform-card,
.step-card,
.screenshot-card {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Accessibility: Respect 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;
    }
}

/* ==========================================================================
   MOBILE RESPONSIVE STYLES (Under 550px)
   Global Mobile Scale-Down - Applies to ALL pages and elements
   ========================================================================== */
@media (max-width: 550px) {
    /* Global mobile scale-down via font-size reduction */
    html {
        font-size: 88% !important;
    }

    /* Prevent horizontal scroll */
    .container,
    .container-fluid {
        max-width: 100% !important;
        overflow-x: hidden !important;
        padding-left: 0.875rem !important;
        padding-right: 0.875rem !important;
    }

    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    section {
        overflow-x: hidden !important;
    }

    /* Section spacing - scaled down */
    section.py-7,
    .py-7 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    section.py-6,
    .py-6 {
        padding-top: 1.25rem !important;
        padding-bottom: 1.25rem !important;
    }

    section.py-5,
    .py-5 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    section.py-4,
    .py-4 {
        padding-top: 0.875rem !important;
        padding-bottom: 0.875rem !important;
    }

    /* Margin utilities - scaled down */
    .mb-5 { margin-bottom: 1rem !important; }
    .mb-4 { margin-bottom: 0.75rem !important; }
    .mb-3 { margin-bottom: 0.5rem !important; }
    .mt-5 { margin-top: 1rem !important; }
    .mt-4 { margin-top: 0.75rem !important; }
    .my-5 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
    .my-4 { margin-top: 0.75rem !important; margin-bottom: 0.75rem !important; }

    /* Padding utilities - scaled down */
    .p-5 { padding: 1rem !important; }
    .p-4 { padding: 0.875rem !important; }
    .p-3 { padding: 0.625rem !important; }
    .px-5 { padding-left: 1rem !important; padding-right: 1rem !important; }
    .px-4 { padding-left: 0.875rem !important; padding-right: 0.875rem !important; }

    /* Headings scale-down */
    h1, .h1 {
        font-size: calc(1.2rem + 1.8vw) !important;
        margin-bottom: 0.75rem !important;
    }

    h2, .h2 {
        font-size: calc(1rem + 1.3vw) !important;
        margin-bottom: 0.65rem !important;
    }

    h3, .h3 {
        font-size: calc(0.9rem + 0.5vw) !important;
        margin-bottom: 0.5rem !important;
    }

    h4, .h4 {
        font-size: calc(0.85rem + 0.3vw) !important;
    }

    h5, .h5, h6, .h6 {
        font-size: 0.9rem !important;
    }

    .display-1 {
        font-size: calc(2rem + 3vw) !important;
    }

    .display-2 {
        font-size: calc(1.8rem + 2.8vw) !important;
    }

    .display-3 {
        font-size: calc(1.4rem + 2.2vw) !important;
    }

    .display-4 {
        font-size: calc(1.2rem + 1.8vw) !important;
    }

    .display-5 {
        font-size: calc(1rem + 1.3vw) !important;
    }

    .display-6 {
        font-size: calc(0.9rem + 1vw) !important;
    }

    .lead {
        font-size: 0.95rem !important;
    }

    /* Paragraph text */
    p {
        font-size: 0.9rem !important;
    }

    /* Cards and components - tighter spacing */
    .card {
        padding: 1rem !important;
        margin-bottom: 0.875rem !important;
    }

    .card-body {
        padding: 1rem !important;
    }

    .card-header,
    .card-footer {
        padding: 0.75rem 1rem !important;
    }

    .feature-card {
        padding: 1.25rem !important;
        margin-bottom: 1rem !important;
    }

    /* Pricing cards - comprehensive scaling */
    .pricing-card,
    .price-card,
    [class*="pricing"] .card {
        padding: 1.25rem !important;
    }

    .pricing-card .card-header,
    .price-card .card-header {
        padding: 0.875rem !important;
    }

    .pricing-card .card-body,
    .price-card .card-body {
        padding: 1rem !important;
    }

    /* Price amounts */
    .price,
    .pricing-price,
    [class*="price-amount"] {
        font-size: calc(1.5rem + 1vw) !important;
    }

    /* Buttons - scaled down */
    .btn {
        font-size: 0.85rem !important;
        padding: 0.5rem 0.875rem !important;
    }

    .btn-lg {
        font-size: 0.95rem !important;
        padding: 0.625rem 1.125rem !important;
    }

    .btn-sm {
        font-size: 0.75rem !important;
        padding: 0.375rem 0.625rem !important;
    }

    /* Icons - scaled proportionally */
    .platform-icon,
    .feature-icon,
    [class*="icon-"] {
        font-size: 2.25rem !important;
    }

    i.fa,
    i.fas,
    i.far,
    i.fab {
        font-size: 0.9em !important;
    }

    /* Form inputs and controls */
    .form-control,
    .form-select,
    textarea.form-control {
        font-size: 0.875rem !important;
        padding: 0.5rem 0.75rem !important;
    }

    .form-label {
        font-size: 0.85rem !important;
        margin-bottom: 0.375rem !important;
    }

    .input-group-text {
        font-size: 0.875rem !important;
        padding: 0.5rem 0.75rem !important;
    }

    /* Badges and labels */
    .badge {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.5rem !important;
    }

    /* Alerts */
    .alert {
        font-size: 0.875rem !important;
        padding: 0.75rem 1rem !important;
    }

    /* Lists */
    ul, ol {
        padding-left: 1.25rem !important;
    }

    li {
        font-size: 0.9rem !important;
        margin-bottom: 0.375rem !important;
    }

    .list-group-item {
        padding: 0.625rem 0.875rem !important;
        font-size: 0.9rem !important;
    }

    /* Tables */
    table {
        font-size: 0.85rem !important;
    }

    th, td {
        padding: 0.5rem !important;
    }

    /* Modals */
    .modal-header {
        padding: 0.875rem 1rem !important;
    }

    .modal-body {
        padding: 1rem !important;
    }

    .modal-footer {
        padding: 0.75rem 1rem !important;
    }

    .modal-title {
        font-size: 1.1rem !important;
    }

    /* Breadcrumbs */
    .breadcrumb {
        font-size: 0.8rem !important;
        padding: 0.5rem 0.75rem !important;
    }

    /* Pagination */
    .pagination {
        font-size: 0.85rem !important;
    }

    .page-link {
        padding: 0.375rem 0.625rem !important;
    }

    /* Nav tabs and pills */
    .nav-link {
        font-size: 0.875rem !important;
        padding: 0.5rem 0.875rem !important;
    }

    /* Images - maintain aspect ratio but scale */
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Testimonials and quotes */
    blockquote {
        font-size: 0.9rem !important;
        padding: 0.75rem 1rem !important;
    }

    /* Feature lists and check items */
    .check-icon,
    [class*="check"] i {
        font-size: 1rem !important;
    }

    /* Spacing between sections */
    .section-gap,
    section + section {
        margin-top: 1rem !important;
    }

    /* Grid gaps */
    .g-4, .gx-4, .gy-4 {
        --bs-gutter-x: 0.875rem !important;
        --bs-gutter-y: 0.875rem !important;
    }

    .g-5, .gx-5, .gy-5 {
        --bs-gutter-x: 1rem !important;
        --bs-gutter-y: 1rem !important;
    }

    /* Offcanvas */
    .offcanvas-header {
        padding: 0.875rem 1rem !important;
    }

    .offcanvas-body {
        padding: 1rem !important;
    }

    /* Accordion */
    .accordion-button {
        font-size: 0.9rem !important;
        padding: 0.75rem 1rem !important;
    }

    .accordion-body {
        padding: 1rem !important;
        font-size: 0.875rem !important;
    }

    /* Progress bars */
    .progress {
        height: 0.875rem !important;
        font-size: 0.7rem !important;
    }

    /* Spinners and loaders */
    .spinner-border,
    .spinner-grow {
        width: 1.5rem !important;
        height: 1.5rem !important;
    }

    /* Toast notifications */
    .toast {
        font-size: 0.85rem !important;
    }

    .toast-header {
        padding: 0.5rem 0.75rem !important;
    }

    .toast-body {
        padding: 0.75rem !important;
    }

    /* ============================================
       PAGE-SPECIFIC MOBILE FIXES
       ============================================ */

    /* Home Section - Carousel Logos */
    .carousel-logo {
        height: 35px !important;
        max-width: 120px !important;
    }

    /* Footer - Logo and Trust Badges */
    .footer-logo img {
        max-height: 35px !important;
        width: auto !important;
    }

    .trust-badge {
        height: 28px !important;
        width: auto !important;
        margin: 0.25rem !important;
    }

    /* Contact Form - Hide "Support Department" label text */
    label[for="department"] {
        font-size: 0 !important;
        line-height: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Guide Menu - Fix Mobile Distortion */
    .mobile-nav-bar {
        padding: 12px 16px !important;
    }

    .mobile-nav-bar-inner {
        gap: 8px !important;
        flex-wrap: nowrap !important;
    }

    .mobile-nav-label {
        font-size: 13px !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }

    .mobile-nav-select {
        font-size: 13px !important;
        padding: 10px 12px !important;
        padding-right: 36px !important;
    }

    /* Pricing Cards - Scale down significantly on mobile */
    .pricing-card,
    .price-card,
    [class*="pricing"] .card,
    .card.pricing-plan {
        transform: scale(0.85) !important;
        transform-origin: top center !important;
        margin-bottom: 0.5rem !important;
    }

    /* How It Works - Step Number Badges */
    .step-badge {
        width: 45px !important;
        height: 45px !important;
        font-size: 1.3rem !important;
        margin-bottom: 1rem !important;
    }
}

/* Extra small phones - additional scale-down */
@media (max-width: 400px) {
    html {
        font-size: 85% !important;
    }

    .container,
    .container-fluid {
        padding-left: 0.625rem !important;
        padding-right: 0.625rem !important;
    }

    section.py-7,
    .py-7 {
        padding-top: 1.25rem !important;
        padding-bottom: 1.25rem !important;
    }

    section.py-6,
    .py-6 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .card,
    .feature-card {
        padding: 0.875rem !important;
    }

    .card-body {
        padding: 0.875rem !important;
    }

    h1, .h1 {
        font-size: calc(1.1rem + 1.5vw) !important;
    }

    h2, .h2 {
        font-size: calc(0.95rem + 1.2vw) !important;
    }

    .display-3 {
        font-size: calc(1.3rem + 2vw) !important;
    }

    .btn {
        font-size: 0.8rem !important;
        padding: 0.45rem 0.75rem !important;
    }

    .btn-lg {
        font-size: 0.9rem !important;
        padding: 0.55rem 1rem !important;
    }

    /* Extra small - Additional logo scaling */
    .carousel-logo {
        height: 30px !important;
        max-width: 100px !important;
    }

    .footer-logo img {
        max-height: 30px !important;
    }

    .trust-badge {
        height: 24px !important;
    }

    /* Extra small - Guide menu further optimization */
    .mobile-nav-label {
        font-size: 12px !important;
    }

    .mobile-nav-select {
        font-size: 12px !important;
        padding: 8px 10px !important;
        padding-right: 32px !important;
    }

    /* Extra small - Pricing cards even smaller */
    .pricing-card,
    .price-card,
    [class*="pricing"] .card,
    .card.pricing-plan {
        transform: scale(0.78) !important;
    }

    /* Extra small - Step badges smaller */
    .step-badge {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.1rem !important;
    }
}
