
/*
  ESTILOS ESPECÍFICOS DA PÁGINA DA GALERIA
*/

:root { 
    --primary-color: #c60202; 
    --whatsapp-color: #25D366; 
    --dark-color: #333; 
    --light-color: #fff; 
}

/* Garante que o seletor universal não sobreponha o box-sizing do header.css */
* { 
    box-sizing: border-box; 
}

.main-content { 
    padding: 0.1rem 5%; 
    flex-grow: 1; /* Garante que o conteúdo principal ocupe o espaço disponível */
}

.gallery-section h1 { 
    text-align: center; 
    margin-bottom: 1rem; 
    font-size: 2.5rem; 
    letter-spacing: 1px; 
    color:#c60202 ;
}

#gallery-subtext {
    text-align: center;
    margin: 0 auto 2.5rem auto;
    max-width: 700px;
    color: #555;
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.7;
    transition: opacity 0.5s;
}

.filter-buttons { text-align: center; margin-bottom: 2rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.filter-btn { border: 1px solid #ddd; background-color: var(--light-color); padding: 0.75rem 1.5rem; cursor: pointer; border-radius: 25px; font-size: 1rem; transition: all 0.3s; font-family: 'Poppins', sans-serif; }
.filter-btn:hover { background-color: #e9e9e9; }
.filter-btn.active { background-color:#02c67b; color: var(--light-color); border-color: #02c67b; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; justify-content: center; }

.quadro-item { background-color: var(--light-color); border: 1px solid #e1e1e1; box-shadow: 0 2px 8px rgba(0,0,0,0.08); transition: transform 0.3s, box-shadow 0.3s; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; }
.quadro-item:hover { transform: translateY(-5px); box-shadow: 0 6px 16px rgba(0,0,0,0.12); }
.quadro-item img { width: 100%; height: 250px; object-fit: contain; background-color: #f8f9fa; display: block; }

/* --- AJUSTE DRÁSTICO DE ESPAÇAMENTO --- */
.quadro-info { 
    padding: 0rem 1rem; /* Topo mínimo (0.2rem) | Direita/Esquerda (1rem) | Base (1rem) */
    text-align: center; 
    display: flex; 
    flex-direction: column; 
    flex-grow: 1; 
}

/* NOVO: Estilo para o Tema no Card */
.quadro-theme {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 0rem;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Espaçamentos internos zerados ou quase zerados */
.quadro-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 0; color: #333; }
.quadro-price { font-size: 1.1rem; font-weight: bold; color: var(--primary-color); margin: 0; }
.quadro-payment { font-size: 0.8rem; color: #777; margin-bottom: 0; }
.quadro-details { font-size: 0.9rem; color: #555; margin-bottom: 0.5rem; } /* Espaço apenas para afastar do botão */
.quadro-btn { background-color: #c60202; color: var(--light-color); border: none; padding: 0.75rem; border-radius: 5px; cursor: pointer; font-weight: bold; text-transform: uppercase; margin-top: auto; transition: background-color 0.3s; }
.quadro-btn:hover { background-color: #9a0101; }

.artist-quote {
    font-size: 0.8rem;
    font-style: italic;
    color: #888;
    margin-top: 0.5rem; /* Espaço mínimo após o botão */
    padding: 0;
}

#main-whatsapp-fab { position: fixed; bottom: 20px; right: 20px; background-color: var(--whatsapp-color); width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center; box-shadow: 0 4px 12px rgba(0,0,0,0.3); z-index: 999; transition: transform 0.3s ease; }
#main-whatsapp-fab:hover { transform: scale(1.1); }
#main-whatsapp-fab svg { fill: white; }

.modal { display: none; position: fixed; z-index: 1001; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.9); justify-content: center; align-items: center; animation: fadeIn 0.3s; }
.modal-content { display: flex; width: 90%; max-width: 1200px; height: 85vh; background-color: var(--light-color); position: relative; box-shadow: 0 5px 20px rgba(0,0,0,0.4); }
.modal-left { flex: 2; background-color: #000; position: relative; display: flex; justify-content: center; align-items: center; }
.media-container, .media-wrapper, .media-wrapper video, .media-wrapper img { position: absolute; width: 100%; height: 100%; top: 0; left: 0; object-fit: contain; }
.media-wrapper { opacity: 0; transition: opacity 0.4s ease-in-out; }
.media-wrapper.media-active { opacity: 1; }
.prev-btn, .next-btn { cursor: pointer; position: absolute; top: 50%; transform: translateY(-50%); color: white; font-size: 2rem; background-color: rgba(0,0,0,0.3); border: none; border-radius: 50%; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; z-index: 15; }
.prev-btn { left: 10px; }
.next-btn { right: 10px; }
.dots-container { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 15; }
.dot { width: 10px; height: 10px; border-radius: 50%; background-color: rgba(255,255,255,0.5); cursor: pointer; transition: background-color 0.3s; }
.dot.active { background-color: var(--light-color); }

#mute-btn { position: absolute; bottom: 20px; right: 20px; z-index: 10; background-color: rgba(0, 0, 0, 0.4); color: white; border: none; border-radius: 50%; width: 40px; height: 40px; font-size: 1rem; cursor: pointer; display: flex; justify-content: center; align-items: center; transition: background-color 0.3s; }
#mute-btn:hover { background-color: rgba(0, 0, 0, 0.7); }
#mute-btn.muted::before { content: '\f6a9'; }
#mute-btn::before { content: '\f028'; font-family: "Font Awesome 6 Free"; font-weight: 900; }

.modal-right { flex: 1; padding: 2rem; overflow-y: auto; display: flex; flex-direction: column; }

/* --- ESTILOS DO POPUP (MODAL) --- */

/* NOVO: Estilo para o Tema no Popup */
#popup-theme {
    text-align: center;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    font-weight: 600;
}

/* TÍTULO */
#popup-title { 
    margin-bottom: 1rem; 
    font-size: 1.8rem; 
    font-weight: 700; 
    text-align: center; 
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* DESCRIÇÃO (INTRO) - CORREÇÃO DOS BURACOS E ALINHAMENTO */
#popup-intro { 
    line-height: 1.6; 
    color: #333; 
    width: 85%; 
    margin: 0 auto 2rem auto; 
    
    /* JUSTIFICAÇÃO COM ÚLTIMA LINHA À ESQUERDA */
    text-align: justify; 
    text-align-last: left; /* <-- AQUI ESTÁ A CORREÇÃO QUE VOCÊ PEDIU */
    
    /* HIFENIZAÇÃO: Quebra palavras para evitar buracos */
    hyphens: auto; 
    -webkit-hyphens: auto; 
    -ms-hyphens: auto;
    
    word-spacing: -1px; 
    
    font-style: normal; 
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    padding: 0 0 1rem 0;
    border-bottom: 1px solid #eee; 
}

.poem-container { position: relative; margin-bottom: 1.5rem; }

/* POEMA */
.poem-placeholder, #popup-poem { 
    font-family: 'Poppis', serif; 
    font-style: italic; 
    line-height: 1.6; 
    white-space: pre-wrap; 
    text-align: center; 
    font-size: 1.1rem; 
    color: #555;
    margin: 0; 
}

.poem-placeholder { color: transparent; }
#popup-poem { position: absolute; top: 0; left: 0; width: 100%; height: 100%; color: #444; background-color: var(--light-color); }

.info-section { border-top: 1px solid #eee; padding-top: 1rem; margin-top: 1rem; }
.info-toggle { display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-family: 'Georgia', serif; font-size: 1.1rem; font-weight: 600; color: #4a4a4a; padding-bottom: 10px; }
.info-toggle i { transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); font-size: 1rem; }
.info-section.active .info-toggle i { transform: rotate(180deg); }

.info-content { max-height: 0; overflow: hidden; transition: max-height 0.5s ease-out, padding-top 0.5s ease-out; }
.info-section.active .info-content { max-height: 100vh; padding-top: 1rem; }

.concept-content { line-height: 1.7; font-size: 0.95rem; white-space: pre-wrap; text-align: justify; -webkit-hyphens: auto; hyphens: auto; }
.color-palette { display: grid; grid-template-columns: repeat(auto-fit, minmax(50px, 1fr)); gap: 15px; }

.color-dot { width: 50px; height: 50px; border-radius: 50%; cursor: pointer; border: 3px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.2); transition: all 0.3s; justify-self: center; }
.color-dot.active { border-color: var(--primary-color); transform: scale(1.15); }

.color-meaning { margin-top: 1.5rem; padding: 1rem; background-color: #f0f4f8; border-radius: 5px; font-size: 0.95rem; line-height: 1.6; color: #333; min-height: 70px; transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out; opacity: 0; transform: translateY(-10px); border-left: 4px solid var(--primary-color); }
.color-meaning.visible { opacity: 1; transform: translateY(0); }

#popup-price-section { margin-top: auto; padding-top: 1.5rem; border-top: 1px solid #eee; text-align: center; }
#popup-price { font-size: 1.5rem; font-weight: bold; color: var(--primary-color); }
#popup-payment { font-size: 1rem; color: #777; margin-bottom: 0.5rem; }
#popup-details { font-size: 1rem; color: #555; }

.popup-disclaimer { display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-size: 0.85rem; color: #666; margin-top: 1rem; margin-bottom: 1rem; font-weight: 600; }

.whatsapp-link { display: flex; align-items: center; justify-content: center; gap: 0.8rem; padding: 1rem; background-color: var(--whatsapp-color); color: var(--light-color); text-decoration: none; font-weight: bold; border-radius: 8px; }
.whatsapp-link svg { width: 24px; height: 24px; fill: var(--light-color); }
#suggestions-section { padding-top: 1.5rem; border-top: 1px solid #eee; }
#suggestions-section h3 { text-align: center; margin-bottom: 1rem; color: #333; font-weight: 600; }
.suggestions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1rem; }
.suggestion-item { cursor: pointer; border-radius: 5px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,0.1); transition: transform 0.3s; }
.suggestion-item:hover { transform: translateY(-5px); }
.suggestion-item img { width: 100%; height: 100px; object-fit: cover; display: block; }
.suggestion-item p { padding: 0.5rem; font-size: 0.8rem; text-align: center; background-color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.close-btn { position: absolute; top: 15px; right: 35px; color: var(--dark-color); font-size: 40px; font-weight: bold; cursor: pointer; z-index: 1002; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 992px) { .modal-content { flex-direction: column; height: 95vh; width: 95%; } .modal-left, .modal-right { flex: none; } .modal-left { height: 50%; } .modal-right { height: 50%; } .close-btn { color: white; right: 15px; top: 10px; text-shadow: 0 0 5px black; } }
@media (max-width: 768px) { .modal-content { width: 100%; height: 100%; border-radius: 0; } .modal-left { height: 45%; } .modal-right { height: 55%; padding: 1.5rem; } #popup-title { font-size: 1.4rem; } #popup-price { font-size: 1.2rem; } .whatsapp-link { padding: 0.8rem; } }
