/*
Theme Name: Barca Novo
Theme URI: https://barcadacultura.com
Author: Automação Barca
Author URI: https://barcadacultura.com
Description: Tema limpo e funcional para o projeto Barca da Cultura - Redesign 2025
Version: 2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: barca-novo
*/

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Variáveis de cores - PALETA BARCA DA CULTURA (Inspir  /* Paleta de Cores Premium - Redesign 2025 */
/* Variáveis de cores - PALETA BARCA DA CULTURA (Inspir  /* Paleta de Cores Premium - Redesign 2025 */
:root {
  /* Marrons (Base Terrosa/Histórica) - Tons mais ricos e quentes */
  --color-marrom-profundo: #3E2723;
  /* Mantendo o tom original solicitado */
  /* Marrom Café Profundo */
  --color-marrom-medio: #5D4037;
  /* Marrom Terra */
  --color-marrom-suave: #8D6E63;
  /* Marrom Argila */

  /* Dourados (Nobreza/Cultura) */
  --color-dourado-velho: #C5A065;
  /* Ouro Envelhecido */
  --color-dourado-suave: #E6CEAA;
  /* Champanhe */
  --color-areia: #F5F1E8;
  /* Papel Antigo */

  /* Nuvens (Atmosfera/Sonho) */
  --color-nuvem-escura: #546E7A;
  /* Azul Acinzentado Profundo */
  --color-nuvem-media: #90A4AE;
  /* Azul Acinzentado Médio */
  --color-nuvem-clara: #CFD8DC;
  /* Azul Acinzentado Claro */

  /* Neutros */
  --color-branco: #FFFFFF;
  --color-off-white: #FAFAFA;
  --color-preto-suave: #263238;
  --color-texto: #37474F;

  /* Legado (Cores antigas remapeadas para manter compatibilidade sem quebrar) */
  --color-azul-profundo: var(--color-marrom-profundo);
  --color-azul-medio: var(--color-marrom-medio);
  --color-ciano: var(--color-nuvem-media);
  --color-laranja: var(--color-dourado-velho);
  /* Funcionais */
  --color-destaque: var(--color-dourado-velho);
  --color-texto: var(--color-preto-suave);
  --color-fundo: var(--color-areia);
}

/* Seleção */
::selection {
  background: var(--color-dourado-velho);
  color: var(--color-branco);
}

/* Tipografia */
body {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 19px;
  line-height: 1.8;
  color: var(--color-texto);
  background-color: var(--color-fundo);
  /* Fundo de nuvens fixo para todo o site */
  background-image: url('images/clouds-background-soft.jpg');
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  background-position: center center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  /* Garantir margem zero */
}

/* Títulos */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-marrom-profundo);
  margin-bottom: 1rem;
}

/* Links */
a {
  color: var(--color-marrom-profundo);
  /* Unificando cor dos links */
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--color-dourado-velho);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header - Mantendo o que o usuário gostou, mas refinando */
.site-header {
  position: relative;
  background: url('images/clouds-full-width-v3.jpg') center center/cover no-repeat;
  min-height: 400px;
  /* Mais imponente */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  margin-bottom: 0;
  /* Remover margem inferior para evitar faixa cinza */
}

.header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Gradiente mais suave e cinematográfico */
  background: linear-gradient(to bottom, rgba(62, 44, 34, 0.3), rgba(62, 44, 34, 0.1) 50%, rgba(62, 44, 34, 0.6));
  z-index: 1;
}

.header-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  /* Efeito de vidro fosco sutil no texto */
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.site-title {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  color: var(--color-branco);
  margin: 0;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.site-title a {
  color: var(--color-branco);
}

.site-title a:hover {
  color: var(--color-dourado-suave);
}

.site-subtitle {
  display: block;
  font-size: 0.4em;
  font-weight: 400;
  margin-top: 1rem;
  letter-spacing: 4px;
  color: var(--color-dourado-suave);
  text-transform: uppercase;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 0;
  display: inline-block;
}

/* Navegação - Mais elegante e flutuante */
.main-navigation {
  background: var(--color-marrom-profundo);
  /* Usando a cor sólida solicitada */
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--color-dourado-velho);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Navigation Centering */
.main-navigation .container {
  display: flex;
  justify-content: center !important;
  /* Force center alignment */
  align-items: center;
  position: relative;
}

.nav-menu {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Mobile Menu Toggle - Hidden on Desktop */
#mobile-menu-toggle {
  display: none;
}

@media (max-width: 992px) {
  .main-navigation .container {
    justify-content: space-between !important;
  }

  #mobile-menu-toggle {
    display: block;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
  }

  .nav-menu {
    display: none;
    /* Hidden by default on mobile, toggled via JS */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-marrom-profundo);
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }

  .main-navigation.menu-open .nav-menu {
    display: flex;
  }
}

.main-navigation a {
  color: var(--color-areia);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 1px;
  position: relative;
  padding: 0.5rem 0;
}

.main-navigation a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-dourado-velho);
  transition: width 0.3s ease;
}

.main-navigation a:hover {
  color: var(--color-dourado-velho);
}

.main-navigation a:hover::after {
  width: 100%;
}

/* Conteúdo Principal */
.site-main {
  padding: 4rem 0;
  /* Cards flutuando sobre o fundo de nuvens */
}

/* Cards e Containers de Conteúdo */
.page-header,
.no-results,
.obra-card,
.barca-livro-destaque .container>div>div {
  background: rgba(255, 255, 255, 0.95);
  /* Mais opaco para leitura */
  backdrop-filter: blur(5px);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.page-header {
  padding: 3rem;
  margin-bottom: 4rem;
  text-align: center;
}

.page-title {
  font-size: 3.5rem;
  color: var(--color-marrom-profundo);
  margin-bottom: 1rem;
}

.page-description {
  font-size: 1.3rem;
  color: var(--color-marrom-suave);
  font-style: italic;
  max-width: 800px;
  margin: 0 auto;
}

/* Grid de Obras - Mosaico/Masonry */
.obras-grid {
  column-count: 3;
  column-gap: 2rem;
  margin: 3rem 0;
}

.obra-card {
  break-inside: avoid;
  margin-bottom: 2rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  background: var(--color-branco);
  border: none;
  display: inline-block;
  /* Necessário para column-count */
  width: 100%;
}

.obra-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.obra-card-image {
  /* Remover altura fixa para permitir mosaico real */
  width: 100%;
  overflow: hidden;
  position: relative;
}

.obra-card-image img {
  width: 100%;
  height: auto;
  /* Altura automática */
  display: block;
  transition: transform 0.5s ease;
}

.obra-card:hover .obra-card-image img {
  transform: scale(1.1);
}

.audio-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(62, 44, 34, 0.8);
  color: var(--color-dourado-suave);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 5px;
}

.obra-card-content {
  padding: 2rem;
}

.obra-card-title {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--color-marrom-profundo);
}

.obra-card-title a:hover {
  color: var(--color-dourado-velho);
}

.obra-card-excerpt {
  color: var(--color-marrom-medio);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.obra-card-link {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: transparent;
  color: var(--color-marrom-profundo);
  border: 1px solid var(--color-marrom-profundo);
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.obra-card-link:hover {
  background: var(--color-marrom-profundo);
  color: var(--color-branco);
}

/* Paginação */
.pagination {
  margin: 4rem 0;
  display: block;
  /* Reset flex on container */
  text-align: center;
}

.pagination .nav-links {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  text-decoration: none;
  color: var(--color-marrom-profundo);
  border: 1px solid var(--color-marrom-suave);
  font-weight: 600;
  transition: all 0.3s ease;
}

.pagination a:hover,
.pagination .current {
  background: var(--color-marrom-profundo);
  color: var(--color-branco);
  border-color: var(--color-marrom-profundo);
  transform: scale(1.1);
}

/* Footer */
.site-footer {
  background: var(--color-marrom-profundo);
  color: var(--color-areia);
  padding: 4rem 0;
  margin-top: 4rem;
  text-align: center;
  border-top: 5px solid var(--color-dourado-velho);
}

.site-footer p {
  opacity: 0.8;
  margin-bottom: 1rem;
}

.site-footer strong {
  color: var(--color-dourado-suave);
  opacity: 1;
}

/* WhatsApp Sticky Button - Redesign */
.whatsapp-float {
  position: fixed;
  bottom: 40px;
  right: 40px;
  background-color: #25d366;
  color: #FFF;
  border-radius: 50px;
  padding: 12px 24px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.whatsapp-float:hover {
  transform: translateY(-5px);
  background-color: #128C7E;
  box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.3);
}

.whatsapp-text {
  display: inline-block;
}

/* Header Alignment Fix */
.site-header {
  position: relative;
  background: url('images/clouds-full-width-v3.jpg') center center/cover no-repeat;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  margin-bottom: 0;
  text-align: center;
  /* Ensure text is centered */
}

.header-content {
  width: 100%;
  /* Ensure full width for centering */
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.site-title {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  color: var(--color-branco);
  margin: 0;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1.1;
}

/* Grid de Obras - Masonry Real Fix */
.obras-grid {
  column-count: 3;
  column-gap: 2rem;
  margin: 3rem 0;
}

.obra-card {
  break-inside: avoid;
  margin-bottom: 2rem;
  background: var(--color-branco);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  display: inline-block;
  /* Crucial for masonry */
  width: 100%;
}

.obra-card-image img {
  width: 100%;
  height: auto;
  /* Maintain aspect ratio */
  display: block;
}

/* Page Header Fix - Remove Blue/White Bars */
.page-header {
  background: transparent;
  /* Remove default background */
  padding: 3rem 0;
  margin-bottom: 3rem;
  text-align: center;
  box-shadow: none;
  /* Remove box shadow from container if present */
  border: none;
}

.page-header .page-title {
  font-size: 3.5rem;
  color: var(--color-marrom-profundo);
  margin-bottom: 1rem;
}

/* Responsividade */
@media (max-width: 992px) {
  .obras-grid {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .obras-grid {
    column-count: 1;
  }

  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    font-size: 14px;
  }

  .whatsapp-text {
    display: none;
    /* Hide text on very small screens if needed, or keep it */
  }

  .whatsapp-float svg {
    margin-right: 0;
  }
}

#mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--color-dourado-velho);
  margin: 5px 0;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .site-title {
    font-size: 2.5rem;
  }

  .container {
    padding: 0 1.5rem;
  }

  /* Ajuste Grid Mobile */
  .obras-grid {
    column-count: 1;
  }

  /* Mobile Menu Styles */
  #mobile-menu-toggle {
    display: block;
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
  }

  .main-navigation .container {
    justify-content: center;
    min-height: 60px;
  }

  /* Ensure nav-menu is hidden by default on mobile */
  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background: rgba(62, 44, 34, 0.98);
    backdrop-filter: blur(15px);
    position: absolute;
    top: 100%;
    left: 0;
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-dourado-velho);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  }

  /* If container exists, handle it too */
  .nav-menu-container {
    width: 100%;
    display: none;
    /* Hidden by default */
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(62, 44, 34, 0.98);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--color-dourado-velho);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  }

  /* When menu is open, show the menu */
  .main-navigation.menu-open .nav-menu,
  .main-navigation.menu-open .nav-menu-container {
    display: flex;
    /* Or block */
    flex-direction: column;
  }

  /* If container is used, ensure inner ul is flex */
  .main-navigation.menu-open .nav-menu-container .nav-menu {
    display: flex;
    position: relative;
    /* Reset position inside container */
    top: auto;
    left: auto;
    box-shadow: none;
    background: transparent;
    border: none;
  }

  .main-navigation ul {
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    width: 100%;
    margin: 0;
  }

  .main-navigation li {
    width: 100%;
    text-align: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
  }

  .main-navigation.menu-open li {
    opacity: 1;
    transform: translateY(0);
  }

  /* Stagger animation for items */
  .main-navigation.menu-open li:nth-child(1) {
    transition-delay: 0.1s;
  }

  .main-navigation.menu-open li:nth-child(2) {
    transition-delay: 0.2s;
  }

  .main-navigation.menu-open li:nth-child(3) {
    transition-delay: 0.3s;
  }

  .main-navigation.menu-open li:nth-child(4) {
    transition-delay: 0.4s;
  }

  .main-navigation.menu-open li:nth-child(5) {
    transition-delay: 0.5s;
  }

  .main-navigation a {
    display: block;
    padding: 1rem;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(197, 160, 101, 0.1);
    color: #FFF;
    /* Ensure text is white on dark background */
  }

  .main-navigation a:hover {
    background: rgba(197, 160, 101, 0.1);
    color: var(--color-dourado-velho);
  }

  /* Animação do Botão X */
  .main-navigation.menu-open #mobile-menu-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .main-navigation.menu-open #mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .main-navigation.menu-open #mobile-menu-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
}