/* VMTTI Master Responsive Stylesheet */

/* Global Mobile Fixes & Overflow Protection */
html, body {
    overflow-x: clip !important;
    max-width: 100vw !important;
    width: 100% !important;
    margin: 0;
    padding: 0;
}

*, *::before, *::after {
    box-sizing: border-box;
}

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

/* ----------------------------------------------------
   Large Viewports (max-width: 1200px)
   ---------------------------------------------------- */
@media (max-width: 1200px) {
    .floating-info-card.card-1 { left: -10px; }
    .floating-info-card.card-2 { right: -10px; }
}

/* ----------------------------------------------------
   Tablet / Medium Viewports (max-width: 991.98px)
   ---------------------------------------------------- */
@media (max-width: 991.98px) {
    .hero-section:not(.p-0) {
        padding: 50px 0;
        text-align: center;
    }
    
    .hero-img-container {
        margin-top: 50px;
    }
    
    .floating-info-card {
        display: none !important; /* Hide floating items on small viewports */
    }
    
    .trust-strip {
        padding: 18px 0;
    }
    
    .trust-item {
        justify-content: flex-start;
        margin-bottom: 12px;
    }
    
    .navbar-collapse {
        background-color: var(--white);
        box-shadow: var(--shadow-lg);
        padding: 15px;
        border-radius: 8px;
        margin-top: 10px;
        border: 1px solid rgba(0,0,0,0.05);
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .nav-link {
        padding: 8px 12px !important;
    }

    .navbar-btn {
        width: 100% !important;
        margin-top: 5px;
    }
    
    .navbar-collapse .d-flex {
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        width: 100%;
    }
    
    .step-indicator {
        margin-bottom: 30px;
    }
    
    .step-label {
        font-size: 0.65rem;
    }
}

/* ----------------------------------------------------
   Mobile Landscape & Portrait (max-width: 767.98px)
   ---------------------------------------------------- */
@media (max-width: 767.98px) {
    /* Do not add 50px padding to hero carousel or zero-padded sections */
    section:not(.hero-section):not(.p-0) {
        padding: 40px 0 !important;
    }
    
    .hero-section.p-0 {
        padding: 0 !important;
    }
    
    /* Hero Carousel Mobile Optimization */
    #heroCarousel .carousel-inner {
        min-height: 480px !important;
        height: auto !important;
        max-height: 82vh !important;
        aspect-ratio: auto !important;
    }
    
    #heroCarousel .carousel-item {
        min-height: 480px !important;
        height: 100% !important;
    }
    
    #heroCarousel .carousel-item img {
        height: 100% !important;
        object-fit: cover !important;
        object-position: center top !important;
    }

    /* Hide bulky left/right arrow controls on mobile screens - swipe handles navigation */
    #heroCarousel .carousel-control-prev,
    #heroCarousel .carousel-control-next {
        display: none !important;
    }

    /* Hero Text & Badges */
    .hero-badge {
        font-size: 0.72rem !important;
        padding: 5px 12px !important;
        letter-spacing: 0.5px !important;
        margin-bottom: 12px !important;
        max-width: 100% !important;
        white-space: normal !important;
        word-break: break-word !important;
        line-height: 1.35 !important;
        text-align: center;
        display: inline-block;
    }

    .hero-title {
        font-size: clamp(1.45rem, 5.8vw, 2.1rem) !important;
        line-height: 1.25 !important;
    }

    .hero-section .d-flex.flex-wrap {
        justify-content: center !important;
        width: 100%;
    }

    .section-title {
        font-size: 1.45rem;
        line-height: 1.3;
    }
    
    .filter-tabs {
        gap: 6px;
    }
    
    .filter-tab {
        padding: 6px 14px;
        font-size: 0.8rem;
    }
    
    /* Responsive Tables */
    .responsive-table-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .step-dot .step-label {
        display: none;
    }
    
    .step-dot.active::after {
        content: attr(data-step-name);
        position: absolute;
        top: 36px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.7rem;
        font-weight: 700;
        color: var(--primary-navy);
        white-space: nowrap;
        background-color: var(--white);
        padding: 2px 8px;
        border-radius: 4px;
        box-shadow: var(--shadow-sm);
        border: 1px solid rgba(20,43,114,0.1);
        z-index: 10;
    }

    /* Verification Form on Mobile */
    .verification-panel {
        padding: 20px 16px !important;
    }
}

/* ----------------------------------------------------
   Small Mobile Viewports (max-width: 575.98px)
   ---------------------------------------------------- */
@media (max-width: 575.98px) {
    .navbar-brand img {
        height: 40px !important;
        max-height: 40px !important;
    }

    .navbar-brand-text {
        font-size: 1rem;
    }
    
    .navbar-brand-subtitle {
        font-size: 0.55rem;
    }
    
    .hero-title {
        font-size: clamp(1.35rem, 5.5vw, 1.8rem) !important;
    }

    .hero-section .btn {
        width: 100%;
        margin-bottom: 8px;
        font-size: 0.84rem !important;
        padding: 10px 16px !important;
    }
    
    .hero-section .btn:last-child {
        margin-bottom: 0;
    }

    /* Trust Strip Cards on Small Mobile */
    .trust-strip {
        padding: 14px 0 !important;
        background-color: #FAF6F0 !important;
        border-top: 1px solid rgba(74, 14, 23, 0.08) !important;
        border-bottom: 1px solid rgba(74, 14, 23, 0.08) !important;
    }

    .trust-item {
        background: #FFFFFF !important;
        padding: 10px 10px !important;
        border-radius: 10px !important;
        border: 1px solid rgba(74, 14, 23, 0.08) !important;
        box-shadow: 0 2px 5px rgba(74, 14, 23, 0.04) !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        height: 100% !important;
        margin-bottom: 0 !important;
    }

    .trust-icon {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        border-radius: 8px !important;
        font-size: 1.1rem !important;
        background: rgba(212, 175, 55, 0.15) !important;
        color: #b38810 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
    }

    .trust-item h5 {
        font-size: 0.8rem !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        margin-bottom: 2px !important;
        color: var(--primary-navy) !important;
    }

    .trust-item p {
        font-size: 0.68rem !important;
        color: var(--text-muted) !important;
        line-height: 1.15 !important;
        margin: 0 !important;
    }

    .trust-content {
        flex-grow: 1;
        min-width: 0;
    }
    
    /* Section Title Dynamic Sizing */
    .section-title {
        font-size: 1.35rem !important;
        line-height: 1.3;
    }

    .section-badge {
        font-size: 0.75rem;
        letter-spacing: 1.5px;
    }

    /* Highlights 2-Col Grid on Mobile */
    .highlight-card-mobile {
        padding: 14px 10px !important;
    }

    .highlight-card-mobile i {
        font-size: 1.5rem !important;
        margin-bottom: 8px !important;
    }

    .highlight-card-mobile h6 {
        font-size: 0.85rem !important;
        margin-bottom: 4px !important;
    }

    .highlight-card-mobile p {
        font-size: 0.72rem !important;
    }

    /* Standalone Buttons - exclude buttons inside input-groups */
    .btn-premium:not(.input-group .btn), 
    .btn-accent:not(.input-group .btn) {
        padding: 9px 18px;
        font-size: 0.88rem;
    }

    /* Footer adjustments */
    .footer-section {
        padding: 40px 0 20px 0 !important;
    }

    .footer-section h4 {
        margin-bottom: 15px;
        font-size: 1.05rem;
    }
}
