/* =========================================
   STRICT MOBILE-ONLY CSS
   ========================================= */
@media (max-width: 768px) {
    /* Ensure the body does not allow horizontal scroll */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
    }

    /* Force the mobile menu to stay hidden until triggered */
    .mobile-menu {
        display: flex !important; /* It's flex when active, hidden otherwise */
        position: fixed;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100vh !important;
        overflow-x: hidden !important;
        transform: translateX(100%);
        transition: transform 0.4s ease;
        z-index: 9999;
    }

    .mobile-menu.active {
        transform: translateX(0);
    }

    /* Ensure hidden elements are truly removed from layout */
    .nav-links, .flex.items-center.gap-10 {
        display: none !important;
    }
}

/* =========================================
   DESKTOP PROTECTION (Crucial)
   ========================================= */
@media (min-width: 769px) {
    /* Explicitly hide mobile elements on desktop */
    .mobile-menu, .mobile-menu-btn, .mobile-menu-close {
        display: none !important;
    }
}
@media (max-width:768px){
/* GLOBAL FIX FOR HORIZONTAL SCROLL */
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* This prevents the horizontal scroll bar */
    width: 100%;
}

* {
    box-sizing: border-box; /* Ensures padding/borders don't expand elements beyond width */
}
/* =========================
   HIDE DESKTOP MENU
========================= */

.nav-links,
.flex.items-center.gap-10{
    display:none;
}

/* =========================
   MOBILE NAVBAR
========================= */

.nav-container{
    padding:18px 20px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.logo-image{
    height:50px;
    margin-left:0;
}

/* =========================
   MENU BUTTON
========================= */

.mobile-menu-btn{
    width:45px;
    height:45px;

    border-radius:50%;

    border:1px solid rgba(255,255,255,0.2);

    background:rgba(255,255,255,0.08);

    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;

    gap:5px;

    cursor:pointer;

    z-index:1002;
}

.mobile-menu-btn span{
    width:18px;
    height:2px;

    background:#fff;

    border-radius:10px;
}

/* =========================
   FULL SCREEN MENU
========================= */

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw; /* Use vw for viewport width */
    height: 100vh;
    background: #050505;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 22px;
    transform: translateX(100%);
    transition: 0.4s ease;
    z-index: 1001;
    overflow-x: hidden; /* Add this to ensure menu content doesn't break layout */
}



/* OPEN MENU */

.mobile-menu.active{
    transform:translateX(0);
}

/* =========================
   MENU LINKS
========================= */

.mobile-menu a{
    color:#fff;

    text-decoration:none;

    font-size:18px;

    letter-spacing:3px;
}

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

.mobile-contact{
    margin-top:40px;

    display:flex;
    flex-direction:column;

    align-items:center;

    gap:12px;
}

.mobile-contact a{
    font-size:14px;

    color:#d6d6d6;
}

/* =========================
   SOCIAL ICONS
========================= */

.mobile-social{
    margin-top:35px;

    display:flex;

    gap:18px;
}

.mobile-social a{
    width:45px;
    height:45px;

    border:1px solid #c5a059;

    border-radius:50%;

    display:flex;
    justify-content:center;
    align-items:center;

    color:#c5a059;

    font-size:18px;
}
}

/* =========================
   HERO TEXT
========================= */

.hero-content{
    padding:0 25px;

    justify-content:center;
    align-items:center;

    text-align:center;
}

.hero-title{
    font-size:46px;
}

/* =========================
   FEEDBACK CARD
========================= */

.feedback-card{
    width:calc(100% - 30px);

    max-width:320px;

    right:50%;

    transform:translateX(50%);

    bottom:90px;
}

/* =========================
   HIDE RIGHT SOCIAL BAR
========================= */

.social-sidebar-right{
    display:none;
}


.mobile-menu-close{
    position:absolute;

    top:25px;
    right:25px;

    width:42px;
    height:42px;

    border-radius:50%;

    border:1px solid rgba(255,255,255,0.2);

    display:flex;
    justify-content:center;
    align-items:center;

    color:#fff;

    font-size:20px;

    cursor:pointer;

    background:rgba(255,255,255,0.05);
}

@media (max-width:768px){

/* HIDE SOCIAL BAR IN HOME */
.social-sidebar-right{
    display:none !important;
}

/* CENTER HERO CONTENT */
.hero-content{
    position:absolute;
    inset:0;

    display:flex;
    flex-direction:column;

    justify-content:center !important;
    align-items:center !important;

    text-align:center;

    padding:0 25px !important;

    z-index:20;
}

/* TITLE */
.hero-title{
    font-size:48px !important;
    line-height:1.05 !important;

    max-width:320px;

    margin:0 auto !important;
}

.hero-title span{
    display:block;
    margin-top:10px;

    font-size:0.5em;
}

/* FEEDBACK CARD */
.feedback-card{
    position:absolute !important;

    left:50% !important;
    right:auto !important;

    transform:translateX(-50%) !important;

    bottom:85px !important;

    width:calc(100% - 30px) !important;
    max-width:320px !important;

    padding:14px 18px !important;
}

/* SLIDER BUTTONS */
.controls-row{
    position:absolute !important;

    left:50% !important;
    right:auto !important;

    transform:translateX(-50%) !important;

    bottom:28px !important;

    gap:14px;
}

/* SMALLER DOTS */
.shape-btn{
    width:10px;
    height:10px;
}

/* NAVBAR */
.nav-container{
    padding:18px 20px !important;
}

/* LOGO */
.logo-image{
    height:50px !important;
    margin-left:0 !important;
}

/* MENU BUTTON */
.mobile-menu-btn{
    margin-right:0 !important;
}
/* Hero section mobile optimization */

}
/* Mobile Hero Section Optimization */
@media (max-width: 768px) {
    .about-hero {
        height: 35vh !important; /* Slightly shorter for a tighter mobile feel */
        padding: 0 20px !important;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .hero-title {
        font-size: 26px !important; /* Optimized for mobile readability */
        line-height: 1.3 !important;
        white-space: normal !important; /* Allows text to wrap to a new line */
        word-break: break-word; /* Ensures long words don't push the layout */
        text-align: center;
        margin: 0 auto !important;
        max-width: 90% !important; /* Prevents text from hitting screen edges */
    }

    .hero-title .gold-accent {
        display: block; /* Forces the gold accent to drop to the next line */
        margin-top: 5px;
        font-size: 0.9em; /* Slightly smaller accent text for balance */
    }
}
/* Styling for the dropdown toggle */
.mobile-dropdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 10px 0;
}

/* Initially hide submenus */
.mobile-dropdown-content {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    width: 100%;
}

/* Class toggled by JavaScript */
.mobile-dropdown-content.show {
    display: flex;
}

/* Submenu link styling */
.mobile-dropdown-content a {
    font-size: 14px !important;
    text-transform: lowercase;
    color: #fff !important;
    letter-spacing: 1px !important;
}

/* Ensure mobile contact is gone */
.mobile-contact {
    display: none !important;
}

/* next */


@media (max-width: 991px) {
    /* 1. Target the section and force full width */
    .logic-services-section {
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* 2. Target the services container and force full width */
    .logic-services-section .services {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
    }

    /* 3. Force the individual cards to span the container */
    .logic-services-section .service-card {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }
}
@media (max-width: 991px) {
    /* Tighten gap between number and heading */
    .logic-services-section .service-number {
        margin-bottom: 20px !important; 
    }

    /* Premium Paragraph Font & Tighten layout */
    .logic-services-section .service-content p {
        font-family: 'Inter', sans-serif;
        font-weight: 300; /* Lighter weight for a premium look */
        font-size: 16px;
        line-height: 1.6;
        color: #2b2b2b;
        margin-bottom: 15px; /* Reduced space after paragraph */
    }

    /* Remove gap between button and image */
    .logic-services-section .service-card {
        gap: 0 !important; /* Removes the space between flex items */
        padding-bottom: 0 !important; /* Removes padding at the bottom of the card */
    }

    /* Ensures the image sits flush if needed */
    .logic-services-section .service-image {
        margin-top: 0 !important;
    }
}

@media (max-width: 991px) {
    /* Ensure the card is a flex container so we can reorder children */
    .logic-services-section .service-card {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Assign the order based on your requested sequence */
    .logic-services-section .service-number {
        order: 1;
    }

    .logic-services-section .service-content h2 {
        order: 2;
    }

    .logic-services-section .service-image {
        order: 3;
    }

    .logic-services-section .service-content {
        order: 4;
    }

    .logic-services-section .service-btn {
        order: 5;
    }
}

/* next */

@media (max-width: 991px) {
    /* --- WORKFLOW SECTION: Premium Editorial Flow --- */
    .logic-workflow-section {
        padding: 60px 20px !important;
    }

    .logic-workflow-tag {
        font-size: 12px !important; /* Smaller, tighter tag for elegance */
        letter-spacing: 4px !important;
        margin-bottom: 10px !important;
    }

    .logic-workflow-title {
        font-size: 28px !important;
        line-height: 1.2 !important;
        letter-spacing: -0.5px !important;
    }

    .logic-steps {
        gap: 40px !important; /* Generous space between cards */
    }

    .logic-step-content {
        padding: 30px !important;
        border-radius: 16px !important;
        border: 1px solid rgba(0,0,0,0.06) !important;
        box-shadow: 0 5px 20px rgba(0,0,0,0.03) !important;
    }

    .logic-step-content h3 {
        font-size: 20px !important;
        margin-bottom: 15px !important;
    }

    /* --- ACTION SECTION: Luxury Agency Contrast --- */
    .logic-action-section {
        padding: 60px 20px !important;
    }

    .logic-action-right {
        padding: 50px 30px !important;
    }

    .logic-action-right h2 {
        font-size: 26px !important;
        line-height: 1.2 !important;
        margin-bottom: 20px !important;
    }

    .logic-action-right p {
        font-size: 15px !important;
        line-height: 1.7 !important;
        margin-bottom: 40px !important;
    }

    .logic-btn-area {
        flex-direction: column;
        gap: 12px !important;
    }

    .logic-btn {
        padding: 16px 20px !important;
        text-align: center;
        border-radius: 12px !important; /* Sharper, more modern button shape */
        font-size: 14px !important;
    }
}
@media (max-width: 991px) {
    /* 1. Remove top and bottom padding of the sections */
    .logic-workflow-section, 
    .logic-action-section {
        padding-top: 0 !important;
        padding-bottom: 40px !important;
    }

    /* 2. Remove the large gap between the header and the step cards */
    .logic-workflow-header {
        margin-bottom: 20px !important; /* Reduced from 90px */
        padding-top: 30px;
    }

    /* 3. Tighten the space between cards */
    .logic-steps {
        gap: 15px !important; 
    }
    
    /* 4. Remove extra margin from individual cards */
    .logic-step-card {
        margin-bottom: 0 !important;
    }
}


/* next */

@media (max-width: 991px) {
    /* 1. Container adjustments for flush, full-width look */
    .logic-action-section {
        padding: 40px 15px !important; /* Balanced side spacing */
    }

    .logic-action-wrap {
        flex-direction: column;
        height: auto !important; /* Allows content to dictate height */
        border-radius: 20px !important;
        overflow: hidden;
    }

    /* 2. Image area (Top) */
    .logic-action-left {
        width: 100% !important;
        height: 220px !important; /* Modern, cinematic ratio */
    }

    /* 3. Text & Content area (Bottom) */
    .logic-action-right {
        width: 100% !important;
        padding: 40px 30px !important;
        text-align: center; /* Centered for mobile impact */
        align-items: center;
    }

    .logic-action-right h2 {
        font-size: 26px !important;
        margin-bottom: 20px !important;
        text-align: center;
    }

    .logic-action-right p {
        font-size: 17px !important;
        line-height: 1.5 !important;
        
        margin-bottom: 30px !important;
        text-align: justify !important;
    }

    /* 4. Button styling */
    .logic-btn-area {
        width: 100%;
        justify-content: center;
    }

    .logic-btn {
        width: 100%;
        text-align: center;
        padding: 16px 20px !important;
        border-radius: 12px !important;
    }
}
@media (max-width: 991px) {
    .logic-action-section {
        padding-top: 0 !important;    /* Removes top gap */
        padding-bottom: 0 !important; /* Removes bottom gap */
        margin-top: 0 !important;
        margin-bottom: -50px !important;
    }
}

/* =============================== */
/* FOOTER MOBILE CSS ONLY */
/* =============================== */

@media (max-width:768px){

    .madmaze-footer{
        padding:45px 18px 30px !important;
    }

    /* LOGO */

    .footer-logo{
        margin-bottom:20px !important;
    }

    .footer-logo img{
        width:180px !important;
    }

    /* DESCRIPTION */

    .footer-description{
        font-family:'Inter',sans-serif;

        font-size:14px !important;

        line-height:1.8 !important;

        color:#d2d2d2 !important;

        text-align:justify !important;

        margin-bottom:28px !important;

        padding:0 5px;
    }

    /* SOCIAL ICONS */

    .social-links{
        gap:12px !important;
        margin-bottom:30px !important;

        flex-wrap:wrap;
    }

    .social-links a{
        width:44px !important;
        height:44px !important;

        font-size:16px !important;

        border-radius:50%;

        background:rgba(255,255,255,0.06);

        border:1px solid rgba(255,255,255,0.08);

        backdrop-filter:blur(10px);
    }

    .social-links a:hover{
        transform:none !important;
    }

    /* MENU */

    .footer-nav{
        gap:14px 22px !important;

        margin-bottom:30px !important;

        justify-content:center;
    }

    .footer-nav a{
        font-size:14px !important;

        letter-spacing:0.3px;

        color:#e5e5e5 !important;
    }

    .footer-nav a .arrow{
        font-size:12px;
    }

    /* DIVIDER */

    .footer-divider{
        margin-bottom:20px !important;
    }

    /* BOTTOM */

    .footer-bottom{
        flex-direction:column !important;

        text-align:center;

        gap:10px !important;
    }

    .footer-bottom p{
        font-size:12px !important;

        line-height:1.7;

        color:#9f9f9f;

        /* text-align: justify !important; */
    }

    .legal-links{
        font-size:12px;
    }

    .legal-links a{
        color:#bdbdbd !important;
    }

    /* REMOVE EXTRA GLOW SIZE */

    .madmaze-footer::before{
        width:250px;
        height:250px;
        top:-120px;
        left:-100px;
    }

    .madmaze-footer::after{
        width:220px;
        height:220px;
        bottom:-120px;
        right:-80px;
    }

}