/* ===========================
   RESPONSIVE ENHANCEMENTS
   Mobile-first responsive design
=========================== */

/* ========== BASE RESPONSIVE UTILITIES ========== */

.container-fluid-responsive {
    padding-left: 15px;
    padding-right: 15px;
}

/* ========== MOBILE FIRST (320px+) ========== */

@media (max-width: 575px) {

    /* Typography */
    h1 {
        font-size: 2rem !important;
        line-height: 1.3;
    }

    h2 {
        font-size: 1.75rem !important;
    }

    h3 {
        font-size: 1.5rem !important;
    }

    h4 {
        font-size: 1.25rem !important;
    }

    p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* Hero Section */
    .hero-section {
        padding: 80px 0 60px;
    }

    .hero-content {
        text-align: center;
        margin-bottom: 40px;
    }

    .hero-btns {
        flex-direction: column;
        gap: 15px;
    }

    .hero-btns .main-btn {
        width: 100%;
        justify-content: center;
    }

    .hero-img {
        margin-top: 30px;
    }

    .hero-img img {
        max-width: 100%;
        height: auto;
    }

    /* Feature Cards */
    .single-feature {
        margin-bottom: 30px;
        padding: 30px 20px;
    }

    .single-feature .icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .single-feature h3 {
        font-size: 1.25rem;
        margin-top: 20px;
    }

    /* Step Cards */
    .step-card {
        margin-bottom: 25px;
        padding: 30px 20px;
    }

    .step-number {
        width: 60px;
        height: 60px;
        font-size: 26px;
    }

    .step-card h4 {
        font-size: 1.1rem;
    }

    /* Benefits Section */
    .benefits-section {
        padding: 60px 0;
    }

    .benefits-section .row {
        margin-bottom: 40px;
    }

    .benefits-section img {
        margin-bottom: 30px;
        max-width: 100%;
    }

    /* Statistics */
    .stats-section {
        padding: 50px 0;
    }

    .stat-number {
        font-size: 2.5rem !important;
    }

    /* Policy Cards */
    .policy-card {
        padding: 30px 20px;
        margin-bottom: 25px;
    }

    .policy-icon {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }

    /* Download Section */
    .download-section {
        padding: 60px 0;
    }

    .download li {
        margin-bottom: 15px;
    }

    .download li a {
        padding: 15px 20px;
        font-size: 0.9rem;
    }

    /* Footer */
    .footer {
        padding: 50px 0 30px;
    }

    .footer-widget {
        margin-bottom: 30px;
    }

    /* Navigation */
    .navbar-brand img {
        height: 40px !important;
    }

    .navbar-nav {
        padding: 20px 0;
    }

    .navbar-nav .nav-item {
        margin: 10px 0;
    }

    /* Badges */
    .badge-parkee {
        font-size: 0.85rem;
        padding: 4px 12px;
    }

    /* Section Spacing */
    .pt-140,
    .pt-150 {
        padding-top: 60px !important;
    }

    .pb-150 {
        padding-bottom: 60px !important;
    }

    .mb-50 {
        margin-bottom: 30px !important;
    }

    .mb-100 {
        margin-bottom: 50px !important;
    }
}

/* ========== SMALL DEVICES (576px - 767px) ========== */

@media (min-width: 576px) and (max-width: 767px) {
    h1 {
        font-size: 2.25rem !important;
    }

    h2 {
        font-size: 2rem !important;
    }

    .hero-section {
        padding: 100px 0 70px;
    }

    .single-feature {
        padding: 35px 25px;
    }

    .step-card {
        padding: 35px 25px;
    }

    .stat-number {
        font-size: 3rem !important;
    }
}

/* ========== TABLETS (768px - 1024px) ========== */

@media (min-width: 768px) and (max-width: 1024px) {

    /* Typography */
    h1 {
        font-size: 2.5rem !important;
    }

    h2 {
        font-size: 2.25rem !important;
    }

    /* Hero Section */
    .hero-section {
        padding: 120px 0 80px;
    }

    .hero-content h1 {
        font-size: 2.5rem !important;
    }

    /* Feature Grid */
    .single-feature {
        margin-bottom: 30px;
    }

    /* Step Cards */
    .step-card {
        margin-bottom: 30px;
    }

    /* Benefits */
    .benefits-section img {
        max-width: 90%;
        margin: 0 auto;
        display: block;
    }

    /* Download */
    .download-img img {
        max-width: 90%;
    }
}

/* ========== DESKTOP (1025px - 1440px) ========== */

@media (min-width: 1025px) and (max-width: 1440px) {
    .container {
        max-width: 1140px;
    }

    .hero-content h1 {
        font-size: 3rem !important;
    }
}

/* ========== LARGE DESKTOP (1441px+) ========== */

@media (min-width: 1441px) {
    .container {
        max-width: 1320px;
    }

    .hero-content h1 {
        font-size: 3.5rem !important;
    }

    .single-feature {
        padding: 50px 35px;
    }

    .step-card {
        padding: 50px 30px;
    }
}

/* ========== TOUCH DEVICE OPTIMIZATIONS ========== */

@media (hover: none) and (pointer: coarse) {

    /* Increase touch targets */
    .main-btn {
        min-height: 48px;
        padding: 12px 30px;
    }

    .navbar-nav .nav-item a {
        padding: 12px 0;
    }

    .download li a {
        min-height: 60px;
    }

    /* Disable hover effects on touch devices */
    .single-feature:hover,
    .step-card:hover,
    .policy-card:hover {
        transform: none;
    }

    /* Simplify animations */
    .single-feature .icon,
    .policy-icon {
        animation: none;
    }
}

/* ========== LANDSCAPE MOBILE ========== */

@media (max-width: 767px) and (orientation: landscape) {
    .hero-section {
        padding: 60px 0 40px;
    }

    .hero-img {
        max-height: 300px;
        overflow: hidden;
    }

    .step-card {
        padding: 25px 20px;
    }
}

/* ========== PRINT STYLES ========== */

@media print {

    .navbar,
    .scroll-top,
    .scroll-progress,
    .parking-indicator {
        display: none !important;
    }

    .hero-section,
    .stats-section {
        background: white !important;
        color: black !important;
    }

    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ========== HIGH DPI DISPLAYS ========== */

@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    /* Optimize for retina displays */
    .hero-img img,
    .download-img img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ========== REDUCED MOTION ========== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .scroll-fade-in,
    .scroll-slide-left,
    .scroll-slide-right,
    .scroll-scale-up {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ========== DARK MODE SUPPORT (OPTIONAL) ========== */

@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
    /* Currently keeping light theme as default */
}

/* ========== ASPECT RATIO UTILITIES ========== */

.aspect-ratio-16-9 {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.aspect-ratio-4-3 {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.aspect-ratio-1-1 {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* ========== RESPONSIVE IMAGES ========== */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

/* ========== RESPONSIVE SPACING ========== */

@media (max-width: 767px) {
    .mb-mobile-30 {
        margin-bottom: 30px !important;
    }

    .mt-mobile-30 {
        margin-top: 30px !important;
    }

    .px-mobile-15 {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* ========== RESPONSIVE TEXT ALIGNMENT ========== */

@media (max-width: 767px) {
    .text-mobile-center {
        text-align: center !important;
    }

    .text-mobile-left {
        text-align: left !important;
    }
}

/* ========== RESPONSIVE FLEXBOX ========== */

@media (max-width: 767px) {
    .flex-mobile-column {
        flex-direction: column !important;
    }

    .flex-mobile-center {
        align-items: center !important;
        justify-content: center !important;
    }
}

/* ========== RESPONSIVE GRID ========== */

@media (max-width: 767px) {
    .grid-mobile-1 {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .grid-tablet-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ========== CONTAINER QUERIES (MODERN BROWSERS) ========== */

@supports (container-type: inline-size) {
    .feature-container {
        container-type: inline-size;
    }

    @container (max-width: 400px) {
        .single-feature {
            padding: 25px 15px;
        }
    }
}

/* ========== SAFE AREA INSETS (iOS) ========== */

@supports (padding: max(0px)) {
    .navbar-area {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }

    .footer {
        padding-bottom: max(30px, env(safe-area-inset-bottom));
    }
}

/* ========== PERFORMANCE OPTIMIZATIONS ========== */

.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* Remove will-change after animation */
.animated {
    will-change: auto;
}

/* ========== ACCESSIBILITY ENHANCEMENTS ========== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.focus-visible:focus {
    outline: 3px solid var(--parkee-primary);
    outline-offset: 2px;
}

/* ========== LOADING STATES ========== */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* ========== HOW-IT-WORKS RESPONSIVE ENHANCEMENTS ========== */

@media (max-width: 575px) {
    .how-it-works {
        padding-top: 60px !important;
        padding-bottom: 50px;
    }

    .street-label {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 35px;
    }

    .lane-title {
        width: 100% !important;
        font-size: 0.95rem;
    }

    .dual-street-container {
        margin: 40px auto 0;
        padding: 30px 0;
    }

    .street-row {
        margin-bottom: 50px;
    }

    .user-lane,
    .owner-lane {
        width: 100% !important;
    }

    .lane-card {
        padding: 24px 18px;
    }

    .user-lane .lane-token,
    .owner-lane .lane-token {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .how-it-works {
        padding-top: 70px !important;
    }

    .street-label {
        flex-direction: column;
        gap: 18px;
        margin-bottom: 45px;
    }

    .lane-title {
        width: 100% !important;
        font-size: 1.1rem;
    }

    .street-row {
        margin-bottom: 65px;
    }

    .lane-card {
        padding: 28px 20px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .how-it-works {
        padding-top: 80px !important;
    }

    .dual-street-container {
        max-width: 95%;
        margin: 60px auto 0;
        padding: 50px 20px;
    }

    .street-row {
        margin-bottom: 70px;
    }

    .user-lane,
    .owner-lane {
        width: 45% !important;
    }

    .user-lane .lane-token {
        right: -50px;
    }

    .owner-lane .lane-token {
        left: -50px;
    }
}

/* ========== DOWNLOAD SECTION RESPONSIVE ENHANCEMENTS ========== */

@media (max-width: 575px) {
    .download-section {
        padding: 50px 0 !important;
    }

    .download-hub-wrapper {
        flex-direction: column;
    }

    .download-content {
        margin-bottom: 30px;
    }

    .download-content h1 {
        font-size: 28px;
        line-height: 1.2;
    }

    .hub-diagnostic {
        flex-wrap: wrap;
        gap: 8px;
    }

    .download {
        flex-direction: column;
    }

    .download li {
        margin-bottom: 12px;
    }

    .download li a {
        min-width: 100%;
        padding: 12px 18px;
        font-size: 0.8rem;
        flex-direction: column;
        text-align: center;
    }

    .download li a .icon {
        font-size: 26px;
    }

    .download-img-grid {
        margin-top: 25px;
    }

    .floating-hub-elements {
        display: none !important;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .download-section {
        padding: 60px 0 !important;
    }

    .download-content h1 {
        font-size: 32px;
    }

    .download li a {
        min-width: auto;
        flex-direction: column;
        padding: 14px 22px;
    }

    .download li a .text {
        font-size: 0.85rem;
    }

    .download-img-grid {
        margin-top: 30px;
        text-align: center;
    }

    .download-img img {
        max-width: 85%;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .download-section {
        padding: 70px 0 !important;
    }

    .download-hub-wrapper {
        display: flex;
        gap: 30px;
    }

    .download-content {
        flex: 1;
    }

    .download-img-grid {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .download-content h1 {
        font-size: 38px;
    }

    .download li a {
        min-width: 210px;
        flex-direction: row;
    }

    .download-img img {
        max-width: 90%;
    }
}

@media (min-width: 992px) {
    .download-hub-wrapper {
        display: flex;
        gap: 40px;
    }

    .download-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .download-img-grid {
        flex: 1;
    }
}

/* ========== ADDITIONAL RESPONSIVE ENHANCEMENTS ========== */

/* ========== EXTRA RESPONSIVE FIXES FOR HOW-IT-WORKS ========== */

/* Ultra-small devices (320px - 374px) */
@media (max-width: 374px) {
    .how-it-works {
        padding: 50px 0 40px !important;
    }

    .section-title h1 {
        font-size: 1.5rem !important;
        line-height: 1.3;
    }

    .section-title p {
        font-size: 0.9rem;
    }

    .dual-street-container {
        margin: 30px auto 0;
        padding: 30px 0;
    }

    .dual-street-container::before {
        left: 25px !important;
        width: 3px !important;
    }

    .dual-street-container::after {
        left: 25px !important;
    }

    .street-row {
        margin-bottom: 45px;
    }

    .user-lane,
    .owner-lane {
        padding-left: 60px !important;
    }

    .lane-card {
        padding: 20px 15px !important;
        border-radius: 12px;
    }

    .lane-icon {
        width: 45px;
        height: 45px;
        font-size: 22px;
        margin-bottom: 12px;
        border-radius: 12px;
    }

    .lane-card h4 {
        font-size: 15px !important;
        margin-bottom: 8px;
    }

    .lane-card p {
        font-size: 13px !important;
        line-height: 1.4;
    }

    .user-lane .lane-token,
    .owner-lane .lane-token {
        left: 25px !important;
        width: 38px;
        height: 38px;
        font-size: 14px;
        box-shadow: 0 0 0 2px #2d3436, 0 0 0 6px white !important;
    }

    .street-label {
        margin-bottom: 30px;
        gap: 12px;
    }

    .lane-title {
        font-size: 0.9rem !important;
        padding: 12px 18px;
        border-width: 3px;
    }
}

/* Small mobile devices (375px - 479px) */
@media (min-width: 375px) and (max-width: 479px) {
    .how-it-works {
        padding: 60px 0 50px !important;
    }

    .dual-street-container::before {
        left: 28px !important;
        width: 4px !important;
    }

    .dual-street-container::after {
        left: 28px !important;
    }

    .user-lane,
    .owner-lane {
        padding-left: 68px !important;
    }

    .lane-card {
        padding: 22px 16px !important;
    }

    .user-lane .lane-token,
    .owner-lane .lane-token {
        left: 28px !important;
        width: 40px;
        height: 40px;
        font-size: 15px;
    }
}

/* Tablet portrait (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .how-it-works {
        padding: 90px 0 70px !important;
    }

    .dual-street-container {
        max-width: 90%;
        margin: 65px auto 0;
        padding: 55px 15px;
    }

    .dual-street-container::before {
        left: 45px;
        width: 6px;
    }

    .dual-street-container::after {
        left: 45px;
    }

    .street-row {
        margin-bottom: 75px;
        flex-direction: column;
    }

    .user-lane,
    .owner-lane {
        width: 100% !important;
        padding-left: 85px !important;
        margin-bottom: 0;
    }

    .user-lane .lane-card,
    .owner-lane .lane-card {
        padding: 32px 24px !important;
        text-align: left !important;
    }

    .lane-icon {
        width: 58px;
        height: 58px;
        font-size: 27px;
    }

    .lane-card h4 {
        font-size: 19px;
    }

    .lane-card p {
        font-size: 15.5px;
    }

    .user-lane .lane-token,
    .owner-lane .lane-token {
        left: 45px !important;
        right: auto !important;
        width: 52px;
        height: 52px;
        font-size: 19px;
        transform: translateY(-50%) !important;
    }

    .street-label {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 55px;
    }

    .lane-title {
        width: 100% !important;
        font-size: 1.25rem;
        padding: 18px 30px;
    }
}

/* Desktop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .how-it-works {
        padding: 120px 0 90px !important;
    }

    .dual-street-container {
        max-width: 950px;
        margin: 70px auto 0;
        padding: 60px 0;
    }

    .street-row {
        margin-bottom: 75px;
    }

    .user-lane,
    .owner-lane {
        width: 46%;
    }

    .lane-card {
        padding: 32px 28px;
    }

    .user-lane .lane-token {
        right: -55px;
    }

    .owner-lane .lane-token {
        left: -55px;
    }

    .lane-title {
        font-size: 1.2rem;
        padding: 16px 28px;
    }
}

/* Large desktop (1200px - 1439px) */
@media (min-width: 1200px) and (max-width: 1439px) {
    .how-it-works {
        padding: 130px 0 100px !important;
    }

    .dual-street-container {
        max-width: 1050px;
    }

    .lane-card {
        padding: 34px 30px;
    }
}

/* Extra large screens (1440px+) */
@media (min-width: 1440px) {
    .how-it-works {
        padding: 140px 0 110px !important;
    }

    .dual-street-container {
        max-width: 1150px;
    }

    .lane-card {
        padding: 38px 35px;
    }

    .lane-card h4 {
        font-size: 21px;
    }

    .lane-card p {
        font-size: 17px;
    }

    .lane-title {
        font-size: 1.35rem;
        padding: 20px 35px;
    }
}

/* ========== EXTRA RESPONSIVE FIXES FOR DOWNLOAD SECTION ========== */

/* Ultra-small devices (320px - 374px) */
@media (max-width: 374px) {
    .download-section {
        padding: 40px 0 !important;
    }

    .download-content {
        margin-bottom: 25px;
        text-align: center;
    }

    .download-content h1 {
        font-size: 24px !important;
        line-height: 1.15;
        margin-bottom: 18px;
    }

    .download-content p {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .hub-diagnostic {
        justify-content: center;
        gap: 6px;
        margin-bottom: 18px;
    }

    .diag-tag {
        font-size: 9px;
        padding: 3px 8px;
        letter-spacing: 0.5px;
    }

    .download {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .download li {
        margin-bottom: 0;
        width: 100%;
    }

    .download li a {
        width: 100%;
        min-width: auto !important;
        padding: 10px 15px;
        font-size: 0.75rem;
        flex-direction: row;
        justify-content: center;
        gap: 10px;
        border-radius: 15px;
    }

    .download li a .icon {
        font-size: 24px;
    }

    .download li a .text {
        font-size: 0.75rem;
        text-align: left;
    }

    .download-img-grid {
        margin-top: 20px;
    }

    .download-img img {
        max-width: 100% !important;
        height: auto;
    }

    .floating-hub-elements {
        display: none !important;
    }
}

/* Small mobile (375px - 479px) */
@media (min-width: 375px) and (max-width: 479px) {
    .download-section {
        padding: 45px 0 !important;
    }

    .download-content h1 {
        font-size: 26px !important;
    }

    .download li a {
        padding: 11px 16px;
        font-size: 0.78rem;
    }

    .download li a .icon {
        font-size: 26px;
    }
}

/* Medium mobile (480px - 575px) */
@media (min-width: 480px) and (max-width: 575px) {
    .download-section {
        padding: 55px 0 !important;
    }

    .download-content {
        text-align: center;
        margin-bottom: 30px;
    }

    .download-content h1 {
        font-size: 30px !important;
        margin-bottom: 20px;
    }

    .hub-diagnostic {
        justify-content: center;
    }

    .download {
        flex-direction: column;
        gap: 12px;
    }

    .download li a {
        min-width: auto !important;
        flex-direction: row;
        padding: 12px 20px;
        font-size: 0.85rem;
    }

    .download li a .icon {
        font-size: 28px;
    }

    .download-img-grid {
        margin-top: 25px;
    }
}

/* Tablet portrait (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .download-section {
        padding: 75px 0 !important;
    }

    .download-hub-wrapper {
        display: flex;
        flex-direction: column;
        gap: 35px;
    }

    .download-content {
        text-align: center;
        max-width: 100%;
    }

    .download-content h1 {
        font-size: 42px !important;
        margin-bottom: 24px;
    }

    .download-content p {
        font-size: 1rem;
        max-width: 90%;
        margin: 0 auto 25px;
    }

    .hub-diagnostic {
        justify-content: center;
        gap: 12px;
    }

    .download {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 15px;
        flex-wrap: wrap;
    }

    .download li {
        flex: 0 1 auto;
    }

    .download li a {
        min-width: 220px;
        flex-direction: row;
        padding: 14px 24px;
        font-size: 0.9rem;
    }

    .download li a .icon {
        font-size: 32px;
    }

    .download-img-grid {
        margin-top: 35px;
        text-align: center;
    }

    .download-img img {
        max-width: 80%;
        margin: 0 auto;
    }

    .floating-hub-elements {
        display: none;
    }
}

/* Desktop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .download-section {
        padding: 80px 0 !important;
    }

    .download-hub-wrapper {
        gap: 35px;
    }

    .download-content h1 {
        font-size: 44px !important;
        margin-bottom: 24px;
    }

    .download-content p {
        font-size: 1rem;
    }

    .download {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .download li a {
        min-width: 230px;
        padding: 14px 26px;
    }

    .download-img-grid {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .download-img img {
        max-width: 95%;
    }

    .hub-element {
        font-size: 18px;
        padding: 10px;
    }
}

/* Large desktop (1200px - 1439px) */
@media (min-width: 1200px) and (max-width: 1439px) {
    .download-section {
        padding: 90px 0 !important;
    }

    .download-content h1 {
        font-size: 46px !important;
    }

    .download li a {
        min-width: 245px;
        padding: 15px 28px;
    }
}

/* Extra large screens (1440px+) */
@media (min-width: 1440px) {
    .download-section {
        padding: 100px 0 !important;
    }

    .download-hub-wrapper {
        gap: 50px;
    }

    .download-content h1 {
        font-size: 52px !important;
        margin-bottom: 28px;
    }

    .download-content p {
        font-size: 1.1rem;
        line-height: 1.7;
    }

    .download li a {
        min-width: 260px;
        padding: 16px 32px;
        font-size: 1rem;
    }

    .download li a .icon {
        font-size: 38px;
    }

    .hub-element {
        font-size: 22px;
        padding: 14px;
    }
}

/* ========== LANDSCAPE ORIENTATION FIXES ========== */

/* Mobile landscape */
@media (max-width: 767px) and (orientation: landscape) {
    .how-it-works {
        padding: 50px 0 40px !important;
    }

    .dual-street-container {
        margin: 40px auto 0;
        padding: 35px 0;
    }

    .street-row {
        margin-bottom: 50px;
    }

    .lane-card {
        padding: 20px 18px !important;
    }

    .download-section {
        padding: 45px 0 !important;
    }

    .download-content h1 {
        font-size: 28px !important;
    }

    .download-img-grid {
        margin-top: 20px;
    }
}

/* Tablet landscape */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .how-it-works {
        padding: 70px 0 60px !important;
    }

    .download-section {
        padding: 65px 0 !important;
    }

    .download-hub-wrapper {
        flex-direction: row;
        gap: 30px;
    }

    .download-content {
        text-align: left;
    }

    .hub-diagnostic {
        justify-content: flex-start;
    }
}

/* ========== RESPONSIVE UTILITIES FOR BOTH SECTIONS ========== */

/* Ensure images are always responsive */
.download-img img,
.lane-icon,
.hub-element {
    max-width: 100%;
    height: auto;
}

/* Prevent horizontal overflow */
.how-it-works,
.download-section {
    overflow-x: hidden;
}

/* Ensure proper text wrapping */
.lane-card h4,
.lane-card p,
.download-content h1,
.download-content p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Touch-friendly buttons on mobile */
@media (max-width: 767px) {
    .download li a {
        min-height: 50px;
        touch-action: manipulation;
    }

    .lane-card {
        touch-action: manipulation;
    }
}

/* High DPI display optimizations */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .download-img img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Ensure proper spacing on all devices */
@media (max-width: 991px) {

    .how-it-works .container,
    .download-section .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 575px) {

    .how-it-works .container,
    .download-section .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* ==========================
   HOW-IT-WORKS FINAL FIXES
   Prevent overflow and align tokens on small/tablet
   (Does not change desktop layout)
   ========================== */

.how-it-works {
    overflow-x: hidden;
}

.how-it-works .dual-street-container {
    max-width: 100%;
    padding-left: 10px;
    padding-right: 10px;
    box-sizing: border-box;
}

.lane-token {
    box-sizing: border-box;
    max-width: 54px;
}

@media (max-width: 991px) {
    /* Keep central divider centered to avoid off-canvas elements */
    .dual-street-container::before,
    .dual-street-container::after {
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 8px;
    }

    /* Stack lanes full-width and create space for tokens */
    .user-lane,
    .owner-lane {
        width: 100% !important;
        padding-left: 70px;
        padding-right: 15px;
        margin-bottom: 40px;
    }

    .user-lane .lane-card,
    .owner-lane .lane-card {
        padding: 20px !important;
        text-align: left !important;
    }

    .user-lane .lane-token,
    .owner-lane .lane-token {
        position: absolute !important;
        left: 20px !important;
        right: auto !important;
        transform: translateY(-50%) !important;
    }

    .street-row {
        margin-bottom: 40px !important;
    }

    .street-label {
        padding-left: 10px;
        padding-right: 10px;
    }

    .lane-title {
        width: 100% !important;
        font-size: 1rem !important;
    }
}

/* ==========================
   DOWNLOAD SECTION REVAMP
   Revise laptop layout and improve tablet/mobile responsiveness
   ========================== */

.download-section {
    overflow: hidden;
    position: relative;
}

.download-hub-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: center;
}

.download-content {
    padding: 8px 4px;
}

.download li a {
    min-width: 0; /* allow shrinking on smaller screens */
    width: auto;
}

/* Mobile: stack and make buttons full width */
@media (max-width: 575px) {
    .download-hub-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .download li {
        display: block;
        margin: 0 auto 12px;
        width: 100%;
        max-width: 360px;
    }

    .download li a {
        display: flex;
        justify-content: center;
        gap: 12px;
        padding: 12px 18px;
        width: 100%;
    }

    .download-content h1 {
        font-size: 26px !important;
        line-height: 1.2;
    }

    .floating-hub-elements {
        display: none !important;
    }
}

/* Tablet: side-by-side but constrained */
@media (min-width: 576px) and (max-width: 991px) {
    .download-hub-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-items: center;
    }

    .download-content {
        padding-right: 10px;
    }

    .download-img-grid {
        display: flex;
        align-items: center;
        justify-content: center;
        padding-left: 10px;
    }

    .download-img img {
        max-width: 88%;
        height: auto;
    }

    .floating-hub-elements {
        opacity: 0.9;
        pointer-events: none;
    }
}

/* Laptop: redesign layout to avoid overflow and improve balance
   Targets typical laptop widths (992px - 1366px) */
@media (min-width: 992px) and (max-width: 1366px) {
    .download-hub-wrapper {
        display: flex;
        gap: 36px;
        align-items: center;
        justify-content: space-between;
    }

    .download-content {
        flex: 0 0 48%;
        padding: 0 12px 0 0;
    }

    .download-img-grid {
        flex: 0 0 48%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 0 0 12px;
    }

    .download-content h1 {
        font-size: 40px !important;
        line-height: 1.08;
    }

    .download li a {
        min-width: 200px;
    }

    /* Limit floating elements to avoid horizontal overflow */
    .floating-hub-elements {
        max-width: 90%;
        left: 5%;
        right: auto;
    }
}

/* Desktop large: restore richer visuals */
@media (min-width: 1367px) {
    .download-hub-wrapper {
        gap: 48px;
    }

    .floating-hub-elements {
        left: 0;
        right: 0;
    }
}


@media (min-width: 768px) and (max-width: 1024px) {
    /* Tablet: two columns but constrained to avoid overflow */
    .dual-street-container {
        padding: 40px 10px;
        max-width: 100%;
    }

    .user-lane,
    .owner-lane {
        width: 48% !important;
        padding-left: 30px;
        padding-right: 30px;
    }

    /* Position tokens near the center line without negative offsets */
    .user-lane .lane-token {
        right: auto !important;
        left: calc(50% - 22px) !important;
        transform: translateY(-50%) !important;
    }

    .owner-lane .lane-token {
        left: auto !important;
        right: calc(50% - 22px) !important;
        transform: translateY(-50%) !important;
    }
}

/* Download Section Layout Fix - Ensure left/right alignment on desktop */
@media (min-width: 992px) {
    .download-section .col-lg-6 {
        flex: 0 0 auto;
        width: 100%;
    }

    .download-hub-wrapper {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 50px;
        align-items: center;
    }

    .download-hub-wrapper .col-lg-6:first-child {
        order: 1;
    }

    .download-hub-wrapper .col-lg-6:last-child {
        order: 2;
    }

    .download-content {
        padding-right: 40px;
    }

    .download-img-grid {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 400px;
        position: relative;
    }

    .download-img {
        max-width: 100%;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .download-img img {
        max-width: 100%;
        height: auto;
        animation: float 3s ease-in-out infinite;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* Enhanced Download Section Styling */
.download-content {
    animation: slideInLeft 0.8s ease-out;
}

.download-content .section-title h1 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #1D2A5D;
}

.download-content .section-title p {
    font-size: 1.05rem;
    color: #6B7494;
    line-height: 1.6;
    margin-bottom: 30px;
}

.download-img-grid {
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
