/* ==========================================================================
   BARCLAYS Bank — responsive.css
   Tablet: 768px – 1199px   |   Mobile: below 768px
   ========================================================================== */

/* ---------- Large tablet / small laptop ---------- */

@media (max-width: 1199px) {
    body{
        overflow-x: hidden;
    }
    .container {
        padding: 0 22px;
    }

    .section {
        padding: 80px 0;
    }

    .split {
        gap: 44px;
    }

    .nav-link {
        padding: 10px 11px;
        font-size: .92rem;
    }

    .footer__top {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 34px;
    }

    .footer__about {
        grid-column: 1 / -1;
    }

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

    .security-card-grid,
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonial-slider {
        --visible-cards: 2;
    }

    .process-grid::before {
        display: none;
    }

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

    .card-showcase {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---------- Tablet ---------- */

@media (max-width: 1024px) {
    .value-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .auth {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .auth__aside {
        order: -1;
        border-left: 0;
        border-bottom: 1px solid var(--border);
        min-height: 240px;
    }

    .auth__aside-content {
        padding: 36px 28px;
    }

    .auth__panel {
        padding: 48px 24px 64px;
    }
}

/* ---------- Below 992px: mobile navigation takes over ---------- */

@media (max-width: 991px) {
    .nav-toggle {
        display: inline-flex;
    }

    .nav-actions--desktop {
        display: none;
    }

    /* Sign-in buttons move into the slide-in menu */
    .nav-item--actions {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        bottom: auto;
        width: 100%;
        height: calc(100dvh - var(--nav-h));
        max-height: calc(100dvh - var(--nav-h));
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        background: var(--bg);
        border-top: 1px solid var(--border);
        padding: 18px 22px max(140px, env(safe-area-inset-bottom));
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        transition: transform .32s cubic-bezier(.4, 0, .2, 1), opacity .25s ease, visibility .32s;
        margin: 0;
        z-index: 99;
    }

    .nav-menu.is-open {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        width: 100%;
        justify-content: space-between;
        padding: 16px 14px;
        font-size: 1.02rem;
        border-bottom: 1px solid var(--border);
        border-radius: 0;
        min-height: 56px;
        color: var(--text);
    }

    .nav-link:hover {
        background: transparent;
    }

    .nav-link.is-active {
        color: var(--accent);
    }

    .nav-link.is-active::after {
        display: none;
    }

    .dropdown {
        width: 100%;
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        background: var(--surface);
        border-radius: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
        min-width: 0;
    }

    .nav-item.is-open .dropdown {
        padding: 8px 0;
    }

    .dropdown__link {
        padding: 14px 18px;
        min-height: 56px;
    }

    .nav-menu-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 14px 0 4px;
    }

    .body-locked {
        overflow: hidden;
        touch-action: none;
    }

    .body-locked .nav-menu {
        touch-action: pan-y;
    }
}

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
    :root {
        --nav-h: 66px;
        --mobile-bar-h: 84px;
    }

    body {
        font-size: 15.5px;
    }

    .container {
        padding: 0 18px;
    }

    .section {
        padding: 60px 0;
    }

    .section--tight {
        padding: 44px 0;
    }

    .section-head {
        margin-bottom: 32px;
    }

    /* Keep content clear of the fixed bottom action bar */
    body.has-mobile-actions {
        padding-bottom: var(--mobile-bar-h);
    }

    .mobile-actions {
        display: flex;
    }

    .mobile-actions .btn {
        width: auto;
        min-width: 0;
        flex: 1 1 0;
    }

    .hero__inner {
        padding: 64px 0 56px;
    }

    .hero--page .hero__inner {
        padding: 48px 0 44px;
    }

    .hero__overlay {
        background:
            linear-gradient(0deg, rgba(7, 13, 11, .97) 10%, rgba(7, 13, 11, .8) 55%, rgba(7, 13, 11, .68) 100%);
    }

    .hero__text {
        font-size: 1.02rem;
    }

    .btn {
        width: 100%;
        padding: 15px 22px;
        min-height: 52px;
    }

    .btn-group {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
    }

    .nav-actions .btn {
        width: auto;
        min-height: 44px;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .security-card-grid,
    .process-grid,
    .split,
    .stats,
    .card-showcase,
    .value-grid,
    .form-row {
        grid-template-columns: 1fr;
    }

    .split {
        gap: 32px;
    }

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

    .trust-list {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .card {
        padding: 24px;
    }

    .security-card,
    .process-card__body {
        min-height: 0;
        padding: 24px;
    }

    .testimonial-slider {
        --visible-cards: 1;
        --slider-gap: 16px;
    }

    .quote {
        min-height: 300px;
        padding: 24px;
    }

    .testimonial-slider__controls {
        gap: 12px;
    }

    .process-card {
        padding-top: 58px;
    }

    .process-card__number {
        width: 54px;
        height: 54px;
        font-size: 1.35rem;
    }

    .card--media .card__body {
        padding: 22px 22px 26px;
    }

    .value-grid {
        border-radius: var(--radius-md);
    }

    .bank-card {
        padding: 20px;
    }

    .accordion__trigger {
        padding: 17px 18px;
        font-size: .96rem;
    }

    .accordion__panel-inner {
        padding: 0 18px 18px;
    }

    .cta {
        padding: 60px 0;
    }

    .quote {
        padding: 24px;
    }

    .quote p {
        font-size: 1.05rem;
    }

    .media-badge {
        left: 14px;
        right: 14px;
        bottom: 14px;
        max-width: none;
    }

    .footer {
        padding: 56px 0 30px;
    }

    .footer__top {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .footer__about {
        grid-column: 1 / -1;
    }

    .footer__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .footer__legal {
        flex-wrap: wrap;
        gap: 14px;
    }

    .steps li {
        padding: 18px;
    }

    .chip-row {
        justify-content: flex-start;
    }

    .auth__panel {
        padding: 40px 18px 56px;
    }

    .auth__meta {
        gap: 10px;
    }

    .phone {
        width: 270px;
    }
}

/* ---------- Small phones ---------- */

@media (max-width: 400px) {
    .brand__tag {
        display: none;
    }

    .brand__mark {
        width: 34px;
        height: 34px;
    }

    .card-showcase {
        gap: 18px;
    }

    .mobile-actions .btn {
        font-size: .94rem;
        padding: 14px 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-preloader__mark,
    .site-preloader__line::before {
        animation: none;
    }
}
