/* ========================================
   Al Batool Abaya Shop - Responsive CSS
   Mobile-First Design Optimization
   ======================================== */

/* ========================================
   Mobile First (320px and up)
   ======================================== */

/* Base mobile styles are already in main CSS */

/* ========================================
   Small Mobile (480px and up)
   ======================================== */

@media (max-width: 480px) {
    /* Typography adjustments for small screens */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    .section-title { font-size: 2rem; }
    .section-subtitle { font-size: 1.1rem; }
    
    /* Container padding for mobile */
    .container {
        padding: 0 15px;
    }
    
    /* Navigation mobile styles */
    .nav-container {
        height: 70px;
        padding: 0 15px;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--cream-white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 1.5rem;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 1rem 0;
    }
    
    .nav-actions {
        gap: 0.5rem;
    }
    
    .phone-link {
        display: none; /* Hide on very small screens */
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Logo adjustments for mobile */
    .logo-arabic {
        font-size: 1.5rem;
    }
    
    .logo-english {
        font-size: 1rem;
    }
    
    .logo-tagline {
        font-size: 0.7rem;
    }
    
    /* Hero section mobile */
    .hero {
        height: 100vh;
        padding: 80px 0 0 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 1.5rem;
        padding: 0 1rem;
        align-items: center;
    }
    
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
        max-width: 320px;
    }
    
    .btn-hero-main {
        font-size: 1.1rem;
        padding: 16px 32px;
        order: 1;
        background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    
    .btn-hero-main:hover {
        background: linear-gradient(135deg, #2EE76F 0%, #1DA851 100%);
        box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
    }
    
    .btn-hero-secondary {
        font-size: 1rem;
        padding: 14px 28px;
        order: 2;
        background: var(--pure-white);
        color: var(--primary-emerald);
        border: 2px solid var(--pure-white);
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
    }
    
    .btn-hero-secondary:hover {
        background: rgba(255, 255, 255, 0.9);
        color: var(--charcoal);
        box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
    }
    
    /* Collections grid mobile */
    .collections-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .collection-card {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .card-content {
        padding: 1.5rem;
    }
    
    /* Testimonials mobile */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .testimonial-card {
        padding: 2rem;
    }
    
    /* About section mobile */
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-text {
        padding-right: 0;
    }
    
    .about-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    
    /* Contact section mobile */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .contact-actions .btn {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .map-actions {
        flex-direction: row;
        justify-content: space-between;
        gap: 0.3rem;
    }
    
    .map-link, .directions-link {
        font-size: 0.8rem;
        padding: 0.4rem;
    }
    
    .map-container {
        height: 300px;
    }
    
    .map-overlay {
        position: static;
        margin-bottom: 1rem;
        max-width: 100%;
        background: rgba(255, 255, 255, 0.98);
    }
    
    .location-marker {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .location-marker i {
        font-size: 2rem;
        align-self: center;
    }
    
    /* Footer mobile */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* WhatsApp float button mobile */
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
        font-size: 1.6rem;
    }
    
    .whatsapp-tooltip {
        display: none; /* Hide tooltip on mobile */
    }
}

/* ========================================
   Large Mobile / Small Tablet (768px and up)
   ======================================== */

@media (min-width: 481px) and (max-width: 768px) {
    /* Show phone link on larger mobile devices */
    .phone-link {
        display: flex;
        font-size: 0.9rem;
    }
    
    /* Adjust hero stats layout */
    .hero-stats {
        flex-direction: row;
        gap: 2rem;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero-actions {
        flex-direction: row;
        justify-content: center;
    }
    
    /* Collections grid for tablets */
    .collections-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
    
    /* Testimonials for tablets */
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* About stats for tablets */
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Footer for tablets */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

/* ========================================
   Tablet (768px and up)
   ======================================== */

@media (min-width: 769px) and (max-width: 1024px) {
    /* Navigation adjustments */
    .nav-menu {
        gap: 1.5rem;
    }
    
    /* Hero section */
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-stats {
        gap: 2.5rem;
    }
    
    /* Collections */
    .collections-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
    
    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonial-card:last-child {
        grid-column: 1 / -1;
        max-width: 500px;
        margin: 0 auto;
    }
    
    /* Contact */
    .contact-content {
        gap: 3rem;
    }
}

/* ========================================
   Desktop (1025px and up)
   ======================================== */

@media (min-width: 1025px) {
    /* All desktop styles are in main CSS */
    
    /* Large collections grid on big screens */
    .collections-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Testimonials all in one row on large screens */
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================
   Large Desktop (1440px and up)
   ======================================== */

@media (min-width: 1441px) {
    :root {
        --container-max-width: 1400px;
    }
    
    /* Hero section for large screens */
    .hero-title {
        font-size: 4.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    /* Large grid layouts */
    .collections-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
    
    .about-stats {
        gap: 2.5rem;
    }
}

/* ========================================
   Touch and Interaction Optimizations
   ======================================== */

/* Touch-friendly button sizes */
@media (max-width: 768px) {
    .btn {
        min-height: 44px; /* iOS minimum touch target */
        padding: 16px 24px;
        font-size: 1.1rem;
    }
    
    .nav-link {
        padding: 16px 0;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .social-link {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
    
    .lang-btn {
        padding: 12px 20px;
        min-height: 44px;
    }
}

/* ========================================
   Landscape Mobile Optimizations
   ======================================== */

@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 100px 0 50px;
    }
    
    .hero-title {
        font-size: 2.8rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-stats {
        margin-bottom: 1.5rem;
    }
    
    .section-padding {
        --section-padding: 60px 0;
    }
}

/* ========================================
   Print Optimizations
   ======================================== */

@media print {
    .navbar,
    .whatsapp-float,
    .floating-whatsapp,
    .hero-actions,
    .contact-actions {
        display: none;
    }
    
    .hero {
        height: auto;
        background: none;
        color: var(--charcoal);
    }
    
    .hero-overlay,
    .hero-background {
        display: none;
    }
    
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    body {
        background: white;
        color: black;
        font-size: 12pt;
    }
}

/* ========================================
   Accessibility Improvements
   ======================================== */

/* Focus styles for keyboard navigation */
.btn:focus,
.nav-link:focus,
.lang-btn:focus {
    outline: 3px solid var(--soft-gold);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .pulse-animation {
        animation: none;
    }
    
    .whatsapp-float {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-emerald: #000000;
        --soft-gold: #FFD700;
        --charcoal: #000000;
        --medium-gray: #333333;
    }
}

/* ========================================
   Performance Optimizations
   ======================================== */

/* Hardware acceleration for animations */
.collection-card,
.testimonial-card,
.btn,
.whatsapp-float {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Optimize image placeholders for performance */
.image-placeholder {
    will-change: transform;
}

/* ========================================
   Loading States
   ======================================== */

/* Loading animation for dynamic content */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ========================================
   Error States
   ======================================== */

.error-message {
    background: #FEE;
    border: 1px solid #FCC;
    color: #C33;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin: 1rem 0;
}

.success-message {
    background: #EFE;
    border: 1px solid #CFC;
    color: #3C3;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin: 1rem 0;
}