/* ============================================
   RESPONSIVE BREAKPOINTS - Riyadh SEO
   ============================================ */

/* Add top padding to body for fixed header */
body {
    padding-top: var(--header-height, 70px);
}

/* Main content must be below header dropdown */
main {
    position: relative;
    z-index: 1;
}

.hero,
section {
    position: relative;
    z-index: 1;
}

/* Container responsive */
.container {
    width: 100%;
    padding: 0 1rem;
}

@media (min-width: 576px) {
    .container { max-width: 540px; margin: 0 auto; }
}

@media (min-width: 768px) {
    .container { max-width: 720px; }
}

@media (min-width: 992px) {
    .container { max-width: 960px; }
}

@media (min-width: 1200px) {
    .container { max-width: 1140px; }
}

@media (min-width: 1400px) {
    .container { max-width: 1320px; }
}

/* ============================================
   HERO RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    html[dir="rtl"] .hero .container {
        flex-direction: column;
    }

    .hero-content {
        order: 1;
        max-width: 100%;
    }

    .hero-image {
        order: 2;
        margin-top: 2rem;
        max-width: 400px;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 575px) {
    .hero {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 1.875rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-buttons .btn {
        width: 100%;
    }
}

/* ============================================
   GRIDS RESPONSIVE
   ============================================ */

/* Services Grid */
@media (max-width: 575px) {
    .services-grid { grid-template-columns: 1fr; }
}

@media (min-width: 576px) and (max-width: 991px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Stats Grid */
@media (max-width: 767px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .stat-item h3 {
        font-size: 2rem;
    }
}

@media (max-width: 575px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Testimonials Grid */
@media (max-width: 767px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Process Grid */
@media (max-width: 767px) {
    .process-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .process-step::after {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Footer Grid */
@media (max-width: 575px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .contact-info li {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (min-width: 576px) and (max-width: 991px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   SECTIONS RESPONSIVE
   ============================================ */

@media (max-width: 767px) {
    section {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

/* ============================================
   PAGE HEADER RESPONSIVE
   ============================================ */

@media (max-width: 767px) {
    .page-header {
        padding: 3rem 0;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }
}

/* ============================================
   CARDS RESPONSIVE
   ============================================ */

@media (max-width: 575px) {
    .service-card,
    .testimonial-card {
        padding: 1.5rem;
    }

    .service-icon {
        width: 60px;
        height: 60px;
    }

    .service-icon svg {
        width: 28px;
        height: 28px;
    }
}

/* ============================================
   CTA SECTION RESPONSIVE
   ============================================ */

@media (max-width: 575px) {
    .cta-section {
        padding: 3rem 0;
    }

    .cta-section h2 {
        font-size: 1.5rem;
    }

    .cta-section p {
        font-size: 1rem;
    }
}

/* ============================================
   GENERAL RESPONSIVE RULES
   ============================================ */

img {
    max-width: 100%;
    height: auto;
}

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
}

/* Form elements full width on mobile */
input, textarea, select, button {
    max-width: 100%;
}

@media (max-width: 575px) {
    input, textarea, select {
        width: 100%;
    }
}

/* ============================================
   UTILITY RESPONSIVE
   ============================================ */

/* Hide on mobile */
@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Hide on desktop */
@media (min-width: 768px) {
    .hide-desktop {
        display: none !important;
    }
}

/* Text alignment responsive */
@media (max-width: 767px) {
    .text-center-mobile {
        text-align: center !important;
    }
}

/* ============================================
   SCROLL TO TOP RESPONSIVE
   ============================================ */

@media (max-width: 575px) {
    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
    }

    html[dir="rtl"] .scroll-to-top {
        right: auto;
        left: 1rem;
    }
}
