/* ========== 
ArsianCare — Responsive overrides One @media block per breakpoint
— do not add a second block for a condition that already exists below.
========== */


/* ========== DESKTOP AND UP  (Bootstrap lg) ========== */
@media (min-width: 992px) {

    .navbar-nav {
        column-gap: 8px;
    }

    .navbar-nav .dropdown-menu {
        display: block;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: opacity .22s ease, transform .22s ease, visibility .22s;
        pointer-events: none;
    }

    .navbar-nav .nav-item.dropdown:hover .dropdown-menu,
    .navbar-nav .dropdown-menu.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .dropdown-menu-end {
        right: 0;
        left: auto;
    }

    .navbar-nav .nav-item.dropdown::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        height: 14px;
    }

    /* stats: vertical divider between the 4 columns */
    .stats .col-lg-3:not(:last-child) .stat::after {
        content: "";
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 46px;
        background: rgba(255, 255, 255, .22);
    }
}

/* ========== LARGE DESKTOP  — give the mega panel more room ========== */
@media (min-width: 1200px) {
    .navbar-nav .nav-link {
        font-size: 15px;
    }

    .dropdown-menu-mega {
        min-width: 520px;
    }

    .navbar-nav{
        gap: 16px;
    }
}

@media (max-width: 1199.9px){
    .navbar-nav .nav-link{
        font-size: 14px;
    }

    /* ---- hero / banner: tighten the split for the lg range (992–1199px)
       so the copy always sits on the dark panel, never on the photo ---- */
    .hero{
        --hero-media-w: 44%;
        min-height: 420px;
    }
    .hero-content{
        padding-top: 56px;
        padding-bottom: 56px;
    }
    .hero-copy{
        max-width: 420px;
    }
    .hero-lead{
        font-size: 13.5px;
    }

    .btn-ghost i, .btn-appointment i{
        display: none;
    }
    .care-feature-media img{
        aspect-ratio: inherit;
    }
    .btn-appointment{
        max-width: fit-content;
    }

    /* Health Packages / Free Health Camps — stack each card row so the
       thumb, text and button get full width in the tighter lg container */
    #health-packages .hc2-row{
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
    #health-packages .hc2-row-thumb{
        width: 100%;
        height: 180px;
    }
    #health-packages .hc2-row-btn{
        align-self: stretch;
        justify-content: center;
    }

    .doc-card-head{
        margin-top: 16px;
    }
    .doc-card .doc-fee{
        position: absolute;
        top: 10px;
        right: 10px;
    }
}

/* ========== TABLET / MOBILE  — below Bootstrap lg (offcanvas menu) ========== */
@media (max-width: 991.98px) {

    /* Top utility bar: keep it on tablet & mobile — drop the phone/email,
       show social + location + Download Report across the row. */
    .topbar .container {
        justify-content: center !important;
    }
    .topbar-info,
    .topbar .divider {
        display: none;
    }
    .topbar-actions {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
        flex-wrap: nowrap;
    }
    .topbar-actions > a {
        margin-left: 0;
    }
    .topbar-social {
        margin-left: 0;
    }
    /* Location: cap the width and keep a visible background on mobile */
    .topbar-loc-btn {
        max-width: 115px;
        gap: 4px;
        background: rgba(255, 255, 255, .14);
    }

    .contact-card{
        grid-template-columns: 1fr;
    }
    .contact-card-info{
        order: 2;
    }
    .bto-switch{
        flex-wrap: wrap;
        padding: 10px;
        border-radius: 12px;
    }
    .opd-date-row{
        flex-wrap: nowrap;
    }
    .dept-icon{
        padding: 10px;
    }
    .dept-icon img{
        width: 24px;
        height: 24px;
    }
    .footer-about{
        min-width: 100%;
    }
    .site-header .container {
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .navbar-nav .nav-link {
        padding: 14px 4px !important;
        border-bottom: 1px solid var(--ac-line);
        font-size: 15px;
    }

    .navbar-nav .nav-item:last-child .nav-link {
        border-bottom: 0;
    }

    .navbar-nav .nav-item.dropdown::before {
        display: none;
    }

    .navbar-nav .nav-link .nav-arrow {
        margin-left: auto;
        font-size: 13px;
    }

    .navbar-nav .nav-item:has(.dropdown-menu.show)>.nav-link .nav-arrow {
        transform: rotate(180deg);
    }
    
    .navbar-nav>.nav-item>.nav-link::after {
        display: none;
    }

    .navbar-nav .dropdown-menu {
        position: static !important;
        transform: none !important;
        inset: auto !important;
        float: none;
        display: none;
        border: 0;
        box-shadow: none;
        padding: 4px 0 10px 8px;
        margin: 0;
        min-width: 100%;
        background: #f7fbfa;
        border-radius: 10px;
    }

    .navbar-nav .dropdown-menu.show {
        display: block;
    }

    .dropdown-menu-mega {
        min-width: 100%;
    }

    .mega-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .dropdown-item,
    .mega-item {
        padding: 12px 10px;
        border-radius: 0;
    }

    .navbar-nav .dropdown-menu>li:not(:last-child)>.dropdown-item,
    .navbar-nav .dropdown-menu .mega-grid .mega-item:not(:last-child) {
        border-bottom: 1px solid var(--ac-line);
    }

    .nav-cta {
        margin-top: 14px;
    }

    .btn-appointment {
        margin-left: 0;
        /* width: 100%; */
        justify-content: center;
        padding: 12px 18px;
    }
    .reviews-summary{
        flex-wrap: nowrap;
    }

    /* ---- hero / banner: stack colour panel + image ---- */
    .hero {
        flex-direction: column;
        min-height: 0;
    }

    .hero-carousel {
        position: relative;
        order: -1;
        width: 100%;
        height: 230px;
    }

    .hero-carousel .carousel-item img {
        object-fit: cover;
        object-position: center;
    }

    .hero-overlay {
        display: none;
    }

    .hero-content {
        width: 100%;
        padding-top: 40px;
        padding-bottom: 20px;
    }

    .hero-copy {
        max-width: none;
    }

    .hero-lead {
        font-size: 15px;
    }

    /* ---- health-camps hero: stack image + copy (base for below lg) ---- */
    .hc2-hero-media {
        position: relative;
        width: 100%;
        height: 220px;
    }

    .hc2-hero-media::before {
        display: none;
    }

    .hc2-hero-copy {
        max-width: none;
        padding: 32px 0 8px;
    }

    /* ---- shared sections ---- */
    .departments,
    .care-feature,
    .team,
    .reviews,
    .cta,
    .blog {
        padding: 44px 0;
    }

    .cta-panel {
        padding: 28px 22px;
    }

    .cta-title {
        font-size: 22px;
    }

    /* .cta-actions {
        width: 100%;
    }

    .cta-actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    } */

    /* Reviews summary bar — trim secondary bits so it stays compact */
    #reviews .reviews-summary {
        gap: 12px 16px;
        padding: 16px 18px;
    }

    #reviews .reviews-stars,
    #reviews .reviews-count {
        display: none;
    }

    .reviews-summary-actions {
        margin-left: auto;
        /* width: 100%; */
    }

    .reviews-summary-actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .stats {
        padding: 40px 0;
    }

    .stat-num {
        font-size: 34px;
    }

    .about-hero {
        padding: 36px 0 40px;
    }

    .site-footer {
        padding: 40px 0 18px;
    }

    .footer-report.btn-appointment {
        width: fit-content;
        justify-content: center;
    }
    .package-tests{
        flex-grow: inherit;
    }

    .doc-actions {
        flex-direction: column;
    }

    .dm-list > div {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    /* ---- OPD finder panel ---- */
    .opd-finder {
        padding: 16px;
    }

    .opd-date-row {
        gap: 8px;
    }

    .opd-date-input {
        min-width: 0;
        width: 100%;
    }

    .opd-quick {
        width: 100%;
    }

    .opd-quick-btn {
        flex: 1;
        text-align: center;
    }
    .footer-bottom{
        justify-content: center;
    }
    .footer-bottom .footer-credit{
        margin-left: 0;
    }
    .mv-icon{
        display: none;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .opd-finder-filters > .opd-finder-intro {
        flex: 1 1 100%;
    }
    .bc-highlight{
        padding: 0;
    }
    .bc-why-card{
        align-items: self-start;
    }
}

/* ========== TABLET LANDSCAPE (768–991px) — keep the banner as a two-column split (content left, image right) ========== */
@media (min-width: 768px) and (max-width: 991.98px) {
    .opd-finder-filters > .opd-finder-intro {
        flex: 2;
    }
    .opd-field-date{
        max-width: 100%;
    }
    .hero {
        --hero-media-w: 38%;
        flex-direction: row;
        align-items: center;
        min-height: 380px;
    }

    .hero-carousel {
        position: absolute;
        order: 0;
        top: 0;
        right: 0;
        bottom: 0;
        width: var(--hero-media-w);
        height: auto;
    }

    .hero-carousel .carousel-item img {
        object-position: right center;
    }

    .hero-overlay {
        display: block;
        width: var(--hero-media-w);
    }

    .hero-content {
        width: 100%;
        max-width: none;
        padding: 48px 32px;
    }

    .hero-copy {
        max-width: 400px;
    }

    .hero-lead {
        font-size: 13px;
    }

    /* OPD department filters — equal-width grid instead of ragged wrap */
    .opd-filter {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .opd-filter .opd-chip {
        text-align: center;
    }

    /* health-camps hero — keep image + copy side by side across the tablet range */
    .hc2-hero {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
    }

    .hc2-hero-media {
        position: relative;
        width: auto;
        height: 100%;
        min-height: 340px;
    }

    .hc2-hero-copy {
        max-width: none;
        padding: 48px 0 48px 24px;
    }

    /* shared heading scale — tablet (H1 36->30, H2 32->26) */
    .hero-title,
    .about-hero-title,
    .dept-hero-title,
    .post-single-title,
    .campd-banner-title,
    .rp-hero-title,
    .hc2-hero-title,
    .docp-name,
    h1.section-title {
        font-size: 30px;
    }

    .section-title,
    .hc2-h2,
    .post-prose h2 {
        font-size: 26px;
    }
}

@media (max-width: 767.9px){
    /* Phones: not enough room — keep only Location + Download Report */
    .topbar-social {
        display: none;
    }

    .bc-highlights{
        flex-wrap: nowrap;
    }
    .bc-why-card{
        align-items: self-start;
        grid-template-columns: 42px 1fr;
    }
    .bc-why-card .bc-why-ico{
        width: 42px;
        height: 42px;
        font-size: 20px;
    }
    .hero-carousel{
        order: 2;
    }
    .hero-carousel{
        height: inherit;
    }
    .section-link--block{
        width: fit-content;
        display: block;
        margin: 20px auto;
    }
    #health-packages .hc2-row-btn{
        max-width: 100%;
    }

    /* health-camps hero — below md: full stack, image on top, copy beneath */
    .hc2-hero {
        display: block;
        padding-bottom: 24px;
    }
    .hc2-hero-media {
        position: relative;
        width: 100%;
        height: 220px;
        min-height: 0;
    }
    .hc2-hero-copy {
        max-width: none;
        padding: 32px 0 8px;
    }

    /* shared heading scale — mobile (H1 36->26, H2 32->22) */
    .hero-title,
    .about-hero-title,
    .dept-hero-title,
    .post-single-title,
    .campd-banner-title,
    .rp-hero-title,
    .hc2-hero-title,
    .docp-name,
    h1.section-title,
    .stat-num {
        font-size: 26px;
    }

    .section-title,
    .hc2-h2,
    .post-prose h2 {
        font-size: 24px;
    }
}

/* ========== SMALL PHONES ========== */
@media (max-width: 575.98px) {
    .contact-centres button{
        font-size: 13px;
    }
    .report-captcha{
        flex-wrap: nowrap;
    }
    .report-captcha-code{
        font-size: 16px;
        width: 110px;
    }
    .docp-spec-item{
        padding: 14px;
    }
    .doc-actions{
        flex-direction: row;
    }
    .footer-bottom{
        justify-content: flex-start;
        gap: 4px;
    }
    .bc-highlights{
        flex-wrap: wrap;
    }
    .opd-date-row{
        flex-wrap: wrap;
    }
    .brand-logo {
        height: 42px;
    }
    .cta-actions a.btn{
        padding: 10px 12px;
        font-size: 12px;
    }
    .site-header.is-stuck .brand-logo {
        height: 38px;
    }

    .dropdown-item .di-sub {
        font-size: 11px;
    }

    .hero-actions .btn-appointment,
    .hero-actions .btn-hero-ghost {
        /* width: 100%; */
        padding: 10px 12px;
        font-size: 13px;
        justify-content: center;
    }
    .btn-hero-ghost i{
        display: none;
    }

    .care-feature .btn-appointment {
        width: 100%;
        justify-content: center;
    }

    .camp-card-in {
        padding: 24px 20px;
    }

    .camp-name {
        font-size: 22px;
    }

    .camp-seal {
        width: 74px;
        height: 74px;
        font-size: 13px;
        top: 14px;
        right: 14px;
    }

    .campaign-timeline {
        gap: 8px;
        padding: 14px 16px;
    }

    .dept-steps-list {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .dept-step::before {
        top: 34px;
        bottom: -36px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 2px;
        height: auto;
        display: none;
    }

    /* ---- blog-details reference table: stack each row as a card ---- */
    .post-table-wrap {
        overflow-x: visible;
    }

    .post-table-wrap table {
        min-width: 0;
    }

    .post-table-wrap thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
        border: 0;
    }

    .post-table-wrap tbody tr {
        display: block;
        padding: 6px 0 8px;
        border-bottom: 1px solid var(--ac-line);
    }

    .post-table-wrap tbody tr:last-child {
        border-bottom: 0;
    }

    .post-table-wrap tbody td {
        display: flex;
        justify-content: space-between;
        gap: 16px;
        padding: 6px 16px;
        border: 0;
        text-align: right;
    }

    .post-table-wrap tbody td:first-child {
        display: block;
        padding: 10px 16px 6px;
        font-size: 14px;
        text-align: left;
    }

    .post-table-wrap tbody td[data-label]::before {
        content: attr(data-label);
        flex: none;
        font-weight: 700;
        color: var(--ac-primary-dark);
        text-align: left;
    }
}