/* ===== Responsive Design ===== */

/* Mobile devices (max-width: 640px) */
@media (max-width: 640px) {
    /* Base adjustments for better mobile reading */
    body {
        padding-bottom: 4.5rem; /* More space for fixed bottom CTA */
        -webkit-text-size-adjust: 100%; /* Prevent font size adjustment */
        -ms-text-size-adjust: 100%;
    }
    
    /* Improve readability with better typography */
    * {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Container adjustments */
    .lp-container {
        max-width: 100%;
        margin: 3.5rem 0.5rem 1rem;
        padding: 0;
        border-radius: 0.5rem;
    }
    
    /* Buffer page mobile optimizations */
    .buffer-content-wrapper {
        margin: 0 1rem;
        padding: 1.25rem;
    }
    
    .buffer-headline {
        font-size: 1.75rem;
        line-height: 1.2;
        margin-bottom: 0.5rem;
    }
    
    .buffer-subheadline {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .buffer-cta-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
        min-height: 44px; /* Touch target size */
    }
    
    /* Hero section optimizations */
    .hero-header {
        height: 200px;
        border-radius: 0.5rem 0.5rem 0 0;
    }
    
    .hero-avatar {
        width: 100px;
        height: 100px;
        border-width: 3px;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .hero-content h1 span {
        font-size: 0.875rem;
    }
    
    /* Main content optimizations */
    .main-content {
        padding: 0.75rem 0.875rem;
    }
    
    .main-headline {
        font-size: 1.25rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }
    
    .sub-headline {
        font-size: 0.875rem;
        line-height: 1.5;
        margin-bottom: 0.875rem;
    }
    
    /* Section spacing and readability */
    .testimonials-section, 
    .community-section, 
    .chat-section {
        margin-bottom: 0.875rem;
        padding: 0.875rem;
    }
    
    .section-title {
        font-size: 0.95rem;
        margin-bottom: 0.625rem;
        line-height: 1.3;
    }
    
    /* Testimonials optimization */
    .testimonial-container {
        height: 110px;
    }
    
    .testimonial-item {
        padding: 0.75rem;
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .testimonial-item p:first-child {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .testimonial-item p:last-child {
        font-size: 0.7rem;
        margin-top: 0.375rem;
    }
    
    /* Community counter optimization */
    .community-counter {
        font-size: 2rem;
        margin: 0.375rem 0;
    }
    
    .community-text {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    /* Benefits section readability */
    .benefits-section {
        font-size: 0.875rem;
        line-height: 1.6;
        padding: 0 0.125rem;
    }
    
    .benefits-section p {
        margin-bottom: 0.75rem;
    }
    
    /* Chat window optimization */
    .chat-window {
        height: 150px;
        padding: 0.5rem;
        gap: 0.375rem;
    }
    
    .chat-message {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
        line-height: 1.4;
        max-width: 85%;
    }
    
    /* Fixed headers mobile optimization */
    .fixed-top-bar {
        padding: 0.5rem 0.75rem;
        height: 3.5rem;
    }
    
    .logo-name-group {
        gap: 0.375rem;
    }
    
    .logo-name-group img {
        width: 32px;
        height: 32px;
    }
    
    .logo-name-group p {
        font-size: 0.9rem;
        font-weight: 600;
    }
    
    .fixed-top-bar .button {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
        max-width: 120px;
        min-height: 36px;
    }
    
    /* Fixed bottom CTA optimization */
    .fixed-bottom-cta {
        padding: 0.625rem 0.75rem;
        background-color: rgba(15, 23, 42, 0.98);
    }
    
    .bottom-cta-btn {
        font-size: 0.9rem;
        padding: 0.75rem 1.25rem;
        max-width: 100%;
        min-height: 44px; /* Touch target */
        line-height: 1.2;
    }
    
    /* Image optimizations */
    .description-image {
        margin-bottom: 0.875rem;
        border-radius: 0.375rem;
    }
    
    /* Final CTA text */
    .final-cta-text {
        font-size: 0.875rem;
        line-height: 1.4;
        margin: 0.875rem 0;
        padding: 0 0.5rem;
    }
    
    /* Footer optimization */
    .footer {
        margin-top: 1rem;
        padding: 0 0.5rem;
    }
    
    .copyright {
        font-size: 0.7rem;
        line-height: 1.4;
    }
    
    .footer-links {
        font-size: 0.65rem;
        line-height: 1.5;
        margin-top: 0.375rem;
    }
    
    /* Touch-friendly link spacing */
    .footer-link {
        padding: 0.25rem;
        display: inline-block;
    }
    
    /* Improve tap targets */
    button, a {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden;
    }
}

/* Small phones (max-width: 375px) */
@media (max-width: 375px) {
    .hero-header {
        height: 180px;
    }
    
    .hero-avatar {
        width: 90px;
        height: 90px;
    }
    
    .main-headline {
        font-size: 1.125rem;
    }
    
    .community-counter {
        font-size: 1.75rem;
    }
    
    .fixed-top-bar .button {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
    }
}

/* Tablet devices (min-width: 641px and max-width: 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
    .lp-container {
        max-width: 600px;
        padding: 1rem;
    }
    
    .hero-header {
        height: 250px;
    }
    
    .hero-avatar {
        width: 128px;
        height: 128px;
    }
    
    .main-headline {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .sub-headline {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .community-counter {
        font-size: 2.5rem;
    }
    
    .chat-window {
        height: 180px;
    }
    
    .testimonial-container {
        height: 130px;
    }
    
    .benefits-section {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

/* Desktop devices (min-width: 1025px) */
@media (min-width: 1025px) {
    .lp-container {
        max-width: 800px;
        padding: 1.5rem;
    }
    
    .hero-header {
        height: 300px;
    }
    
    .hero-avatar {
        width: 150px;
        height: 150px;
    }
    
    .main-headline {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .sub-headline {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .community-counter {
        font-size: 3rem;
    }
    
    .chat-window {
        height: 200px;
    }
    
    .testimonial-container {
        height: 150px;
    }
    
    .benefits-section {
        font-size: 1rem;
        line-height: 1.7;
    }
}

/* High-resolution displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Enhance image quality for retina displays */
    .hero-avatar,
    .avatar-image,
    .logo-name-group img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    .hero-header {
        height: 160px;
    }
    
    .hero-avatar {
        width: 80px;
        height: 80px;
    }
    
    .fixed-bottom-cta {
        padding: 0.375rem;
    }
    
    .bottom-cta-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    body {
        padding-bottom: 3rem;
    }
    
    .main-content {
        padding: 0.5rem 0.75rem;
    }
    
    .chat-window {
        height: 120px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .pro-button-glow:hover {
        transform: none;
    }
    
    .buffer-cta-btn:hover {
        transform: none;
    }
    
    /* Increase touch target sizes */
    a, button {
        position: relative;
    }
    
    a::before, button::before {
        content: "";
        position: absolute;
        top: -8px;
        right: -8px;
        bottom: -8px;
        left: -8px;
    }
}

/* Accessibility improvements for mobile */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
} 