:root {
    /* Esquema Claro */
    --light-bg: #f8f9fa; /* Branco suave */
    --light-surface: #ffffff; /* Branco puro */
    --brand-orange: #f97316; /* Laranja (mantido) */
    --text-dark: #212529; /* Cinza bem escuro (quase preto) */
    --text-muted-dark: #6c757d; /* Cinza médio */
    --border-color-light: rgba(0, 0, 0, 0.08); /* Cor da borda sutil */
    --shadow-color-light: rgba(0, 0, 0, 0.1); /* Cor da sombra */
    --gap: 1rem;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg); /* Fundo claro */
    /* Remove a grade sutil no tema claro ou ajusta a cor */
    background-image: linear-gradient(to right, rgba(0,0,0,0.01) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(0,0,0,0.01) 1px, transparent 1px);
    background-size: 40px 40px;
    color: var(--text-dark); /* Texto escuro */
    overflow-x: hidden;
    /* Animação de fundo pode ser removida ou ajustada */
    /* animation: animated-bg 4s linear infinite; */
}

/* @keyframes animated-bg {
    from { background-position: 0 0; }
    to { background-position: 80px 80px; }
} */

/* --- Preloader --- */
#preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--light-bg); display: flex; justify-content: center; align-items: center; z-index: 9999; transition: opacity 0.5s ease-out, visibility 0.5s ease-out; cursor: pointer; }
#preloader.hidden { opacity: 0; visibility: hidden; }
.preloader-text { font-size: 2rem; font-weight: 900; color: var(--text-dark); letter-spacing: 0.2em; animation: text-appear 1s cubic-bezier(0.19, 1, 0.22, 1) forwards; }

@keyframes text-appear {
    0% { filter: blur(12px); opacity: 0; }
    70%, 100% { filter: blur(0); opacity: 1; }
}

/* --- Main Content --- */
#main-content { opacity: 0; transition: opacity 0.6s ease-in; }
main { padding-top: 80px; }

/* --- Header --- */
#header { 
    background: rgba(255, 255, 255, 0.7); /* Fundo branco translúcido */
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
    border-bottom: 1px solid var(--border-color-light); 
}
.nav-link { color: var(--text-muted-dark); transition: color 0.3s; } /* Texto do menu */

/* 🚀 CORREÇÃO AQUI: Aumentando a especificidade para garantir a cor laranja */
#header .nav-link:hover, 
#header .nav-link.active { 
    color: var(--brand-orange) !important; 
}

#header a.page-link { color: var(--text-dark); } /* Cor do título WESLEN.ARTE */
#header .lang-switcher { color: var(--text-muted-dark); }
#header .lang-switcher.text-orange-500 { color: var(--brand-orange); } /* Cor do idioma ativo */
#header span.text-gray-600 { color: var(--text-muted-dark);}
#header .text-white { color: var(--text-dark); } /* Ícone do menu mobile */
#header a[target="_blank"] { color: var(--text-muted-dark); } /* Ícone do Instagram */
#header a[target="_blank"]:hover { color: var(--brand-orange); }

/* --- Homepage Puzzle Grid --- */
.puzzle-grid { display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(4, 20vh); gap: var(--gap); padding: 1rem; min-height: 100vh; }
.puzzle-item { 
    overflow: hidden; 
    border-radius: 8px; 
    box-shadow: 0 10px 20px var(--shadow-color-light); /* Sombra mais suave */
    opacity: 0; 
    transform-style: preserve-3d; 
    transition: opacity 1s ease-out, transform 1s cubic-bezier(0.19, 1, 0.22, 1), box-shadow 0.4s ease; 
}
.puzzle-item img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; transition: transform 0.6s ease; }
.puzzle-item:hover img { transform: scale(1.08); }
.puzzle-item:hover { box-shadow: 0 15px 30px var(--shadow-color-light); z-index: 10; } /* Sombra no hover */
.puzzle-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.puzzle-item:nth-child(2) { grid-column: span 2; grid-row: span 1; }
.puzzle-item:nth-child(3) { grid-column: span 2; grid-row: span 2; }
.puzzle-item:nth-child(4) { grid-column: span 1; grid-row: span 2; }
.puzzle-item:nth-child(5) { grid-column: span 3; grid-row: span 2; }
.puzzle-item:nth-child(6) { grid-column: span 2; grid-row: span 2; }

@media (max-width: 768px) {
    main { padding-top: 70px; }
    .puzzle-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(auto-fill, 30vh); gap: 0.5rem; padding: 0.5rem; }
    .puzzle-item:nth-child(n) { grid-column: span 1; grid-row: span 1; }
    .puzzle-item:nth-child(3), .puzzle-item:nth-child(5) { grid-row: span 2; }
}

/* --- Lightbox Modal --- */
#lightbox { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(248, 249, 250, 0.8); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s; padding: 1rem; }
#lightbox.active { opacity: 1; visibility: visible; }
#lightbox-content { display: flex; width: 100%; height: 100%; max-width: 90vw; max-height: 90vh; background-color: var(--light-surface); border-radius: 8px; overflow: hidden; transform: scale(0.9); transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1); box-shadow: 0 15px 40px rgba(0,0,0,0.15); }
#lightbox.active #lightbox-content { transform: scale(1); }

/* [MUDANÇA AQUI] Estilos para o wrapper de mídia */
#lightbox-media-wrapper { 
    flex: 2; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background-color: var(--light-bg); 
    position: relative; 
    overflow: hidden; 
}
#lightbox-media-wrapper .hidden {
    display: none;
}
#lightbox-media-wrapper img,
#lightbox-media-wrapper iframe {
    max-width: 100%;
    max-height: 100%;
    display: block;
}
#lightbox-media-wrapper iframe {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
}
/* Fim da MUDANÇA */

#lightbox-details { flex: 1; padding: 2rem; overflow-y: auto; display: flex; flex-direction: column; background-color: var(--light-surface); } /* Fundo dos detalhes branco */
#lightbox-details-title { font-size: 1.75rem; font-weight: 700; color: var(--text-dark); margin-bottom: 1rem; } /* Título escuro */
#lightbox-details-description { color: var(--text-muted-dark); line-height: 1.6; padding-top: 1.5rem; border-top: 1px solid var(--border-color-light); } /* Descrição cinza, borda clara */
.lightbox-nav { position: absolute; top: 50%
; transform: translateY(-50%); color: var(--text-dark); background: rgba(255,255,255,0.5); border-radius: 50%; padding: 0.75rem; cursor: pointer; transition: background 0.3s, opacity 0.3s; opacity: 0.7; z-index: 15; } /* Navegação com fundo branco translúcido */
.lightbox-nav:hover { background: rgba(255,255,255,0.8); opacity: 1; }
#lightbox-prev { left: 1rem; }
#lightbox-next { right: 1rem; }
#lightbox-close { position: absolute; top: 1rem; right: 1rem; color: var(--text-muted-dark); cursor: pointer; z-index: 20; transition: color 0.3s; } /* Fechar cinza */
#lightbox-close:hover { color: var(--text-dark); } /* Fechar mais escuro no hover */
#lightbox-actions { display: flex; gap: 1.5rem; color: var(--text-muted-dark); margin-bottom: 1.5rem; align-items: center; } /* Ações cinza */
.lightbox-action { cursor: pointer; transition: color 0.3s, transform 0.3s; }
.lightbox-action:hover { color: var(--brand-orange); transform: scale(1.1); }
#like-button { display: flex; align-items: center; gap: 0.5rem; }
#like-button.liked svg { color: rgb(239 68 68); fill: currentColor; }
@media (max-width: 1024px) { #lightbox-content { flex-direction: column; } #lightbox-details { flex-basis: 40%; } }

/* --- Gallery Page Grid --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--gap);
}
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}
 @media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: 1fr; 
    }
}
.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: box-shadow 0.4s ease;
    aspect-ratio: 4 / 5; 
    background-color: var(--light-surface); /* Fundo branco para os cards */
    box-shadow: 0 4px 10px var(--shadow-color-light); /* Sombra sutil */
}
.gallery-card:hover { 
    box-shadow: 0 8px 20px var(--shadow-color-light); /* Sombra mais forte no hover */
    z-index: 10;
}
.gallery-card img { 
    width: 100%;
    height: 100%;
    object-fit: cover; 
    cursor: pointer; 
    transition: transform 0.4s ease; 
}
.gallery-card:hover img { transform: scale(1.05); }
.card-title-overlay { 
    position: absolute; 
    bottom: 0; left: 0; right: 0; 
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); /* Fundo escuro para contraste */
    color: white; /* Texto branco no overlay */
    padding: 1.5rem 1rem 1rem; 
    opacity: 0; 
    transform: translateY(10px); 
    transition: opacity 0.4s ease, transform 0.4s ease; 
    font-weight: 500;
}
.gallery-card:hover .card-title-overlay { opacity: 1; transform: translateY(0); }

/* --- Filter buttons --- */
.filter-btn { 
    background-color: transparent; 
    border: 1px solid var(--text-muted-dark); /* Borda cinza */
    color: var(--text-muted-dark); /* Texto cinza */
    transition: all 0.3s ease; 
    padding: 0.375rem 1rem; 
    border-radius: 9999px; 
    font-size: 0.875rem; 
}
.filter-btn:hover {
    background-color: var(--brand-orange); 
    border-color: var(--brand-orange); 
    color: white; 
    transform: translateY(-2px); 
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}
.filter-btn.active { 
    background-color: var(--brand-orange); 
    border-color: var(--brand-orange); 
    color: white; 
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

/* --- Mobile Menu --- */
#mobile-menu { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(248, 249, 250, 0.95); backdrop-filter: blur(10px); z-index: 100; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2rem; transform: translateY(-100%); transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1); }
#mobile-menu.active { transform: translateY(0); }
#mobile-menu .nav-link { font-size: 1.5rem; color: var(--text-dark); } /* Texto escuro no menu mobile */
#mobile-menu .nav-link.active { color: var(--brand-orange); }
#mobile-menu-close { position: absolute; top: 1.5rem; right: 1.5rem; color: var(--text-dark); }

/* --- Scroll to top button --- */
#scroll-to-top { position: fixed; bottom: 2rem; right: 2rem; background: var(--brand-orange); color: white; border-radius: 50%; padding: 0.75rem; box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(20px); transition: opacity 0.3s, visibility 0.3s, transform 0.3s; z-index: 500; }
#scroll-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* --- Footer --- */
#footer { 
    background: rgba(255, 255, 255, 0.7); /* Branco translúcido */
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
    border-top: 1px solid var(--border-color-light); 
}
#footer p { color: var(--text-muted-dark); } /* Texto cinza no rodapé */
#footer a { color: var(--text-muted-dark); } /* Ícones cinza no rodapé */
#footer a:hover { color: var(--brand-orange); }

/* Ajustes finos para tema claro */
#donate .bg-dark-surface { background-color: var(--light-surface); box-shadow: 0 4px 10px var(--shadow-color-light);}
#donate .border-gray-800 { border-color: var(--border-color-light); }
#donate .text-gray-300 { color: var(--text-muted-dark); }
#about-me .text-gray-400 { color: var(--text-muted-dark); } /* Texto "Sobre Mim" */