/*==================================
  1. FONTES E CONFIGURAÇÃO BÁSICA
==================================*/

/* Variáveis de Cores */
:root {
  --color-primary: #226ce7; /* Usado no background antigo e como base para o gradiente dos botões */
  --color-muted: #9ca2ae;
  --color-dark-blue: #2357ad; /* Cor do fundo animado */
}

@font-face {
  font-family: 'Material Symbols Outlined';
  src: url('/font/MaterialSymbolsOutlined-VariableFont_FILL,GRAD,opsz,wght.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

/* A classe CSS que aplica a fonte aos seus ícones.*/
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px; /* Ajuste o tamanho conforme o seu design */
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* Reset Básico */
* {
    box-sizing: border-box;
  }
  
  /* --- Estilos do Body e Layout Principal --- */
  body {
    display: grid;
    place-items: center;
    /* gap: 50px; */
    margin: 0;
    min-height: 100vh;
    /* height: 100vh; */
    padding: 0 10px;
    background: #f1f5fb;
    color: #474f5c;
    font-family: "Euclid Circular A", "Poppins";
    overflow-x: hidden; /* CRÍTICO: Impede rolagem horizontal no body */
  }
  
  @media (width >= 500px) {
    body {
      padding: 0;
    }
  }
  
  /*==================================
  2. BACKGROUND ANIMADO
==================================*/

  @keyframes move {
    100% {
      transform: translateY(-120px);
    }
  }
  
  .background {
    position: fixed;
    inset: 0;
    z-index: 1; /* ponto*/
  }
  
  .background::before,
  .background::after {
    content: "";
    position: inherit;
    border-radius: 47% 53% 61% 39% / 45% 51% 49% 55%;
    width: 100vmin;
    height: 100vmin;
    animation: move 10s alternate infinite linear;
  }
  
  .background::before {
    top: -40vmin;
    left: -50vmin;
    /* background: #2357ad;  */
    background: var(--color-dark-blue); /* ponto */ 
  }
  
  .background::after {
    right: -50vmin;
    bottom: -55vmin;
    /* background: #2357ad; */
    background: var(--color-dark-blue); /* ponto */
    animation-direction: alternate-reverse;
  }

  /*==================================
  3. CARD (PAINEL PRINCIPAL)
==================================*/
  
  .card {
    overflow: hidden;
    position: relative;
    z-index: 3;
    width: clamp(300px, 90vw, 400px); /* Ajuste para melhor controle em diferentes telas */
    margin: 0 10px;
    padding: 34px 10px;
    border-radius: 24px;
    background: rgb(255 255 255 / 100%);
    backdrop-filter: blur(10px);
    text-align: center;
    box-shadow: 0 20px 50px rgb(0 0 0 / 15%);
  }
  
  /* @media (width >= 680px) {
    .card {
      margin: 0;
      width: clamp(300px, 45vw, 600px); 
      max-width: 800px;
    }
  } */
  /* Garante que o card seja limitado em telas maiores, mas não force a rolagem em telas menores */
  @media (width >= 680px) {
    .card {
      /* Define a largura máxima, mas sem forçar uma largura mínima que cause transbordamento */
      width: 600px; 
      max-width: 800px;
      margin: 0;
      padding: 54px 30px; /* Restaura o padding para telas maiores */
    }
  }
  
  /* Logo e Títulos */

  .card .logo {
    position: absolute;
    /* top: 0;
    left: -10%; */
    top: 0;
    left: 0; /* Começa na borda esquerda */
    right: 0; /* Termina na borda direita */
    padding: 20px 0;
    background: rgb(0 0 0 / 15%); 
    border-bottom-left-radius: 50%;
    border-bottom-right-radius: 50%;
    width: 100%;
    height: 124px;
    /* margin-bottom: 20px; Ponto */
  }
  
  .card > h2 {
    font-size: 32px;
    font-weight: 600;
    /* margin: 116px 0 4px; Ponto */
    margin: 0 0 4px; /* Ajuste para não depender do logo box */
    margin-top: 116px; /* Mantém o espaçamento superior */
  }
  
  .card > h3 {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 44px;
    color: var(--color-muted);
  }

  /*==================================
  4. FORMULÁRIO E BOTÕES
==================================*/
  
  .form {
    margin: 0 0 32px;
    display: grid;
    gap: 12px;
  }
  


  /* Estilos para os botões do formulário */
.form button {
  display: flex; 
  align-items: center; 
  justify-content: center; 
  width: 100%;
  height: 56px; /* Ponto */
  padding: 0 20px;
  margin-bottom: 15px; 
  border: none;
  border-radius: 12px; 
  font-size: 1.05em;
  font-weight: 600;
  color: #ffffff; 
  cursor: pointer;
  transition: all 0.3s ease;

  /* Gradiente e Sombra */
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%); 
  box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

/* Estilo para os ícones dentro dos botões */
.form button .material-symbols-outlined {
  margin-right: 10px; /* Espaço entre o ícone e o texto */
  font-size: 1.4em; /* Tamanho do ícone */
}

/* Novo: Efeito ao passar o mouse (hover) */
.form button:hover {
  background: linear-gradient(135deg, #0056b3 0%, #003d80 100%); /* Gradiente mais escuro no hover */
  box-shadow: 0 8px 20px rgba(0, 123, 255, 0.4); /* Sombra mais pronunciada no hover */
  transform: translateY(-2px); /* Leve elevação */
}

/* Novo: Efeito ao clicar (active) */
.form button:active {
  background: #003d80; /* Cor sólida mais escura ao clicar */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transform: translateY(0); /* Volta à posição normal */
}
  

  /*==================================
  5. MINIATURA DE VÍDEO E MODAIS
==================================*/

/* --- Miniatura do Card --- */

.video-thumbnail {
  margin-top: 6px; 
  position: relative;
  display: inline-block; 
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden; 
  box-shadow: 0 5px 15px rgb(0 0 0 / 20%);
}

.video-thumbnail img {
  display: block;
  width: 100%; 
  max-width: 400px;
  height: auto;
  transition: opacity 0.3s ease;
}

.video-thumbnail:hover img {
  opacity: 0.8;
}

.video-thumbnail .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 60px; 
  color: #fff; 
  background: rgb(0 0 0 / 30%);
  border-radius: 50%;
  transition: background 0.3s ease;
  padding: 5px;
}

.video-caption {
  margin-top: 10px;
  font-size: 0.9em;
  color: #666;
}


/* ------------------------------------ */
/* ESTILOS DA MODAL */
/* ------------------------------------ */

.modal {
  display: none; 
  position: fixed; 
  z-index: 100; 
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(0 0 0 / 70%); 
  overflow: auto; 
}

.modal-content {
  background-color: #fefefe;
  margin: 10% auto; /* 10% do topo e centralizado horizontalmente */
  padding: 30px;
  border-radius: 16px;
  width: 80%; 
  max-width: 900px; 
  box-shadow: 0 4px 20px rgb(0 0 0 / 30%);
  position: relative;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
    font-weight: 600;
}

/* Botão de fechar (x) */
.close-button {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  top: 10px;
  right: 20px;
  cursor: pointer;
}

.close-button:hover,
.close-button:focus {
  color: #333;
  text-decoration: none;
  cursor: pointer;
}

/* ------------------------------------ */
/* ESTILOS DA GALERIA DE VÍDEOS */
/* ------------------------------------ */

.video-gallery {
    display: flex; 
    flex-wrap: wrap; 
    gap: 20px; 
    justify-content: center; 
}

.gallery-item {
    display: block;
    text-decoration: none;
    color: #333;
    width: 200px; 
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgb(0 0 0 / 15%);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-item p {
    padding: 10px;
    margin: 0;
    font-size: 0.9em;
    font-weight: 500;
}


/* ------------------------------------ */
/* NOVO ESTILO CRÍTICO PARA TAG <video> */
/* ------------------------------------ */

/* --- ESTILOS DO PLAYER DE VÍDEO (Modal 2) --- */

.modal-content {
    /* (Mantém os estilos padrões: fundo, margem, sombra) */
    padding: 20px;
    overflow: hidden;
    /* Adicione position: relative para que os elementos internos verticais possam ser posicionados absolutamente */
    position: relative; 
}

/* Estilos de Controle (Título e Botão Voltar) */
.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 0 10px;
}

#videoTitle {
    margin: 0;
    font-size: 1.2em;
    text-align: left;
    flex-grow: 1;
}

/* --- ESTILO PARA VÍDEOS HORIZONTAIS (Padrão: 16:9) --- */

.horizontal-player {
    max-width: 1000px;
}

.horizontal-player .video-container {
    width: 100%;
    /* Truque para proporção 16:9 */
    padding-top: 56.25%; 
    height: 0;
    position: relative;
    margin: 20px auto 0 auto; 
    max-width: 900px;
    overflow: hidden;
}

.horizontal-player #videoEmbed video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 8px;
}

/* --- ESTILO PARA VÍDEOS VERTICAIS (Tipo Stories/Shorts) --- */

.vertical-player {
    max-width: 450px; /* Modal estreita, estilo celular */
}

/* No modo vertical, o header e o container são posicionados próximos */
.vertical-player .video-header {
    /* Ajustes para o header ficar flutuando sobre o player vertical */
    position: absolute;
    z-index: 2; /* Garante que o header fique na frente do vídeo */
    top: 10px; /* Distância do topo */
    left: 50%;
    transform: translateX(-50%); /* Centraliza */
    width: calc(100% - 20px); /* Ocupa a largura da modal */
    
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
    color: white;
    padding: 10px;
    box-sizing: border-box;
    border-radius: 16px 16px 0 0;
}

.vertical-player #videoTitle {
    color: white;
}
.vertical-player .back-button {
    color: white;
    background: none;
    border: none;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.vertical-player .video-container {
    width: 100%;
    /* Proporção 9:16 */
    padding-top: 177.77%; 
    height: 0;
    position: relative;
    margin: 10px auto; 
    max-width: 400px;
    overflow: hidden;
    /* Efeito de "celular" */
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.vertical-player #videoEmbed video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 16px; 
}


/* --- Estilos para o Botão de Voltar na Modal do Player --- */

.modal-controls {
    text-align: left; 
    margin-bottom: 10px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f8f8f8;
    color: #555;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-button:hover {
    background-color: #ebebeb;
    border-color: #ccc;
    color: #333;
}

.back-button .material-symbols-outlined {
    font-size: 1.2em;
    margin-right: 0; 
}