/* Container da planilha */

.fundo_ranking {
    width: 100%;
    height: 90vh;
    background-color: transparent;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }

  /* iframe base */
  .fundo_ranking iframe {
    width: 500px;   /* largura original da planilha */
    height: 80vh;
    border: none;
    border-radius: 12px;
    transform-origin: top center;
    transition: all 0.25s ease;
    display: flex;
    justify-content: center;
    align-items: center;
  }

/* 📱 Ajuste automático para celular na vertical */
/* 📱 Modo celular vertical — ajuste automático */
@media (max-width: 767px) and (orientation: portrait) {
  html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }

  .fundo_ranking {
    width: 100% !important;
    height: 95vh;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .fundo_ranking iframe {
    position: absolute;
    top: 0;
    left: 0;
    padding-top: 10px;
    width: 980px !important; /* largura real detectada da planilha */
    height: 100%;
    border: none;
    transform-origin: top left;
    transform: scale(calc(100vw / 980)); /* redimensiona automaticamente */
  }
}


  /* 📱 Modo celular horizontal (landscape) */
  @media (max-width: 767px) and (orientation: landscape) {
    .fundo_ranking {
      height: 100vh;
      border-radius: 12px;
      display: flex;
      justify-content: center;
      align-items: center;
      overflow: hidden;    }

    .fundo_ranking iframe {
      width: 500px; 
      height: 100%;
      transform: scale(0.9);
      transform-origin: top center;
      border-radius: 12px;
      display: flex;
      justify-content: center;
      align-items: center;

    }
  }
