/* ========================================
   Mobile & Tablet Responsive Enhancements
   Real Estate Deals Platform
   ======================================== */

/* ========================================
   Global Mobile Optimizations
   ======================================== */

/* Ensure proper touch targets (minimum 44x44px) */
@media (max-width: 767.98px) {
    .btn,
    .form-control,
    .form-select,
    button,
    a.btn {
        min-height: 44px;
        padding: 12px 16px;
    }

    /* Improve readability */
    body {
        font-size: 14px;
        line-height: 1.6;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    /* Container padding */
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Card spacing */
    .card {
        margin-bottom: 16px;
    }

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

/* ========================================
   Hero Section - Mobile
   ======================================== */
@media (max-width: 767.98px) {
    .hero {
        min-height: 300px;
        padding: 40px 0;
    }

    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 12px;
    }

    .breadcrumb {
        font-size: 0.875rem;
    }

    .breadcrumb-item {
        padding: 4px 8px;
    }
}

/* ========================================
   Filters Sidebar - Mobile (Off-canvas style)
   ======================================== */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: #fff;
        z-index: 1050;
        transition: right 0.3s ease;
        overflow-y: auto;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        padding: 20px;
    }

    .sidebar.show {
        right: 0;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        display: none;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .filter-toggle-btn {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 1030;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: linear-gradient(135deg, #306955 0%, #467e67 100%);
        color: white;
        border: none;
        box-shadow: 0 4px 12px rgba(48, 105, 85, 0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
    }

    .listings-section {
        width: 100%;
        padding: 0;
    }

    .content-wrapper {
        flex-direction: column;
    }
}

/* ========================================
   Cards Grid - Responsive
   ======================================== */
@media (max-width: 767.98px) {
    .projects-list.grid-view {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .project-card {
        margin-bottom: 16px;
    }

    /* List view on mobile */
    .projects-list.list-view .project-card {
        flex-direction: column;
    }

    .project-image-wrapper {
        width: 100%;
        height: 200px;
    }

    .project-body {
        width: 100%;
        padding: 16px;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023.98px) {
    .projects-list.grid-view {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* ========================================
   Countdown Timer - Mobile
   ======================================== */
@media (max-width: 767.98px) {
    .countdown-ring-wrapper {
        width: 60px;
        height: 60px;
    }

    .countdown-ring-wrapper svg {
        width: 60px;
        height: 60px;
    }

    .countdown-timer {
        font-size: 8px;
    }

    .timer-unit {
        min-width: 50px;
        padding: 8px;
    }

    .timer-val {
        font-size: 18px;
    }

    .timer-label {
        font-size: 10px;
    }

    .auction-countdown-section {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
}

/* ========================================
   Auction Details Page - Mobile
   ======================================== */
@media (max-width: 767.98px) {
    .gallery-container {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .main-img-wrapper {
        height: 250px;
    }

    .secondary-images {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .secondary-img-wrapper {
        height: 100px;
    }

    .info-sidebar-layout {
        flex-direction: column;
    }

    .property-main-content,
    .details-sidebar {
        width: 100%;
    }

    .specs-grid-horizontal {
        flex-direction: column;
        gap: 12px;
    }

    .spec-item-horizontal {
        width: 100%;
    }
}

/* ========================================
   Forms - Mobile
   ======================================== */
@media (max-width: 767.98px) {
    .form-row {
        flex-direction: column;
    }

    .form-row > div {
        width: 100%;
        margin-bottom: 16px;
    }

    /* File upload area */
    .upload-area {
        min-height: 150px;
        padding: 20px;
    }

    .upload-area p {
        font-size: 0.875rem;
    }
}

/* ========================================
   Pagination - Mobile
   ======================================== */
@media (max-width: 767.98px) {
    .pagination-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .pagination {
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .page-link {
        padding: 8px 12px;
        font-size: 0.875rem;
    }
}

/* ========================================
   Toolbar - Mobile
   ======================================== */
@media (max-width: 767.98px) {
    .listings-toolbar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .view-toggle-group {
        justify-content: center;
    }

    .results-count {
        text-align: center;
        font-size: 0.875rem;
    }
}

/* ========================================
   Toast Notifications - Mobile
   ======================================== */
@media (max-width: 767.98px) {
    .toast-notification {
        width: calc(100% - 32px);
        right: -100%;
        left: auto;
    }

    .toast-notification.active {
        right: 16px;
    }

    .toast-content {
        padding: 16px;
        gap: 12px;
    }

    .toast-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .toast-text {
        font-size: 13px;
    }
}

/* ========================================
   Badges and Tags - Mobile
   ======================================== */
@media (max-width: 767.98px) {
    .badge-ribbon {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .project-status-badge {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
}

/* ========================================
   Advertiser Card - Mobile
   ======================================== */
@media (max-width: 767.98px) {
    .advertiser-card {
        padding: 16px;
    }

    .advertiser-logo {
        width: 60px;
        height: 60px;
    }

    .advertiser-name {
        font-size: 1rem;
    }
}

/* ========================================
   Deposit Section - Mobile
   ======================================== */
@media (max-width: 767.98px) {
    .deposit-section {
        padding: 20px;
        margin-top: 16px;
    }

    .deposit-amount {
        font-size: 24px;
    }
}

/* ========================================
   Date Info - Mobile
   ======================================== */
@media (max-width: 767.98px) {
    .auction-date-info,
    .auction-deposit-info {
        flex-wrap: wrap;
        font-size: 13px;
    }

    .date-label,
    .deposit-label {
        width: 100%;
        margin-bottom: 4px;
    }
}

/* ========================================
   Header & Navigation - Mobile
   ======================================== */
/* ========================================
   Header & Navigation - Mobile FIXED
   ======================================== */
@media (max-width: 991.98px) {
    /* 1. Header Container */
    .header {
        background-color: #ffffff !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        padding: 0 !important;
        position: sticky;
        top: 0;
        z-index: 1020;
        height: 75px !important; /* Slightly increased for larger logo */
        display: flex !important;
        align-items: center !important;
    }

    .header .container-fluid {
        height: 100%;
        padding: 0 15px !important;
    }

    .navbar {
        height: 100%;
        width: 100%;
        padding: 0 !important;
        display: flex !important;
        flex-direction: row !important; /* Follows document direction (RTL) */
        align-items: center !important;
        justify-content: space-between !important;
        position: relative !important;
        flex-wrap: nowrap !important;
    }

    /* 2. Hide Desktop Elements strictly */
    .header-center,
    .navbar-nav.d-none.d-lg-flex,
    .add-ad-dropdown,
    .header-divider,
    .user-name {
        display: none !important;
    }

    /* 3. Logo Section - Far Right (45% Space) */
    .logo-header-wrapper {
        order: 1 !important;
        flex: 1 1 45% !important; 
        display: flex !important;
        /* Explictly push to the far start (Right in RTL) */
        justify-content: flex-start !important; 
        z-index: 10 !important;
        min-width: 0 !important;
        padding-right: 0 !important; /* Ensure it hugs the container edge */
    }

    .logo-icon-wrapper {
        max-width: 150px !important; /* Visual dominant size */
        height: 55px !important;    /* 25%+ larger than others */
        display: flex !important;
        align-items: center !important;
    }

    .logo-icon-img {
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
    }

    /* 4. Actions (Login) - Scaled Down Area (35% Space) */
    .header-left {
        order: 2 !important;
        flex: 1 1 35% !important; 
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 5 !important;
        position: static !important;
        transform: none !important;
    }

    /* Compact login to ensure logo dominance - LOCKED height */
    .header-left .btn-primary {
        min-width: 75px !important;
        height: 28px !important;
        min-height: 28px !important;
        max-height: 28px !important;
        padding: 0 10px !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        border-radius: 6px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
        background: #306955 !important;
        border: none !important;
        line-height: 1 !important;
        align-self: center !important; /* Force center alignment */
    }
    
    .action-icon-btn, .user-avatar-circle {
        width: 28px !important; /* Smaller size */
        height: 28px !important;
        background: #f5f6f7 !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 12px !important;
        color: #333 !important;
    }

    .header-left .language-dropdown {
        display: none !important;
    }

    /* 5. Mobile Menu Toggle - Minimalist (20% Space) */
    .navbar-toggler-custom {
        order: 3 !important;
        flex: 1 1 20% !important; 
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: flex-end !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        margin: 0 !important;
        z-index: 10 !important;
    }

    .toggler-icon {
        display: block;
        width: 20px; /* Thinner burger */
        height: 2px;
        background-color: #333;
        border-radius: 20px;
        margin: 3px 0;
        transition: all 0.3s ease;
    }
    
    /* Animation for active menu */
    .mobile-offcanvas-menu.active ~ .navbar-toggler-custom .toggler-icon:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .mobile-offcanvas-menu.active ~ .navbar-toggler-custom .toggler-icon:nth-child(2) {
        opacity: 0;
    }
    .mobile-offcanvas-menu.active ~ .navbar-toggler-custom .toggler-icon:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* Fix Content Spacing */
    body {
        padding-top: 0;
    }
    
    .main-content, .hero {
        margin-top: 0 !important;
    }

    .hero-section .content-wrapper, .hero-slide-content .content-wrapper {
        padding-top: 25px !important;
    }
}

/* ========================================
   Home Page Transparent Header - Mobile (Strict Mode)
   ======================================== */
@media (max-width: 991.98px) {
    
    /* Layout Reset for Home Page */
    body.is-home-page,
    body.is-home-page main,
    body.is-home-page .hero,
    body.is-home-page .main-content {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* Force Hero to fit viewport without scroll */
    body.is-home-page .hero {
        padding-top: 85px !important; /* Space for header */
        height: 100vh !important;
        min-height: auto !important;
        max-height: 100vh !important;
        background-position: top center !important;
        margin-top: -1px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important; /* Align content to top */
        overflow: hidden !important; /* Cut anything overflowing */
    }

    /* Transparent Header Overlay - Alignment Match */
    body.is-home-page .header, 
    body.is-home-page .header.scrolled {
        background: transparent !important;
        background-image: none !important;
        box-shadow: none !important;
        position: absolute !important;
        top: 0;
        left: 0;
        right: 0;
        width: 100% !important;
        border: none !important;
        z-index: 1050;
        padding-top: 0 !important;
    }

    /* Compact Content Wrapper */
    .hero-section .content-wrapper, 
    .hero-slide-content .content-wrapper,
    body.is-home-page .hero .container {
        padding-top: 10px !important; /* Minimized top padding */
        padding-bottom: 0 !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Badge Compact */
    .hero-badge {
        margin-bottom: 10px !important;
        padding: 4px 12px !important;
        font-size: 12px !important;
    }

    /* Main Title Compact */
    .hero-title, .hero h1 {
        font-size: 24px !important; /* Reduced from likely 30+ */
        line-height: 1.3 !important;
        margin-bottom: 8px !important;
    }

    /* Subtitle Compact */
    .hero-subtitle, .hero p {
        font-size: 13px !important;
        line-height: 1.4 !important;
        margin-bottom: 10px !important;
        max-width: 90% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Hero Image/Building - Ensure visibility */
    .hero-image-wrapper, 
    .hero img.main-img,
    .hero-section .mt-4 { /* Target the building image container */
        margin-top: auto !important; /* Push to bottom */
        margin-bottom: 0 !important;
        max-height: 35vh !important; /* Limit height to 35% of screen */
        object-fit: contain !important;
        display: block !important;
        width: 100% !important;
    }
    
    .hero-section .mt-4 img {
        max-height: 100% !important;
        width: auto !important;
        max-width: 100% !important;
    }

    /* White Elements for Dark Background Visibility */
    body.is-home-page .navbar-toggler-custom .toggler-icon {
        background-color: #ffffff !important;
    }

    body.is-home-page .action-icon-btn,
    body.is-home-page .user-avatar-circle {
        background: rgba(255, 255, 255, 0.15) !important;
        color: #ffffff !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        backdrop-filter: blur(4px);
    }
    
    body.is-home-page .header-left .btn-primary {
        background: rgba(255, 255, 255, 0.2) !important;
        color: #ffffff !important;
        border: 1px solid rgba(255, 255, 255, 0.4) !important;
        box-shadow: none !important;
        height: 28px !important;
        min-height: 28px !important;
        max-height: 28px !important;
    }

    body.is-home-page .notification-badge {
        background-color: #d32f2f !important;
        color: #fff !important;
        border: 1px solid #fff !important;
    }

    body.is-home-page .header-left .language-dropdown {
        display: none !important;
    }
}

/* Mobile Menu Backdrop */
.mobile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2147483646 !important;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-backdrop.active {
    display: block;
    opacity: 1;
}

/* Offcanvas Menu Styles (Refined) */
.mobile-offcanvas-menu {
    position: fixed;
    top: 0;
    width: 300px;
    height: 100vh;
    background: #fff; /* Always white background for the menu itself */
    z-index: 2147483647 !important;
    transition: transform 0.3s ease;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

/* LTR Default */
.mobile-offcanvas-menu {
    right: 0;
    transform: translateX(100%);
}
.mobile-offcanvas-menu.active {
    transform: translateX(0);
}

.offcanvas-header {
    padding: 24px 20px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.offcanvas-logo img {
    max-height: 50px;
    width: auto;
}

.btn-close-custom {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f9fafb;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    transition: all 0.2s ease;
}

.btn-close-custom:hover {
    background: #fee2e2;
    color: #ef4444;
}

.offcanvas-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-nav-list {
    list-style: none;
    padding: 10px;
    margin: 0;
    flex: 0 0 auto; /* Don't grow */
}

.mobile-nav-list li {
    margin-bottom: 4px;
}

.mobile-nav-list li a {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    color: #4b5563;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-weight: 500;
}

.mobile-nav-list li a .nav-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #9ca3af;
    transition: all 0.3s ease;
    margin-left: 12px; /* RTL spacing */
}

/* Professional Active State */
.mobile-nav-list li a.active {
    background: #f0fdf4;
    color: #306955;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(48, 105, 85, 0.08);
}

.mobile-nav-list li a.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: #306955;
    border-radius: 4px 0 0 4px;
}

.mobile-nav-list li a.active .nav-icon {
    color: #306955;
    transform: scale(1.1);
}

.mobile-nav-list li a:not(.active):hover {
    background: #f9fafb;
    color: #306955;
}

.mobile-nav-list li a:not(.active):hover .nav-icon {
    color: #306955;
}

/* Mobile Language Section */
.mobile-language-section {
    padding: 20px;
    border-top: 1px solid #f3f4f6;
    margin-top: auto; /* Push to bottom */
}

.language-title {
    font-size: 13px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    text-align: center;
}

.language-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.language-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 10px;
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.language-option:hover {
    background: #f3f4f6;
    color: #306955;
}

.language-option.active {
    background: #f0fdf4;
    color: #306955;
    border-color: #306955;
    font-weight: 700;
}

.language-option .language-name {
    flex: 1;
    text-align: right;
}

.language-option i {
    color: #306955;
    font-size: 14px;
}

/* RTL Specifics */
[dir="rtl"] .mobile-offcanvas-menu {
    right: auto; /* Reset right */
    left: 0;
    transform: translateX(-100%);
}

[dir="rtl"] .mobile-offcanvas-menu.active {
    transform: translateX(0);
}

/* Hide desktop stuff strictly */
@media (max-width: 991.98px) {
    .d-none.d-lg-flex {
        display: none !important;
    }
}

/* ========================================
   Footer - Mobile
   ======================================== */
@media (max-width: 767.98px) {
    .footer {
        padding: 40px 0 20px;
    }

    .footer-col {
        margin-bottom: 30px;
    }

    .footer-title {
        font-size: 1.1rem;
        margin-bottom: 16px;
    }

    .footer-links {
        font-size: 0.875rem;
    }
}

/* ========================================
   Search Input - Mobile
   ======================================== */
@media (max-width: 767.98px) {
    .search-wrapper {
        width: 100%;
    }

    .search-input {
        font-size: 14px;
        padding: 12px 40px 12px 16px;
    }
}

/* ========================================
   Action Buttons - Mobile
   ======================================== */
@media (max-width: 767.98px) {
    .action-buttons {
        gap: 8px;
    }

    .action-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .btn-favorite-project {
        width: 40px;
        height: 40px;
    }
}

/* ========================================
   RTL Support - Mobile
   ======================================== */
@media (max-width: 991.98px) {
    [dir="rtl"] .sidebar {
        right: auto;
        left: -100%;
    }

    [dir="rtl"] .sidebar.show {
        right: auto;
        left: 0;
    }

    [dir="rtl"] .filter-toggle-btn {
        right: auto;
        left: 20px;
    }
}

/* ========================================
   Tablet Optimizations
   ======================================== */
@media (min-width: 768px) and (max-width: 1023.98px) {
    .container {
        max-width: 720px;
    }

    .hero {
        min-height: 350px;
    }

    .project-card {
        margin-bottom: 20px;
    }

    .countdown-ring-wrapper {
        width: 70px;
        height: 70px;
    }

    .countdown-ring-wrapper svg {
        width: 70px;
        height: 70px;
    }
}

/* ========================================
   Utility Classes for Mobile
   ======================================== */
@media (max-width: 767.98px) {
    .mobile-hidden {
        display: none !important;
    }

    .mobile-visible {
        display: block !important;
    }

    .mobile-stack {
        flex-direction: column !important;
    }

    .mobile-full-width {
        width: 100% !important;
    }

    .mobile-text-center {
        text-align: center !important;
    }

    .mobile-p-2 {
        padding: 0.5rem !important;
    }

    .mobile-mb-3 {
        margin-bottom: 1rem !important;
    }
}

/* ========================================
   Performance Optimizations
   ======================================== */
@media (max-width: 767.98px) {
    /* Reduce animations on mobile for better performance */
    * {
        animation-duration: 0.2s !important;
        transition-duration: 0.2s !important;
    }

    /* Optimize images */
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ========================================
   Accessibility - Touch Targets
   ======================================== */
@media (max-width: 767.98px) and (hover: none) {
    /* Ensure all interactive elements are touch-friendly */
    a, button, input, select, textarea, .clickable {
        min-height: 44px;
        min-width: 44px;
    }

    /* Remove hover effects on touch devices */
    .btn:hover,
    .card:hover {
        transform: none;
    }
}

/* ========================================
   Footer Mobile Optimization
   ======================================== */
@media (max-width: 767.98px) {
    .main-footer,
    .footer-widget {
        text-align: center !important;
    }

    .main-footer .footer-logo,
    .main-footer .footer-about,
    .main-footer .footer-links,
    .main-footer .footer-contact-info,
    .main-footer .social-links {
        text-align: center !important;
        justify-content: center !important;
        align-items: center !important;
        display: flex;
        flex-direction: column;
    }
    
    .footer-logo img {
        margin: 0 auto 15px auto !important;
        display: block;
    }

    .footer-links {
        padding: 0;
        list-style: none;
    }

    .footer-links ul {
        padding: 0;
        width: 100%;
    }

    .footer-links ul li,
    .footer-links li {
        justify-content: center !important;
        display: flex;
        width: 100%;
    }

    .footer-links ul li a,
    .footer-links li a {
        width: auto;
    }

    h3, h4, .h3, .h4, .footer-title, .widget-title {
        text-align: center !important;
    }
    
    .social-links {
        display: flex !important;
        flex-direction: row !important; /* Keep icons in row */
        justify-content: center !important;
        gap: 10px;
        width: 100%;
        margin-top: 15px;
    }

    /* Newsletter form centering */
    .footer-newsletter form {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    /* Order: Make Logo/Social column appear FIRST */
    .main-footer .row {
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Target the logo column specifically */
    .main-footer .row > div:has(.footer-logo),
    .main-footer .row > div:last-child {
        order: -1 !important;
        margin-bottom: 20px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important; /* Critical for centering */
        width: 100% !important;
    }

    .footer-logo {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin-bottom: 15px !important;
        text-align: center !important;
    }

    .footer-logo img {
        margin: 0 auto !important;
        display: block !important;
        max-width: 150px; /* Ensure reasonable size */
    }
    
    /* Center Help/Title below logo */
    .footer-title {
        width: 100%;
        text-align: center !important;
    }
}

/* Footer Subscribe Button Styling */
.footer-subscribe .btn {
    border-radius: 10px !important;
}
