/* Homepage additions only. Desktop styles at 1200px and above remain in main.css. */
.home-page .hero-carousel {
    background: #161241;
    --swiper-theme-color: #fff;
}

.home-page .hero-carousel .swiper-wrapper { transition-timing-function: cubic-bezier(.22, .61, .36, 1); }

.home-page .hero-carousel .swiper-slide img {
    display: block;
    width: 100%;
    height: auto;
}

.home-page .hero-carousel .hero-arrow,
.home-page .hero-carousel .hero-pause {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.4);
    color: #fff;
    background: rgba(22,18,65,.55);
    backdrop-filter: blur(12px);
    transition: background .2s ease, border-color .2s ease;
}

.home-page .hero-carousel .hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 1.2rem;
    transform: translateY(-50%);
}

.home-page .hero-carousel .hero-prev { left: clamp(12px, 2vw, 32px); }
.home-page .hero-carousel .hero-next { right: clamp(12px, 2vw, 32px); }

.home-page .hero-carousel .hero-controls {
    position: absolute;
    bottom: 16px;
    left: 50%;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: calc(100% - 32px);
    padding: 6px 8px 6px 16px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 50px;
    background: rgba(22,18,65,.55);
    backdrop-filter: blur(12px);
    transform: translateX(-50%);
}

.home-page .hero-carousel .swiper-pagination {
    position: static;
    display: flex;
    width: auto;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

.home-page .hero-carousel .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    margin: 0 !important;
    border-radius: 10px;
    background: rgba(255,255,255,.55);
}

.home-page .hero-carousel .swiper-pagination-bullet-active { width: 28px; background: #fff !important; }

.home-page .hero-carousel .hero-pause { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; }
.home-page .hero-carousel .hero-pause[hidden] { display: none; }
.home-page .hero-carousel .hero-arrow:hover,
.home-page .hero-carousel .hero-pause:hover { background: #161241; border-color: #fff; }
.home-page .hero-carousel button:focus-visible,
.home-page .hero-carousel .swiper-pagination-bullet:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

@media (max-width: 575.98px) {
    .home-page .hero-carousel .hero-arrow { width: 30px; height: 30px; font-size: .9rem; }
    .home-page .hero-carousel .hero-controls { bottom: 8px; gap: 6px; padding: 3px 5px 3px 10px; }
    .home-page .hero-carousel .hero-pause { width: 28px; height: 28px; }
}

/* Compact homepage contact cards and contained social-profile viewports. */
.home-page #connect .connect-card {
    --connect-color: #0d6efd;
    --connect-tint: #eef4ff;
    --connect-body-height: 280px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100%;
    min-width: 0;
    padding: 20px;
    border: 1px solid #e0e3ec;
    border-radius: 24px;
    background: rgba(255,255,255,.85);
    box-shadow: 0 8px 28px rgba(22,18,65,.035);
    color: #19304d;
}

.home-page #connect .connect-whatsapp { --connect-color: #198754; --connect-tint: #edf8f2; }
.home-page #connect .connect-instagram { --connect-color: #dc3545; --connect-tint: #fff0f3; }
.home-page #connect .connect-card-heading { display:flex; align-items:center; gap:12px; min-height:52px; }
.home-page #connect .connect-icon { display:inline-flex; flex:0 0 48px; align-items:center; justify-content:center; height:48px; border-radius:16px; color:var(--connect-color); background:var(--connect-tint); font-size:1.45rem; }
.home-page #connect .connect-eyebrow { margin:0 0 3px; color:#6e7890; font-size:.65rem; font-weight:600; letter-spacing:.08em; text-transform:uppercase; }
.home-page #connect .connect-card h3 { margin:0; color:#19304d; font-size:clamp(1.1rem,1.55vw,1.4rem); font-weight:700; }
.home-page #connect .connect-body { position:relative; flex:0 0 var(--connect-body-height); width:100%; height:var(--connect-body-height); min-width:0; overflow:hidden; border:1px solid #e8ebf2; border-radius:16px; }
.home-page #connect .connect-contact-body { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; padding:20px 14px; text-align:center; background:linear-gradient(150deg,var(--connect-tint),#fff); }
.home-page #connect .connect-body-icon { color:var(--connect-color); font-size:2rem; opacity:.7; }
.home-page #connect .connect-contact-value { margin:0; overflow-wrap:anywhere; color:#19304d; font-size:.95rem; font-weight:600; }
.home-page #connect .connect-description { margin:0; color:#627089; font-size:.88rem; line-height:1.65; }
.home-page #connect .connect-action { display:flex; align-items:center; justify-content:center; width:100%; min-height:42px; padding:10px 12px; margin-top:auto; border-radius:12px; font-size:.86rem; font-weight:600; white-space:normal; }
.home-page #connect .socail-handlerIframe { display:flex; flex:1; flex-direction:column; gap:18px; width:100%; min-width:0; }
.home-page #connect .social-body { background:#fff; }
.home-page #connect .social-fallback { display:flex; align-items:center; justify-content:center; height:100%; padding:20px; text-align:center; background:var(--connect-tint); }
.home-page #connect .social-embed { position:absolute; inset:0; width:100%; height:100%; overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#bdc5d4 #f4f6fa; background:#fff; visibility:hidden; pointer-events:none; }
.home-page #connect [data-social-state="ready"] .social-embed { position:absolute; display:block; width:100%; max-width:none; height:100%; max-height:none; margin:0; overflow:auto; visibility:visible; pointer-events:auto; border-radius:0; }
.home-page #connect [data-social-state="ready"] .social-fallback { display:none; }
.home-page #connect .social-embed-stage { position:relative; width:100%; }
.home-page #connect .social-embed-canvas { position:absolute; top:0; left:0; transform-origin:top left; }
.home-page #connect .instagram-profile-frame { display:block; width:326px; border:0; }
.home-page #connect .social-embed:focus-visible,
.home-page #connect a.connect-card:focus-visible { outline:2px solid var(--connect-color,#1937b2); outline-offset:3px; }

@media (min-width: 992px) and (max-width: 1199.98px) {
    .home-page #connect .connect-card { padding:14px; }
    .home-page #connect .connect-card-heading { gap:8px; }
    .home-page #connect .connect-icon { flex-basis:40px; height:40px; border-radius:12px; }
}

@media (max-width: 767.98px) {
    .home-page #connect .connect-contact-body { min-height:190px; height:auto; flex-basis:auto; }
}

@media (max-width: 767.98px) {
    /* Social links live inside the collapsed contact panel on phones. */
    .home-page #topBarCollapse #drawer {
        position: static;
        display: flex;
        flex-direction: row !important;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 8px;
        padding: 10px 0 2px;
        border: 0;
        border-top: 1px solid rgba(255,255,255,.22);
        border-radius: 0;
        background: transparent;
        backdrop-filter: none;
    }

    .home-page #topBarCollapse #drawer a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        margin: 0 !important;
    }

    .home-page #topBarCollapse #drawer img {
        width: 26px;
        height: 26px;
        object-fit: contain;
    }

    /* Give portrait phones a readable banner while preserving the image focus. */
    .home-page .home-hero .swiper,
    .home-page .home-hero .swiper-wrapper,
    .home-page .home-hero .swiper-slide {
        height: clamp(180px, 52vw, 240px);
    }

    .home-page .home-hero .swiper-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    /* Restore the side drawer at tablet widths, where the top bar is always open. */
    .home-page #drawer {
        position: fixed;
        right: 8px;
        bottom: 32%;
        flex-direction: column !important;
        flex-wrap: nowrap;
        padding: 1rem;
        border: solid 1px #eaeaea;
        border-radius: 2rem;
        background-color: rgb(255 255 255 / 16%);
        backdrop-filter: blur(5px);
    }

    .home-page #drawer a { width: auto; height: auto; margin-bottom: 1rem !important; }
    .home-page #drawer a:last-child { margin-bottom: 0 !important; }
    .home-page #drawer img { width: auto; height: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .home-page .hero-carousel * { transition-duration: 0s !important; }
}

@media (max-width: 1199.98px) {
    .home-page #header .logo {
        min-width: 0;
        max-width: calc(100% - 60px);
    }

    .home-page #header .logo img {
        max-width: 100%;
        height: auto;
        object-fit: contain;
    }

    .home-page .mobile-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        margin-right: 0;
    }

    .home-page .navmenu a {
        white-space: normal;
        overflow-wrap: anywhere;
        gap: 8px;
        min-height: 44px;
    }

    .home-page .navmenu a .toggle-dropdown {
        flex-shrink: 0;
        width: 44px;
        height: 44px;
    }

    .home-page .navmenu .dropdown ul {
        margin: 8px 12px;
    }

    .home-page.mobile-nav-active .navmenu > ul {
        overscroll-behavior: contain;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }

    .home-page #topBarCollapse > .d-flex,
    .home-page #topBarCollapse ul {
        flex-wrap: wrap;
        gap: 4px 8px;
    }

    .home-page #topBarCollapse .btn {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    /* Keep the social links available without covering narrow-screen content. */
    .home-page #drawer {
        position: static;
        flex-direction: row !important;
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px;
        padding: 4px 12px;
        border-radius: 0;
        background: #fff;
    }

    .home-page #drawer a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        margin-bottom: 0 !important;
    }

    .home-page #drawer img {
        width: 28px;
        height: 28px;
        object-fit: contain;
    }

    .home-page .home-news marquee {
        flex: 1 1 0;
        min-width: 0;
    }

    .home-page .home-news .newsHead {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        width: auto;
        min-height: 44px;
        white-space: nowrap;
    }

    .home-page .home-hero .swiper-slide img {
        display: block;
        width: 100%;
        height: auto;
    }

    .home-page .home-officials .row > .col-md-5 {
        width: 50%;
    }

    .home-page .home-officials .shadow2 > img {
        flex-shrink: 0;
        width: 140px;
        height: 140px;
        object-fit: contain;
    }

    .home-page .home-officials .shadow2 > div,
    .home-page .download-info,
    .home-page #footer .method-details {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .home-page #about img,
    .home-page #vision-2047 img {
        max-width: 100%;
        height: auto;
    }

    .home-page #about .about-content,
    .home-page #vision-2047 .about-content,
    .home-page #services .service-card,
    .home-page #testimonials .author-details {
        overflow-wrap: anywhere;
    }

    .home-page #vision-2047 .about-content .d-flex {
        flex-wrap: wrap;
    }

    .home-page .home-notices .row > .col-lg-7 {
        width: 100%;
    }

    .home-page .home-notices .download-widget > h3 {
        flex-wrap: wrap;
        gap: 12px;
    }

    .home-page .home-notices .download-widget > h3 .btn {
        flex-shrink: 0;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .home-page .home-notices .download-item {
        clear: both;
    }

    .home-page .home-notices .download-widget > a {
        overflow-wrap: anywhere;
    }

    .home-page #connect .row > .col-lg-3 {
        width: 50%;
    }

    .home-page #connect .connect-card .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Fixed-width third-party frames scroll inside their cards. */
    .home-page #connect [data-social-state="ready"] .social-embed {
        max-height: 400px;
        max-width: 100%;
        overflow: auto;
        overscroll-behavior: contain;
        border-radius: 12px;
    }

    .home-page #footer .footer2Cont {
        width: calc(100% - 32px);
    }

    .home-page #footer .contact-methods .row > .col-md-4 {
        width: 100%;
    }

    .home-page #footer .social-connect,
    .home-page #footer .social-icons {
        flex-wrap: wrap;
    }

    .home-page #popupBannerModal .modal-body img {
        max-height: 70vh;
        max-height: 70dvh;
        object-fit: contain;
    }
}

@media (max-width: 991.98px) {
    .home-page .home-officials .shadow2.d-flex {
        flex-direction: column !important;
        align-items: center !important;
        gap: 16px;
        height: calc(100% - 2rem);
        text-align: center;
    }

    .home-page .home-officials .shadow2 > img {
        margin-right: 0 !important;
    }

    .home-page .home-officials .shadow2 .w-75 {
        margin-inline: auto;
    }

    .home-page #testimonials .testimonial-card img {
        height: auto;
        aspect-ratio: 4 / 3;
        object-fit: contain;
    }
}

@media (max-width: 767.98px) {
    .home-page #header .logo img {
        max-height: 64px;
    }

    .home-page #topBarCollapse .btn,
    .home-page [data-bs-target="#topBarCollapse"] {
        min-height: 44px;
    }

    .home-page #about,
    .home-page #services,
    .home-page #vision-2047,
    .home-page #testimonials,
    .home-page .home-notices,
    .home-page #connect {
        padding-block: 40px;
    }

    .home-page .section-title {
        padding-bottom: 28px;
    }

    .home-page #vision-2047 h2 {
        font-size: clamp(1.65rem, 5vw, 2.25rem);
        line-height: 1.25;
    }

    .home-page #pillNav2 {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-radius: 20px !important;
    }

    .home-page #pillNav2 .nav-link {
        width: 100%;
        height: 100%;
        min-height: 48px;
        padding: 10px 6px;
    }

    .home-page #pillNav2 .h5 {
        font-size: 1rem;
        line-height: 1.4;
    }

    .home-page .home-notices .sidebar-widget {
        padding: 20px 16px;
    }

    .home-page .home-notices .download-item {
        gap: 10px;
        padding: 12px 10px;
    }

    .home-page .home-notices .download-icon {
        width: 36px;
        height: 40px;
    }

    .home-page #connect > .container {
        padding-block: 0 !important;
    }

    .home-page #connect .row > .col-lg-3 {
        width: 100%;
    }

    .home-page #footer .footer2Cont {
        width: calc(100% - 24px);
        padding: 24px 12px !important;
        border-radius: 24px !important;
    }

    .home-page #footer .legal-links {
        gap: 8px 16px;
    }

    .home-page #footer .legal-links a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }

    .home-page #uw-widget-custom-trigger {
        width: 48px;
        max-width: 48px;
        height: 48px;
        padding: 10px;
        right: 12px;
        bottom: calc(68px + env(safe-area-inset-bottom));
    }

    .home-page #uw-widget-custom-trigger img {
        width: 28px;
        flex-shrink: 0;
    }

    .home-page .uwaw {
        max-width: 100vw;
    }
}

@media (max-width: 575.98px) {
    .home-page .home-officials .row > .col-md-5 {
        width: 100%;
    }

    .home-page .home-news .newsHead {
        min-width: 105px;
        font-size: .875rem;
    }

    .home-page #about .experience-badge {
        max-width: calc(100% - 40px);
    }
}
