/* ═══════════════════════════════════════════════════════════════
   MOBILE COMPLETE FIX - Professional Mobile Design
   Comprehensive mobile redesign - fixes all jumbled elements
   ═══════════════════════════════════════════════════════════════ */

/* ==========================================
   MOBILE ONLY - Desktop Unchanged
   ========================================== */
@media (max-width: 991px) {
    /* Hide ALL desktop elements on mobile only */
    .main-navbar,
    .main-responsive-nav,
    .navbar-area {
        display: none !important;
    }
    
    /* Hide 3D rotating logo on mobile only */
    .rotating-3d-logo {
        display: none !important;
    }
    
    /* Show mobile navbar */
    .mobile-top-navbar {
        display: flex !important;
    }
}

/* 3D rotating logo - let original CSS handle desktop, only hide on mobile */

/* ==========================================
   MOBILE NAVBAR - Top Right Hamburger
   ========================================== */
@media (max-width: 991px) {
    .mobile-top-navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 65px;
        background: rgba(16, 53, 136, 0.98);
        backdrop-filter: blur(10px);
        z-index: 10000;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .mobile-top-navbar .mobile-logo {
        max-height: 45px;
        width: auto;
        height: auto;
    }
    
    .mobile-navbar-right {
        display: flex;
        align-items: center;
        gap: 15px;
    }
    
    .mobile-top-navbar .mobile-theme-toggle {
        width: 35px;
        height: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Hamburger Menu - Top Right */
    .mobile-top-navbar .mobile-menu-toggle {
        position: relative;
        width: 45px;
        height: 45px;
        background: transparent;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-radius: 6px;
        padding: 0;
        margin: 0;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }
    
    .mobile-top-navbar .mobile-menu-toggle:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.5);
    }
    
    .mobile-top-navbar .mobile-menu-toggle.active {
        background: rgba(255, 215, 0, 0.2);
        border-color: rgba(255, 215, 0, 0.6);
    }
    
    .mobile-top-navbar .mobile-menu-toggle span {
        position: absolute;
        width: 24px;
        height: 3px;
        background: #ffffff;
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    
    .mobile-top-navbar .mobile-menu-toggle span:nth-child(1) {
        top: 13px;
    }
    
    .mobile-top-navbar .mobile-menu-toggle span:nth-child(2) {
        top: 21px;
    }
    
    .mobile-top-navbar .mobile-menu-toggle span:nth-child(3) {
        top: 29px;
    }
    
    .mobile-top-navbar .mobile-menu-toggle.active span:nth-child(1) {
        top: 21px;
        transform: rotate(45deg);
    }
    
    .mobile-top-navbar .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }
    
    .mobile-top-navbar .mobile-menu-toggle.active span:nth-child(3) {
        top: 21px;
        transform: rotate(-45deg);
    }
}

/* ==========================================
   MOBILE HERO SECTION - Complete Fix
   ========================================== */
@media (max-width: 991px) {
    .vanta-hero-section {
        min-height: 100vh;
        padding-top: 75px; /* Space for mobile navbar */
        padding-bottom: 40px;
        position: relative;
        overflow: hidden;
    }
    
    /* Hide Vanta background on mobile for performance */
    #vanta-bg,
    .vanta-background {
        display: none !important;
    }
    
    .vanta-hero-section {
        background: linear-gradient(135deg, #000000 0%, #1a3a5c 50%, #3a7bd5 100%) !important;
    }
    
    /* Hero Heading - Clean Centered */
    .hero-centered-heading {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        text-align: center;
        padding: 30px 20px 20px;
        margin-bottom: 30px;
        width: 100%;
        max-width: 100%;
    }
    
    .hero-main-title {
        font-size: 32px !important;
        line-height: 1.3;
        margin-bottom: 12px;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    }
    
    .hero-main-caption {
        font-size: 18px !important;
        margin-bottom: 15px;
        line-height: 1.4;
    }
    
    .hero-anniversary-headline {
        font-size: 14px !important;
        margin-top: 10px;
        padding: 0 15px;
    }
    
    /* Hero Images - Stack Vertically (No Container, Individual Fix) */
    .vanta-center-image,
    .vanta-right-image {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 20px auto !important;
        padding: 0 15px !important;
        float: none !important;
        clear: both !important;
        display: block !important;
        text-align: center;
        animation: none !important;
    }
    
    .vanta-center-image img,
    .vanta-right-image img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
        display: block !important;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
    }
    
    /* Magazine Slideshow in Hero - Mobile Fix */
    #hero-magazine-slideshow {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 250px !important;
        margin: 15px auto 0 !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        display: block !important;
    }
    
    /* Hide the placeholder image in center */
    .vanta-center-image img[style*="opacity: 0"] {
        display: none !important;
    }
    
    /* Text Overlays - Remove or Reposition */
    .vanta-center-image-text,
    .vanta-right-image-text {
        position: relative !important;
        margin-top: 15px !important;
        text-align: center !important;
        padding: 0 15px !important;
    }
    
    .vanta-center-image-text p,
    .vanta-right-image-text p {
        font-size: 14px;
        line-height: 1.5;
        margin: 5px 0;
    }
    
    /* Hero Buttons - Stacked Center */
    .hero-cta-button,
    .hero-magazine-button-wrapper {
        position: relative !important;
        margin: 25px auto !important;
        text-align: center !important;
        transform: none !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: 100% !important;
        padding: 0 15px !important;
    }
    
    .hero-cta-button .default-btn,
    .hero-magazine-btn,
    #first-anniversary-btn {
        width: 100%;
        max-width: 280px;
        margin: 8px auto;
        display: block;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    /* Contact Info - Centered */
    .hero-contact-info {
        position: relative !important;
        margin: 25px auto !important;
        text-align: center !important;
        right: auto !important;
        bottom: auto !important;
        width: 100% !important;
        padding: 0 15px !important;
    }
    
    .contact-line {
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
}

/* ==========================================
   MOBILE NAVIGATION DRAWER - Right Side
   ========================================== */
@media (max-width: 991px) {
    .mobile-nav-drawer {
        width: 85% !important;
        max-width: 320px !important;
        left: auto !important;
        right: -100% !important;
        top: 65px !important; /* Below mobile navbar */
        height: calc(100vh - 65px) !important;
        transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
        border-radius: 0 !important;
        box-shadow: -4px 0 30px rgba(0, 0, 0, 0.5) !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .mobile-nav-drawer.active {
        right: 0 !important;
        left: auto !important;
    }
    
    .mobile-nav-overlay {
        z-index: 9999 !important;
        display: block !important;
    }
    
    .mobile-nav-overlay.active {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .mobile-nav-drawer {
        z-index: 10001 !important;
    }
    
    /* Ensure menu is visible and functional */
    .mobile-nav-menu {
        display: block !important;
        visibility: visible !important;
    }
    
    .mobile-nav-menu li {
        display: block !important;
    }
    
    .mobile-nav-menu a {
        display: flex !important;
        visibility: visible !important;
    }
}

/* ==========================================
   MOBILE MAGAZINE GALLERY FIX
   ========================================== */
@media (max-width: 767px) {
    .project-gallery-section {
        padding: 40px 0;
    }
    
    .magazine-wrapper {
        padding: 1rem 0.5rem;
        width: 100%;
        max-width: 100%;
    }
    
    .magazine-container {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-height: 350px;
        margin: 0 auto;
    }
    
    .magazine-book {
        width: 100%;
        height: 400px;
    }
    
    .magazine-page {
        width: 100%;
        height: 100%;
    }
    
    .magazine-page-image-full {
        height: calc(100% - 60px);
    }
    
    .magazine-page-image-full img {
        object-fit: cover;
        width: 100%;
        height: 100%;
    }
    
    .magazine-controls {
        position: absolute;
        bottom: 70px;
        left: 0;
        right: 0;
        z-index: 10;
    }
    
    .magazine-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .magazine-indicators {
        position: absolute;
        bottom: 10px;
        left: 0;
        right: 0;
        z-index: 10;
    }
}

/* ==========================================
   MOBILE SECTIONS - Clean Spacing
   ========================================== */
@media (max-width: 767px) {
    section {
        padding: 40px 0 !important;
    }
    
    .ptb-100 {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }
    
    .section-title {
        margin-bottom: 30px;
        text-align: center;
        padding: 0 15px;
    }
    
    .section-title h2 {
        font-size: 24px !important;
        line-height: 1.3;
    }
    
    /* All content sections - full width */
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    [class*="col-"] {
        padding-left: 10px !important;
        padding-right: 10px !important;
        margin-bottom: 20px;
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* ==========================================
   MOBILE CAPABILITIES - Stacked Cards
   ========================================== */
@media (max-width: 767px) {
    .services-area .single-services-box {
        width: 100%;
        margin: 0 0 25px 0;
        padding: 25px 20px;
        text-align: center;
    }
    
    .single-services-box .icon {
        font-size: 45px;
        margin: 0 auto 15px;
        display: block;
    }
    
    .single-services-box h3 {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .single-services-box p {
        font-size: 14px;
        line-height: 1.6;
    }
}

/* ==========================================
   MOBILE CASE STUDIES - Full Width
   ========================================== */
@media (max-width: 767px) {
    .case-studies-area .single-case-study {
        width: 100%;
        margin: 0 0 25px 0;
    }
    
    .case-study-image {
        height: 200px !important;
    }
    
    .case-study-content {
        padding: 20px !important;
    }
    
    .case-study-content h3 {
        font-size: 18px !important;
        margin-bottom: 12px;
    }
    
    .case-study-content p {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .case-study-content .default-btn {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================
   MOBILE ABOUT SECTION
   ========================================== */
@media (max-width: 767px) {
    .about-area .row {
        flex-direction: column-reverse;
    }
    
    .about-image {
        margin-bottom: 30px;
    }
    
    .about-image img {
        width: 100%;
        height: auto;
        border-radius: 8px;
    }
    
    .about-content {
        text-align: center;
        padding: 0 15px;
    }
}

/* ==========================================
   MOBILE CONTACT FORM
   ========================================== */
@media (max-width: 767px) {
    .contact-area .row {
        flex-direction: column;
    }
    
    .contact-info {
        margin-bottom: 30px;
        text-align: center;
    }
    
    .contact-form {
        width: 100%;
    }
    
    .form-control {
        font-size: 16px !important;
        padding: 12px 15px;
        width: 100%;
    }
    
    .default-btn {
        width: 100%;
        padding: 14px 25px;
    }
}

/* ==========================================
   MOBILE UTILITIES
   ========================================== */
@media (max-width: 991px) {
    /* Hide desktop elements */
    .hide-mobile {
        display: none !important;
    }
    
    /* Show mobile elements */
    .show-mobile {
        display: block !important;
    }
    
    /* Full width on mobile */
    .full-width-mobile {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Center text on mobile */
    .text-center-mobile {
        text-align: center !important;
    }
}

/* ==========================================
   MOBILE FIXES - Remove Overlapping
   ========================================== */
@media (max-width: 991px) {
    /* Remove all absolute positioning that causes jumbling */
    .vanta-center-image,
    .vanta-right-image {
        position: relative !important;
        float: none !important;
        clear: both !important;
        margin-top: 25px !important;
        margin-bottom: 25px !important;
    }
    
    /* Override any desktop positioning */
    .vanta-hero-section .vanta-center-image,
    .vanta-hero-section .vanta-right-image {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
    }
    
    /* Ensure proper stacking */
    .vanta-hero-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
    }
    
    /* Fix body overflow */
    body {
        overflow-x: hidden;
        width: 100%;
    }
    
    /* Hide any desktop layout containers */
    .d-table,
    .d-table-cell {
        display: block !important;
    }
    
    .main-banner-content,
    .banner-image {
        display: none !important;
    }
}

/* ==========================================
   MOBILE WHATSAPP BUTTON
   ========================================== */
@media (max-width: 767px) {
    .whatsapp-float,
    .hero-whatsapp-icon {
        width: 55px !important;
        height: 55px !important;
        bottom: 25px !important;
        right: 25px !important;
        z-index: 9998;
    }
}

