/* ==========================================================================
   Swasti Homoeo Clinic — Responsive Styles
   Loaded AFTER main.css.
   Breakpoints: 1180, 1024, 900, 760, 560, 420
   ========================================================================== */

/* --------------------------------------------------------------------------
   LARGE TABLETS / SMALL DESKTOPS
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
    :root {
        --container: 1040px;
        --section-y: 74px;
    }


    .hero__inner {
        gap: 42px;
    }

    .split {
        gap: 46px;
    }

    .page-hero__inner {
        gap: 40px;
    }
}


/* --------------------------------------------------------------------------
   TABLETS
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    :root {
        --gutter: 22px;
        --section-y: 66px;
        --header-h: 70px;
    }

    /* Header */
    .nav {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .header__call {
        display: none;
    }

    /* The desktop nav carries the margin-left:auto that pushes the actions
       to the right edge. It is hidden here, so move that spacer onto the
       actions themselves or the brand and the buttons collapse to the left
       of the bar and the nav toggle stops being flush right. */
    .header__actions {
        margin-left: auto;
        gap: 10px;
    }

    /* Main hero */
    .hero__inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero {
        padding-block: 60px 118px;
    }

    .hero__media {
        width: 100%;
        max-width: 560px;
        margin-inline: auto;
    }

    .hero__lead {
        max-width: none;
    }

    /* Stats */
    .stats {
        margin-top: -62px;
    }

    .stats__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Split sections */
    .split {
        grid-template-columns: minmax(0, 1fr);
    }

    .split__media {
        width: 100%;
        max-width: 520px;
        margin-inline: auto;
    }

    .split--reverse .split__media {
        order: -1;
    }

    /* Cards */
    .cards--three,
    .cards--four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Process */
    .process {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 26px 30px;
    }

    /* Services */
    .service {
        grid-template-columns: minmax(0, 1fr);
        gap: 26px;
        padding-block: 34px;
    }

    .service--flip .service__media {
        order: 0;
    }

    .service__media {
        width: 100%;
        max-width: 520px;
        margin-inline: auto;
    }

    /* Layouts that become single column */
    .booking-grid,
    .contact-grid,
    .article-layout,
    .cta-band__inner,
    .admin-columns,
    .admin-columns--single,
    .admin-columns--form {
        grid-template-columns: minmax(0, 1fr);
    }

    .booking-grid__aside,
    .contact-grid__aside,
    .panel--sticky,
    .admin-card--side {
        position: static;
    }

    /* Page hero */
    .page-hero__inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .page-hero__media {
        width: 100%;
        max-width: 520px;
        margin-inline: auto;
    }

    /* Admin */
    .admin-sidebar {
        transform: translateX(-105%);
        transition: transform var(--t, 220ms ease);
        box-shadow: var(--shadow-lg);
        z-index: 100;
    }

    .admin-shell {
        margin-left: 0;
    }

    .admin-burger {
        display: grid;
        place-items: center;
    }

    .admin-main {
        padding: 20px;
    }

    .admin-topbar {
        padding: 12px 18px;
    }

    .admin-body.sidebar-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-body.sidebar-open::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 90;
        background: rgba(14, 27, 42, .45);
    }
}


/* --------------------------------------------------------------------------
   SMALL TABLETS
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .cards--three,
    .cards--four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Contact */
    .contact-cards {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Booking keeps two cards per row on tablets so the form stays reachable */
    .booking-grid .contact-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Testimonials */
    .testimonials__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .testimonial {
        flex-basis: auto;
        min-width: 0;
    }

    /* Why section */
    .why-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        margin-top: 24px;
    }

    .why-list__item {
        padding: 16px 18px;
    }

    .why-list__mark {
        width: 28px;
        height: 28px;
        margin-bottom: 10px;
    }

    .why-list__title { font-size: .98rem; }
    .why-list__text { font-size: .89rem; }

    /* Detail grid */
    .detail-grid__row {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }

    .detail-grid__row dt {
        font-size: .74rem;
    }
}


/* --------------------------------------------------------------------------
   PHONES / LARGE MOBILE
   -------------------------------------------------------------------------- */
@media (max-width: 760px) {
    :root {
        --section-y: 56px;
        --gutter: 18px;
        --header-h: 64px;
    }

    body {
        font-size: 16px;
    }

    /* Header */
    .brand__mark {
        width: 38px;
        height: 38px;
    }

    .brand__logo {
        height: 56px;
    }

    .brand__name {
        font-size: 1.02rem;
    }

    .brand__tag {
        display: none;
    }

    .header__actions {
        gap: 8px;
    }

    .header__actions .btn--primary {
        padding: 10px 16px;
        font-size: .84rem;
    }

    /* Hero */
    .hero {
        padding-block: 48px 104px;
    }

    .hero__title {
        font-size: clamp(1.9rem, 1.3rem + 3vw, 2.5rem);
        line-height: 1.08;
    }

    .hero__actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .hero__actions .btn {
        width: 100%;
    }

    .hero__card {
        padding: 16px;
    }


    .hero__caption {
        padding: 0;
    }

    /* Stats */
    .stats {
        margin-top: -52px;
    }

    .stats__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .stat {
        padding: 20px 18px;
    }

    .stat__value {
        font-size: 1.6rem;
    }

    /* Cards / process */
    .cards--three,
    .cards--four {
        grid-template-columns: minmax(0, 1fr);
    }

    .process {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .process__step {
        padding-top: 14px;
    }

    /* Forms */
    .form__grid,
    .form-row {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Section headings */
    .section__head {
        margin-bottom: 30px;
    }

    .section__more {
        margin-top: 30px;
    }

    .section__more .btn {
        width: 100%;
    }

    /* Split badge */
    .split__badge {
        position: static;
        width: 100%;
        max-width: none;
    }

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

    .cta-band__actions .btn {
        width: 100%;
    }

    .cta-band__phone {
        width: 100%;
        justify-content: center;
        font-size: 1.1rem;
    }

    /* Footer */

    .page-hero {
        padding-block: 44px 52px;
    }

    .page-hero__title {
        max-width: none;
    }

    /* Responsive tables */
    .table--cards {
        display: block;
        width: 100%;
        overflow: visible;
    }

    .table--cards thead {
        display: none;
    }

    .table--cards tbody,
    .table--cards tr,
    .table--cards td {
        display: block;
        width: 100%;
    }

    .table--cards tbody tr {
        padding: 16px 16px 14px;
        border-bottom: 1px solid var(--line-soft);
    }

    .table--cards tbody td {
        padding: 0;
        border: 0;
        margin: 0 0 8px;
    }

    .table--cards tbody td:last-child {
        margin-bottom: 0;
    }

    .table--cards tbody td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        color: var(--ink-400);
        font-size: .68rem;
        font-weight: 700;
        letter-spacing: .1em;
        text-transform: uppercase;
    }

    .table--cards tbody td[data-label="Actions"] {
        margin-top: 10px;
    }

    .table--cards .table__actions {
        text-align: left;
    }

    .table-wrap {
        border: 0;
        background: transparent;
        overflow: visible;
    }

    /* Menus */
    .row-menu__panel {
        right: auto;
        left: 0;
        width: min(290px, 82vw);
    }

    /* Admin */
    .admin-main {
        padding: 16px;
    }

    .admin-head {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-head__actions {
        width: 100%;
    }

    .admin-head__actions .btn {
        flex: 1 1 auto;
    }

    .stat-card__value {
        font-size: 1.6rem;
    }

    .filter-bar {
        padding: 14px;
    }

    .filter-bar__actions {
        width: 100%;
    }

    .filter-bar__actions .btn {
        flex: 1;
    }

    .faq-admin {
        flex-direction: column;
    }

    .faq-admin__actions {
        width: 100%;
    }

    .faq-admin__actions .btn {
        flex: 1;
    }

    .admin-user__name {
        display: none;
    }

    .admin-topbar__title {
        font-size: .98rem;
    }

    .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }

    .pagination__link {
        padding: 8px 12px;
    }
}


/* --------------------------------------------------------------------------
   SMALL PHONES
   -------------------------------------------------------------------------- */
@media (max-width: 560px) {
    :root {
        --gutter: 16px;
    }

    .card {
        padding: 24px 20px;
    }

    .panel {
        padding: 24px 20px;
    }

    .booking-grid .contact-cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-card {
        padding: 18px 16px;
    }

    .testimonial {
        width: 100%;
        padding: 24px 20px;
    }

    .testimonials__controls {
        gap: 10px;
    }

    .accordion__summary {
        padding: 15px 16px;
        font-size: .96rem;
    }

    .accordion__panel p {
        padding: 0 16px 16px;
    }

    .hours__row th,
    .hours__row td {
        padding: 9px 4px;
        font-size: .88rem;
    }

    .hours__state {
        display: none;
    }

    .contact-card {
        padding: 16px;
    }

    .hours-list li {
        font-size: .88rem;
    }

    .auth-card {
        padding: 26px 20px;
    }

    .auth-card__title {
        font-size: 1.16rem;
    }


    .notice {
        padding: 16px;
        flex-direction: column;
        gap: 10px;
    }

    .msg__link {
        padding: 13px 2px;
    }

    .msg__preview {
        display: none;
    }
}


/* --------------------------------------------------------------------------
   VERY SMALL PHONES
   -------------------------------------------------------------------------- */
@media (max-width: 420px) {
    :root {
        --gutter: 14px;
    }

    .header__actions .btn--primary {
        display: none;
    }

    .hero__trust li {
        font-size: .84rem;
    }

    .stat {
        padding: 18px 14px;
    }

    .card__list {
        font-size: .86rem;
    }

    .brand__name {
        font-size: .96rem;
    }

    .nav-toggle {
        width: 42px;
        height: 42px;
    }

    .hero {
        padding-bottom: 92px;
    }

    .page-hero {
        padding-block: 36px 44px;
    }
}


/* --------------------------------------------------------------------------
   TOUCH DEVICES
   -------------------------------------------------------------------------- */
@media (hover: none) {

    .pagination__link {
        padding: 11px 16px;
    }


    /* Prevent hover-only transforms from feeling sticky on touch devices. */
    .card:hover,
    .testimonial:hover {
        transform: none;
    }
}


/* --------------------------------------------------------------------------
   REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .admin-sidebar {
        transition: none;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

@media (max-width: 760px) {
    .brand__logo { height: 42px; }
}


/* --------------------------------------------------------------------------
   ADMIN SIDEBAR STATE
   -------------------------------------------------------------------------- */
.admin-body.sidebar-open {
    overflow: hidden;
}
