﻿/* ===== MOBILE RESPONSIVE FIXES FOR TENANT APPLICATION ===== */

/* ===== GLOBAL MOBILE IMPROVEMENTS - APPLIED TO ALL PAGES ===== */

/* Better mobile container behavior */
@media (max-width: 768px) {
    /* Improve overall mobile layout for ALL pages */
    .main-content,
    .page-content,
    .content-wrapper,
    main {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    /* Better mobile container spacing for ALL containers */
    .container,
    .container-fluid,
    .container-sm,
    .container-md,
    .container-lg,
    .container-xl {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        max-width: 100% !important;
    }

    /* Improve mobile typography globally */
    body {
        font-size: 14px;
        line-height: 1.5;
    }

    /* Global heading sizes for mobile */
    h1, .h1 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.75rem !important;
    }

    h2, .h2 {
        font-size: 1.3rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.5rem !important;
    }

    h3, .h3 {
        font-size: 1.1rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.5rem !important;
    }

    h4, .h4 {
        font-size: 1rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.375rem !important;
    }

    h5, .h5 {
        font-size: 0.9rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.375rem !important;
    }

    h6, .h6 {
        font-size: 0.85rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.25rem !important;
    }
    

    /* Improve mobile card layouts globally */
    .card {
        border-radius: 0.75rem;
        margin-bottom: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .card-header {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .card-footer {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    /* Global table improvements for mobile */
    .table {
        font-size: 0.85rem;
    }

    .table th,
    .table td {
        padding: 0.5rem;
        vertical-align: middle;
    }

    /* Global modal improvements for mobile */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 0.75rem 1rem;
    }

    /* Global navigation improvements */
    .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .navbar-nav .nav-link {
        padding: 0.625rem 0.75rem;
    }

    /* Global list improvements */
    .list-group-item {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    /* Global alert improvements */
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-radius: 0.5rem;
    }
}

/* ===== PUBLIC HOME PAGE MOBILE FIXES ===== */

@media (max-width: 768px) {
    /* Hero section mobile improvements - more compact */
    .compact-hero {
        padding: 1rem 0 0.75rem 0 !important;
    }

    .compact-hero .container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .hero-content {
        padding: 0 0.25rem;
    }

    .hero-title {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    .hero-subtitle {
        font-size: 0.9rem !important;
        margin-bottom: 1rem !important;
    }

    /* Search bar mobile optimization */
    .standout-search {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .search-bar-container {
        margin-left: 0.25rem !important;
        margin-right: 0.25rem !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        padding: 0.5rem !important;
    }

    /* Ensure search button is visible */
    .search-btn {
        display: flex !important;
        width: 100% !important;
        background: var(--primary-blue, #00A6FF) !important;
        color: white !important;
        margin-top: 0.5rem !important;
        padding: 0.75rem !important;
        border-radius: 8px !important;
        font-weight: 600 !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }

    .filter-btn {
        display: flex !important;
        width: 100% !important;
        margin-top: 0.25rem !important;
        padding: 0.75rem !important;
        border-radius: 8px !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }

    /* Accommodation tabs mobile improvements */
    .accommodation-tabs-section {
        margin-top: 1.5rem;
        margin-bottom: 1rem;
    }

    .accommodation-tabs {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        margin-bottom: 0.5rem;
    }

    /* Property grid mobile improvements */
    .property-grid {
        margin-top: 2rem;
        padding: 0 0.5rem;
    }

    .property-card {
        margin-bottom: 1.5rem;
    }

    /* Categories grid mobile improvements */
    .categories-grid {
        padding: 0 0.5rem;
        margin-top: 2rem;
    }

    .category-card {
        margin-bottom: 1.5rem;
    }

    /* How it works section mobile */
    .step-card {
        margin-bottom: 2rem;
    }

    .step-icon {
        width: 60px !important;
        height: 60px !important;
    }

    .step-icon i {
        font-size: 1.5rem !important;
    }
}

/* ===== SMALL MOBILE SCREENS (576px and below) ===== */

@media (max-width: 576px) {
    /* Tighter mobile spacing for ALL pages */
    .main-content,
    .page-content,
    .content-wrapper,
    main {
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }

    .container,
    .container-fluid,
    .container-sm,
    .container-md,
    .container-lg,
    .container-xl {
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }

    /* Even smaller typography for small screens */
    body {
        font-size: 13px;
    }

    h1, .h1 {
        font-size: 1.3rem !important;
        margin-bottom: 0.5rem !important;
    }

    h2, .h2 {
        font-size: 1.1rem !important;
        margin-bottom: 0.375rem !important;
    }

    h3, .h3 {
        font-size: 1rem !important;
        margin-bottom: 0.375rem !important;
    }

    h4, .h4 {
        font-size: 0.9rem !important;
        margin-bottom: 0.25rem !important;
    }

    h5, .h5 {
        font-size: 0.85rem !important;
        margin-bottom: 0.25rem !important;
    }

    h6, .h6 {
        font-size: 0.8rem !important;
        margin-bottom: 0.25rem !important;
    }

    /* Smaller cards */
    .card-body {
        padding: 0.75rem;
    }

    .card-header,
    .card-footer {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    /* Smaller modals */
    .modal-dialog {
        margin: 0.25rem;
        max-width: calc(100% - 0.5rem);
    }

    .modal-header,
    .modal-body {
        padding: 0.75rem;
    }

    .modal-footer {
        padding: 0.5rem 0.75rem;
    }

    /* Smaller navigation */
    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 0.625rem;
    }

    /* Smaller lists and alerts */
    .list-group-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .alert {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    /* Smaller tables */
    .table {
        font-size: 0.8rem;
    }

    .table th,
    .table td {
        padding: 0.375rem;
    }

    /* Hero section for small screens - even more compact */
    .compact-hero {
        padding: 0.75rem 0 0.5rem 0 !important;
    }

    .compact-hero .container {
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }

    .hero-content {
        padding: 0 0.125rem;
    }

    .hero-title {
        font-size: 1.3rem !important;
        margin-bottom: 0.375rem !important;
    }

    .hero-subtitle {
        font-size: 0.8rem !important;
        margin-bottom: 0.75rem !important;
    }

    /* Search bar for small screens */
    .search-bar-container {
        margin-left: 0.25rem !important;
        margin-right: 0.25rem !important;
    }

    /* Tabs wrapper for small screens */
    .tabs-wrapper {
        margin-left: 0.25rem !important;
        margin-right: 0.25rem !important;
    }

    /* Property and category grids */
    .property-grid,
    .categories-grid {
        padding: 0 0.25rem;
    }

    /* Single column layout for very small screens */
    .col-6 {
        flex: 0 0 auto;
        width: 100% !important;
        margin-bottom: 1rem;
    }

    /* Better mobile typography */
    body {
        font-size: 13px;
    }

    .btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.875rem;
    }

    .btn-sm {
        font-size: 0.8rem;
        padding: 0.375rem 0.625rem;
    }
}

/* ===== VERY SMALL SCREENS (iPhone SE, etc.) ===== */

@media (max-width: 375px) {
    /* Ultra-compact spacing for ALL pages */
    .main-content,
    .page-content,
    .content-wrapper,
    main {
        padding-left: 0.125rem !important;
        padding-right: 0.125rem !important;
    }

    .container,
    .container-fluid,
    .container-sm,
    .container-md,
    .container-lg,
    .container-xl {
        padding-left: 0.125rem !important;
        padding-right: 0.125rem !important;
    }

    /* Ultra-compact typography */
    body {
        font-size: 12px;
    }

    h1, .h1 {
        font-size: 1.2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.375rem !important;
    }

    h2, .h2 {
        font-size: 1rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.25rem !important;
    }

    h3, .h3 {
        font-size: 0.9rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.25rem !important;
    }

    h4, .h4 {
        font-size: 0.85rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.25rem !important;
    }

    h5, .h5 {
        font-size: 0.8rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.125rem !important;
    }

    h6, .h6 {
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.125rem !important;
    }
    
    /* Ultra-compact cards */
    .card {
        border-radius: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .card-body {
        padding: 0.5rem;
    }

    .card-header,
    .card-footer {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
    }

    /* Ultra-compact modals */
    .modal-dialog {
        margin: 0.125rem;
        max-width: calc(100% - 0.25rem);
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 0.5rem;
    }

    /* Ultra-compact navigation */
    .nav-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
    }

    .navbar-nav .nav-link {
        padding: 0.375rem 0.5rem;
    }

    /* Ultra-compact lists and alerts */
    .list-group-item {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
    }

    .alert {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
        border-radius: 0.375rem;
    }

    /* Ultra-compact tables */
    .table {
        font-size: 0.75rem;
    }

    .table th,
    .table td {
        padding: 0.25rem;
    }

    /* Hero section ultra-compact */
    .compact-hero .container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    /* Search bar ultra-compact */
    .search-bar-container {
        margin-left: 0.125rem !important;
        margin-right: 0.125rem !important;
        padding: 0.375rem;
    }

    /* Tabs ultra-compact */
    .tabs-wrapper {
        margin-left: 0.125rem !important;
        margin-right: 0.125rem !important;
    }

    .accommodation-tabs {
        padding: 0.375rem 0.125rem;
    }

    .tab-item {
        min-width: 60px;
        padding: 0.25rem 0.375rem;
    }

    .tab-item i {
        font-size: 0.85rem;
    }

    .tab-item span {
        font-size: 0.6rem;
    }

    /* Ultra-compact typography */
    body {
        font-size: 12px;
    }
}

/* ===== TOUCH TARGET IMPROVEMENTS ===== */

/* Ensure all interactive elements meet minimum touch target size */
@media (max-width: 768px) {
    .btn,
    .form-control,
    .form-select,
    .tab-item,
    .nav-link {
        min-height: 44px;
    }

    /* Improve tap targets for small elements */
    .tab-item,
    .filter-btn,
    .search-btn {
        min-width: 44px;
        min-height: 44px;
    }
}

/* ===== MOBILE NAVIGATION IMPROVEMENTS ===== */

@media (max-width: 768px) {
    /* Better mobile navbar spacing */
    .navbar .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Improve mobile navbar brand */
    .navbar-brand img {
        max-height: 35px;
    }

    /* Better mobile navbar toggles */
    .navbar-toggler {
        padding: 0.5rem;
        border: none;
        min-height: 44px;
        min-width: 44px;
    }
}

/* ===== PROPERTY GRID MOBILE FIXES ===== */

@media (max-width: 768px) {
    /* Fix property grid to show 2 cards per row on mobile */
    .property-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
        padding: 0 0.5rem !important;
        margin-top: 1.5rem !important;
    }

    .property-card {
        max-width: 100% !important;
        margin-bottom: 0 !important;
    }

    .property-image-container {
        height: 160px !important;
        border-radius: 8px !important;
        margin-bottom: 0.5rem !important;
    }

    .property-content {
        padding: 0 0.125rem !important;
    }

    .property-title {
        font-size: 0.9rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.25rem !important;
    }

    .property-location,
    .property-type {
        font-size: 0.8rem !important;
        margin-bottom: 0.125rem !important;
    }

    /* Fix categories grid to single column on mobile */
    .categories-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
        padding: 0 0.75rem !important;
        margin-top: 1.5rem !important;
    }

    .category-card {
        max-width: 100% !important;
        margin-bottom: 0 !important;
    }

    .category-image-container {
        height: 160px !important;
        border-radius: 12px 12px 0 0 !important;
    }

    .category-content {
        padding: 1rem !important;
    }

    .category-title {
        font-size: 1.1rem !important;
        margin-bottom: 0.25rem !important;
    }

    .category-description {
        font-size: 0.9rem !important;
    }

    /* Section titles mobile optimization */
    .section-title {
        font-size: 1.5rem !important;
        text-align: center !important;
        margin-bottom: 0.5rem !important;
        padding: 0 1rem !important;
    }

    .section-subtitle {
        font-size: 0.95rem !important;
        text-align: center !important;
        margin-bottom: 1.5rem !important;
        padding: 0 1rem !important;
    }
}

@media (max-width: 576px) {
    /* Keep 2 cards per row but more compact */
    .property-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
        padding: 0 0.25rem !important;
    }

    .property-image-container {
        height: 140px !important;
    }

    .property-title {
        font-size: 0.85rem !important;
    }

    .property-location,
    .property-type {
        font-size: 0.75rem !important;
    }

    .categories-grid {
        gap: 1rem !important;
        padding: 0 0.5rem !important;
    }

    .category-image-container {
        height: 140px !important;
    }

    .category-title {
        font-size: 1rem !important;
    }

    .category-description {
        font-size: 0.85rem !important;
    }

    .section-title {
        font-size: 1.3rem !important;
    }

    .section-subtitle {
        font-size: 0.9rem !important;
    }
}

@media (max-width: 375px) {
    /* Ultra-compact for very small screens - still 2 per row */
    .property-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
        padding: 0 0.125rem !important;
    }

    .property-image-container {
        height: 120px !important;
    }

    .property-title {
        font-size: 0.8rem !important;
    }

    .property-location,
    .property-type {
        font-size: 0.7rem !important;
    }

    .categories-grid {
        gap: 0.875rem !important;
        padding: 0 0.375rem !important;
    }

    .category-image-container {
        height: 120px !important;
    }

    .section-title {
        font-size: 1.2rem !important;
    }

    .section-subtitle {
        font-size: 0.85rem !important;
    }
}

/* ===== HOW IT WORKS SECTION MOBILE FIXES ===== */

@media (max-width: 768px) {
    /* Fix step cards layout - EXCEPT for how-it-works section */
    .row.g-4 .col-lg-3.col-md-6:not(.how-it-works-section .col-lg-3.col-md-6) {
        flex: 0 0 auto;
        width: 100% !important;
        margin-bottom: 1.5rem;
    }

    .step-card {
        padding: 1.5rem !important;
        text-align: center;
        margin-bottom: 1rem;
    }

    .step-icon {
        width: 60px !important;
        height: 60px !important;
        margin: 0 auto 1rem auto !important;
    }

    .step-icon i {
        font-size: 1.5rem !important;
    }

    /* Fix feature cards layout */
    .row.g-4 .col-lg-4.col-md-6 {
        flex: 0 0 auto;
        width: 100% !important;
        margin-bottom: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem !important;
        text-align: center;
        margin-bottom: 1rem;
    }

    .feature-icon {
        margin-bottom: 1rem !important;
    }

    .feature-icon i {
        font-size: 2rem !important;
    }
}

@media (max-width: 576px) {
    .step-card {
        padding: 1.25rem !important;
    }

    .step-icon {
        width: 50px !important;
        height: 50px !important;
    }

    .step-icon i {
        font-size: 1.25rem !important;
    }

    .feature-card {
        padding: 1.25rem !important;
    }

    .feature-icon i {
        font-size: 1.75rem !important;
    }
}

/* ===== GLOBAL BOOTSTRAP GRID OVERRIDES FOR ALL PAGES ===== */

@media (max-width: 768px) {
    /* Better grid spacing for all pages */
    .row {
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }

    .row > * {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    /* Optimize common grid layouts */
    .row.g-4 {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 1rem;
    }

    .row.g-3 {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.75rem;
    }

    .row.g-2 {
        --bs-gutter-x: 0.25rem;
        --bs-gutter-y: 0.5rem;
    }

    /* Better column spacing */
    .col,
    .col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
    .col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
    .col-sm, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6,
    .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12,
    .col-md, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6,
    .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,
    .col-lg, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6,
    .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
        margin-bottom: 0.75rem;
    }
}

@media (max-width: 576px) {
    /* More aggressive grid optimization for small screens */
    .row {
        margin-left: -0.125rem;
        margin-right: -0.125rem;
    }

    .row > * {
        padding-left: 0.125rem;
        padding-right: 0.125rem;
    }

    /* Force single column layout on very small screens for better readability */
    /* Exception: Keep 2-column layout for accommodation results AND how-it-works section */
    .col-md-4:not(.accommodation-result):not(.how-it-works-section *),
    .col-md-6:not(.accommodation-result):not(.how-it-works-section *),
    .col-lg-3:not(.accommodation-result):not(.how-it-works-section *),
    .col-lg-4:not(.accommodation-result):not(.how-it-works-section *) {
        flex: 0 0 auto;
        width: 100% !important;
        margin-bottom: 0.75rem;
    }

    /* Keep 2-column layout for accommodation results on mobile */
    .col-6 {
        flex: 0 0 auto;
        width: 50% !important;
        margin-bottom: 0.75rem;
    }

    /* Tighter grid spacing */
    .row.g-4 {
        --bs-gutter-x: 0.25rem;
        --bs-gutter-y: 0.75rem;
    }

    .row.g-3 {
        --bs-gutter-x: 0.25rem;
        --bs-gutter-y: 0.5rem;
    }

    .row.g-2 {
        --bs-gutter-x: 0.125rem;
        --bs-gutter-y: 0.375rem;
    }

    /* Smaller column margins */
    .col,
    .col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
    .col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
    .col-sm, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6,
    .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12,
    .col-md, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6,
    .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,
    .col-lg, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6,
    .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 375px) {
    /* Ultra-tight grid for very small screens */
    .row {
        margin-left: -0.0625rem;
        margin-right: -0.0625rem;
    }

    .row > * {
        padding-left: 0.0625rem;
        padding-right: 0.0625rem;
    }

    /* Ultra-tight grid spacing */
    .row.g-4,
    .row.g-3,
    .row.g-2 {
        --bs-gutter-x: 0.125rem;
        --bs-gutter-y: 0.25rem;
    }

    /* Ultra-small column margins */
    .col,
    .col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
    .col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
    .col-sm, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6,
    .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12,
    .col-md, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6,
    .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,
    .col-lg, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6,
    .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
        margin-bottom: 0.375rem;
    }
}

/* ===== GLOBAL PAGE LAYOUT IMPROVEMENTS ===== */

@media (max-width: 768px) {
    /* Common page sections */
    .page-header,
    .section-header {
        padding: 1rem 0.5rem;
        margin-bottom: 1rem;
    }

    .page-title,
    .section-title {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    .page-subtitle,
    .section-subtitle {
        font-size: 0.95rem !important;
        margin-bottom: 1rem !important;
    }

    /* Common content areas */
    .content-section {
        padding: 1rem 0.5rem;
        margin-bottom: 1.5rem;
    }

    .sidebar {
        padding: 1rem 0.5rem;
    }

    /* Common form layouts */
    .form-section {
        padding: 1rem 0.5rem;
        margin-bottom: 1.5rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-row {
        margin-bottom: 0.75rem;
    }

    /* Common dashboard layouts */
    .dashboard-card,
    .stats-card,
    .info-card {
        margin-bottom: 1rem;
        padding: 1rem;
    }

    .dashboard-grid {
        gap: 1rem !important;
    }

    /* Common list layouts */
    .item-list,
    .data-list {
        margin-bottom: 1rem;
    }

    .list-item {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }

    /* Common filter and search layouts */
    .filter-section,
    .search-section {
        padding: 0.75rem 0.5rem;
        margin-bottom: 1rem;
    }

    .filter-controls,
    .search-controls {
        gap: 0.5rem;
    }

    /* Common pagination */
    .pagination {
        margin: 1rem 0;
        justify-content: center;
    }

    .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    /* Smaller page sections */
    .page-header,
    .section-header {
        padding: 0.75rem 0.25rem;
        margin-bottom: 0.75rem;
    }

    .content-section {
        padding: 0.75rem 0.25rem;
        margin-bottom: 1rem;
    }

    .form-section {
        padding: 0.75rem 0.25rem;
        margin-bottom: 1rem;
    }

    .dashboard-card,
    .stats-card,
    .info-card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .list-item {
        padding: 0.5rem;
        margin-bottom: 0.375rem;
    }

    .filter-section,
    .search-section {
        padding: 0.5rem 0.25rem;
        margin-bottom: 0.75rem;
    }

    .page-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 375px) {
    /* Ultra-compact page sections */
    .page-header,
    .section-header {
        padding: 0.5rem 0.125rem;
        margin-bottom: 0.5rem;
    }

    .content-section {
        padding: 0.5rem 0.125rem;
        margin-bottom: 0.75rem;
    }

    .form-section {
        padding: 0.5rem 0.125rem;
        margin-bottom: 0.75rem;
    }

    .dashboard-card,
    .stats-card,
    .info-card {
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .list-item {
        padding: 0.375rem;
        margin-bottom: 0.25rem;
    }

    .filter-section,
    .search-section {
        padding: 0.375rem 0.125rem;
        margin-bottom: 0.5rem;
    }

    .page-link {
        padding: 0.25rem 0.375rem;
        font-size: 0.8rem;
    }
}

/* ===== FOOTER MOBILE RESPONSIVE FIXES ===== */

@media (max-width: 768px) {
    /* Footer mobile improvements */
    footer.bg-dark {
        padding: 2rem 0 1.5rem 0 !important;
        margin-top: 2rem !important;
    }

    footer .container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    /* Footer columns - stack on mobile */
    footer .row .col-lg-4,
    footer .row .col-lg-2,
    footer .row .col-md-6 {
        flex: 0 0 auto;
        width: 100% !important;
        margin-bottom: 2rem !important;
        text-align: center !important;
    }

    /* Footer brand section */
    footer .col-lg-4 h5 {
        font-size: 1.3rem !important;
        margin-bottom: 1rem !important;
    }

    footer .col-lg-4 p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1.5rem !important;
        padding: 0 1rem;
    }

    /* Social links mobile optimization */
    footer .d-flex.gap-3 {
        justify-content: center !important;
        gap: 1.5rem !important;
    }

    footer .d-flex.gap-3 a {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 44px !important;
        height: 44px !important;
        border-radius: 50% !important;
        background-color: rgba(255, 255, 255, 0.1) !important;
        transition: all 0.3s ease !important;
    }

    footer .d-flex.gap-3 a:hover {
        background-color: var(--primary-blue, #00A6FF) !important;
        transform: translateY(-2px) !important;
    }

    footer .d-flex.gap-3 a i {
        font-size: 1.1rem !important;
    }

    /* Footer section headings */
    footer h6 {
        font-size: 1rem !important;
        margin-bottom: 1rem !important;
        color: white !important;
    }

    /* Footer links */
    footer ul.list-unstyled {
        padding: 0 1rem;
    }

    footer ul.list-unstyled li {
        margin-bottom: 0.75rem !important;
    }

    footer ul.list-unstyled li a {
        font-size: 0.9rem !important;
        display: inline-block !important;
        padding: 0.25rem 0 !important;
        transition: all 0.3s ease !important;
    }

    footer ul.list-unstyled li a:hover {
        color: var(--primary-blue, #00A6FF) !important;
        transform: translateX(5px) !important;
    }

    /* Contact info mobile */
    footer .text-muted div {
        margin-bottom: 0.75rem !important;
        font-size: 0.9rem !important;
    }

    footer .text-muted i {
        font-size: 1rem !important;
        margin-right: 0.75rem !important;
        color: var(--primary-blue, #00A6FF) !important;
    }

    /* Footer divider */
    footer hr {
        margin: 2rem 0 1.5rem 0 !important;
        opacity: 0.3 !important;
    }

    /* Footer bottom row */
    footer .row.align-items-center .col-md-6 {
        text-align: center !important;
        margin-bottom: 0.5rem !important;
    }

    footer .row.align-items-center small {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
    }
}

@media (max-width: 576px) {
    /* Even more compact footer for small screens */
    footer.bg-dark {
        padding: 1.5rem 0 1rem 0 !important;
        margin-top: 1.5rem !important;
    }

    footer .container {
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }

    /* Smaller footer sections */
    footer .row .col-lg-4,
    footer .row .col-lg-2,
    footer .row .col-md-6 {
        margin-bottom: 1.5rem !important;
    }

    footer .col-lg-4 h5 {
        font-size: 1.2rem !important;
        margin-bottom: 0.75rem !important;
    }

    footer .col-lg-4 p {
        font-size: 0.85rem !important;
        padding: 0 0.5rem;
        margin-bottom: 1rem !important;
    }

    /* Smaller social links */
    footer .d-flex.gap-3 {
        gap: 1rem !important;
    }

    footer .d-flex.gap-3 a {
        width: 40px !important;
        height: 40px !important;
    }

    footer .d-flex.gap-3 a i {
        font-size: 1rem !important;
    }

    /* Smaller section headings */
    footer h6 {
        font-size: 0.95rem !important;
        margin-bottom: 0.75rem !important;
    }

    /* Smaller footer links */
    footer ul.list-unstyled {
        padding: 0 0.5rem;
    }

    footer ul.list-unstyled li {
        margin-bottom: 0.5rem !important;
    }

    footer ul.list-unstyled li a {
        font-size: 0.85rem !important;
    }

    /* Smaller contact info */
    footer .text-muted div {
        margin-bottom: 0.5rem !important;
        font-size: 0.85rem !important;
    }

    footer .text-muted i {
        font-size: 0.9rem !important;
        margin-right: 0.5rem !important;
    }

    /* Smaller footer divider */
    footer hr {
        margin: 1.5rem 0 1rem 0 !important;
    }

    /* Smaller bottom text */
    footer .row.align-items-center small {
        font-size: 0.8rem !important;
    }
}

@media (max-width: 375px) {
    /* Ultra-compact footer for very small screens */
    footer.bg-dark {
        padding: 1rem 0 0.75rem 0 !important;
        margin-top: 1rem !important;
    }

    footer .container {
        padding-left: 0.125rem !important;
        padding-right: 0.125rem !important;
    }

    /* Ultra-compact footer sections */
    footer .row .col-lg-4,
    footer .row .col-lg-2,
    footer .row .col-md-6 {
        margin-bottom: 1rem !important;
    }

    footer .col-lg-4 h5 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }

    footer .col-lg-4 p {
        font-size: 0.8rem !important;
        padding: 0 0.25rem;
        margin-bottom: 0.75rem !important;
    }

    /* Ultra-compact social links */
    footer .d-flex.gap-3 {
        gap: 0.75rem !important;
    }

    footer .d-flex.gap-3 a {
        width: 36px !important;
        height: 36px !important;
    }

    footer .d-flex.gap-3 a i {
        font-size: 0.9rem !important;
    }

    /* Ultra-compact section headings */
    footer h6 {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
    }

    /* Ultra-compact footer links */
    footer ul.list-unstyled {
        padding: 0 0.25rem;
    }

    footer ul.list-unstyled li {
        margin-bottom: 0.375rem !important;
    }

    footer ul.list-unstyled li a {
        font-size: 0.8rem !important;
    }

    /* Ultra-compact contact info */
    footer .text-muted div {
        margin-bottom: 0.375rem !important;
        font-size: 0.8rem !important;
    }

    footer .text-muted i {
        font-size: 0.85rem !important;
        margin-right: 0.375rem !important;
    }

    /* Ultra-compact footer divider */
    footer hr {
        margin: 1rem 0 0.75rem 0 !important;
    }

    /* Ultra-compact bottom text */
    footer .row.align-items-center .col-md-6 {
        margin-bottom: 0.25rem !important;
    }

    footer .row.align-items-center small {
        font-size: 0.75rem !important;
    }
}

/* ===== FOOTER ACCESSIBILITY AND HOVER IMPROVEMENTS ===== */

/* Better hover states for footer links */
footer .hover-text-primary:hover {
    color: var(--primary-blue, #00A6FF) !important;
    transition: color 0.3s ease !important;
}

/* Focus states for footer links */
footer a:focus {
    outline: 2px solid var(--primary-blue, #00A6FF) !important;
    outline-offset: 2px !important;
    border-radius: 2px !important;
}

/* Better footer link accessibility */
@media (max-width: 768px) {
    footer a {
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        padding: 0.5rem 0 !important;
    }

    footer .d-flex.gap-3 a {
        min-height: 44px !important;
        min-width: 44px !important;
    }
}

@media (max-width: 576px) {
    footer a {
        min-height: 40px !important;
        padding: 0.375rem 0 !important;
    }

    footer .d-flex.gap-3 a {
        min-height: 40px !important;
        min-width: 40px !important;
    }
}

@media (max-width: 375px) {
    footer a {
        min-height: 36px !important;
        padding: 0.25rem 0 !important;
    }

    footer .d-flex.gap-3 a {
        min-height: 36px !important;
        min-width: 36px !important;
    }
}

/* ===== FIND ACCOMMODATION PAGE MOBILE FIXES ===== */

@media (max-width: 768px) {
    /* Ensure accommodation results show 2 per row */
    .find-accommodation-page .col-6.col-md-4.col-lg-3,
    .accommodation-results .col-6.col-md-4.col-lg-3 {
        flex: 0 0 auto;
        width: 50% !important;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
        margin-bottom: 1rem;
    }

    /* Fix card backgrounds - ensure white background */
    .card {
        background-color: #ffffff !important;
        border: 1px solid #e0e0e0 !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    }

    .card-body {
        background-color: #ffffff !important;
        color: #333333 !important;
    }

    .card-header {
        background-color: #f8f9fa !important;
        border-bottom: 1px solid #e0e0e0 !important;
        color: #333333 !important;
    }

    .card-footer {
        background-color: #f8f9fa !important;
        border-top: 1px solid #e0e0e0 !important;
        color: #333333 !important;
    }

    /* Airbnb-style cards specific fixes */
    .airbnb-card {
        background-color: #ffffff !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        transition: all 0.3s ease !important;
    }

    .airbnb-card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
        transform: translateY(-2px) !important;
    }

    .airbnb-content {
        background-color: #ffffff !important;
        color: #333333 !important;
        padding: 0.75rem !important;
    }

    .airbnb-title {
        color: #333333 !important;
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        margin-bottom: 0.25rem !important;
    }

    .airbnb-location,
    .airbnb-type {
        color: #666666 !important;
        font-size: 0.8rem !important;
        margin-bottom: 0.125rem !important;
    }

    .airbnb-price {
        color: #333333 !important;
        font-weight: 600 !important;
        font-size: 0.9rem !important;
    }

    /* Results section card */
    .find-accommodation-page .card.mb-3 {
        background-color: #ffffff !important;
        border: 1px solid #e0e0e0 !important;
        margin-bottom: 1.5rem !important;
    }

    /* Accommodation grid spacing */
    .find-accommodation-page .row.g-3 {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 1rem;
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }
}

@media (max-width: 576px) {
    /* Tighter spacing for small screens but keep 2-column */
    .find-accommodation-page .col-6.col-md-4.col-lg-3,
    .accommodation-results .col-6.col-md-4.col-lg-3 {
        padding-left: 0.125rem;
        padding-right: 0.125rem;
        margin-bottom: 0.75rem;
    }

    .airbnb-content {
        padding: 0.5rem !important;
    }

    .airbnb-title {
        font-size: 0.85rem !important;
    }

    .airbnb-location,
    .airbnb-type {
        font-size: 0.75rem !important;
    }

    .airbnb-price {
        font-size: 0.85rem !important;
    }

    /* Tighter grid spacing */
    .find-accommodation-page .row.g-3 {
        --bs-gutter-x: 0.25rem;
        --bs-gutter-y: 0.75rem;
        margin-left: -0.125rem;
        margin-right: -0.125rem;
    }
}

@media (max-width: 375px) {
    /* Ultra-compact but still 2-column */
    .find-accommodation-page .col-6.col-md-4.col-lg-3,
    .accommodation-results .col-6.col-md-4.col-lg-3 {
        padding-left: 0.0625rem;
        padding-right: 0.0625rem;
        margin-bottom: 0.5rem;
    }

    .airbnb-content {
        padding: 0.375rem !important;
    }

    .airbnb-title {
        font-size: 0.8rem !important;
    }

    .airbnb-location,
    .airbnb-type {
        font-size: 0.7rem !important;
    }

    .airbnb-price {
        font-size: 0.8rem !important;
    }

    /* Ultra-tight grid spacing */
    .find-accommodation-page .row.g-3 {
        --bs-gutter-x: 0.125rem;
        --bs-gutter-y: 0.5rem;
        margin-left: -0.0625rem;
        margin-right: -0.0625rem;
    }
}

/* ===== HOW IT WORKS SECTION - 2 COLUMNS ON MOBILE ===== */
@media (max-width: 768px) {
    /* Ensure 2 columns on mobile with proper spacing */
    .how-it-works-section .col-6.col-md-6.col-lg-3 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        margin-bottom: 1.5rem !important;
    }

    .how-it-works-section .step-card {
        padding: 1rem !important;
        height: 100%;
        background: white;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .how-it-works-section .step-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    }

    .how-it-works-section .step-icon {
        width: 60px !important;
        height: 60px !important;
        margin-bottom: 0.75rem !important;
    }

    .how-it-works-section .step-icon i {
        font-size: 1.5rem !important;
    }

    .how-it-works-section h5 {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .how-it-works-section p {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0 !important;
    }
}

@media (max-width: 576px) {
    /* Tighter spacing for smaller screens but still 2 columns */
    .how-it-works-section .col-6.col-md-6.col-lg-3 {
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
        margin-bottom: 1rem !important;
    }

    .how-it-works-section .step-card {
        padding: 0.75rem !important;
    }

    .how-it-works-section .step-icon {
        width: 50px !important;
        height: 50px !important;
        margin-bottom: 0.5rem !important;
    }

    .how-it-works-section .step-icon i {
        font-size: 1.25rem !important;
    }

    .how-it-works-section h5 {
        font-size: 0.9rem !important;
        margin-bottom: 0.375rem !important;
    }

    .how-it-works-section p {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
    }
}

@media (max-width: 375px) {
    /* Ultra-compact for very small screens but still 2 columns */
    .how-it-works-section .col-6.col-md-6.col-lg-3 {
        padding-left: 0.125rem !important;
        padding-right: 0.125rem !important;
        margin-bottom: 0.75rem !important;
    }

    .how-it-works-section .step-card {
        padding: 0.5rem !important;
    }

    .how-it-works-section .step-icon {
        width: 45px !important;
        height: 45px !important;
        margin-bottom: 0.375rem !important;
    }

    .how-it-works-section .step-icon i {
        font-size: 1rem !important;
    }

    .how-it-works-section h5 {
        font-size: 0.85rem !important;
        margin-bottom: 0.25rem !important;
    }

    .how-it-works-section p {
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
    }
}

/* ===== CRITICAL OVERRIDE FOR HOW IT WORKS SECTION ===== */
/* This must be at the very end to override all conflicting rules */

@media (max-width: 768px) {
    /* ULTRA-HIGH PRIORITY: Override ALL Bootstrap and custom CSS for how-it-works */
    section.how-it-works-section .container .row.g-4 .col-6.col-md-6.col-lg-3,
    section.how-it-works-section .container .row .col-6.col-md-6.col-lg-3,
    section.how-it-works-section .row.g-4 .col-6.col-md-6.col-lg-3,
    section.how-it-works-section .row .col-6.col-md-6.col-lg-3,
    .how-it-works-section .container .row.g-4 .col-6.col-md-6.col-lg-3,
    .how-it-works-section .container .row .col-6.col-md-6.col-lg-3,
    .how-it-works-section .row.g-4 .col-6.col-md-6.col-lg-3,
    .how-it-works-section .row .col-6.col-md-6.col-lg-3,
    .how-it-works-section .col-6.col-md-6.col-lg-3,
    .how-it-works-section .col-6.col-md-6,
    .how-it-works-section .col-6 {
        flex: 0 0 auto !important;
        width: 50% !important;
        max-width: 50% !important;
        flex-basis: 50% !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        margin-bottom: 1.5rem !important;
        display: block !important;
        float: none !important;
    }

    /* Force the row to display as flex */
    section.how-it-works-section .row,
    .how-it-works-section .row {
        display: flex !important;
        flex-wrap: wrap !important;
    }
}

@media (max-width: 576px) {
    /* ULTRA-HIGH PRIORITY: 2-column layout for how-it-works section on small screens */
    section.how-it-works-section .container .row.g-4 .col-6.col-md-6.col-lg-3,
    section.how-it-works-section .container .row .col-6.col-md-6.col-lg-3,
    section.how-it-works-section .row.g-4 .col-6.col-md-6.col-lg-3,
    section.how-it-works-section .row .col-6.col-md-6.col-lg-3,
    .how-it-works-section .container .row.g-4 .col-6.col-md-6.col-lg-3,
    .how-it-works-section .container .row .col-6.col-md-6.col-lg-3,
    .how-it-works-section .row.g-4 .col-6.col-md-6.col-lg-3,
    .how-it-works-section .row .col-6.col-md-6.col-lg-3,
    .how-it-works-section .col-6.col-md-6.col-lg-3,
    .how-it-works-section .col-6.col-md-6,
    .how-it-works-section .col-6 {
        flex: 0 0 auto !important;
        width: 50% !important;
        max-width: 50% !important;
        flex-basis: 50% !important;
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
        margin-bottom: 1rem !important;
        display: block !important;
        float: none !important;
    }
}

@media (max-width: 375px) {
    /* ULTRA-HIGH PRIORITY: 2-column layout for how-it-works section on very small screens */
    section.how-it-works-section .container .row.g-4 .col-6.col-md-6.col-lg-3,
    section.how-it-works-section .container .row .col-6.col-md-6.col-lg-3,
    section.how-it-works-section .row.g-4 .col-6.col-md-6.col-lg-3,
    section.how-it-works-section .row .col-6.col-md-6.col-lg-3,
    .how-it-works-section .container .row.g-4 .col-6.col-md-6.col-lg-3,
    .how-it-works-section .container .row .col-6.col-md-6.col-lg-3,
    .how-it-works-section .row.g-4 .col-6.col-md-6.col-lg-3,
    .how-it-works-section .row .col-6.col-md-6.col-lg-3,
    .how-it-works-section .col-6.col-md-6.col-lg-3,
    .how-it-works-section .col-6.col-md-6,
    .how-it-works-section .col-6 {
        flex: 0 0 auto !important;
        width: 50% !important;
        max-width: 50% !important;
        flex-basis: 50% !important;
        padding-left: 0.125rem !important;
        padding-right: 0.125rem !important;
        margin-bottom: 0.75rem !important;
        display: block !important;
        float: none !important;
    }
}

/* ===== COMPREHENSIVE MOBILE COVERAGE FOR ALL SCREEN SIZES ===== */
/* This covers ALL possible mobile devices and screen sizes */

/* Extra Small Mobile (320px - 479px) - iPhone SE, small Android phones */
@media screen and (max-width: 479px) {
    html body section.how-it-works-section .container .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    html body section.how-it-works-section .container .row > div.col-6.col-md-6.col-lg-3.text-center,
    html body .how-it-works-section .container .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    html body .how-it-works-section .container .row > div.col-6.col-md-6.col-lg-3.text-center,
    section.how-it-works-section .container .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    section.how-it-works-section .container .row > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section .container .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section .container .row > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section .row > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section > .container > .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section > .container > .row > div.col-6.col-md-6.col-lg-3.text-center {
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
        flex-basis: 50% !important;
        min-width: 50% !important;
        box-sizing: border-box !important;
        display: block !important;
        float: left !important;
        clear: none !important;
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
        margin-bottom: 1rem !important;
    }

    .how-it-works-section .row > div.col-6.col-md-6.col-lg-3.text-center:nth-child(2n+1) {
        clear: left !important;
    }

    .how-it-works-section .row.g-4,
    .how-it-works-section .row {
        display: block !important;
        width: 100% !important;
        margin-left: -0.25rem !important;
        margin-right: -0.25rem !important;
    }
}

/* Small Mobile (480px - 575px) - Standard mobile phones */
@media screen and (min-width: 480px) and (max-width: 575px) {
    html body section.how-it-works-section .container .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    html body section.how-it-works-section .container .row > div.col-6.col-md-6.col-lg-3.text-center,
    html body .how-it-works-section .container .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    html body .how-it-works-section .container .row > div.col-6.col-md-6.col-lg-3.text-center,
    section.how-it-works-section .container .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    section.how-it-works-section .container .row > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section .container .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section .container .row > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section .row > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section > .container > .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section > .container > .row > div.col-6.col-md-6.col-lg-3.text-center {
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
        flex-basis: 50% !important;
        min-width: 50% !important;
        box-sizing: border-box !important;
        display: block !important;
        float: left !important;
        clear: none !important;
        padding-left: 0.375rem !important;
        padding-right: 0.375rem !important;
        margin-bottom: 1.25rem !important;
    }

    .how-it-works-section .row > div.col-6.col-md-6.col-lg-3.text-center:nth-child(2n+1) {
        clear: left !important;
    }

    .how-it-works-section .row.g-4,
    .how-it-works-section .row {
        display: block !important;
        width: 100% !important;
        margin-left: -0.375rem !important;
        margin-right: -0.375rem !important;
    }
}

/* Medium Mobile (576px - 767px) - Large phones, small tablets in portrait */
@media screen and (min-width: 576px) and (max-width: 767px) {
    html body section.how-it-works-section .container .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    html body section.how-it-works-section .container .row > div.col-6.col-md-6.col-lg-3.text-center,
    html body .how-it-works-section .container .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    html body .how-it-works-section .container .row > div.col-6.col-md-6.col-lg-3.text-center,
    section.how-it-works-section .container .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    section.how-it-works-section .container .row > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section .container .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section .container .row > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section .row > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section > .container > .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section > .container > .row > div.col-6.col-md-6.col-lg-3.text-center {
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
        flex-basis: 50% !important;
        min-width: 50% !important;
        box-sizing: border-box !important;
        display: block !important;
        float: left !important;
        clear: none !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        margin-bottom: 1.5rem !important;
    }

    .how-it-works-section .row > div.col-6.col-md-6.col-lg-3.text-center:nth-child(2n+1) {
        clear: left !important;
    }

    .how-it-works-section .row.g-4,
    .how-it-works-section .row {
        display: block !important;
        width: 100% !important;
        margin-left: -0.5rem !important;
        margin-right: -0.5rem !important;
    }
}

/* Large Mobile/Small Tablet (768px - 991px) - Tablets in portrait, large phones in landscape */
@media screen and (min-width: 768px) and (max-width: 991px) {
    html body section.how-it-works-section .container .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    html body section.how-it-works-section .container .row > div.col-6.col-md-6.col-lg-3.text-center,
    html body .how-it-works-section .container .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    html body .how-it-works-section .container .row > div.col-6.col-md-6.col-lg-3.text-center,
    section.how-it-works-section .container .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    section.how-it-works-section .container .row > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section .container .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section .container .row > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section .row > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section > .container > .row.g-4 > div.col-6.col-md-6.col-lg-3.text-center,
    .how-it-works-section > .container > .row > div.col-6.col-md-6.col-lg-3.text-center {
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
        flex-basis: 50% !important;
        min-width: 50% !important;
        box-sizing: border-box !important;
        display: block !important;
        float: left !important;
        clear: none !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        margin-bottom: 2rem !important;
    }

    .how-it-works-section .row > div.col-6.col-md-6.col-lg-3.text-center:nth-child(2n+1) {
        clear: left !important;
    }

    .how-it-works-section .row.g-4,
    .how-it-works-section .row {
        display: block !important;
        width: 100% !important;
        margin-left: -0.75rem !important;
        margin-right: -0.75rem !important;
    }
}

/* ===== MODERN HOW IT WORKS SECTION DESIGN ===== */
/* Using Lodgenda project colors for consistency */

/* Section Background and Layout */
.how-it-works-modern {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.how-it-works-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%2300A6FF" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
    z-index: 1;
}

.how-it-works-modern .container {
    position: relative;
    z-index: 2;
}

/* Section Header */
.section-badge {
    margin-bottom: 1rem;
}

.section-badge .badge {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border: 1px solid rgba(0, 166, 255, 0.2);
    background-color: rgba(0, 166, 255, 0.1) !important;
    color: #00A6FF !important;
}

/* Steps Grid Layout */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Step Item */
.step-item {
    position: relative;
}

/* Step Card */
.step-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00A6FF, #80D3FF);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.step-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.step-card:hover::before {
    transform: scaleX(1);
}

/* Step Number */
.step-number {
    position: absolute;
    top: -10px;
    right: 20px;
    background: linear-gradient(135deg, #00A6FF, #0077B3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(0, 166, 255, 0.3);
    z-index: 3;
}

/* Step Icon */
.step-icon-wrapper {
    margin-bottom: 1.5rem;
}

.step-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(0, 166, 255, 0.1), rgba(128, 211, 255, 0.1));
    border: 2px solid rgba(0, 166, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.step-icon i {
    font-size: 2rem;
    color: #00A6FF;
    transition: all 0.3s ease;
}

.step-card:hover .step-icon {
    background: linear-gradient(135deg, #00A6FF, #0077B3);
    border-color: transparent;
    transform: scale(1.1);
}

.step-card:hover .step-icon i {
    color: white;
}

/* Step Content */
.step-content {
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.step-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.step-description {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Feature Tags */
.step-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: auto;
}

.feature-tag {
    background: rgba(0, 166, 255, 0.1);
    color: #00A6FF;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(0, 166, 255, 0.2);
    transition: all 0.3s ease;
}

.feature-tag:hover {
    background: #00A6FF;
    color: white;
    transform: translateY(-2px);
}

/* Call to Action */
.cta-wrapper {
    background: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    max-width: 600px;
    margin: 0 auto;
}

.cta-wrapper .btn {
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 166, 255, 0.3);
    transition: all 0.3s ease;
    background-color: #00A6FF !important;
    border-color: #00A6FF !important;
}

.cta-wrapper .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 166, 255, 0.4);
    background-color: #0077B3 !important;
    border-color: #0077B3 !important;
}

/* ===== MOBILE RESPONSIVE DESIGN ===== */

/* Tablet and Mobile Layout */
@media (max-width: 991px) {
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .step-card {
        padding: 1.5rem;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        top: -8px;
        right: 15px;
    }

    .step-icon {
        width: 60px;
        height: 60px;
        border-radius: 15px;
    }

    .step-icon i {
        font-size: 1.5rem;
    }

    .step-title {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }

    .step-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .feature-tag {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .cta-wrapper {
        padding: 2rem 1.5rem;
        margin-top: 2rem;
    }
}

/* Mobile Portrait */
@media (max-width: 768px) {
    .how-it-works-modern {
        padding: 3rem 0;
    }

    .steps-grid {
        gap: 1.25rem;
        margin-top: 1.5rem;
    }

    .step-card {
        padding: 1.25rem;
        border-radius: 15px;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
        top: -6px;
        right: 12px;
    }

    .step-icon {
        width: 50px;
        height: 50px;
        border-radius: 12px;
        margin-bottom: 1rem;
    }

    .step-icon i {
        font-size: 1.25rem;
    }

    .step-title {
        font-size: 1.1rem;
        margin-bottom: 0.7rem;
    }

    .step-description {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 0.8rem;
    }

    .step-features {
        gap: 0.4rem;
    }

    .feature-tag {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    .cta-wrapper {
        padding: 1.5rem 1rem;
    }

    .cta-wrapper h3 {
        font-size: 1.3rem;
    }

    .cta-wrapper p {
        font-size: 0.9rem;
    }
}

/* Small Mobile */
@media (max-width: 576px) {
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1rem;
    }

    .step-card {
        padding: 1rem;
        border-radius: 12px;
    }

    .step-number {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
        top: -5px;
        right: 10px;
    }

    .step-icon {
        width: 45px;
        height: 45px;
        border-radius: 10px;
        margin-bottom: 0.8rem;
    }

    .step-icon i {
        font-size: 1.1rem;
    }

    .step-title {
        font-size: 1rem;
        margin-bottom: 0.6rem;
    }

    .step-description {
        font-size: 0.8rem;
        line-height: 1.4;
        margin-bottom: 0.7rem;
    }

    .step-features {
        gap: 0.3rem;
    }

    .feature-tag {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }

    .cta-wrapper {
        padding: 1.25rem 0.8rem;
    }

    .cta-wrapper h3 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .cta-wrapper p {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .cta-wrapper .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Focus states for accessibility */
.btn:focus,
.form-select:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 166, 255, 0.25);
}
