/* =========================================================
   NATIONAL DRUG HOUSE
   HOMEPAGE RESPONSIVE STYLES
   PHP 7.4.3 / Bootstrap compatible
========================================================= */


/* =========================================================
   GLOBAL HOMEPAGE PROTECTION
========================================================= */

.ndh-home-intro,
.ndh-hero,
.ndh-home-intro *,
.ndh-hero * {
    box-sizing: border-box;
}

.ndh-home-intro,
.ndh-hero {
    max-width: 100%;
    overflow: hidden;
}


/* =========================================================
   HERO CAROUSEL
========================================================= */

.ndh-hero {
    position: relative;
    width: 100%;
    isolation: isolate;
    background: #0b2239;
}


/*
 * Desktop hero height.
 *
 * We intentionally do not use Bootstrap ratio-21x9 here.
 * A fixed responsive height gives us much better control
 * over mobile readability.
 */

.ndh-hero-media {
    position: relative;
    width: 100%;
    height: clamp(460px, 42vw, 650px);
    overflow: hidden;
}


.ndh-hero-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}


/*
 * Subtle global image overlay.
 *
 * The main readability comes from .ndh-hero-content.
 */

.ndh-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(
            90deg,
            rgba(3, 25, 45, 0.28) 0%,
            rgba(3, 25, 45, 0.10) 48%,
            rgba(3, 25, 45, 0.18) 100%
        );
}


/* =========================================================
   HERO CAPTION
========================================================= */

.ndh-hero-caption {
    position: absolute;
    inset: 0;
    z-index: 2;

    display: flex;
    align-items: center;

    padding-top: 2rem;
    padding-bottom: 3.5rem;

    margin: 0;

    text-align: left;
}


.ndh-hero-caption .container {
    position: relative;
    z-index: 3;
}


/* =========================================================
   HERO CONTENT PANEL
   Glass / floating 3D effect
========================================================= */

.ndh-hero-content {
    position: relative;
    max-width: 720px;

    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 1.5rem;

	/*
 * Change background of Title Subtitle of Slider here, hari bol. 
 */
    background:
        linear-gradient(
            135deg,
            rgba(5, 31, 52, 0.5),
            rgba(8, 53, 78, 0.1)
        );

    box-shadow:
        0 1.5rem 3rem rgba(0, 0, 0, 0.28),
        0 0.35rem 1rem rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.20),
        inset 0 -1px 0 rgba(0, 0, 0, 0.10);

    overflow: hidden;

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}


/*
 * Decorative soft glow behind the content.
 */

.ndh-hero-content-glow {
    position: absolute;
    top: -120px;
    left: -80px;

    width: 280px;
    height: 280px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(43, 183, 109, 0.26) 0%,
            rgba(43, 183, 109, 0.10) 35%,
            rgba(43, 183, 109, 0) 72%
        );

    pointer-events: none;
}


/*
 * Content remains above the decorative glow.
 */

.ndh-hero-content-body {
    position: relative;
    z-index: 2;

    padding: 2.25rem 2.5rem;
}
.ndh-hero-title {
    color: #fff;

    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.55),
        0 0 18px rgba(255, 255, 255, 0.12);
}

.ndh-hero-subtitle {
    color: rgba(255, 255, 255, 0.94);

    text-shadow:
        0 2px 6px rgba(0, 0, 0, 0.50);
}

/* =========================================================
   HERO TYPOGRAPHY
========================================================= */

.ndh-hero-title {
    margin: 0 0 1rem;

    max-width: 680px;

    color: #ffffff;

    font-size: clamp(
        2rem,
        4vw,
        4.15rem
    );

    font-weight: 800;

    line-height: 1.05;
    letter-spacing: -0.035em;

    text-wrap: balance;

    text-shadow:
        0 2px 3px rgba(0, 0, 0, 0.45),
        0 8px 24px rgba(0, 0, 0, 0.32);
}


.ndh-hero-subtitle {
    max-width: 650px;

    margin: 0 0 1.5rem;

    color: rgba(255, 255, 255, 0.94);

    font-size: clamp(
        1rem,
        1.5vw,
        1.35rem
    );

    font-weight: 400;

    line-height: 1.6;

    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.38);
}


.ndh-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}


.ndh-hero-button {
    min-height: 52px;

    padding-right: 1.5rem;
    padding-left: 1.5rem;

    border: 0;

    border-radius: 999px;

    font-weight: 700;

    box-shadow:
        0 0.75rem 1.5rem rgba(0, 0, 0, 0.20);
}


.ndh-hero-button:hover,
.ndh-hero-button:focus-visible {
    transform: translateY(-2px);
    box-shadow:
        0 1rem 1.8rem rgba(0, 0, 0, 0.28);
}


/* =========================================================
   HERO INDICATORS
========================================================= */

.ndh-hero-indicators {
    z-index: 5;

    margin-bottom: 1rem;
}


.ndh-hero-indicators [data-bs-target] {
    width: 2rem;
    height: 0.25rem;

    margin-right: 0.3rem;
    margin-left: 0.3rem;

    border: 0;

    border-radius: 999px;

    opacity: 0.55;
}


.ndh-hero-indicators .active {
    opacity: 1;
}


/* =========================================================
   HERO CONTROLS
========================================================= */

.ndh-hero-control {
    z-index: 5;

    width: 5rem;

    opacity: 0.9;
}


.ndh-hero-control-prev {
    justify-content: flex-start;
    padding-left: 1rem;
}


.ndh-hero-control-next {
    justify-content: flex-end;
    padding-right: 1rem;
}


.ndh-hero-control:hover,
.ndh-hero-control:focus-visible {
    opacity: 1;
}


.ndh-hero-control .carousel-control-prev-icon,
.ndh-hero-control .carousel-control-next-icon {
    width: 2.6rem;
    height: 2.6rem;

    padding: 0.6rem;

    border-radius: 50%;

    background-color: rgba(5, 31, 52, 0.65);
    background-size: 55% 55%;

    box-shadow:
        0 0.5rem 1rem rgba(0, 0, 0, 0.20);
}


/* =========================================================
   GENERAL HOMEPAGE ICONS
========================================================= */

.ndh-round-icon {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 56px;
    height: 56px;

    border-radius: 50%;
}


.ndh-round-icon-primary {
    background-color: var(--bs-primary);
    color: #ffffff;
}


.ndh-round-icon-light {
    width: 64px;
    height: 64px;

    background-color: #ffffff;
    color: var(--bs-primary);
}


/* =========================================================
   CATEGORY ICON
========================================================= */

.ndh-category-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 52px;
    height: 52px;

    border-radius: 0.75rem;

    background-color: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
}


.ndh-category-icon i {
    line-height: 1;
}


/* =========================================================
   PRODUCT MEDIA
========================================================= */

.ndh-product-media {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    height: 210px;

    padding: 1rem;

    overflow: hidden;
}


.ndh-product-image {
    display: block;

    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 190px;

    object-fit: contain;
}


/* =========================================================
   HOW IT WORKS ICON
========================================================= */

.ndh-step-icon {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 72px;
    height: 72px;

    border-radius: 50%;

    background-color: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
}


/* =========================================================
   FUTURE FLASH OFFER / DIALOGUE
========================================================= */

/*
 * We deliberately reserve a layer above the homepage.

 * Future dynamic flash-offer/dialogue component can use:

       .ndh-offer-dialogue

 * without changing the carousel stacking order.
 */

.ndh-offer-dialogue {
    position: fixed;

    z-index: 1080;

    pointer-events: auto;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1199.98px) {

    .ndh-hero-media {
        height: clamp(450px, 48vw, 580px);
    }


    .ndh-hero-content-body {
        padding: 2rem 2.25rem;
    }


    .ndh-hero-title {
        font-size: clamp(
            2rem,
            4.5vw,
            3.35rem
        );
    }


    .ndh-hero-subtitle {
        font-size: 1.08rem;
    }

}


/* =========================================================
   MOBILE / TABLET
========================================================= */

@media (max-width: 767.98px) {

    .ndh-hero-media {
        height: 590px;
    }


    /*
     * On smaller screens the image is positioned toward
     * the right so the pharmacist/customer visual remains
     * visible behind the content.
     */

    .ndh-hero-image {
        object-position: 68% center;
    }


    /*
     * Stronger mobile readability.
     */

    .ndh-hero-overlay {
        background:
            linear-gradient(
                180deg,
                rgba(3, 25, 45, 0.12) 0%,
                rgba(3, 25, 45, 0.20) 100%
            );
    }


    .ndh-hero-caption {
        align-items: flex-end;

        padding-top: 1.5rem;
        padding-bottom: 2.75rem;
    }


    .ndh-hero-content {
        width: 100%;
        max-width: none;

        border-radius: 1.25rem;

        background:
            linear-gradient(
                145deg,
                rgba(5, 31, 52, 0.97),
                rgba(8, 53, 78, 0.95)
            );
    }


    .ndh-hero-content-body {
        padding: 1.5rem 1.35rem;
    }


    .ndh-hero-title {
        margin-bottom: 0.85rem;

        font-size: clamp(
            1.9rem,
            8vw,
            2.55rem
        );

        line-height: 1.08;

        letter-spacing: -0.025em;
    }


    .ndh-hero-subtitle {
        margin-bottom: 1.25rem;

        font-size: 0.98rem;

        line-height: 1.5;
    }


    .ndh-hero-button {
        width: 100%;

        min-height: 50px;
    }


    .ndh-hero-control {
        display: none;
    }


    .ndh-hero-indicators {
        margin-bottom: 0.75rem;
    }


    .ndh-hero-indicators [data-bs-target] {
        width: 1.5rem;
    }


    /*
     * Prevent long buttons/actions from causing
     * horizontal overflow.
     */

    .ndh-hero-actions {
        width: 100%;
    }


    .ndh-hero-actions .btn {
        max-width: 100%;
    }


    /*
     * Mobile product images.
     */

    .ndh-product-media {
        height: 190px;
    }


    .ndh-product-image {
        max-height: 170px;
    }

}


/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 575.98px) {

    .ndh-hero-media {
        height: 610px;
    }


    .ndh-hero-image {
        object-position: 70% center;
    }


    .ndh-hero-caption {
        padding-bottom: 2.5rem;
    }


    .ndh-hero-content {
        border-radius: 1rem;
    }


    .ndh-hero-content-body {
        padding: 1.35rem 1.1rem;
    }


    .ndh-hero-title {
        font-size: 1.85rem;
    }


    .ndh-hero-subtitle {
        font-size: 0.95rem;
    }


    .ndh-home-intro .display-4 {
        font-size: 2.25rem;
    }


    .ndh-home-intro .input-group-lg {
        flex-wrap: wrap;
    }


    .ndh-home-intro .input-group-lg .input-group-text {
        border-radius: 0.5rem 0 0 0.5rem;
    }


    .ndh-home-intro .input-group-lg .form-control {
        min-width: 0;
    }


    .ndh-home-intro .input-group-lg .btn {
        width: 100%;
        margin-top: 0.5rem;

        border-radius: 0.5rem;
    }


    .ndh-product-media {
        height: 180px;
    }


    .ndh-product-image {
        max-height: 160px;
    }


    .ndh-round-icon {
        width: 50px;
        height: 50px;
    }


    .ndh-round-icon-light {
        width: 58px;
        height: 58px;
    }


    .ndh-step-icon {
        width: 64px;
        height: 64px;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .ndh-hero-button {
        transition: none;
    }

    .carousel-item {
        transition: none;
    }

}