/* DreamFace AI - Responsive Styles for Soft Design */

/* Mobile First Approach - Base styles are for mobile */

/* Extra Small screens (phones) - up to 640px */
@media (max-width: 640px) {
    /* Container adjustments */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Hero Section Mobile */
    .hero-section {
        min-height: 100vh;
        padding: 1.5rem 0;
    }
    
    .hero-section .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
        margin-bottom: 2rem;
    }
    
    /* Steps Container Mobile */
    .steps-container {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .step-item {
        justify-content: flex-start;
        margin-bottom: 1rem;
    }
    
    .step-text {
        font-size: 1rem;
    }
    
    .step-arrow {
        margin-left: 0;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    /* Main Image Mobile */
    .main-image {
        max-width: 280px;
        margin-bottom: 1.5rem;
    }
    
    .image-container {
        margin-bottom: 1rem;
    }
    
    /* Contact Form Card Mobile */
    .contact-form-card {
        margin-top: 1.5rem;
        padding: 1.5rem;
        max-width: 100%;
    }
    
    .contact-form-card h3 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Form inputs mobile */
    .form-input {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }
    
    /* CTA buttons mobile */
    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .contact-form-btn, .email-btn {
        min-width: auto;
        width: 100%;
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    /* Feature cards mobile */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 2rem 1.5rem;
    }
    
    .feature-icon {
        width: 4rem;
        height: 4rem;
        margin-bottom: 1.5rem;
    }
    
    /* Modal mobile */
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
    
    /* Sections padding mobile */
    .quick-contact-section,
    .features-section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    /* Quick contact section mobile */
    .quick-contact-section h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .quick-contact-section p {
        font-size: 1.125rem;
        margin-bottom: 2rem;
    }
}

/* Small screens (large phones) - 641px to 768px */
@media (min-width: 641px) and (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.375rem;
    }
    
    .main-image {
        max-width: 320px;
    }
    
    .contact-form-card {
        max-width: 400px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cta-buttons {
        flex-direction: row;
        gap: 1rem;
    }
    
    .contact-form-btn, .email-btn {
        min-width: 250px;
    }
}

/* Medium screens (tablets) - 769px to 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-section .grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        align-items: center;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-title {
        font-size: 3.5rem;
        text-align: center;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .hero-left-content {
        align-items: center;
        text-align: center;
    }
    
    .image-container {
        display: flex;
        justify-content: center;
    }
    
    .step-item {
        justify-content: flex-start;
    }
    
    .step-arrow {
        text-align: left;
        margin-left: 20px;
    }
    
    .main-image {
        max-width: 400px;
    }
    
    .contact-form-card {
        max-width: 350px;
    }
    
    /* Features grid tablet */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .feature-card:last-child {
        grid-column: 1 / -1;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* Large screens (desktop) - 1025px to 1440px */
@media (min-width: 1025px) and (max-width: 1440px) {
    .hero-section .grid {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.75rem;
    }
    
    .main-image {
        max-width: 450px;
    }
    
    .contact-form-card {
        max-width: 380px;
    }
    
    /* Features desktop */
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    /* Hover effects for desktop */
    .feature-card:hover {
        transform: translateY(-10px);
    }
    
    .step-item:hover {
        transform: translateX(15px);
    }
    
    .main-image:hover {
        transform: scale(1.05);
    }
}

/* Extra large screens - 1441px and up */
@media (min-width: 1441px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 5rem;
    }
    
    .hero-subtitle {
        font-size: 2rem;
    }
    
    .main-image {
        max-width: 500px;
    }
    
    .contact-form-card {
        max-width: 420px;
    }
    
    .features-grid {
        gap: 3rem;
    }
}

/* Ultra-wide screens - 1920px and up */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
    
    .hero-title {
        font-size: 6rem;
    }
    
    .hero-section .grid {
        gap: 6rem;
    }
}

/* Landscape orientation on mobile and tablet */
@media (max-width: 1024px) and (orientation: landscape) {
    .hero-section {
        min-height: 80vh;
        padding: 1.5rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .steps-container {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .step-item {
        margin-bottom: 0.5rem;
    }
    
    .step-arrow {
        margin-bottom: 0.5rem;
    }
    
    .contact-form-card {
        margin-top: 1rem;
        padding: 1rem;
    }
    
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .main-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    .feature-icon {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase tap targets for touch devices */
    button, input, textarea {
        min-height: 44px;
    }
    
    .contact-form-btn, .email-btn, .cta-button {
        padding: 1rem 2rem;
        min-height: 50px;
    }
    
    .modal-close {
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
    }
    
    /* Remove hover effects on touch devices */
    .feature-card:hover,
    .step-item:hover,
    .main-image:hover {
        transform: none;
    }
    
    /* Add active states for touch feedback */
    .contact-form-btn:active,
    .email-btn:active,
    .cta-button:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    .feature-card:active {
        transform: scale(0.98);
    }
    
    /* Improve touch scrolling */
    .modal-content {
        -webkit-overflow-scrolling: touch;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-background {
        animation: none;
    }
    
    .floating, .pulse-soft {
        animation: none;
    }
    
    .step-arrow {
        animation: none;
    }
    
    /* Keep essential transitions for usability */
    button, input, textarea {
        transition: background-color 0.2s ease !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .glass-card {
        background: rgba(255, 255, 255, 0.95);
        border: 2px solid #ec4899;
    }
    
    .contact-form-btn, .email-btn, .cta-button {
        border: 2px solid;
        border-color: currentColor;
    }
    
    .feature-card {
        border: 2px solid #ec4899;
    }
    
    .form-input {
        border: 2px solid #6b7280;
    }
    
    .form-input:focus {
        border-color: #ec4899;
        box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.5);
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .features-section {
        background-color: #1f2937;
        color: #f3f4f6;
    }
    
    .feature-card {
        background: linear-gradient(135deg, #374151, #4b5563);
        color: #f3f4f6;
    }
    
    .feature-card h3 {
        color: #f9fafb;
    }
    
    .modal-content {
        background-color: #1f2937;
        color: #f3f4f6;
        border: 1px solid #4b5563;
    }
    
    .modal input, .modal textarea {
        background-color: #374151;
        border-color: #4b5563;
        color: #f3f4f6;
    }
    
    .modal input::placeholder,
    .modal textarea::placeholder {
        color: #9ca3af;
    }
    
    .modal-close {
        color: #9ca3af;
    }
    
    .modal-close:hover {
        color: #ec4899;
    }
}

/* Print styles */
@media print {
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .hero-background,
    .modal,
    .cta-buttons,
    footer {
        display: none !important;
    }
    
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
        background: white !important;
    }
    
    .hero-title, .hero-subtitle {
        color: black !important;
    }
    
    .steps-container {
        background: white !important;
        border: 1px solid #ccc !important;
    }
    
    .step-text {
        color: black !important;
    }
    
    .contact-form-card {
        display: none !important;
    }
    
    .main-image {
        max-width: 300px;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        color: black !important;
    }
    
    section {
        page-break-inside: avoid;
        padding: 1rem 0;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-transparency) {
    .glass-card {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    
    .hero-background {
        opacity: 0.7;
    }
}

/* Focus improvements for keyboard navigation */
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #ec4899;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.3);
}

/* Ensure sufficient color contrast */
@media (prefers-contrast: more) {
    .hero-title, .hero-subtitle {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    }
    
    .step-text {
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    }
}

/* Safe area adjustments for notched devices */
@supports (padding: max(0px)) {
    .container {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    .modal-content {
        margin-top: max(1rem, env(safe-area-inset-top));
        margin-bottom: max(1rem, env(safe-area-inset-bottom));
    }
}