/* ===== RESPONSIVE STYLES ===== */

/* Tablet Landscape and below */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.75rem;
    }

    .solution-cards {
        grid-template-columns: 1fr;
    }

    .solution-cards-5 {
        grid-template-columns: repeat(3, 1fr);
    }

    .pain-simple-grid {
        grid-template-columns: 1fr;
    }

    .features-flow::before {
        left: 30px;
    }

    .feature-item {
        grid-template-columns: 60px 1fr;
        gap: 0.75rem;
    }

    .feature-item .feature-content,
    .feature-item:nth-child(odd) .feature-content,
    .feature-item:nth-child(even) .feature-content {
        grid-column: 2;
        text-align: left;
    }

    .feature-item .feature-visual,
    .feature-item:nth-child(even) .feature-visual {
        grid-column: 2;
        grid-row: 2;
    }

    .feature-step {
        grid-column: 1;
        grid-row: 1 / 3;
        align-self: start;
    }

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

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

    .architecture-diagram {
        flex-direction: column;
    }

    .arch-connector {
        width: 2px;
        height: 40px;
    }

    .arch-connector::after {
        content: '↓';
        right: 50%;
        transform: translateX(50%);
        top: auto;
        bottom: -8px;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    .header-inner {
        padding: 1rem;
    }

    .nav-links {
        display: flex;
        gap: 0;
    }

    .nav-links a:not(.btn) {
        display: none;
    }

    .nav-links .btn {
        display: inline-flex;
        font-size: 0.875rem;
        padding: 0.75rem 1.25rem;
    }

    .hero {
        padding: 6rem 1rem 3rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section {
        padding: 4rem 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .screen-content {
        grid-template-columns: 1fr;
    }

    .screen-right {
        display: none;
    }

    .pain-simple-grid {
        grid-template-columns: 1fr;
    }

    .solution-cards-5 {
        grid-template-columns: 1fr;
    }

    .cta-title {
        font-size: 2rem;
    }

    .footer-inner {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Fix Step 2 plan cards overflow on mobile */
    .plan-cards {
        gap: 0.2rem;
    }

    .plan-card {
        padding: 0.25rem 0.3rem;
        font-size: 0.5rem;
        min-width: 0;
        overflow: hidden;
        word-break: break-all;
    }

    .plan-card-title {
        font-size: 0.55rem;
        margin-bottom: 0.05rem;
        line-height: 1.1;
    }

    .plan-card-price {
        font-size: 0.5rem;
        line-height: 1.1;
    }

    /* Comprehensive mobile fixes for Steps 3-6 */
    .feature-screen {
        max-width: 100%;
        overflow: hidden;
    }

    .feature-screen-body {
        padding: 0.5rem;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    /* Step 3-6: Make all content smaller and contained */
    .mini-chat,
    .pdf-preview,
    .human-chat-header,
    .quote-status,
    .quote-detail,
    .status-timeline {
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }

    .mini-chat-bubble {
        max-width: 70%;
        word-break: break-word;
        font-size: 0.6rem;
        padding: 0.3rem 0.4rem;
    }

    .pdf-preview {
        padding: 0.75rem;
    }

    .pdf-price-value {
        font-size: 0.8rem;
    }

    .human-chat-name,
    .pdf-company {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.6rem;
    }

    .quote-detail-row,
    .quote-status-value {
        word-break: break-word;
        font-size: 0.6rem;
    }

    /* Force all steps visual content to be contained */
    .feature-visual {
        min-height: 220px;
        padding: 0.75rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .header-inner {
        padding: 0.75rem;
    }

    .nav-links .btn {
        font-size: 0.8rem;
        padding: 0.625rem 1rem;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .hero {
        padding: 5rem 1rem 2rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-badge {
        font-size: 0.75rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .section {
        padding: 3rem 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .pain-simple-card {
        padding: 1.5rem;
    }

    .solution-card {
        padding: 1.5rem;
    }

    .feature-item {
        gap: 0.5rem;
        grid-template-columns: 48px 1fr;
    }

    .feature-step {
        width: 48px;
        height: 48px;
        font-size: 1.125rem;
    }

    .feature-title {
        font-size: 1.375rem;
    }

    .feature-desc {
        font-size: 0.875rem;
    }

    /* Enhanced Step 2 plan cards for small mobile */
    .plan-cards {
        gap: 0.15rem;
    }

    .plan-card {
        padding: 0.2rem 0.25rem;
        font-size: 0.45rem;
        border-radius: 4px;
    }

    .plan-card-title {
        font-size: 0.5rem;
        margin-bottom: 0.05rem;
    }

    .plan-card-price {
        font-size: 0.45rem;
    }

    /* Aggressive mobile fixes for Steps 3-6 */
    .feature-screen {
        max-width: 100%;
        overflow: hidden;
    }

    .feature-screen-body {
        padding: 0.375rem;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }

    .feature-visual {
        min-height: 180px;
        padding: 0.5rem;
    }

    /* Step 3 - Ultra compact chat */
    .mini-chat-bubble {
        max-width: 65%;
        font-size: 0.55rem;
        padding: 0.25rem 0.35rem;
        word-break: break-word;
        line-height: 1.2;
    }

    .mini-chat-input input {
        font-size: 0.55rem;
        padding: 0.3rem;
        min-width: 0;
    }

    .mini-chat-input button {
        font-size: 0.55rem;
        padding: 0.3rem 0.4rem;
        white-space: nowrap;
    }

    /* Step 4 - Compact PDF */
    .pdf-preview {
        padding: 0.5rem;
    }

    .pdf-price-value {
        font-size: 0.75rem;
        word-break: break-word;
    }

    .pdf-company {
        font-size: 0.55rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .pdf-body {
        font-size: 0.55rem;
        line-height: 1.3;
    }

    /* Step 5 - Compact human chat */
    .human-chat-name {
        font-size: 0.6rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .human-chat-role {
        font-size: 0.55rem;
    }

    /* Step 6 - Compact quote/status */
    .quote-status-value {
        font-size: 0.65rem;
        word-break: break-word;
    }

    .quote-detail {
        font-size: 0.55rem;
    }

    .quote-detail-row {
        font-size: 0.55rem;
        word-break: break-word;
        padding: 0.25rem 0;
    }

    .status-labels {
        font-size: 0.45rem;
    }

    .status-timeline {
        padding: 0.5rem 0;
    }

    .faq-item {
        padding: 1.25rem;
    }

    .faq-question {
        font-size: 1rem;
    }

    .faq-answer {
        font-size: 0.875rem;
        padding-left: 2rem;
    }

    .trust-card {
        padding: 2rem;
    }

    .cta-title {
        font-size: 1.75rem;
    }

    .cta-subtitle {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn {
        width: 100%;
    }

    .footer {
        padding: 2rem 1rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .feature-title {
        font-size: 1.25rem;
    }

    .cta-title {
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .cta-section {
        display: none;
    }

    .section {
        padding: 2rem 0;
        page-break-inside: avoid;
    }

    .hero {
        padding: 2rem 0;
        background: none;
        color: black;
    }

    .hero-title,
    .hero-subtitle {
        color: black;
    }

    .btn {
        display: none;
    }

    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    img {
        max-width: 100% !important;
    }

    @page {
        margin: 2cm;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    .hero-grid {
        background-size: 30px 30px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    ::before,
    ::after {
        animation-delay: -1ms !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        background-attachment: initial !important;
        scroll-behavior: auto !important;
        transition-duration: 0s !important;
        transition-delay: 0s !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* Could add dark mode styles here if needed */
}

/* Hover Support Detection */
@media (hover: none) {
    .btn:hover,
    .solution-card:hover,
    .faq-item:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Landscape Orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 4rem 1rem 2rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .section {
        padding: 3rem 1rem;
    }
}