/* ========================================
   A ARTE DO COTIDIANO - CSS COMPLETO
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Merriweather:wght@300;400&display=swap');

/* ===== RESET E VARIÁVEIS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bege-vintage: #f5f0e1;
    --marrom-escuro: #5d4037;
    --dourado: #8b7500;
    --bege-claro: #e8e1c9;
    --bege-medio: #f9f5e9;
    --dourado-claro: #d4a76a;
    --vermelho: #f44336;
    --verde: #4caf50;
    --azul: #2196f3;
    --laranja: #ff9800;
}

/* ===== ESTILOS GERAIS ===== */
body {
    font-family: 'Merriweather', serif;
    background: var(--bege-vintage);
    color: #3e3a33;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* HEADER - UMA LINHA SÓ */
header {
    background: rgba(255, 253, 240, 0.95);
    border-bottom: 3px solid #9a7b4f;
    box-shadow: 0 2px 10px rgba(44, 36, 22, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    gap: 20px;
}

/* LOGO + TEXTO */
.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    flex-shrink: 0; /* Não encolhe */
}

.logo-img {
    height: 60px;
    width: auto;
    border-radius: 5px;
}

.logo-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: #2c2416;
    margin: 0;
    line-height: 1.2;
    font-weight: 700;
}

.logo-text span {
    font-size: 0.85rem;
    color: #9a7b4f;
    font-style: italic;
    display: block;
    margin-top: 2px;
}

/* MENU - UMA LINHA */
.menu {
    display: flex;
    list-style: none;
    gap: 8px; /* Reduzi o gap */
    margin: 0;
    padding: 0;
    align-items: center;
    flex-wrap: nowrap; /* Força uma linha */
}

.menu > li {
    position: relative;
    display: inline-block;
    white-space: nowrap;
}

.menu > li > a {
    display: inline-block;
    padding: 10px 18px; /* Reduzi padding */
    background: linear-gradient(145deg, #9a7b4f, #7a623f);
    color: #fffef0;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.88rem; /* Fonte menor */
    transition: all 0.3s;
    box-shadow: 0 3px 5px rgba(154, 123, 79, 0.4), inset 0 1px 0 rgba(255,255,255,0.3);
    border: 2px solid #c9b896;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    text-align: center;
    white-space: nowrap;
}

.menu > li > a:hover,
.menu > li > a.active {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(154, 123, 79, 0.5), inset 0 1px 0 rgba(255,255,255,0.4);
    background: linear-gradient(145deg, #aa8b5f, #8a7249);
}

/* Botão Área do Autor - menor */
.btn-autor {
    background: linear-gradient(145deg, #5a7b6f, #4a655f) !important;
    border-color: #7a9b8f !important;
    padding: 10px 16px !important;
    font-size: 0.85rem !important;
}

.btn-autor:hover {
    background: linear-gradient(145deg, #6a8b7f, #5a756f) !important;
    box-shadow: 0 5px 10px rgba(90, 123, 111, 0.5) !important;
}

/* DROPDOWN */
.dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 253, 240, 0.98);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(44, 36, 22, 0.2);
    border-radius: 8px;
    z-index: 1000;
    border: 2px solid #c9b896;
    overflow: hidden;
}

.has-dropdown:hover .dropdown {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.dropdown li a {
    padding: 10px 18px;
    color: #2c2416;
    text-decoration: none;
    display: block;
    transition: all 0.3s;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 0.88rem;
}

.dropdown li a:hover {
    background: rgba(154, 123, 79, 0.15);
    padding-left: 23px;
}

/* RESPONSIVO */
@media (max-width: 1200px) {
    .logo-text h1 {
        font-size: 1.4rem;
    }
    
    .menu > li > a {
        padding: 9px 15px;
        font-size: 0.85rem;
    }
}

@media (max-width: 992px) {
    .logo-text h1 {
        font-size: 1.2rem;
    }
    
    .logo-text span {
        display: none; /* Esconde subtítulo em telas menores */
    }
    
    .logo-img {
        height: 50px;
    }
    
    .menu > li > a {
        padding: 8px 12px;
        font-size: 0.82rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
    }
    
    .menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 253, 240, 0.98);
        flex-direction: column;
        padding: 15px;
        box-shadow: 0 4px 6px rgba(44, 36, 22, 0.15);
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .menu.active {
        display: flex;
    }
    
    .menu > li {
        width: 100%;
    }
    
    .menu > li > a {
        width: 100%;
        text-align: center;
        padding: 12px 15px;
    }
    
    .menu-toggle {
        display: block !important;
    }
    
    .dropdown {
        position: static;
        transform: none;
        display: none;
        margin-top: 5px;
        box-shadow: none;
        border: 1px solid #c9b896;
    }
    
    .has-dropdown:hover .dropdown {
        display: block;
        animation: none;
    }
}
/* RESPONSIVO - MENU MOBILE */
@media (max-width: 1024px) {
    .menu {
        gap: 10px;
    }
    
    .menu > li > a {
        padding: 10px 18px;
        font-size: 0.9rem;
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 253, 240, 0.98);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 6px rgba(44, 36, 22, 0.15);
        gap: 10px;
    }
    
    .menu.active {
        display: flex;
    }
    
    .menu > li {
        width: 100%;
    }
    
    .menu > li > a {
        width: 100%;
        text-align: center;
        padding: 15px 20px;
        min-width: auto;
    }
    
    .dropdown {
        position: static;
        transform: none;
        display: none;
        margin-top: 5px;
        box-shadow: none;
        border: 1px solid #c9b896;
    }
    
    .has-dropdown:hover .dropdown {
        display: block;
        animation: none;
    }
    
    .dropdown li a {
        padding: 10px 15px;
    }
    
    .dropdown li a:hover {
        padding-left: 20px;
    }
}

/* ===== BANNER ===== */
.page-banner {
    background: linear-gradient(rgba(93, 64, 55, 0.85), rgba(93, 64, 55, 0.9)), 
                url('images/banners/banner-default.jpg');
    background-size: cover;
    background-position: center;
    color: var(--bege-vintage);
    text-align: center;
    padding: 80px 20px;
    margin-bottom: 40px;
}

.page-banner h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.page-banner p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .page-banner h1 { 
        font-size: 2.2rem; 
    }
}

/* ===== SEÇÕES ===== */
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--marrom-escuro);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: "✧";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: var(--dourado);
}

/* ===== BOTÕES ===== */
.btn-primary {
    display: inline-block;
    background: var(--dourado);
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: #6d5a00;
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--dourado);
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid var(--dourado);
}

.btn-secondary:hover {
    background: var(--dourado);
    color: white;
}

/* ===== ALERTAS ===== */
.alert {
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.alert-warning {
    background: #fff3e0;
    color: #e65100;
    border-left: 4px solid #e65100;
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid #1565c0;
}

/* ===== CARDS ===== */
.card {
    background: white;
    border: 2px solid var(--dourado-claro);
    border-radius: 8px;
    padding: 25px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* ===== FOOTER ===== */
footer {
    background: var(--marrom-escuro);
    color: var(--bege-vintage);
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}

footer p { 
    margin: 10px 0; 
}

footer a {
    color: var(--dourado-claro);
    text-decoration: none;
}

footer a:hover { 
    text-decoration: underline; 
}

/* ===== FORMULÁRIOS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--marrom-escuro);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--dourado-claro);
    border-radius: 5px;
    font-family: 'Merriweather', serif;
    font-size: 1rem;
    color: #3e3a33;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--dourado);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* ===== GRID SYSTEM ===== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-auto {
        grid-template-columns: 1fr;
    }
}

/* ===== UTILITIES ===== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-40 {
    margin-top: 40px;
}

.mb-40 {
    margin-bottom: 40px;
}

.hidden {
    display: none;
}

/* ===== LOADING ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(139, 117, 0, 0.3);
    border-radius: 50%;
    border-top-color: var(--dourado);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--dourado-claro);
}

.modal-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--marrom-escuro);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dourado);
}

/* ===== SLIDER ===== */
.slider-container {
    position: relative;
    max-width: 1000px;
    margin: 40px auto;
    overflow: hidden;
    border: 8px solid var(--dourado-claro);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    background: white;
}

.slider {
    display: flex;
    transition: transform 0.5s ease;
}

.slide {
    min-width: 100%;
    padding: 40px;
    background: linear-gradient(135deg, var(--bege-vintage) 0%, var(--bege-claro) 100%);
    text-align: center;
}

.slide img {
    max-width: 100%;
    height: 400px;
    object-fit: cover;
    border: 3px solid var(--dourado-claro);
    margin-bottom: 20px;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.1);
}

.slide h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--marrom-escuro);
    margin-bottom: 15px;
}

.slide p {
    font-size: 1.1rem;
    color: #6d6147;
    max-width: 600px;
    margin: 0 auto 20px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(139, 117, 0, 0.8);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    transition: background 0.3s;
}

.slider-btn:hover {
    background: rgba(139, 117, 0, 1);
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

/* ===== TABELAS ===== */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th,
td {
    border: 1px solid var(--dourado-claro);
    padding: 12px;
    text-align: left;
}

th {
    background: var(--bege-medio);
    color: var(--dourado);
    font-weight: 600;
}

tr:nth-child(even) {
    background: var(--bege-vintage);
}

tr:hover {
    background: var(--bege-claro);
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-error {
    background: #ffebee;
    color: #c62828;
}

.badge-warning {
    background: #fff3e0;
    color: #e65100;
}

.badge-info {
    background: #e3f2fd;
    color: #1565c0;
}

/* ===== PAGINAÇÃO ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 15px;
    background: white;
    border: 2px solid var(--dourado-claro);
    color: var(--marrom-escuro);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.pagination a:hover,
.pagination .active {
    background: var(--dourado);
    color: white;
    border-color: var(--dourado);
}

/* ===== ICONES ===== */
.icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* ===== ANIMAÇÕES ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* ===== PRINT ===== */
@media print {
    header, footer, .no-print {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
}