/* ============================================================
   COMPREHENSIVE RESPONSIVE STYLES FOR REALIZE MOROCCO
   Add this file to all your HTML pages
   ============================================================ */

/* ==========================================================================
   BASE IMPROVEMENTS - Apply to all screen sizes
   ========================================================================== */

/* Ensure images never overflow their containers */
img {
    max-width: 100%;
    height: auto;
}

/* Make containers more flexible */
.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 20px 15px;
}

/* Ensure sections don't have excessive padding on mobile */
section {
    padding: 40px 0;
}

/* ==========================================================================
   HEADER & NAVIGATION - Mobile Menu
   ========================================================================== */

/* Hamburger Menu Icon (Hidden by default on desktop) */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 28px;
    cursor: pointer;
    padding: 5px;
    z-index: 1000;
}

/* ==========================================================================
   TABLET STYLES (768px - 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
    /* Reduce logo size */
    .logo-header .container1 img {
        height: 140px;
        width: 250px;
    }

    /* Adjust navigation spacing */
    header nav ul li {
        padding: 0 15px;
    }

    header nav a {
        font-size: 15px;
    }

    /* Hero section adjustments */
    .hero-title {
        font-size: 2.5rem !important;
    }

    .hero-subtitle {
        font-size: 1.1rem !important;
    }

    /* Section headings */
    section h1,
    section h2,
    .main-heading {
        font-size: 2rem !important;
    }

    .main-title {
        font-size: 2.8rem !important;
    }

    /* Grid adjustments */
    .story-wrapper {
        gap: 40px !important;
    }

    .promise-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
        gap: 25px !important;
    }

    /* Gallery grid for services */
    .gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    /* Footer adjustments */
    .footer-container {
        gap: 20px;
    }

    .footer-section {
        min-width: 180px;
    }
}

/* ==========================================================================
   MOBILE STYLES (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
    /* === HEADER & NAVIGATION === */
    
    /* Show hamburger menu */
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
    }

    /* Hide navigation by default on mobile */
    header nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--primary-color);
        padding: 80px 20px 20px;
        transition: left 0.3s ease;
        z-index: 999;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    }

    /* Show navigation when active */
    header nav.active {
        left: 0;
    }

    /* Stack navigation vertically */
    header nav ul {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    header nav ul li {
        padding: 15px 0;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    header nav a {
        font-size: 18px;
        padding: 10px 0;
    }

    /* Adjust header container */
    header .container {
        position: relative;
        justify-content: center;
    }

    /* Search container on mobile */
    .search-container-pure-css {
        position: absolute;
        right: 60px;
        top: 50%;
        transform: translateY(-50%);
        margin-left: 0;
        padding-left: 0;
    }

    /* Logo Header */
    .logo-header {
        height: 100px;
        padding: 5px 0;
    }

    .logo-header .container1 img {
        height: 120px;
        width: 200px;
    }

    /* === HERO SECTION === */
    #hero {
        min-height: 500px !important;
        height: auto !important;
    }

    .hero-content-container {
        padding: 40px 20px !important;
    }

    .hero-eyebrow {
        font-size: 0.8rem !important;
    }

    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    .hero-subtitle {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }

    .hero-buttons {
        flex-direction: column !important;
        gap: 15px !important;
        align-items: stretch !important;
    }

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

    /* === SECTIONS === */
    section {
        padding: 30px 0;
        margin-bottom: 15px;
    }

    section h1,
    section h2 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }

    .main-heading {
        font-size: 1.8rem !important;
    }

    .main-title {
        font-size: 2rem !important;
    }

    /* === ABOUT SECTION === */
    .about-section {
        padding: 30px 0 !important;
    }

    .row {
        flex-direction: column !important;
    }

    .col-md-6 {
        width: 100% !important;
        margin-bottom: 30px !important;
    }

    .about-content {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .about-image-wrapper {
        margin-bottom: 30px;
    }

    /* Text adjustments */
    .lead-text {
        font-size: 1.1rem !important;
    }

    .about-content p {
        font-size: 1rem !important;
    }

    /* === STORY SECTION === */
    .story-wrapper {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .story-image {
        order: -1;
        margin-bottom: 20px;
    }

    /* === WHY CHOOSE US === */
    .custom-list-item {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 25px;
    }

    .list-icon {
        margin-bottom: 10px;
    }

    .list-title {
        font-size: 1.1rem !important;
    }

    /* === PROMISE/CARDS SECTION === */
    .promise-grid,
    .gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }

    .promise-card,
    .gallery-card {
        padding: 30px 20px !important;
    }

    .card-content {
        padding: 25px 20px !important;
    }

    .card-image {
        height: 250px !important;
    }

    /* === PHILOSOPHY BLOCK === */
    .philosophy-block {
        padding: 40px 20px !important;
        margin: 0 auto 60px !important;
    }

    .philosophy-block h3 {
        font-size: 1.5rem !important;
    }

    .quote-icon {
        font-size: 4rem !important;
    }

    /* === FAQ SECTION === */
    .faq-item {
        margin-bottom: 15px !important;
    }

    .faq-header {
        padding: 15px !important;
    }

    .faq-title-group span {
        font-size: 0.95rem !important;
    }

    .faq-body {
        padding: 15px !important;
    }

    /* === CONTACT FORM === */
    #contact-form {
        padding: 30px 0;
    }

    #contact-form h1 {
        font-size: 1.8rem;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 1rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* === FOOTER === */
    .footer-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 0 20px;
    }

    .footer-section {
        min-width: unset;
        width: 100%;
        max-width: 320px;
        margin-bottom: 20px;
    }

    .footer-about {
        margin-top: 0 !important;
    }

    .footer-links,
    .footer-contact {
        margin-top: 0 !important;
    }

    .footer-logo {
        max-width: 140px;
    }

    .footer-heading {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .footer-about p,
    .footer-contact p {
        max-width: 100%;
        font-size: 0.85rem;
    }

    .footer-links ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 15px;
    }

    .footer-links ul li {
        margin-bottom: 5px;
    }

    .footer-social-links {
        gap: 12px;
        margin-top: 12px;
    }

    .footer-social-links a {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    .footer-bottom {
        padding-top: 12px;
        margin-top: 20px;
        font-size: 0.75rem;
    }

    .footer-legal-links {
        margin-top: 8px;
    }

    /* === BUTTONS === */
    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    .hero-buttons .btn {
        padding: 14px 25px;
    }

    /* === CTA WRAPPER === */
    .cta-wrapper p {
        font-size: 1rem !important;
    }
}

/* ==========================================================================
   SMALL MOBILE STYLES (max-width: 480px)
   ========================================================================== */
@media (max-width: 480px) {
    /* Container adjustments */
    .container {
        width: 95%;
        padding: 15px 10px;
    }

    /* Logo */
    .logo-header {
        height: 90px;
    }

    .logo-header .container1 img {
        height: 100px;
        width: 170px;
    }

    /* Hero */
    .hero-title {
        font-size: 1.6rem !important;
    }

    .hero-subtitle {
        font-size: 0.95rem !important;
    }

    /* Headings */
    section h1,
    section h2,
    .main-heading,
    .main-title {
        font-size: 1.5rem !important;
    }

    /* Paragraphs */
    p {
        font-size: 0.95rem;
    }

    .lead-text {
        font-size: 1rem !important;
    }

    /* Cards */
    .promise-card,
    .gallery-card {
        padding: 20px 15px !important;
    }

    .card-content h3,
    .promise-card h4 {
        font-size: 1.3rem !important;
    }

    .card-content p {
        font-size: 0.9rem !important;
    }

    /* Philosophy block */
    .philosophy-block {
        padding: 30px 15px !important;
    }

    .philosophy-block h3 {
        font-size: 1.3rem !important;
    }

    /* FAQ */
    .faq-header {
        padding: 12px !important;
    }

    .faq-title-group span {
        font-size: 0.9rem !important;
    }

    .faq-icon {
        font-size: 1rem !important;
        margin-right: 8px !important;
    }

    /* Footer */
    .footer-logo {
        max-width: 120px;
    }

    .footer-heading {
        font-size: 0.95rem;
    }

    .footer-about p,
    .footer-contact p {
        font-size: 0.8rem;
    }

    .footer-social-links a {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .footer-bottom {
        font-size: 0.7rem;
    }

    .footer-legal-links a {
        display: block;
        margin: 5px 0;
    }

    .footer-legal-links span {
        display: none;
    }

    /* Buttons */
    .btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    /* Form inputs - keep at 16px to prevent zoom on iOS */
    .form-group input,
    .form-group textarea {
        font-size: 16px;
        padding: 12px;
    }
}

/* ==========================================================================
   LANDSCAPE MOBILE (max-height: 500px and orientation: landscape)
   ========================================================================== */
@media (max-height: 500px) and (orientation: landscape) {
    #hero {
        min-height: 400px !important;
    }

    .hero-content-container {
        padding: 30px 20px !important;
    }

    .hero-title {
        font-size: 1.8rem !important;
    }

    .scroll-indicator {
        display: none;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */
@media print {
    header,
    .hero-buttons,
    .search-container-pure-css,
    .scroll-indicator,
    .mobile-menu-toggle,
    footer {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    section {
        page-break-inside: avoid;
    }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

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

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

/* Text alignment helpers */
.text-center-mobile {
    text-align: center;
}

@media (min-width: 769px) {
    .text-center-mobile {
        text-align: left;
    }
}
