/* Mobile Optimization Styles */
/* Comprehensive mobile improvements for Dr Jane's 4eyes healing website */

/* Base Mobile Optimizations */
@media (max-width: 992px) {
    /* Body and Container Adjustments */
    body {
        padding: 10px;
    }
    
    .site-wrapper {
        border-radius: 20px;
    }
    
    .container {
        width: 95%;
        padding: 40px 0;
    }
    
    /* Typography Improvements */
    h1 {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    h2 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .tagTitle {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .subtitle {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }
    
    /* Header Improvements */
    header {
        padding: 10px 0;
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    
    header nav {
        padding: 0 15px;
    }
    
    .logo img {
        height: 35px;
    }
    
    /* Hero Section Mobile */
    .hero .container {
        flex-direction: column;
        padding: 30px 0;
    }
    
    .hero-content {
        text-align: center;
        order: 1;
        padding: 0 20px;
    }
    
    .hero-image {
        display: none; /* Hide hero image on mobile */
    }
    
    .hero-placeholder img {
        border-radius: 15px;
    }
    
    /* Services Highlights Mobile */
    .services-highlights .container {
        flex-direction: column;
        gap: 30px;
        padding: 30px 0;
    }
    
    .service-card {
        max-width: 300px;
        margin: 0 auto;
        padding: 30px 20px;
    }
    
    .icon-circle {
        width: 70px;
        height: 70px;
    }
    
    .service-card h3 {
        font-size: 1.2rem;
        margin: 15px 0 10px;
    }
    
    /* About Section Mobile */
    .about-therapist .container {
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
    }
    
    .about-therapist {
        margin: 10px 0;
    }
    
    .therapist-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .therapist-image {
        width: 120px;
        height: 120px;
        flex: 0 0 120px;
        margin: 0 auto;
    }
    
    .therapist-content {
        padding: 0 20px;
    }
    
    /* Services Grid Mobile */
    .services-grid {
        flex-direction: column;
        gap: 40px;
        align-items: center;
    }
    
    .service-item {
        max-width: 350px;
        width: 100%;
        flex: none !important;
    }
    
    .service-image {
        height: 200px;
        margin-bottom: 20px;
    }
    
    .service-img {
        border-radius: 12px;
    }
    
    /* How It Works Mobile */
    .steps-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .step {
        text-align: center;
        max-width: 280px;
        margin: 0 auto;
    }
    
    .step-number {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .step-arrow {
        transform: rotate(90deg);
        width: 30px;
        height: 30px;
        margin: 15px auto;
    }
    
    /* Plans Section Mobile */
    .plans-container {
        flex-direction: column;
        gap: 30px;
        align-items: center;
    }
    
    .plan-card {
        max-width: 350px;
        width: 100%;
        margin: 0 auto;
    }
    
    .plan-card.featured {
        transform: scale(1);
        order: -1;
    }
    
    .plan-comments {
        text-align: center;
        padding: 0 20px;
        margin-top: 30px;
    }
    
    .plan-comments p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* Testimonials Mobile */
    .testimonials-slider {
        margin-bottom: 30px;
    }
    
    .testimonial-card {
        padding: 30px 20px;
        margin: 0 10px;
    }
    
    .testimonial-text {
        font-size: 1.1rem;
        line-height: 1.6;
    }
    
    .testimonial-author {
        margin-top: 25px;
    }
    
    /* FAQ Mobile */
    .faq-container {
        padding: 0 10px;
    }
    
    .faq-item {
        margin-bottom: 20px;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .faq-question {
        padding: 20px;
        font-size: 1.1rem;
        background-color: #f8f8f8;
        border: none;
        width: 100%;
        text-align: left;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .faq-answer {
        padding: 0 20px;
        background-color: white;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }
    
    .faq-answer.open {
        padding: 20px;
        max-height: 500px; /* Generous max height for mobile */
    }
    
    .faq-answer p {
        margin: 0;
        line-height: 1.6;
        color: #333;
    }
    
    /* Contact Form Mobile */
    .contact-form {
        padding: 0 20px;
    }
    
    .contact {
        margin: 10px 0;
    }
    
    .contact .container {
        padding: 20px 0;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 15px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 8px;
    }
    
    /* Button Improvements */
    .btn-primary {
        padding: 15px 30px;
        font-size: 1rem;
        min-height: 48px; /* Touch target size */
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .cta-center {
        text-align: center;
        margin-top: 40px;
    }
    
    /* Footer Mobile */
    footer .container {
        padding: 40px 20px;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
        margin: 30px 0;
    }
    
    .disclaimer {
        text-align: left;
        font-size: 0.85rem;
        line-height: 1.5;
        margin: 30px 0;
    }
}

/* Tablet Specific (768px - 992px) */
@media (max-width: 992px) and (min-width: 769px) {
    .hero .container {
        flex-direction: column;
    }
    
    .hero-content {
        order: 2;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .hero-image {
        order: 1;
        max-width: 450px;
        margin: 0 auto 40px;
    }
    
    .services-highlights .container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 30px;
    }
    
    .service-card {
        flex: 1;
        min-width: 250px;
        max-width: 300px;
    }
    
    .services-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
        max-width: 800px;
        margin: 0 auto;
    }
    
    .service-item:last-child {
        grid-column: 1 / -1;
        max-width: 350px;
        margin: 0 auto;
    }
}

/* Phone Specific (up to 768px) */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }
    
    .site-wrapper {
        border-radius: 15px;
    }
    
    .container {
        width: 100%;
        padding: 30px 0;
    }
    
    /* Tighter spacing for phones */
    h1 {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }
    
    h2 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .tagTitle {
        font-size: 1.1rem;
    }
    
    .subtitle {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    /* Hero adjustments */
    .hero-content {
        padding: 0 10px;
    }
    
    .hero-image {
        display: none; /* Keep hidden on phone sizes */
    }
    
    /* About section tighter padding */
    .therapist-header {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 10px;
    }
    
    .therapist-image {
        width: 100px;
        height: 100px;
        flex: 0 0 100px;
    }
    
    .therapist-content {
        padding: 0 20px;
    }
    
    .about-therapist {
        margin: 5px 0;
    }
    
    .about-therapist .container {
        padding: 15px 0;
    }
    
    /* Contact form tighter padding */
    .contact-form {
        padding: 0 20px;
    }
    
    .contact {
        margin: 5px 0;
    }
    
    .contact .container {
        padding: 15px 0;
    }
    
    /* Services compact layout */
    .service-card {
        max-width: 280px;
        padding: 25px 15px;
    }
    
    .service-item {
        max-width: 320px;
    }
    
    .service-image {
        height: 180px;
    }
    
    /* Steps more compact */
    .step {
        max-width: 250px;
    }
    
    .step-number {
        font-size: 2rem;
    }
    
    /* Plans single column */
    .plan-card {
        max-width: 320px;
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: 25px 15px;
    }
    
    .testimonial-text {
        font-size: 1rem;
    }
    
    /* Quote section */
    blockquote {
        font-size: 1.4rem;
        padding: 0 15px;
    }
    
    /* FAQ Mobile adjustments */
    .faq-question {
        padding: 15px;
        font-size: 1rem;
    }
    
    .faq-answer {
        padding: 0 15px;
    }
    
    .faq-answer.open {
        padding: 15px;
        max-height: 400px;
    }
    
    .faq-toggle {
        font-size: 1.3rem;
        min-width: 35px;
        min-height: 35px;
    }
}

/* Small Phone Specific (up to 576px) */
@media (max-width: 576px) {
    body {
        padding: 2px;
    }
    
    .container {
        padding: 25px 0;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .hero-content {
        padding: 0 5px;
    }
    
    .hero-image {
        display: none; /* Keep hidden on small phones */
    }
    
    /* About section minimal padding */
    .therapist-header {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .therapist-image {
        width: 80px;
        height: 80px;
        flex: 0 0 80px;
    }
    
    .therapist-content {
        padding: 0 20px;
    }
    
    .about-therapist {
        margin: 2px 0;
    }
    
    .about-therapist .container {
        padding: 10px 0;
    }
    
    /* Contact form minimal padding */
    .contact-form {
        padding: 0 20px;
    }
    
    .contact {
        margin: 2px 0;
    }
    
    .contact .container {
        padding: 10px 0;
    }
    
    .service-card,
    .service-item,
    .plan-card {
        max-width: 300px;
    }
    
    .testimonial-text {
        font-size: 0.95rem;
    }
    
    blockquote {
        font-size: 1.2rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 12px;
    }
    
    /* Small phone FAQ adjustments */
    .faq-question {
        padding: 12px;
        font-size: 0.95rem;
    }
    
    .faq-answer {
        padding: 0 12px;
    }
    
    .faq-answer.open {
        padding: 12px;
        max-height: 350px;
    }
    
    .faq-toggle {
        font-size: 1.2rem;
        min-width: 30px;
        min-height: 30px;
    }
}

/* Form validation and mobile enhancements */
.form-group input.error,
.form-group textarea.error {
    border: 2px solid #e74c3c;
    background-color: #ffeaea;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-group input.has-value,
.form-group textarea.has-value {
    border-color: var(--primary-color);
}

.success-message {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Touch and Interaction Improvements */
@media (hover: none) and (pointer: coarse) {
    /* Touch device specific styles */
    .btn-primary {
        min-height: 48px;
        padding: 15px 25px;
    }
    
    .faq-question {
        min-height: 60px;
        display: flex;
        align-items: center;
    }
    
    .service-card,
    .testimonial-card {
        transition: transform 0.2s ease;
    }
    
    .service-card:active,
    .testimonial-card:active {
        transform: scale(0.98);
    }
    
    /* Larger tap targets */
    .testimonial-dots .dot {
        width: 16px;
        height: 16px;
        margin: 0 8px;
    }
    
    .faq-toggle {
        font-size: 1.5rem;
        min-width: 40px;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    /* Reduce animations on mobile for better performance */
    .transition-element {
        transition-duration: 0.2s;
    }
    
    /* Optimize images for mobile */
    .hero-placeholder img,
    .service-img {
        will-change: transform;
    }
    
    /* Improve scroll performance */
    .site-wrapper {
        will-change: auto;
    }
}

/* Landscape phone orientation */
@media (max-width: 896px) and (orientation: landscape) {
    .hero .container {
        flex-direction: column;
        align-items: center;
        min-height: 300px;
        justify-content: center;
    }
    
    .hero-content {
        order: 1;
        flex: 1;
        text-align: center;
        max-width: 600px;
    }
    
    .hero-image {
        display: none; /* Hide hero image in landscape mobile too */
    }
    
    .services-highlights .container {
        flex-direction: row;
        justify-content: space-around;
    }
    
    .service-card {
        max-width: 250px;
    }
}

/* Fix for iOS Safari bottom bar */
@supports (-webkit-touch-callout: none) {
    .mobile-nav-drawer {
        height: -webkit-fill-available;
        height: 100vh;
    }
}

/* Dark mode support for mobile */
@media (prefers-color-scheme: dark) and (max-width: 768px) {
    .mobile-nav-drawer {
        background-color: #1a1a1a;
        color: white;
    }
    
    .mobile-nav-drawer a {
        color: #f0f0f0;
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
}

/* Additional mobile touch improvements */
@media (max-width: 768px) {
    /* Smooth transitions for all interactive elements */
    .btn-primary,
    .service-card,
    .testimonial-card,
    .plan-card,
    .faq-question {
        transition: all 0.3s ease;
    }
    
    /* Active states for better touch feedback */
    .btn-primary:active {
        transform: translateY(1px) scale(0.98);
    }
    
    .service-card:active,
    .plan-card:active {
        transform: scale(0.98);
    }
    
    /* Improved scroll behavior */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Better focus states for accessibility */
    input:focus,
    textarea:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
    
    /* Hide horizontal scrollbar on mobile */
    body {
        overflow-x: hidden;
    }
    
    /* Optimize images for mobile */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Mobile-friendly table scrolling if needed */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Accessibility improvements for mobile */
@media (max-width: 768px) {
    /* Larger touch targets */
    button,
    .btn-primary,
    .faq-question,
    .testimonial-dots .dot {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better contrast for readability */
    .testimonial-text,
    .service-card p,
    .step p {
        color: #2c2c2c;
        line-height: 1.6;
    }
    
    /* Reduce motion for users who prefer it */
    @media (prefers-reduced-motion: reduce) {
        * {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }
}

/* High DPI screens optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo img,
    .icon-circle img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles for mobile */
@media print {
    .mobile-menu-toggle,
    .mobile-nav-drawer,
    .mobile-menu-overlay {
        display: none !important;
    }
    
    .btn-primary {
        background: transparent !important;
        color: var(--primary-color) !important;
        border: 1px solid var(--primary-color) !important;
    }
}