/*
Theme Name: Resumos Mentais
Theme URI: https://resumosmentais.com
Author: Resumos Mentais
Author URI: https://resumosmentais.com
Description: Tema WordPress customizado para Resumos Mentais, focado em educação e mapas mentais.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: resumos-mentais
*/

/* Otimização de Legibilidade Premium */
.entry-content {
    max-width: 850px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    letter-spacing: -0.011em;
    transition: all 0.3s ease;
    scroll-margin-top: 100px;
}

/* Ajuste do Sumário no Modo Leitura */
body.reading-mode-active .toc-container {
    background-color: white !important;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

body.reading-mode-active #back-to-top {
    bottom: 2rem;
    right: 2rem;
    background-color: #facc15;
}

/* Modo de Leitura e Temas */
body.reading-mode-active {
    background-color: #f8f5f2 !important;
}

/* Modo Escuro (Global e Leitura) */
body.dark-mode {
    background-color: #0f172a !important; /* Azul marinho muito escuro em vez de preto puro */
    color: #f1f5f9 !important;
}

body.dark-mode .entry-content,
body.dark-mode .prose,
body.dark-mode .prose p,
body.dark-mode .prose span,
body.dark-mode .prose li {
    color: #f1f5f9 !important;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #ffffff !important;
}

body.dark-mode header,
body.dark-mode footer,
body.dark-mode .bg-white,
body.dark-mode .bg-blue-50,
body.dark-mode .bg-yellow-50,
body.dark-mode .bg-gray-50 {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

body.dark-mode .text-[#1a1a1a],
body.dark-mode .text-gray-900,
body.dark-mode .text-gray-800,
body.dark-mode .text-gray-700 {
    color: #f8fafc !important;
}

body.dark-mode .text-gray-600,
body.dark-mode .text-gray-500 {
    color: #cbd5e1 !important;
}

body.dark-mode .btn-sticker,
body.dark-mode article,
body.dark-mode .toc-container {
    background-color: #1e293b !important;
    border-color: #facc15 !important; /* Mantém o amarelo para destaque */
    box-shadow: 4px 4px 0 0 #0f172a !important;
}

body.dark-mode .toc-container {
    background-color: #1e293b !important;
}

body.dark-mode .marker-yellow {
    background-color: #854d0e !important; /* Amarelo escuro/ocre para não cegar */
    color: #fefce8 !important;
}

body.dark-mode .bg-blue-600 {
    background-color: #2563eb !important;
}

body.dark-mode a:not(.btn-sticker) {
    color: #60a5fa !important;
}

body.dark-mode .border-gray-200,
body.dark-mode .border-gray-100 {
    border-color: #334155 !important;
}



body.reading-mode-active #reading-progress,
body.reading-mode-active header,
body.reading-mode-active footer,
body.reading-mode-active aside,
body.reading-mode-active .related-posts,
body.reading-mode-active .comments-area,
body.reading-mode-active .author-box,
body.reading-mode-active .post-navigation,
body.reading-mode-active nav[aria-label="Breadcrumb"] {
    display: none !important;
}

body.reading-mode-active main {
    padding-top: 2rem !important;
}

body.reading-mode-active .lg\:w-2\/3 {
    width: 100% !important;
    max-width: 800px !important;
    margin: 0 auto !important;
}


/* Efeito de Lupa em Imagens com Lightbox */
.glightbox {
    position: relative;
    display: block;
}

.glightbox::after {
    content: '';
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(26, 26, 26, 0.8) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>') no-repeat center;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.glightbox:hover::after {
    opacity: 1;
}

/* Skeleton Loader */
@keyframes skeleton-loading {
    0% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.is-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.entry-content p {
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .entry-content {
        line-height: 1.8 !important;
    }
}

/* Estilos Personalizados do GLightbox - Identidade Resumos Mentais */
.glightbox-container .gslide-description {
    background: #ffffff !important;
    border-top: 4px solid #facc15 !important;
}

.glightbox-container .gslide-title {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 800 !important;
    color: #1a1a1a !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.glightbox-container .gslide-desc {
    font-family: 'Outfit', sans-serif !important;
    color: #4b5563 !important;
}

.glightbox-container .gclose, 
.glightbox-container .gnext, 
.glightbox-container .gprev {
    background-color: #1a1a1a !important;
    border: 2px solid #facc15 !important;
    border-radius: 12px !important;
    padding: 10px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 3px 3px 0 0 #facc15 !important;
}

.glightbox-container .gclose:focus, 
.glightbox-container .gnext:focus, 
.glightbox-container .gprev:focus {
    outline: 3px solid #3b82f6 !important;
    outline-offset: 4px !important;
    background-color: #facc15 !important;
    color: #1a1a1a !important;
}

.glightbox-container .gclose:hover, 
.glightbox-container .gnext:hover, 
.glightbox-container .gprev:hover {
...
    box-shadow: 1px 1px 0 0 #1a1a1a !important;
}

/* Melhorias para mobile: áreas de toque maiores */
@media (max-width: 768px) {
    .glightbox-container .gnext, 
    .glightbox-container .gprev {
        width: 50px !important;
        height: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}


.glightbox-container .gclose svg path,
.glightbox-container .gnext svg path,
.glightbox-container .gprev svg path {
    fill: currentColor !important;
    stroke: currentColor !important;
    stroke-width: 1px !important;
}

.glightbox-container .goverlay {
    background: rgba(26, 26, 26, 0.95) !important;
    backdrop-filter: blur(8px);
}

.gslide-image img {
    border: 4px solid #ffffff !important;
    border-radius: 24px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

@media (max-width: 768px) {
    .glightbox-container .gclose {
        top: 20px !important;
        right: 20px !important;
    }
}
