﻿/*
 * Responsive CSS - O3 Cleaning Services
 * ملف الاستجابة للشاشات المختلفة
 * Version: 2.0
 */

/* ===================================================================
   TABLET - 1024px and below
   =================================================================== */

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .testimonial-card {
        flex: 0 0 calc(50% - 15px);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-contact-bar {
        gap: 25px;
        padding: 15px 20px;
    }
    
    .hero-contact-bar .contact-item {
        font-size: 0.9rem;
    }
    
    .slider-dots {
        bottom: 90px !important;
    }
}

/* ===================================================================
   MOBILE - 768px and below
   =================================================================== */

@media (max-width: 768px) {
    /* ===== Header / Navigation ===== */
    .navbar,
    .header-container {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .logo {
        order: 1;
        margin-right: auto;
    }
    
    .logo-img {
        height: 50px;
    }
    
    .hamburger {
        order: 2;
        display: flex;
        z-index: 1001;
        margin-left: 15px;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        gap: 30px;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
        transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        order: 3;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu .nav-link {
        opacity: 0;
        transform: translateX(30px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    
    .nav-menu.active .nav-link {
        opacity: 1;
        transform: translateX(0);
    }
    
    .nav-menu.active .nav-link:nth-child(1) { transition-delay: 0.1s; }
    .nav-menu.active .nav-link:nth-child(2) { transition-delay: 0.15s; }
    .nav-menu.active .nav-link:nth-child(3) { transition-delay: 0.2s; }
    .nav-menu.active .nav-link:nth-child(4) { transition-delay: 0.25s; }
    .nav-menu.active .nav-link:nth-child(5) { transition-delay: 0.3s; }
    
    .nav-menu::before {
        content: '';
        position: fixed;
        top: 0;
        right: 100%;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
        z-index: -1;
    }
    
    .nav-menu.active::before {
        opacity: 1;
        pointer-events: auto;
    }
    
    .nav-cta {
        display: none;
    }
    
    /* ===== Hero Section ===== */
    .hero,
    .hero-slider-section {
        min-height: 100vh;
        padding-bottom: 120px;
    }
    
    .hero-title,
    .slide-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle,
    .slide-subtitle {
        font-size: 1rem;
    }
    
    .slide-description {
        font-size: 0.9rem;
    }
    
    .hero-badge {
        font-size: 0.8rem;
        padding: 8px 16px;
    }
    
    .hero-buttons,
    .slide-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn,
    .slide-cta .btn {
        width: 100%;
        justify-content: center;
    }
    
    .lottie-container {
        width: 100px;
        height: 100px;
    }
    
    .slider-nav {
        display: none;
    }
    
    .slider-dots {
        bottom: 140px !important;
    }
    
    .scroll-indicator,
    .hero-scroll-indicator {
        display: none !important;
    }
    
    .slide-content {
        padding: 20px;
        padding-bottom: 80px;
    }
    
    .shape-1,
    .shape-2 {
        width: 200px;
        height: 200px;
    }
    
    .shape-3,
    .shape-4 {
        display: none;
    }
    
    /* ===== Hero Contact Bar ===== */
    .hero-contact-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        padding: 12px 15px;
        border-radius: 0;
        background: rgba(10, 22, 40, 0.98) !important;
    }
    
    .hero-contact-bar .contact-item {
        font-size: 0.8rem;
        gap: 6px;
        padding: 8px 12px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 20px;
    }
    
    .hero-contact-bar .contact-item svg {
        width: 16px;
        height: 16px;
    }
    
    .hero-contact-bar .contact-item.location span {
        display: none;
    }
    
    /* ===== Sections ===== */
    .section-header h2,
    .section-title {
        font-size: 2rem;
    }
    
    .services,
    .services-section,
    .about,
    .testimonials,
    .contact {
        padding: 60px 0;
    }
    
    .services-grid,
    .services-grid-6 {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .service-card {
        padding: 25px 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .about-grid,
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-map,
    .about-image {
        order: -1;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 25px;
    }
    
    .testimonial-card {
        flex: 0 0 100%;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer {
        padding: 70px 0 30px;
    }
}

/* ===================================================================
   SMALL MOBILE - 480px and below
   =================================================================== */

@media (max-width: 480px) {
    /* ===== Hero ===== */
    .hero-title,
    .slide-title {
        font-size: 2rem;
    }
    
    .hero-subtitle,
    .slide-subtitle {
        font-size: 0.95rem;
    }
    
    .hero-badge {
        font-size: 0.75rem;
    }
    
    .slider-dots {
        bottom: 130px !important;
    }
    
    .slider-dot {
        width: 25px;
        height: 4px;
    }
    
    /* ===== Hero Contact Bar ===== */
    .hero-contact-bar {
        padding: 10px;
        gap: 8px;
    }
    
    .hero-contact-bar .contact-item {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    
    .hero-contact-bar .contact-item:nth-child(2) span {
        display: none;
    }
    
    /* ===== Stats ===== */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* ===== Contact ===== */
    .contact-form {
        padding: 20px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* ===== Buttons ===== */
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
    
    .back-to-top {
        bottom: 90px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ===================================================================
   EXTRA SMALL - 400px and below
   =================================================================== */

@media (max-width: 400px) {
    .hero-title,
    .slide-title {
        font-size: 1.7rem;
    }
    
    .section-header h2,
    .section-title {
        font-size: 1.7rem;
    }
}

/* ===================================================================
   LANDSCAPE MOBILE
   =================================================================== */

@media (max-height: 500px) and (orientation: landscape) {
    .hero,
    .hero-slider-section {
        min-height: 100vh;
    }
    
    .slide-content {
        padding-top: 60px;
        padding-bottom: 60px;
    }
    
    .hero-title,
    .slide-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .hero-subtitle,
    .slide-subtitle {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    
    .hero-badge {
        display: none;
    }
    
    .lottie-container {
        width: 80px;
        height: 80px;
    }
}

/* ===================================================================
   iOS SAFARI FIXES
   =================================================================== */

@supports (-webkit-touch-callout: none) {
    .hero-contact-bar {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
    
    .whatsapp-float {
        bottom: calc(20px + env(safe-area-inset-bottom));
    }
    
    .back-to-top {
        bottom: calc(90px + env(safe-area-inset-bottom));
    }
}

/* ===================================================================
   TOUCH DEVICES - Disable hover effects
   =================================================================== */

@media (hover: none) and (pointer: coarse) {
    .btn,
    .slider-btn,
    .carousel-btn,
    .slider-dot,
    .service-card,
    .info-card {
        -webkit-tap-highlight-color: transparent;
    }
    
    .service-card:hover {
        transform: none !important;
    }
    
    .info-card:hover {
        transform: none !important;
    }
}

/* ===================================================================
   PRINT STYLES
   =================================================================== */

@media print {
    .hero-slider-section,
    .particles-container,
    .whatsapp-float,
    .back-to-top,
    .preloader,
    .header,
    .nav-menu,
    .hamburger {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .section-header h2,
    .service-card h3,
    .footer-links h4 {
        color: black !important;
    }
}

/* ===================================================================
   HIGH CONTRAST MODE
   =================================================================== */

@media (prefers-contrast: high) {
    :root {
        --primary-color: #000080;
        --secondary: #FFD700;
    }
    
    .btn-gold {
        border: 2px solid black;
    }
    
    .service-card,
    .testimonial-card,
    .info-card {
        border: 2px solid black;
    }
}

/* ===================================================================
   REDUCED MOTION
   =================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .preloader {
        display: none !important;
    }
    
    .particle,
    .shape {
        animation: none !important;
    }
}
