/* Tablet */
@media (max-width: 1024px) {
  .header__nav-links {
    display: none;
  }

  .header__hamburger {
    display: flex;
  }

  .header__top {
    padding: 12px 20px;
  }

  .content-tabs__inner {
    padding: 0 20px;
  }

  .page-tabs {
    padding: 0 20px;
  }

  .section {
    padding: 40px 20px;
  }

  .hero {
    padding: 40px 20px;
    min-height: 400px;
  }

  .hero__title {
    font-size: var(--text-4xl);
  }

  .hero__image-frame {
    width: 300px;
    height: 300px;
  }

  .hero__cta-card {
    flex-direction: column;
    gap: 16px;
  }

  .hero__cta-thumb {
    width: 100%;
    height: 140px;
  }

  .accounts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .channels-grid {
    flex-direction: column;
  }

  .channel-card--large {
    height: 350px;
    min-height: auto;
  }

  .branches-layout {
    height: auto;
    display: flex;
    flex-direction: column;
  }

  .branches-panel {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-height: none;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    z-index: 2;
    padding: 24px 20px;
  }

  .branches-map {
    position: relative;
    height: 400px;
  }

  .footer__top {
    flex-direction: column;
    gap: 32px;
  }

  .footer__links-group {
    gap: 32px;
  }

  .footer-subscribe__inner {
    flex-direction: column;
    text-align: center;
  }

  .mega-menu__inner {
    flex-wrap: wrap;
    padding: 24px;
    gap: 0;
  }

  .mega-menu__item {
    flex: 0 0 calc(33.333% - 1px);
    border-bottom: 1px solid var(--gray-300);
  }

  .commitment-grid {
    gap: 24px 32px;
  }

  .complaint-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .terms-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tariff-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --header-height: 48px;



        .footer__bg {
            position: absolute;
            inset: 0;
            background-image: var(--footer-art);
            background-repeat: no-repeat;
            background-position: bottom right;
            background-size: 100% 100%;
            pointer-events: none;
            bottom: -273px;
        }

        .LargeCorporatesInput {
          /*  margin-bottom: 20px;*/
        }

        .largecorp-inquiry input, .largecorp-inquiry textarea {
            margin-bottom: 0px;
        }

        .bh-inquiry {
            background-size: 58% !important;
        }
    }

  .header__search {
    display: none;
  }

  /* Show mobile search icon */
  .header__search-mobile {
    display: flex;
  }

  /* Hide Internet Banking on mobile (it's the CTA in the hamburger menu) */
  .btn-internet-banking {
    display: none;
  }

  .page-tabs,
  .content-tabs {
    display: none;
  }

  .header__top {
    padding: 10px 16px;
  }

  /* Home page tab label (Personal/Business) - visible on mobile only */
  .header__logo-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .header__tab-label {
    display: block;
    font-size: var(--text-base);
    color: var(--primary-teal);
    font-weight: var(--font-regular);
  }

  .header--dark .header__tab-label {
    color: var(--primary-teal);
  }

  .content-tabs__inner,
  .page-tabs__inner {
    padding: 0 16px;
    gap: 12px;
  }

  .header__tab {
    font-size: var(--text-base) !important;
    padding: 8px 24px;
    border-top: none;
    border-radius: var(--radius-full);
    background: transparent;
    font-weight: var(--font-regular) !important;
  }

  .header__tab.active {
    background: var(--primary-teal);
    color: var(--white);
    border-top-color: transparent;
  }

  /* Show Quick Links on mobile */
  .quick-links {
    display: flex;
  }

  /* Hero mobile restyle: image on top, teal bg band, hide CTA */
  .hero {
    margin-top: 0;
    padding: 20px 16px 32px;
    min-height: auto;
    background: var(--white);
  }

  .hero:not(.hero--business)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: var(--primary-teal);
    z-index: 0;
  }

  .hero__content {
    flex-direction: column;
    text-align: center;
    position: relative;
    z-index: 2;
  }

  .hero__image {
    order: -1;
  }

  .hero__title {
    font-size: var(--text-3xl);
  }

  .hero__cta-card {
    display: none;
  }

  .hero__image-frame {
    width: 260px;
    height: 260px;
  }

  /* Business hero mobile */
  .hero--business {
    margin-top: 0;
    padding: 40px 16px;
    min-height: 300px;
  }

  .section {
    padding: 32px 16px;
  }

  .section__title {
    font-size: var(--text-2xl);
    margin-bottom: 24px;
  }

  /* Products grid - horizontal scrollable carousel */
  .products-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .products-grid::-webkit-scrollbar {
    display: none;
  }

  .product-card {
    flex: 0 0 112px;
    min-width: 112px;
    height: 112px;
    padding: 16px 8px;
    border: 1px solid #E8E8E8;
    border-radius: 8px;
    scroll-snap-align: start;
  }

  .product-card:last-child {
    border: 1px solid #E8E8E8;
  }

  .product-card__icon {
    width: 32px;
    height: 32px;
  }

  .product-card.active .product-card__icon {
    width: 32px;
    height: 32px;
  }

  .product-card__label {
    font-size: var(--text-xs);
  }

  .accounts-grid {
    grid-template-columns: 1fr;
  }

  .account-card {
    height: 280px;
  }

  .accounts-header {
    flex-direction: column;
    gap: 16px;
  }

  .channels-grid {
    flex-direction: column;
  }

  .channel-card--large {
    height: 280px;
    min-height: auto;
  }

  .channel-card--small {
    flex-direction: column;
  }

  .channel-card--small img {
    width: 100%;
    height: 200px;
    min-height: auto;
  }

  .channel-card--small .channel-card__text {
    padding: 16px;
  }

  .channel-card--small .channel-card__title {
    font-size: var(--text-2xl);
  }

  /* Reversed channel card: image always on top on mobile */
  .channel-card--reversed {
    flex-direction: column;
  }

  .channel-card--reversed img {
    order: -1;
  }

  .channel-card--reversed .channel-card__text {
    padding: 16px;
  }

  .currency-slider-wrap {
    padding: 0;
  }

  .currency-arrow {
    display: none;
  }

  .currency-card {
    min-width: 240px;
  }

  /* Shorter band on mobile so the stretched artwork stays in proportion */
    .egb-lines {
        height: 62px;
        width: 185%;
        margin-left: -25%;
        /* --egb-lines-height: 45px; */
        background-size: cover;
    }

  .egb-breadcrumb__list {
    padding: 14px 15px;
    gap: 4px;
  }

  .egb-breadcrumb__crumb {
    font-size: var(--text-sm);
  }

  .egb-breadcrumb__home svg {
    width: 20px;
    height: 20px;
  }

  .egb-breadcrumb__sep {
    width: 14px;
    height: 14px;
  }

  /* Not enough width for both the trail and the artwork */
  .egb-breadcrumb::after {
    display: none;
  }

    .footer {
        padding: 32px 15px 10px 15px;
    }

  .footer__top {
    flex-direction: column;
    gap: 24px;
  }

  /* Hide links by default on mobile, shown via EGBANK toggle */
  .footer__links-group {
    display: none;
    flex-direction: column;
    gap: 0;
  }

    .footer__links-group.active {
        background: #ffffff12;
        width: 100%;
        opacity: 90%;
        border: 1px solid rgba(255, 255, 255, 0.3);
        padding: 10px;
        border-radius: 16px;
        display: flex;
    }
    footer__nav-toggle {
        background: #ffffff12;
        width: 100%;
        opacity: 90%;
        border: 1px solid rgba(255, 255, 255, 0.3);
        padding: 10px;
        border-radius: 16px;
    }
    .footer__links-col {
        display: flex;
        flex-direction: column;
    }

  .footer__links-col a {
    padding: 14px 0;
   /* border-bottom: 1px solid rgba(255, 255, 255, 0.1);*/
    margin-bottom: 0;
    line-height: 1.4;
  }

  /* Show the EGBANK nav toggle on mobile */
    .footer__nav-toggle {
        background: #ffffff12;
        display: flex;
    }

  .footer__bottom {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 16px 0;
  }

  .footer__office,
  .footer__contact {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
  }

  .footer__office-label,
  .footer__contact-label {
    font-size: var(--text-sm);
    margin-bottom: 4px;
  }

  .footer__info-row {
    display: flex;
    width: 100%;
  }

  .footer__info-row span {
    font-size: var(--text-xs);
  }

  .footer__divider {
    display: none;
  }

  .footer__social-icons {
    gap: 20px;
    padding: 10px 0;
  }

  /* Subscribe section */
  .footer-subscribe {
    padding: 24px 15px;
  }

  .footer-subscribe__inner {
    flex-direction: column;
    text-align: left;
    gap: 20px;
    align-items: flex-start;
  }

  .footer-subscribe__qr {
    display: none;
  }

  .footer-subscribe__app {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

    .footer-subscribe__download-btn {
        width: 100%;
        font-size: 10px;
        display: flex;
    }

  .page-hero {
    margin-top: calc(var(--header-height) + 40px);
    height: 200px;
    padding: 24px 16px;
  }

  .page-hero--with-tabs {
    height: 280px;
  }

  .page-hero__title {
    font-size: var(--text-2xl);
  }

  .branches-panel {
    padding: 16px;
    border-radius: 20px 20px 0 0;
  }

  .branches-filter-header {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 12px;
  }

  .branches-filter-header .btn--outline {
    width: 100%;
    justify-content: center;
  }

  .branches-filter-selects {
    flex-direction: column;
    gap: 10px;
  }

  .branches-map {
    height: 350px;
  }

  .branch-type-tabs {
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 12px;
    justify-content: center;
  }

  .branch-type-tab {
    width: 72px;
    height: 72px;
    font-size: 9px;
  }

  .mega-menu__inner {
    flex-direction: column;
    padding: 16px;
    gap: 0;
  }

  .mega-menu__item {
    flex: 1 1 100%;
    padding: 12px;
    border-bottom: 1px solid var(--gray-300);
    border-right: none;
  }

  .commitment-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .complaint-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .complaint-layout > .contact-image-wrap {
    order: -1;
  }

  .complaint-layout > .contact-image-wrap .hero__image-frame {
    width: 100%;
    height: auto;
  }

  .complaint-layout > .contact-image-wrap .hero__image-frame img {
    position: static;
    inset: auto;
    height: auto;
    transform: none;
    object-fit: cover;
  }

  .complaint-form {
    padding: 20px;
  }

  .complaint-form__row {
    grid-template-columns: 1fr;
  }

  .complaint-sidebar__heading {
    font-size: var(--text-2xl);
  }

  .terms-grid {
    grid-template-columns: 1fr;
  }

  .contact-image-circle {
    width: 280px;
    height: 280px;
  }

  /* Contact form layout */
  .contact-layout {
    grid-template-columns: 1fr !important;
  }

  /* Download cards switch to inline on mobile */
  .download-card {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 16px;
  }

  .download-card__thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
  }

  .download-card__body {
    padding: 0;
    flex: 1;
  }

  /* Tariff grid single column on mobile */
  .tariff-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .tariff-card__icon {
    padding: 24px;
    min-height: 120px;
  }

  .tariff-card__icon svg {
    width: 60px;
    height: 60px;
  }

  .tariff-card__body {
    padding: 0px 16px 16px;
  }

  .terms-card {
    flex-direction: row;
    text-align: left;
    gap: 12px;
  }

  .terms-card__icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero__title {
        font-size: var(--text-2xl);

      

        .footer__contact-label {
            margin-right: 10px;
        }

        .footer__contact {
            align-items: end;
        }
    }

  .hero__image-frame {
    width: 220px;
    height: 220px;
  }

    .section__title {
        font-size: var(--text-2xl);
    }

  .currency-card {
    min-width: 220px;
    padding: 16px;
  }

  .channel-card__title {
    font-size: var(--text-2xl);
  }
}
