﻿/* ==========================================================================
   MIHS Responsive Overrides & Global Fixes
   ========================================================================== */

/* Global safety */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Hero Responsive
   ========================================================================== */
@media (max-width: 991px) {
    .mihs-hero {
        min-height: 78vh;
    }

    .mihs-hero__content {
        padding: 5rem 0 4rem;
        text-align: center;
    }

        .mihs-hero__content .mihs-container {
            max-width: 100%;
        }

        .mihs-hero__content p {
            margin-left: auto;
            margin-right: auto;
        }

    .mihs-hero__actions {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .mihs-hero {
        min-height: 72vh;
    }

    .mihs-hero__content h1 {
        font-size: clamp(1.9rem, 7vw, 2.6rem);
    }

    .mihs-hero__content p {
        font-size: 0.98rem;
    }

    .mihs-btn,
    .mihs-btn-ghost {
        min-height: 46px;
        padding: 0.7rem 1.3rem;
        font-size: 0.88rem;
    }
}

/* ==========================================================================
   About & Exhibitor Responsive
   ========================================================================== */
@media (max-width: 991px) {
    .mihs-about__heading,
    .mihs-exhibitor__top {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 600px) {
    .mihs-about,
    .mihs-exhibitor {
        padding: 70px 0;
    }

    .mihs-about__heading h2,
    .mihs-exhibitor__top h2 {
        font-size: clamp(1.9rem, 6.5vw, 2.5rem);
    }
}

/* ==========================================================================
   Video Section Responsive
   ========================================================================== */
@media (max-width: 900px) {
    .mihs-video__header {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 45px;
    }

    .mihs-video__content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .mihs-video__info {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .mihs-video-section {
        padding: 65px 0;
    }

    .mihs-video__title h2 {
        font-size: 2rem;
    }

    .mihs-video__button {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Gallery Responsive
   ========================================================================== */
@media (max-width: 900px) {
    .mihs-gallery__header {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .mihs-gallery__item {
        flex: 0 0 280px;
    }
}

@media (max-width: 600px) {
    .mihs-gallery {
        padding: 65px 0;
    }

    .mihs-gallery__item {
        flex: 0 0 240px;
    }

    .mihs-gallery__header h2 {
        font-size: 2rem;
    }
}

/* ==========================================================================
   Testimonials Responsive
   ========================================================================== */
@media (max-width: 800px) {
    .mihs-testimonials__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .mihs-testimonial {
        min-height: 280px;
        padding: 2rem;
    }
}

@media (max-width: 500px) {
    .mihs-testimonials {
        padding: 65px 0;
    }

    .mihs-testimonial {
        padding: 1.75rem 1.4rem;
    }

    .mihs-testimonial__text {
        font-size: 0.95rem;
    }
}

/* ==========================================================================
   Section Page Responsive
   ========================================================================== */
@media (max-width: 600px) {
    .mihs-page {
        padding: 50px 0;
    }

    .mihs-page__title {
        font-size: 1.75rem;
    }

    .mihs-page__actions {
        flex-direction: column;
    }

        .mihs-page__actions .mihs-btn,
        .mihs-page__actions .mihs-btn-ghost {
            width: 100%;
            justify-content: center;
        }
}

/* ==========================================================================
   Container adjustments
   ========================================================================== */
@media (max-width: 768px) {
    .mihs-container,
    .mihs-gallery__container,
    .mihs-testimonials__container {
        width: min(100% - 32px, 1180px);
    }
}

@media (max-width: 480px) {
    .mihs-container,
    .mihs-gallery__container,
    .mihs-testimonials__container {
        width: calc(100% - 28px);
    }
}

/* ==========================================================================
   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;
    }

    .mihs-gallery__track,
    .mihs-footer-partners__track,
    .mihs-ticker__track {
        animation: none !important;
    }
}

/* ==========================================================================
   Very small screens (320px)
   ========================================================================== */
@media (max-width: 360px) {
    .mihs-hero__content h1 {
        font-size: 1.75rem;
    }

    .mihs-btn,
    .mihs-btn-ghost {
        width: 100%;
        justify-content: center;
    }

    .mihs-hero__actions {
        flex-direction: column;
        width: 100%;
    }
}


/* =====================================================
   REMOVE GAP AFTER FOOTER
===================================================== */

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
    padding-bottom: 0 !important; /* Removes Bootstrap pb-3 gap */
}

.mihs-footer {
    flex-shrink: 0;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Extra safety */
.mihs-footer-bottom {
    margin-bottom: 0 !important;
    padding-bottom: 18px;
}

body > footer:last-child {
    margin-bottom: 0 !important;
}