/* ============================================
   RESPONSIVE - Qatar SEO Modern Design
   ============================================ */

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

main {
    position: relative;
    z-index: 1;
}

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

@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: 1180px; }
}

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

/* ============================================
   MOBILE NAVIGATION
   ============================================ */

@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--primary-dark);
        padding: 2rem;
        z-index: 9998;
        overflow-y: auto;
    }

    .main-nav.mobile-open {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav-list > li > a {
        padding: 1rem 0;
        font-size: 1.125rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-cta {
        margin: 1.5rem 0 0 0 !important;
        text-align: center;
        display: block !important;
    }

    .has-dropdown {
        flex-direction: column;
        align-items: stretch;
    }

    .dropdown-toggle {
        position: absolute;
        right: 0;
        top: 0.75rem;
        width: 44px;
        height: 44px;
    }

    [dir="rtl"] .dropdown-toggle {
        right: auto;
        left: 0;
    }

    .dropdown-menu {
        position: static;
        display: none;
        background: rgba(0, 0, 0, 0.2);
        border-radius: var(--radius-md);
        margin: 0.5rem 0;
        box-shadow: none;
    }

    .has-dropdown.dropdown-open > .dropdown-menu {
        display: block;
    }

    .dropdown-menu a {
        color: var(--text-on-dark-muted);
        padding: 0.75rem 1rem;
    }

    .dropdown-menu a:hover {
        background: rgba(255, 255, 255, 0.05);
        color: var(--accent-gold);
    }

    .lang-switcher {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        right: 70px;
    }

    [dir="rtl"] .lang-switcher {
        right: auto;
        left: 70px;
    }
}

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

@media (max-width: 991px) {
    .hero {
        min-height: auto;
        padding: calc(var(--header-height) + 3rem) 0 5rem;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

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

    .hero-image {
        order: -1;
        max-width: 350px;
        margin: 0 auto;
    }

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

    .hero::after {
        height: 60px;
    }
}

@media (max-width: 575px) {
    .hero {
        padding: calc(var(--header-height) + 2rem) 0 4rem;
    }

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

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

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

    .hero-image {
        max-width: 280px;
    }

    .hero::after {
        height: 40px;
    }
}

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

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

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

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

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

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

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

    .service-card {
        padding: 2rem;
    }

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

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

/* ============================================
   ABOUT / TWO COLUMN LAYOUTS
   ============================================ */

@media (max-width: 991px) {
    .about-grid,
    .story-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-image,
    .story-image {
        order: -1;
        max-width: 350px;
        margin: 0 auto;
        text-align: center;
    }

    .about-content,
    .story-content {
        text-align: center;
    }

    .benefits-list {
        display: inline-block;
        text-align: left;
    }

    [dir="rtl"] .benefits-list {
        text-align: right;
    }
}

/* ============================================
   STATS RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
    .stats-section {
        padding: 4rem 0;
    }

    .stats-section::before,
    .stats-section::after {
        height: 50px;
    }
}

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

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

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

/* ============================================
   PROCESS STEPS RESPONSIVE
   ============================================ */

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

    .process-steps::before {
        display: none;
    }
}

@media (max-width: 575px) {
    .process-steps {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* ============================================
   TESTIMONIALS RESPONSIVE
   ============================================ */

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

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

    .testimonial-card {
        padding: 2rem;
    }
}

/* ============================================
   CONTACT RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-info {
        text-align: center;
    }

    .contact-item {
        justify-content: center;
    }
}

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

    .contact-form-wrapper {
        padding: 1.5rem;
    }
}

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

@media (max-width: 991px) {
    .service-hero {
        padding: calc(var(--header-height) + 3rem) 0 5rem;
    }

    .service-hero .hero-grid,
    .service-hero .hero-minimal-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .service-hero .hero-image,
    .service-hero .hero-visual {
        order: -1;
        max-width: 300px;
        margin: 0 auto;
    }

    .service-hero .breadcrumb {
        justify-content: center;
    }
}

@media (max-width: 575px) {
    .service-hero {
        padding: calc(var(--header-height) + 2rem) 0 4rem;
    }

    .service-hero::after {
        height: 50px;
    }
}

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

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

    .page-header::after {
        height: 40px;
    }

    .page-header p {
        font-size: 1rem;
    }
}

/* ============================================
   FAQ RESPONSIVE
   ============================================ */

@media (max-width: 575px) {
    .faq-question {
        padding: 1rem;
        font-size: 0.9375rem;
    }

    .faq-answer-content {
        padding: 0 1rem 1rem;
    }
}

/* ============================================
   FOOTER RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
    .footer-wave svg {
        height: 60px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-about {
        grid-column: span 2;
    }

    .footer-about p {
        max-width: 100%;
    }

    .footer-social {
        justify-content: flex-start;
    }
}

@media (max-width: 575px) {
    .site-footer {
        padding: 0 0 1.5rem;
    }

    .footer-wave {
        margin-bottom: 2rem;
    }

    .footer-wave svg {
        height: 40px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .footer-about {
        grid-column: span 1;
    }

    .footer-about .logo {
        justify-content: center;
    }

    .footer-about p {
        margin-left: auto;
        margin-right: auto;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-column h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    [dir="rtl"] .footer-column h4::after {
        right: 50%;
        left: auto;
        transform: translateX(50%);
    }

    .footer-contact-item {
        justify-content: center;
    }

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

    .footer-bottom-links {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* ============================================
   CAROUSEL RESPONSIVE
   ============================================ */

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

    .carousel-item {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
}

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

/* Mission Vision Grid */
@media (max-width: 767px) {
    .mission-vision-grid {
        grid-template-columns: 1fr;
    }

    .mv-card {
        padding: 2rem;
    }
}

/* Values Grid */
@media (max-width: 991px) {
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Why Grid */
@media (max-width: 991px) {
    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Results Grid */
@media (max-width: 991px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Services Grid Alt */
@media (max-width: 991px) {
    .services-grid-alt {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Related Services */
@media (max-width: 991px) {
    .related-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Process Horizontal */
@media (max-width: 767px) {
    .process-horizontal {
        flex-direction: column;
    }

    .process-connector {
        width: 3px;
        height: 40px;
        margin: 0 auto;
    }
}

/* About Header */
@media (max-width: 991px) {
    .about-header-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-header-illustration {
        order: -1;
        max-width: 300px;
        margin: 0 auto;
    }
}

/* ============================================
   BLOG RESPONSIVE
   ============================================ */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

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

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

.blog-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.blog-card-image {
    height: 200px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.blog-card h3 a {
    color: var(--text-dark);
}

.blog-card h3 a:hover {
    color: var(--primary);
}

.blog-meta {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* ============================================
   POPUP RESPONSIVE
   ============================================ */

@media (max-width: 767px) {
    .popup-container {
        margin: 1rem;
        max-height: 90vh;
    }

    .popup-content {
        padding: 1.5rem;
    }
}

/* ============================================
   404 ERROR PAGE RESPONSIVE
   ============================================ */

@media (max-width: 575px) {
    .error-page {
        min-height: 60vh;
    }

    .error-illustration {
        max-width: 250px;
    }

    .error-content h1 {
        font-size: 2rem;
    }

    .error-actions {
        flex-direction: column;
    }

    .error-actions .btn {
        width: 100%;
    }
}

/* ============================================
   GENERAL RESPONSIVE UTILITIES
   ============================================ */

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

html, body {
    overflow-x: hidden;
}

input, textarea, select, button {
    max-width: 100%;
}

/* ============================================
   RTL RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 991px) {
    [dir="rtl"] .hero-content,
    [dir="rtl"] .about-content,
    [dir="rtl"] .story-content {
        text-align: center;
    }

    [dir="rtl"] .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 575px) {
    [dir="rtl"] .footer-grid {
        text-align: center;
    }

    [dir="rtl"] .footer-social {
        justify-content: center;
    }

    [dir="rtl"] .footer-contact-item {
        justify-content: center;
    }
}

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

@media print {
    .site-header,
    .site-footer,
    .mobile-menu-toggle,
    .lang-switcher {
        display: none !important;
    }

    body {
        padding-top: 0;
    }

    .hero {
        min-height: auto;
        padding: 2rem 0;
        background: none;
    }

    .hero::before,
    .hero::after {
        display: none;
    }

    section {
        padding: 2rem 0;
    }
}
