/* ============================================
   RESPONSIVE - Mobile first approach
   Breakpoint: max-width 991px
   ============================================ */
@media (max-width: 991px) {
  :root {
    --header-mobile-height: 68px;
  }
  /* ********** GENERAL ********** */
  body {
    font-size: 15px;
    padding-bottom: calc(
      var(--header-mobile-height) + env(safe-area-inset-bottom)
    );
  }
  section {
    padding: 40px 0;
  }
  .container {
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
    max-width: 100%;
  }
  .title {
    margin-bottom: 20px;
  }
  .title.medium {
    max-width: 100%;
    margin-bottom: 20px;
  }
  .title p {
    font-size: 16px;
    margin-top: 12px;
  }
  .tag {
    font-size: 10px;
    padding: 6px 12px;
  }
  .form-control {
    font-size: 16px;
    padding: 14px 16px;
  }
  /* ********** GRID ********** */
  .grid-block {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .grid-1,
  .grid-2,
  .grid-3,
  .grid-4,
  .grid-5,
  .grid-6,
  .grid-7,
  .grid-8,
  .grid-9,
  .grid-10,
  .grid-11,
  .grid-12 {
    grid-column: span 1;
  }
  .gap-24 {
    gap: 20px;
  }
  .gap-32 {
    gap: 24px;
  }
  .gap-64 {
    gap: 32px;
  }
  .grid-block.mt-64:first-child {
    margin-top: 0 !important;
  }
  /* ********** IMAGES BLOCK ********** */
  .logo-center {
    width: 80%;
  }
  .square-image {
    aspect-ratio: 1/1;
    border-radius: 12px;
  }
  .rectangle-image {
    aspect-ratio: 16/9;
    border-radius: 12px;
  }
  /* ********** BUTTONS ********** */
  .btn-mid {
    padding: 16px 24px;
    font-size: 15px;
  }
  .btn-search {
    height: 44px;
    width: 44px;
  }
  /* ********** HEADER ********** */
  .header-toggle {
    display: none;
  }
  .header-main {
    display: none !important;
  }
  .header-mobile {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: #ffffff;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
  }
  .header-mobile.scroll {
    transform: translateY(100%);
  }
  .header-mobile-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
  .header-mobile-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    color: #000000;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    flex: 1;
    max-width: 80px;
  }
  .header-mobile-item img {
    height: 35px;
  }
  .header-mobile-item i {
    font-size: 25px;
  }
  .header-mobile-item:hover {
    color: var(--color-primary);
  }
  .header-mobile-logo {
    flex: 0 0 auto;
    padding: 4px;
  }
  .header-mobile-logo img {
    width: 32px;
    height: 32px;
    display: block;
    object-fit: contain;
  }
  .header-mobile-panels {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
    pointer-events: none;
  }
  .header-mobile-panels.active {
    pointer-events: auto;
  }
  .header-mobile-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 75vh;
    background-color: #ffffff;
    border-radius: 14px 14px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
  }
  .header-mobile-panel.active {
    transform: translateY(0);
  }
  .header-mobile-panel .panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
  }
  .header-mobile-panel .panel-header h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
  }
  .header-mobile-panel .panel-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 24px;
    color: #000;
    cursor: pointer;
    border-radius: 50%;
  }
  .header-mobile-panel .panel-close:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--color-primary);
  }
  .header-mobile-panel .panel-content {
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
    flex: 1;
  }
  .header-mobile-panel .dropdown-block {
    margin-bottom: 20px;
  }
  .header-mobile-panel .dropdown-block:last-child {
    margin-bottom: 0;
  }
  .header-mobile-panel .dropdown-block h3 {
    display: block;
    margin-bottom: 10px;
  }
  .header-mobile-panel .dropdown-block h3 a {
    font-size: 20px !important;
    font-weight: 600;
    margin: 0;
    padding: 0;
    color: var(--color-primary);
  }
  .header-mobile-panel .dropdown-block a {
    display: block;
    font-size: 15px;
    margin: 0;
    padding: 4px 0;
    text-transform: none;
  }
  .header-mobile-panel .panel-content .btn-mid {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 12px;
  }
  .header-mobile-panel .panel-content .btn-mid:last-child {
    margin-bottom: 0;
  }
  .header-mobile-panel .panel-square {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .header-mobile-panel .panel-square a {
    aspect-ratio: 1/1;
  }
  .header-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.3s,
      visibility 0.3s;
    z-index: 98;
  }
  .header-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  /* ********** HEADER ELITE ********** */
  .header-elite {
    padding: 12px 16px;
  }
  .header-elite .header-logo img {
    height: 24px;
  }
  .header-toggle {
    width: 44px;
    height: 44px;
    right: 1rem;
  }
  /* ********** HOME TOP / SLIDER ********** */
  #home {
    min-height: calc(
      100dvh - var(--header-mobile-height) - env(safe-area-inset-bottom)
    );
    height: calc(
      100dvh - var(--header-mobile-height) - env(safe-area-inset-bottom)
    );
  }
  .home-slider {
    min-height: calc(
      100dvh - var(--header-mobile-height) - env(safe-area-inset-bottom)
    );
    height: calc(
      100dvh - var(--header-mobile-height) - env(safe-area-inset-bottom)
    );
  }
  .home-slider .container {
    padding: 0 16px;
    max-width: 100%;
    position: absolute;
    height: 100%;
    top: inherit;
    transform: none;
    left: 0;
    bottom: 120px;
    display: flex;
    align-items: flex-end;
  }
  .home-slider .slider-content {
    max-width: 100%;
  }
  .home-slider .slider-content h1 {
    font-size: 42px;
    line-height: 1.15;
    margin-bottom: 15px;
  }
  .home-slider .slider-content p {
    font-size: 20px;
    padding-right: 0;
    margin-bottom: 16px;
  }
  .home-slider .slider-logo {
    margin-bottom: 16px;
  }
  .home-slider .slider-logo img {
    height: 36px;
  }
  .home-slider .slider-buttons {
    margin-top: 20px;
    gap: 12px;
  }
  .home-slider .slider-buttons img {
    height: 40px;
  }
  .home-slider .slider-controls {
    bottom: 75px;
    right: 16px;
    width: 100px;
  }
  .home-slider .swiper-button-next,
  .home-slider .swiper-button-prev {
    width: 44px;
    height: 44px;
  }
  .home-slider .swiper-button-prev {
    right: 56px;
  }
  .home-slider .swiper-pagination-progressbar.swiper-pagination-horizontal {
    bottom: -60px;
    width: 100px;
    height: 24px;
    padding: 6px;
  }
  .home-slider .swiper-pagination-progressbar-fill {
    height: 6px !important;
  }
  .home-slider .full-overlay {
    display: block;
  }
  /* Elite slider dentro de #elite */
  #elite .slider-content {
    max-width: 100%;
  }
  #elite .elite-grid .container {
    padding: 0 16px;
  }
  /* ********** HOME SEARCH ********** */
  .search-block {
    padding: 20px 16px;
    border-radius: 12px;
  }
  .search-form {
    flex-direction: column;
    gap: 12px;
  }
  .search-form button {
    position: relative;
    width: 100%;
    right: 0;
  }
  .search-input input {
    padding: 16px 16px 16px 48px;
  }
  .search-input i {
    left: 16px;
    font-size: 1.25rem;
  }
  #search-section .search-form {
    grid-template-columns: 1fr;
  }
  /* ********** HOME BENEFICIOS ********** */
  #benefits-section .grid-block {
    gap: 24px;
  }
  .big-preview {
    padding: 24px 20px;
    min-height: 200px;
    border-radius: 12px;
  }
  .big-text h3 {
    font-size: 20px;
  }
  .split-preview {
    grid-template-columns: 70px 1fr;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
  }
  .split-preview .square-image {
    width: 70px;
    min-width: 70px;
    height: 70px;
    flex-shrink: 0;
  }
  .split-preview p {
    font-size: 13px;
  }
  .mt-64 {
    margin-top: 32px !important;
  }
  /* ********** HOME CARDS (moving-card) ********** */
  .flex-block {
    flex-direction: column;
    gap: 16px;
  }
  .moving-card {
    width: 100% !important;
    height: 220px;
    min-height: 220px;
    flex-shrink: 0;
  }
  .moving-card:hover {
    width: 100% !important;
  }
  .medium-text {
    margin-bottom: -60px;
  }
  .medium-text .square-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
  }
  .medium-text h3 {
    font-size: 18px;
    margin-bottom: 8px;
  }
  .medium-text p {
    width: 100%;
    max-width: 280px;
    font-size: 13px;
  }
  .moving-card.active .medium-text p,
  .moving-card:hover .medium-text p {
    opacity: 1;
  }
  /* ********** HOME TC ********** */
  #tc-section .big-tc-image {
    grid-row-start: 2;
  }
  /* ********** HOME BANNER ********** */
  .banner-wrapper {
    padding: 32px 20px;
    margin-bottom: 32px;
    border-radius: 12px;
  }
  .banner-wrapper .grid-block {
    gap: 24px;
  }
  .banner-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
  }
  .banner-text .title h2 {
    font-size: 24px;
    line-height: 1.2;
  }
  .banner-text .title h2.big {
    font-size: 26px;
  }
  .banner-text .title p {
    font-size: 15px;
  }
  .banner-image {
    margin-top: -50px;
    margin-bottom: 0px;
  }
  .banner-image img {
    max-width: 80%;
    margin: 0 auto;
    display: block;
  }
  .banner-wrapper .grid-6:last-child {
    grid-row-start: 1;
  }
  /* ********** PERSONAS TARJETAS ********** */
  #top-section {
    margin-top: 24px !important;
    padding-top: 0 !important;
  }
  .top-container.mt-64 {
    margin-top: 0 !important;
  }
  .top-container {
    flex-direction: column;
    padding: 24px 20px;
    min-height: auto;
    height: auto;
  }
  .top-text {
    width: 100%;
    padding: 36px 20px;
  }
  .top-split.mt-64 {
    margin-top: 0 !important;
  }
  .top-split .grid-block {
    min-height: auto !important;
  }
  .top-split .top-image {
    padding: 24px 20px;
    height: auto;
    min-height: 25vh;
  }
  .top-card {
    max-width: 100%;
  }
  .card-vertical {
    padding: 16px;
  }
  .card-tab {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
  }
  .tab-options {
    padding: 12px 16px;
    flex: 1 1 auto;
    min-width: 0;
  }
  .tab-container {
    margin-top: 24px;
  }
  .detail-main {
    padding: 24px 20px;
  }
  .detail-main h4 {
    margin-bottom: 16px;
    font-size: 16px;
  }
  .detail-grid.column-3 {
    grid-template-columns: 1fr 1fr;
  }
  .detail-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .detail-grid.column-2 {
    grid-template-columns: 1fr 1fr;
  }
  .detail-box {
    padding: 16px;
  }
  .detail-box h4 {
    width: 100%;
    font-size: 15px;
  }
  .detail-sticky {
    position: relative;
    top: 0;
  }
  #requirements-section .grid-block .grid-8 {
    grid-row-start: 1;
  }
  /* ********** EMPRESAS CORPORATE ********** */
  .grid-block .block-content {
    grid-row-start: 1;
    padding-bottom: 0;
  }
  .grid-block.gap-64 .grid-6.h-100 {
    height: auto;
    min-height: 0;
  }
  .grid-block.gap-64 .full-image {
    height: auto;
    min-height: 200px;
  }
  .grid-block.gap-64 .full-image .fit-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }
  .block-content {
    padding: 24px 0;
  }
  .block-content .title {
    margin-bottom: 16px;
  }
  .block-content .block-text p {
    font-size: 15px;
    margin-top: 12px;
  }
  .block-content .block-text p:first-child {
    margin-top: 0;
  }
  .block-text ul {
    padding-left: 20px;
  }
  .content-list {
    margin: 12px 0;
    padding-left: 20px;
  }
  .content-list li {
    margin-bottom: 8px;
    font-size: 15px;
  }
  .title.right {
    text-align: left;
  }
  .block-text.right {
    text-align: left;
  }
  .detail-grid.mt-64 {
    margin-top: 32px !important;
  }
  .block-content.mt-64 {
    margin-top: 32px !important;
  }
  .title.center.medium.mt-64 {
    margin-top: 32px !important;
  }
  .title.center.medium .btn-mid.mt-24 {
    margin-top: 16px !important;
  }
  /* ********** PERSONAS ELITE ********** */
  #elite {
    min-height: 100vh;
  }
  #elite-section {
    padding-top: 0;
  }
  .elite-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .elite-cover {
    min-height: 50vh;
  }
  .elite-info {
    padding: 32px 24px 60px;
  }
  .elite-top {
    max-width: 100%;
  }
  .elite-logo img {
    height: 2.5rem;
  }
  .elite-scroll {
    display: none;
  }
  #elite-services {
    min-height: 300vh;
  }
  .elite-cards-inner {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .elite-cards-info {
    padding: 24px 20px;
  }
  .elite-cards-info p {
    font-size: 15px;
  }
  .elite-modal-close {
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
  }
  .elite-split {
    grid-template-columns: 1fr;
  }
  .elite-container {
    padding: 32px 0px;
  }
  .elite-text {
    margin-bottom: 48px;
  }
  .elite-text:last-child {
    margin-bottom: 0;
  }
  .elite-text p {
    font-size: 15px;
  }
  .elite-block {
    margin-top: 24px;
  }
  .elite-block h3 {
    margin-bottom: 16px;
  }
  .elite-box {
    padding: 16px;
  }
  .elite-buttons {
    flex-direction: column;
    margin-top: 24px;
    gap: 12px;
  }
  .elite-buttons .btn-mid {
    width: 100%;
    justify-content: center;
  }
  .elite-preview {
    height: 40vh;
    min-height: 280px;
  }
  #elite-section .sticky {
    position: relative;
    top: 0;
  }
  /* ********** CALCULADORA DE CUOTAS ********** */
  .calculator-wrapper .grid-block .grid-6 {
    grid-column: span 12;
  }
  .calculator-range-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .calculator-range-track {
    height: 12px;
  }
  .calculator-range-tooltip {
    right: auto;
    left: 0;
    transform: translateX(0);
  }
  /* ********** DATA TABLE ********** */
  .data-table-wrap {
    overflow-x: scroll;
  }
  .data-table-scroll {
    width: max-content;
    min-width: 100%;
  }
  .data-table {
    min-width: 520px;
  }
  /* ********** BENEFITS DETAIL ********** */
  .benefits-detail .grid-7 {
    grid-row-start: 1;
  }
  #full-section .container {
    margin-top: 0;
  }
  /* ********** CAMBIOS ********** */
  .exchange-card-top,
  .exchange-card-bottom {
    padding: 18px;
  }
  .exchange-flag {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
  }
  .exchange-rate strong {
    font-size: 15px;
  }
  /* ********** FOOTER ********** */
  footer {
    padding: 40px 0;
  }
  .footer-center {
    max-width: 100%;
    margin-bottom: 32px;
  }
  .footer-logo {
    width: 180px;
    margin-bottom: 16px;
  }
  .footer-block p {
    font-size: 15px;
  }
  .footer-app {
    margin-top: 16px;
    gap: 12px;
  }
  .footer-app img {
    height: 40px;
  }
  .footer-block h3 {
    font-size: 15px;
    margin-bottom: 8px;
  }
  .footer-column .footer-block a {
    font-size: 13px;
  }
  .footer-social a {
    width: 44px;
    height: 44px;
  }
  .mt-32 {
    margin-top: 24px !important;
  }
  /* ********** CTA FIXED (WhatsApp) ********** */
  .cta-fixed {
    right: 16px;
    bottom: calc(
      var(--header-mobile-height) + 16px + env(safe-area-inset-bottom)
    );
  }
  .cta-fixed.active {
    bottom: 16px;
  }
  .cta-text {
    width: 180px;
    padding: 0 14px;
    font-size: 13px;
  }
  .cta-fixed:hover .cta-text {
    right: 50px;
  }
  .cta-ws {
    width: 52px;
    height: 52px;
    font-size: 22px;
  }
}
/* Celulares: imágenes -mobile.jpg en home-slider (excluye tablets) */
@media (max-width: 767px) {
  #home .home-slider .slider-bg[data-slide='1'] {
    background-image: url(../images/slider/1-mobile.jpg) !important;
  }
  #home .home-slider .slider-bg[data-slide='2'] {
    background-image: url(../images/slider/2-mobile.jpg) !important;
  }
  #home .home-slider .slider-bg[data-slide='3'] {
    background-image: url(../images/slider/3-mobile.jpg) !important;
  }
  #home .home-slider .slider-bg[data-slide='4'] {
    background-image: url(../images/slider/4-mobile.jpg) !important;
  }
  #home .home-slider .slider-bg[data-slide='5'] {
    background-image: url(../images/slider/5-mobile.jpg) !important;
  }
  #home .home-slider .slider-bg[data-slide='6'] {
    background-image: url(../images/slider/6-mobile.jpg) !important;
  }
  #home .home-slider .slider-bg[data-slide='7'] {
    background-image: url(../images/slider/7-mobile.jpg) !important;
  }
  #home .home-slider .slider-bg[data-slide='8'] {
    background-image: url(../images/slider/8-mobile.jpg) !important;
  }
}
/* Breakpoint adicional: pantallas muy pequeñas (320px-480px) */
@media (max-width: 480px) {
  .detail-grid.column-3 {
    grid-template-columns: 1fr;
  }
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }
  .banner-text .title h2,
  .banner-text .title h2.big {
    font-size: 22px;
  }
  .moving-card {
    height: 200px;
    min-height: 200px;
  }
  .header-mobile-item span {
    display: none;
  }
  .header-mobile-item {
    padding: 8px;
  }
}
/* Desktop: ocultar header-mobile */
@media (min-width: 992px) {
  .header-mobile {
    display: none !important;
  }
}
