/* ============================================= */
/*          VARIÁVEIS GLOBAIS E BASE             */
/* ============================================= */
:root {
  --primary-color: #0d6efd;
  --primary-hover: #0b5ed7;
  --danger-color: #dc3545;
  --favorite-color: #e74c3c;
  --bg-color: #f4f6f9;
  --card-bg-color: #ffffff;
  --header-bg-color: #ffffff;
  --text-color: #212529;
  --text-color-light: #6c757d;
  --accent-color: #0056b3;
  --border-color: #dee2e6;
  --shadow-color: rgba(0, 0, 0, 0.08);
  --shadow-hover-color: rgba(0, 0, 0, 0.15);
  --overlay-color: rgba(0, 0, 0, 0.6);
  --sidebar-bg: #1e2a3b;
  --sidebar-text: #adb5bd;
  --sidebar-text-hover: #ffffff;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --header-height: 60px;
}

html.dark {
  --primary-color: #4dabf7;
  --primary-hover: #74c0fc;
  --danger-color: #ff6b6b;
  --favorite-color: #e74c3c;
  --bg-color: #121212;
  --card-bg-color: #1e1e1e;
  --header-bg-color: #1e1e1e;
  --text-color: #e9ecef;
  --text-color-light: #b0b3b8;
  --accent-color: #4dabf7;
  --border-color: #495057;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --shadow-hover-color: rgba(0, 0, 0, 0.4);
  --overlay-color: rgba(0, 0, 0, 0.7);
  --sidebar-bg: #1c1f24;
  --sidebar-text: #868e96;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color .3s, color .3s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  
  to {
    opacity: 1;
  }
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: scale(.95) translateY(10px);
  }
  
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================= */
/*             CONTEÚDO PRINCIPAL                */
/* ============================================= */
.main-content {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  position: relative;
  padding: 1.0rem;
  border-top: none;
  margin-top: 2rem;
}

.main-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
}

/* ============================================= */
/*             PRELOADER E SPINNER               */
/* ============================================= */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .5s ease;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, .1);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border-left-color: var(--accent-color);
  animation: spin 1s ease infinite;
}

/* ============================================= */
/*             CONTROLES DA PÁGINA               */
/* ============================================= */
#main-controls-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 5rem;
  margin-bottom: 1rem;
}

.main-filters {
  display: flex;
  gap: .75rem;
  padding: .5rem 0;
}

.filter-tag-btn {
  padding: .5rem 1rem;
  border: 1px solid var(--border-color);
  background-color: var(--card-bg-color);
  color: var(--text-color);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  white-space: nowrap;
  transition: all .2s;
}

.filter-tag-btn:hover {
  background-color: var(--tag-bg-color);
  border-color: var(--tag-bg-color);
}

.filter-tag-btn.active {
  background-color: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

/* ============================================= */
/*             GRID E CARDS DE CONTEÚDO          */
/* ============================================= */
#conteudos {
  display: grid;
  gap: 1rem;
  min-height: 300px;
  grid-template-columns: repeat(2, 1fr);
  background-color: #00A0FF21;
  margin: 0rem;
  padding: 0.8rem 0;
  border-radius: 8px;
}

@media (min-width: 768px) {
  #conteudos {
    gap: 1.5rem;
    grid-template-columns: repeat(3, 1fr);
  }
}

.conteudo {
  background-color: var(--card-bg-color);
  border-radius: 6px;
  box-shadow: var(--shadow);
  transition: transform .6s ease-out, opacity .6s ease-out, box-shadow .2s;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  overflow: hidden;
}

.conteudo:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover-color);
}

.conteudo.viewed .conteudo-info {
  opacity: 0.7;
}

.conteudo.viewed:hover .conteudo-info {
  opacity: 1;
}

.media-container {
  position: relative;
  cursor: pointer;
  background-color: #000;
  width: 100%;
  aspect-ratio: 1080 / 1090;
  border-bottom: 3px solid var(--accent-color);
  overflow: hidden;
}

.conteudo img,
.conteudo video,
.conteudo iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
}

.media-container .overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--overlay-color);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s ease;
}

.media-container:hover .overlay {
  opacity: 1;
}

.visualizar-btn {
  background-color: white;
  color: #333;
  border: none;
  padding: .6rem 1.2rem;
  border-radius: 15px;
  cursor: pointer;
  font-weight: bold;
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background-color: rgba(0, 0, 0, .6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  pointer-events: none;
  transition: transform .2s;
}

.media-container:hover .play-icon {
  transform: translate(-50%, -50%) scale(1.1);
}

.play-icon i {
  font-size: 24px;
  color: white;
}

.conteudo-info {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card-actions-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.card-button-group {
  display: flex;
  gap: .8rem;
}

.card-header {
  margin-bottom: .5rem;
}

.conteudo h2 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-color);
}

.action-wrapper {
  display: flex;
  align-items: center;
  gap: .3rem;
  color: var(--text-color-light);
}

.like-btn-card,
.favorite-btn-card {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform .2s;
  display: flex;
}

.like-btn-card i,
.favorite-btn-card i {
  font-size: 15px;
  color: var(--text-color-light);
  transition: color .2s;
}

.action-wrapper.liked .like-btn-card i {
  color: var(--accent-color);
}

.action-wrapper.favorited .favorite-btn-card i {
  color: var(--favorite-color);
}

.action-wrapper.liked,
.action-wrapper.favorited {
  font-weight: bold;
}

.action-wrapper.liked {
  color: var(--accent-color);
}

.action-wrapper.favorited {
  color: var(--favorite-color);
}

.action-wrapper:hover .count {
  color: var(--accent-color);
}

.count {
  font-size: .9em;
  font-weight: 500;
}

.description-text {
  font-size: 0.8rem;
  color: var(--text-color-light);
  margin: .3rem 0;
  line-height: 1.2;
}

.description-text.truncated {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toggle-description-btn {
  font-size: 0.9rem;
  color: #4C4C4C;
  font-weight: 500;
  cursor: pointer;
}

.data {
  font-size: .6rem;
  color: var(--text-color-light);
  margin-top: auto;
  padding-top: 1rem;
}

/* ============================================= */
/*                  PAGINAÇÃO                    */
/* ============================================= */
#paginacao-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2.5rem;
}

#paginacao {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}

.page-number,
.ellipsis {
  padding: .6rem .9rem;
  border: 1px solid var(--border-color);
  background-color: var(--card-bg-color);
  color: var(--accent-color);
  cursor: pointer;
  border-radius: 6px;
  transition: background-color .2s, color .2s;
  font-weight: 500;
}

.page-number:hover {
  background-color: var(--accent-color);
  color: white;
}

.page-number.active {
  background-color: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  cursor: default;
}

.ellipsis {
  cursor: default;
  border: none;
  background: none;
  color: var(--text-color-light);
}

.pagination-total {
  width: 100%;
  text-align: center;
  margin-top: 1rem;
  padding-bottom: 1.5rem;
  color: var(--text-color-light);
  font-size: .9rem;
  position: relative;
}

.pagination-total::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: #C6C6C633;
}

/* ============================================= */
/*          ESTILOS DO LIGHTBOX (PHOTOSWIPE)     */
/* ============================================= */
.pswp__bg {
  background: #000;
}

.pswp__top-bar {
  background-color: rgba(0, 0, 0, 0.5);
}

.pswp__counter {
  padding-right: 1rem;
}

.pswp__custom-actions {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 44px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pswp__button--share-custom {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  opacity: .75;
  transition: opacity .2s, transform .2s;
  padding: 10px;
}

.pswp__button--share-custom:hover {
  opacity: 1;
  transform: scale(1.1);
}

.pswp__button--share-custom i {
  font-size: 24px;
}

.pswp__custom-action-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1rem;
  opacity: .75;
  transition: opacity .2s, transform .2s;
}

.pswp__custom-action-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.pswp__custom-action-btn i {
  font-size: 24px;
}

.pswp__custom-action-btn .count {
  font-size: 1em;
  font-weight: 500;
}

.pswp__custom-action-btn.liked {
  color: var(--accent-color);
}

.pswp__custom-action-btn.favorited {
  color: var(--favorite-color);
}

.pswp__item iframe,
.pswp__item video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: auto;
  max-width: 1024px;
  max-height: 100%;
  aspect-ratio: 16 / 9;
}

.pswp__caption .pswp__caption__center {
  text-align: left;
  max-width: 700px;
  margin: 0 auto;
  padding: 10px;
}

.pswp__caption h3 {
  font-size: 1.1rem;
  margin: 0 0 .6rem 0;
  color: #fff;
  font-weight: 600;
}

.pswp__caption p {
  font-size: .9rem;
  margin: .75rem 0 0 0;
  color: #ccc;
  line-height: 1.5;
  white-space: pre-wrap;
}

.pswp__button--download {
  display: none !important;
}

.pswp__button--arrow--left,
.pswp__button--arrow--right {
  background: rgba(0, 0, 0, 0.3) !important;
  width: 50px;
  height: 60px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 8px;
  background-image: none !important;
}

.pswp__button--arrow--left:hover,
.pswp__button--arrow--right:hover {
  background: rgba(0, 0, 0, 0.5) !important;
}

.pswp__button--arrow--left::before,
.pswp__button--arrow--right::before {
  display: none !important;
}

.pswp__button--arrow--left {
  left: 10px;
}

.pswp__button--arrow--right {
  right: 10px;
}

.pswp__button--arrow--left::after,
.pswp__button--arrow--right::after {
  font-family: Arial, sans-serif;
  font-size: 40px;
  line-height: 1;
  color: #fff;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.pswp__button--arrow--left::after {
  content: '<';
}

.pswp__button--arrow--right::after {
  content: '>';
}

/* ============================================= */
/*          SEÇÃO DE DESTAQUES (SLIDER)          */
/* ============================================= */
.destaques-section {
  margin-top: 3rem;
  margin-bottom: 2rem;
  padding: 0 0rem;
}

.destaques-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 1.9rem;
  text-align: center;
  border-bottom: none;
}

.swiper {
  width: 100%;
  aspect-ratio: 12 / 9;
  border-radius: 12px;
}

.swiper-slide {
  position: relative;
  text-align: left;
  font-size: 18px;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  overflow: hidden;
}

.swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.swiper-slide:hover img {
  transform: scale(1.05);
}

.slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 20%, transparent);
  color: white;
  padding: 1.9rem;
  box-sizing: border-box;
}

.slide-title {
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.slide-description {
  font-size: 0.95rem;
  font-weight: 400;
  margin: 0;
  line-height: 1.4;
  opacity: 0.9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slide-title,
.slide-description {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.swiper-slide-active .slide-title,
.swiper-slide-active .slide-description {
  opacity: 1;
  transform: translateY(0);
}

.swiper-slide-active .slide-description {
  transition-delay: 0.2s;
}

.swiper-button-next,
.swiper-button-prev {
  color: var(--card-bg-color) !important;
  background-color: rgba(0, 0, 0, 0.3);
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 20px !important;
  font-weight: bold;
}

.swiper-pagination-bullet {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  opacity: 1 !important;
  box-shadow: none !important;
  margin: 0 8px !important;
  transition: background .18s, transform .18s;
}

.swiper-pagination-bullet.swiper-pagination-bullet-active {
  background: var(--primary-color) !important;
}

.swiper-pagination-bullet.swiper-pagination-bullet-active::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.0px solid rgba(255, 255, 255, 0.95);
  background: transparent;
  pointer-events: none;
  box-sizing: content-box;
}

/* ============================================= */
/*                SEÇÃO DE NOTÍCIAS              */
/* ============================================= */
.news-section {
  padding: 3rem 0;
  display: none;
}

.news-section h2 {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 1.9rem;
  text-align: left;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.news-card {
  background-color: var(--card-bg-color);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover-color);
}

.news-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card-content {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.news-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0 0 0.5rem 0;
}

.news-card-text {
  font-size: 0.9rem;
  color: var(--text-color-light);
  line-height: 1.5;
  margin: 0;
}

.news-card-date {
  font-size: 0.8rem;
  color: #989898;
  font-weight: 300;
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}


/* ============================================= */
/*             SEÇÃO DE "FEATURES"               */
/* ============================================= */
.feature-sections {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 900px;
  margin: 5rem auto 0 auto;
  display: none;
  overflow: hidden;
}

h4 {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-color);
  text-align: left;
  margin: 0 0 0.3rem 0;
}

.feature-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  background-color: var(--card-bg-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem;
  gap: 1rem;
}

.feature-image {
  flex: 0 0 35%;
  max-width: 35%;
}

.feature-image img {
  width: 100%;
  aspect-ratio: 1080 / 1350;
  max-height: 200px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: var(--shadow);
  display: block;
}

.feature-text {
  flex: 1 1 65%;
  padding: 0 0.5rem;
}

.feature-text h2 {
  font-size: 0.95rem;
  margin: 0 0 0.3rem 0;
  color: var(--primary-color);
}

.feature-text p {
  color: var(--text-color-light);
  line-height: 1.3;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.feature-button {
  display: inline-block;
  background-color: var(--accent-color);
  color: white;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.7rem;
  transition: background-color 0.2s, transform 0.2s;
}

.feature-button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .feature-row {
    gap: 0.5rem;
    padding: 0.5rem;
  }
  
  .feature-image {
    flex: 0 0 30%;
    max-width: 30%;
  }
  
  .feature-image img {
    max-height: 150px;
  }
  
  .feature-text h2 {
    font-size: 0.85rem;
  }
  
  .feature-text p {
    font-size: 0.7rem;
    margin-bottom: 0.3rem;
  }
  
  .feature-button {
    font-size: 0.65rem;
    padding: 0.25rem 0.4rem;
  }
}


/* ============================================= */
/*              COMPONENTES E UTILITÁRIOS        */
/* ============================================= */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text-hover);
  padding: 1rem 1.5rem;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-weight: 500;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}