/* ==========================================================
   Poeta Brasileiro - Custom Styles & Responsive Architecture
   Design System: Literary Cerrado Modernism
   ========================================================== */

:root {
    --color-primary: #8d4b00;
    --color-primary-accent: #d97706;
    --color-primary-dark: #6e3900;
    --color-secondary: #166534;
    --color-secondary-dark: #144625;
    --color-secondary-light: #22c55e;
    --color-bg-paper: #FAFAF7;
    --color-surface: #ffffff;
    --color-surface-variant: #f4ede4;
    --color-ink: #121c2a;
    --color-ink-subtle: #4B5563;
    --color-border: #e8e1d7;
}

/* Base HTML & Body Safety */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--color-bg-paper);
    color: var(--color-ink);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Texturas e Efeitos de Fundo */
.noise-bg {
    position: relative;
}

.noise-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    z-index: 0;
}

/* Tipografia */
.font-display {
    font-family: 'Playfair Display', Georgia, serif;
    letter-spacing: -0.015em;
}

.font-body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Sombras suaves e elegantes */
.soft-shadow {
    box-shadow: 0 8px 24px -4px rgba(18, 28, 42, 0.06), 0 2px 6px -1px rgba(18, 28, 42, 0.04);
}

.soft-shadow-hover {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.soft-shadow-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px -6px rgba(141, 75, 0, 0.12), 0 4px 12px -2px rgba(18, 28, 42, 0.06);
}

/* Linha decorativa orgânica do Cerrado */
.cerrado-divider {
    height: 3px;
    background: linear-gradient(90deg, #d97706 0%, #166534 50%, #d97706 100%);
    border-radius: 9999px;
}

/* Scrollbar Customizada */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: #f1ede8;
}

::-webkit-scrollbar-thumb {
    background: #d97706;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b15f00;
}

/* Ocultar barra de scroll em elementos swipeáveis (filtros mobile) */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.animate-fade-in {
    animation: fadeIn 0.35s ease-out forwards;
}

.animate-slide-in {
    animation: slideInRight 0.3s ease-out forwards;
}

/* Acessibilidade - Alto Contraste */
body.high-contrast {
    background-color: #000000 !important;
    color: #ffffff !important;
}

body.high-contrast .bg-background-paper,
body.high-contrast .bg-white,
body.high-contrast .bg-surface-variant {
    background-color: #121212 !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

body.high-contrast .text-ink-subtle,
body.high-contrast .text-gray-600,
body.high-contrast .text-gray-500 {
    color: #e5e5e5 !important;
}

body.high-contrast a {
    color: #fde047 !important;
}

/* Modal Leitor de PDF */
#pdf-modal {
    transition: opacity 0.3s ease;
}

/* ==========================================================
   Menus Drop-down Modernos (Comportamento Síncrono Puro)
   ========================================================== */
.dropdown-wrapper {
    position: relative;
}

.dropdown-wrapper .dropdown-menu {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(8px) !important;
    pointer-events: none !important;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s !important;
    z-index: 60 !important;
}

.dropdown-wrapper:hover > .dropdown-menu,
.dropdown-wrapper:focus-within > .dropdown-menu,
.dropdown-wrapper.is-open > .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

.dropdown-wrapper:hover .dropdown-arrow,
.dropdown-wrapper:focus-within .dropdown-arrow,
.dropdown-wrapper.is-open .dropdown-arrow {
    transform: rotate(180deg);
}

/* Evitar zoom automático irritante no iPhone em formulários */
@media screen and (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

