/* ========================================================
   HEADER E ELEMENTOS DO SITE (Acompanham Modo Claro/Escuro)
   ======================================================== */

.portfolio-category-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  opacity: 0.5;
  display: block;
  margin-bottom: 5px;
}

.portfolio-main-title {
  text-transform: uppercase;
  letter-spacing: 3px;
  margin: 0;
  font-size: 2.5rem;
  font-weight: 800;
}

.portfolio-description-text {
  font-size: 14px;
  max-width: 500px;
  margin: 10px auto 0 auto;
  opacity: 0.7;
  line-height: 1.5;
}

.header-line {
  width: 40px;
  border-top: 2px solid currentColor;
  margin: 0;
  opacity: 1;
}

.header-star {
  font-size: 12px;
  opacity: 0.5;
}

/* ========================================================
   FIX DA GRELHA AUTOMÁTICA
   ======================================================== */

/* Intercepta a div d-flex que envolve os cards e força a quebra de linha */

.portfolio-section .container > .d-flex {
  flex-wrap: wrap !important;
  gap: 24px !important;
}

/* ========================================================
   CONFIGURAÇÃO GERAL DOS CARDS (PÁGINA PRINCIPAL)
   ======================================================== */

.game-card {
  width: 100% !important;
  max-width: 360px !important;
  margin: 0 auto !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  border: 1px solid currentColor !important;
  cursor: pointer !important;
  position: relative !important;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.game-card:hover {
  transform: translateY(-6px) !important;
}

.game-card-img-wrapper {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 2 / 3 !important;
  background-color: #0b0b0b !important;
}

.game-card-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.5s ease, opacity 0.5s ease !important;
}

/* COMPORTAMENTO DO HOVER NO PC */

html body .game-card-overlay-blindado, html body [data-bs-theme="dark"] .game-card-overlay-blindado, html body [data-bs-theme="light"] .game-card-overlay-blindado {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.5) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  align-items: center !important;
  padding: 35px 20px !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 0.3s ease, visibility 0.3s ease !important;
  z-index: 5 !important;
}

.game-card:hover .game-card-overlay-blindado {
  opacity: 1 !important;
  visibility: visible !important;
}

.game-card:hover .game-card-img {
  opacity: 0.5 !important;
  transform: scale(1.04) !important;
}

/* ========================================================
   COMPORTAMENTO RESPONSIVO MÓVEL (AGRUPADO E CORRIGIDO)
   ======================================================== */

/* Força cada card a ocupar a largura total (1 por linha) */

@media (max-width: 768px) {
  .portfolio-section .game-card {
    flex: 0 0 100% !important;
    max-width: 340px !important;
  }
}

@media (max-width: 768px) {
  .game-card:hover {
    transform: none !important;
  }
}

/* Mantém o overlay blindado fixo no telemóvel */

@media (max-width: 768px) {
  html body .game-card-overlay-blindado, html body [data-bs-theme="dark"] .game-card-overlay-blindado, html body [data-bs-theme="light"] .game-card-overlay-blindado {
    opacity: 1 !important;
    visibility: visible !important;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%) !important;
  }
}

@media (max-width: 768px) {
  html body .game-card-img {
    opacity: 0.8 !important;
    transform: none !important;
  }
}

/* ========================================================
   COMPORTAMENTO RESPONSIVO NO PC (FORÇAR GRELHA DE 3)
   ======================================================== */

@media (min-width: 769px) {
  .portfolio-section .game-card {
    flex: 0 0 calc(33.3333% - 16px) !important;
  }
}

/* ========================================================
   ESTILOS DOS TEXTOS INTERNOS DO OVERLAY
   ======================================================== */

html body .game-card-overlay-blindado .game-card-title-fix, html body [data-bs-theme="dark"] .game-card-overlay-blindado .game-card-title-fix {
  color: #ffffff !important;
  text-align: center !important;
  text-transform: uppercase !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  margin-bottom: 12px !important;
  text-shadow: 0 2px 10px rgba(0,0,0,1) !important;
}

html body .game-card-overlay-blindado .vs-text, html body [data-bs-theme="dark"] .game-card-overlay-blindado .vs-text {
  color: #ffffff !important;
  opacity: 0.9 !important;
  font-size: 13px !important;
}

html body .game-card-overlay-blindado .btn-game-card-trigger, html body [data-bs-theme="dark"] .game-card-overlay-blindado .btn-game-card-trigger {
  padding: 8px 20px !important;
  border: 1px solid #ffffff !important;
  background: transparent !important;
  color: #ffffff !important;
  text-transform: uppercase !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

.game-card:hover .btn-game-card-trigger {
  background: #ffffff !important;
  color: #000000 !important;
}

/* ========================================================
   MODAL LIGHTBOX (Isolamento de Cinema Escuro)
   ======================================================== */

html body .premium-lightbox-content {
  background-color: #080808 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

html body .quality-warning-banner-blindado {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  background: #141414 !important;
  padding: 14px 24px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px !important;
  z-index: 99 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

html body .warning-text-blindado {
  color: #ffffff !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
}

html body .quality-link-btn-premium {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 20px !important;
  height: 20px !important;
  background: #2a2a2a !important;
  color: #ffffff !important;
  border-radius: 50% !important;
  font-size: 11px !important;
  font-weight: bold !important;
  text-decoration: none !important;
  border: 1px solid #444 !important;
}

html body .quality-link-btn-premium:hover {
  background: #ffffff !important;
  color: #000000 !important;
}

html body .btn-close-premium {
  position: absolute !important;
  top: 12px !important;
  right: 20px !important;
  background: none !important;
  border: none !important;
  color: #ffffff !important;
  font-size: 22px !important;
  z-index: 9999 !important;
  cursor: pointer !important;
}

/* ========================================================
   BARRA DE FERRAMENTAS E ÍCONES (FOTO VS GRELHA)
   ======================================================== */

.lightbox-toolbar {
  position: absolute;
  top: 54px;
  right: 20px;
  z-index: 98;
  padding: 5px;
}

.btn-view-mode {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.3;
  transition: opacity 0.2s ease;
}

.btn-view-mode.active {
  opacity: 1 !important;
}

.icon-single-square {
  display: block;
  width: 22px;
  height: 22px;
  border: 2.5px solid #ffffff;
  border-radius: 5px;
}

.icon-grid-squares {
  display: block;
  position: relative;
  width: 6px;
  height: 6px;
  background: #ffffff;
  border-radius: 1px;
  box-shadow: 9px 0 0 0 #ffffff, 0 9px 0 0 #ffffff, 9px 9px 0 0 #ffffff;
  margin-right: 9px;
  margin-bottom: 9px;
}

/* ========================================================
   LÓGICA DINÂMICA DE EXIBIÇÃO DE VISTAS
   ======================================================== */

.lightbox-display-container {
  padding-top: 105px;
  min-height: 72vh;
}

.lightbox-display-container.view-carousel .carousel {
  display: block !important;
}

.lightbox-display-container.view-carousel .lightbox-grid-view-container {
  display: none !important;
}

.lightbox-display-container.view-grid .carousel {
  display: none !important;
}

.lightbox-display-container.view-grid .lightbox-grid-view-container {
  display: block !important;
}

/* ========================================================
   CORREÇÃO DA GRELHA INTERNA 3X3 DO MODAL
   ======================================================== */

.lightbox-grid-view-container {
  max-height: 60vh;
  overflow-y: auto;
  width: 100% !important;
  max-width: 750px !important;
  margin: 0 auto !important;
  padding: 10px !important;
}

html body .lightbox-grid-view-container .row {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  width: 100% !important;
  margin: 0 !important;
}

html body .lightbox-grid-view-container .col {
  flex: 0 0 33.3333% !important;
  max-width: 33.3333% !important;
  width: 33.3333% !important;
  padding: 6px !important;
  box-sizing: border-box !important;
}

html body .grid-view-thumb {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  border-radius: 6px !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, border-color 0.2s ease !important;
}

html body .grid-view-thumb:hover {
  transform: scale(1.04) !important;
  border-color: #ffffff !important;
}

/* ========================================================
   TAMANHO E COMPORTAMENTO DAS IMAGENS DO CARROSSEL
   ======================================================== */

.lightbox-img-container {
  padding: 10px 40px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  height: 58vh !important;
}

html body .lightbox-img {
  max-height: 100% !important;
  max-width: 88% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  border-radius: 6px !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65) !important;
}

/* ========================================================
   SETAS E INDICADORES DO CARROSSEL
   ======================================================== */

html body .premium-control {
  width: 12% !important;
  opacity: 0.5 !important;
  filter: none !important;
}

html body .premium-control:hover {
  opacity: 1 !important;
}

html body .carousel-control-prev-icon, html body .carousel-control-next-icon {
  display: none !important;
}

html body .seta-nova {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  border-top: 4px solid #ffffff !important;
  border-left: 4px solid #ffffff !important;
}

.carousel-control-prev .seta-nova {
  transform: rotate(-45deg) !important;
  margin-left: 15px;
}

.carousel-control-next .seta-nova {
  transform: rotate(135deg) !important;
  margin-right: 15px;
}

.premium-indicators button {
  width: 18px !important;
  height: 3px !important;
  background-color: #ffffff !important;
  border: none !important;
  opacity: 0.3 !important;
}

.premium-indicators button.active {
  opacity: 1 !important;
  width: 30px !important;
}

/* ========================================================
   RODAPÉ DO MODAL
   ======================================================== */

html body .premium-lightbox-footer {
  text-align: center !important;
  padding: 18px !important;
  background: #0f0f0f !important;
  border-top: 1px solid rgba(255,255,255,0.04) !important;
}

html body .premium-lightbox-footer p {
  color: #ffffff !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
}

/* ========================================================
   BLOCO RESPONSIVO (AJUSTES GERAIS MOBILE ADICIONAIS)
   ======================================================== */

@media (max-width: 576px) {
  .lightbox-display-container {
    padding-top: 85px !important;
    min-height: 55vh !important;
  }
}

@media (max-width: 576px) {
  html body .quality-warning-banner-blindado {
    padding: 12px 50px 12px 15px !important;
    justify-content: flex-start !important;
  }
}

@media (max-width: 576px) {
  html body .warning-text-blindado {
    font-size: 9px !important;
    line-height: 1.4 !important;
    text-align: left !important;
    white-space: normal;
  }
}

@media (max-width: 576px) {
  .lightbox-toolbar {
    top: 48px !important;
    right: 15px !important;
  }
}

@media (max-width: 576px) {
  .lightbox-img-container {
    padding: 0 15px !important;
    height: 48vh !important;
  }
}

@media (max-width: 576px) {
  html body .premium-control {
    width: 10% !important;
  }
}

