/* ===== MOBILE - até 480px ===== */
/* ===== MOBILE - até 480px ===== */

@media (max-width: 480px) {

  body {
    background-attachment: scroll;
  }

  /* HEADER */

  header {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 12px;
  }

  .logo img {
    width: 65px;
    height: auto;
  }

  .menu {
    width: 100%;
    justify-content: center;
    gap: 20px;
  }

  .menu a {
    font-size: 14px;
  }

  .input {
    width: 100%;
    justify-content: center;
  }

  .input input {
    width: 100%;
    max-width: 250px;
    font-size: 14px;
  }

  #btnHeader {
    width: 75px;
    height: 38px;
    font-size: 12px;
  }

  .idioma-selector {
    justify-content: center;
  }

  /* CONTEÚDO */

  .main {
    margin: 20px;
    gap: 20px;
  }

  .conteudo {
    max-width: 100%;
  }

  .conteudo h1 {
    font-size: 22px;
    line-height: 1.3;
  }

  .conteudo2 p {
    font-size: 14px;
  }

  /* BUSCA PRINCIPAL */

  .search-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  #filme {
    width: 100%;
    max-width: none;
    font-size: 14px;
  }

  #btnMain {
    width: 100%;
    height: 42px;
  }

  /* CATÁLOGO */

  #alta {
    margin: 15px;
  }

  #alta h3 {
    font-size: 18px;
    margin-bottom: 15px;
  }

  .card {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0;
  }

  .movie-card {
    width: 100%;
  }

  .movie-card img {
    width: 100%;
    height: auto;
  }

  .movie-card h3 {
    font-size: 12px;
    text-align: center;
  }

  .btn-detalhes {
    width: 100%;
    padding: 8px;
    font-size: 11px;
  }

  /* DETALHES */

  .titulo h1 {
    margin: 15px;
    font-size: 20px;
  }

  .detalhe-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 15px;
    gap: 15px;
  }

  .detalhe-card img {
    width: 100%;
    max-width: 220px;
    height: auto;
  }

  .detalhe-card div {
    width: 100%;
  }

  .detalhe-card h1 {
    font-size: 22px;
    text-align: center;
  }

  .detalhe-card p {
    font-size: 14px;
    line-height: 1.5;
  }

  /* FOOTER */

  .footer {
    padding: 20px 15px;
  }

  .footer h3 {
    font-size: 18px;
  }

  .footer h4 {
    font-size: 15px;
  }

  .footer li,
  .footer p {
    font-size: 12px;
  }

  /* PERFORMANCE */

  .movie-card:hover,
  .btn-idioma:hover,
  .btn-detalhes:hover,
  #btnHeader:hover,
  #btnMain:hover {
    transform: none;
  }
}
/* ===== TABLETS - 481px até 768px ===== */
@media (min-width: 481px)  {
  /* HEADER */
  header {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
  }

  .logo img {
    width: 70px;
    height: 55px;
  }

  .menu {
    gap: 20px;
    font-size: 14px;
    order: 3;
    width: 100%;
  }

  .input {
    flex: 1;
    min-width: 150px;
  }

  .input input {
    width: 100%;
    font-size: 13px;
    padding: 9px 9px 9px 35px;
  }

  #btnHeader {
    width: 70px;
    height: 32px;
    font-size: 12px;
  }

  .idioma-selector {
    gap: 8px;
  }

  .btn-idioma {
    padding: 5px 12px;
    font-size: 11px;
  }

  /* MAIN CONTENT */
  .main {
    margin: 30px;
    gap: 20px;
  }

  .conteudo {
    gap: 15px;
    max-width: 100%;
  }

  .conteudo h1 {
    font-size: 32px;
  }

  .conteudo2 p {
    font-size: 15px;
  }

  /* INPUT PRINCIPAL */
  #filme {
    width: 100%;
    max-width: 350px;
    padding: 11px 12px 11px 40px;
    font-size: 13px;
  }

  #btnMain {
    width: 75px;
    height: 35px;
  }

  .search-box {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
  }

  /* CARDS */
  #alta {
    margin: 20px;
  }

  #alta h3 {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .card {
    gap: 16px;
    padding: 15px;
    justify-content: flex-start;
  }

  .movie-card {
    width: 140px;
  }

  .movie-card h3 {
    font-size: 13px;
  }

  /* DETALHE CARD */
  .detalhe-card {
    flex-direction: row;
    gap: 18px;
    margin: 15px;
    flex-wrap: wrap;
  }

  .detalhe-card img {
    height: 350px;
    width: 280px;
  }

  .detalhe-card p {
    font-size: 15px;
    max-width: 100%;
  }

  .titulo h1 {
    margin: 15px;
    font-size: 22px;
  }

  /* BOTÕES */
  .botoes-container {
    gap: 10px;
  }

  .btn-detalhes {
    padding: 9px 14px;
    font-size: 12px;
  }

  /* RESULTADOS */
  h1 {
    margin: 15px;
    font-size: 20px;
  }
}

/* ===== PEQUENOS DESKTOPS - 769px até 1024px ===== */
@media (min-width: 769px) and (max-width: 1024px) {
  /* HEADER */
  header {
    padding: 12px;
  }

  .logo img {
    width: 80px;
    height: 60px;
  }

  .menu {
    gap: 25px;
  }

  .input input {
    width: 170px;
    font-size: 13px;
  }

  #btnHeader {
    width: 75px;
    height: 35px;
  }

  /* MAIN CONTENT */
  .main {
    margin: 40px;
  }

  .conteudo h1 {
    font-size: 38px;
  }

  /* INPUT PRINCIPAL */
  #filme {
    width: 340px;
  }

  /* CARDS */
  .card {
    gap: 18px;
    padding: 18px;
  }

  .movie-card {
    width: 150px;
  }

  /* DETALHE CARD */
  .detalhe-card img {
    height: 400px;
    width: 320px;
  }

  .detalhe-card p {
    font-size: 16px;
  }
}

/* ===== DESKTOPS GRANDES - 1025px+ ===== */
@media (min-width: 1025px) {
  /* Mantém estilos padrão do style.css */
  header {
    padding: 15px;
  }

  .logo img {
    width: 90px;
    height: 70px;
  }

  .menu {
    gap: 30px;
  }

  .input input {
    width: 190px;
  }

  .main {
    margin: 50px;
    gap: 30px;
  }

  .conteudo h1 {
    font-size: 42px;
  }

  #filme {
    width: 380px;
  }

  .card {
    gap: 20px;
    padding: 20px;
  }

  .movie-card {
    width: 160px;
  }

  .detalhe-card img {
    height: 450px;
    width: 350px;
  }
}

/* ===== MELHORIAS GERAIS PARA MOBILE ===== */
@media (max-width: 768px) {
  /* Aumentar área de toque dos botões */
  button {
    min-height: 40px;
    min-width: 40px;
  }

  /* Melhor espaçamento em links */
  .menu a {
    padding: 8px 4px;
    display: block;
  }

  /* Inputs mais acessíveis */
  input {
    font-size: 16px;
    padding: 10px;
  }

  /* Prevenir zoom automático em inputs */
  input:focus {
    font-size: 16px;
  }

  /* Cards mais legíveis */
  .movie-card {
    min-width: 100px;
  }

  /* Remover efeitos de escala em mobile para melhor performance */
  @media (max-width: 480px) {
    .movie-card:hover {
      transform: none;
    }

    .btn-idioma:hover {
      transform: none;
    }

    #btnHeader:hover,
    #btnMain:hover {
      transform: none;
    }

    .btn-detalhes:hover {
      transform: none;
    }
  }

  /* Melhor legibilidade em tablets */
  @media (max-width: 768px) and (min-width: 481px) {
    .movie-card:hover {
      transform: scale(1.02);
    }
  }
}
