/* ========================================
   STYLE.CSS - Descobrindo Tombadouro
   Design moderno, responsivo e acessível
   ======================================== */

/* ========== VARIÁVEIS CSS ========== */
:root {
    /* PALETA DE CORES */
    --color-primary: #8B6F47;        /* Marrom quente */
    --color-secondary: #D4AF37;      /* Dourado */
    --color-accent: #6B8E23;         /* Verde terra */
    --color-dark: #2D2D2D;           /* Escuro profundo */
    --color-light: #F5F1E8;          /* Bege claro */
    --color-white: #FFFFFF;
    --color-text: #3D3D3D;
    --color-highlight: #D2691E;      /* Laranja-marrom */
    
    /* TIPOGRAFIA */
    --font-primary: 'Poppins', 'Segoe UI', sans-serif;
    --font-secondary: 'Georgia', serif;
    
    /* ESPAÇAMENTO */
    --spacing-unit: 1rem;
    --spacing-xs: calc(var(--spacing-unit) * 0.25);
    --spacing-sm: calc(var(--spacing-unit) * 0.5);
    --spacing-md: calc(var(--spacing-unit) * 1);
    --spacing-lg: calc(var(--spacing-unit) * 2);
    --spacing-xl: calc(var(--spacing-unit) * 3);
    --spacing-xxl: calc(var(--spacing-unit) * 4);
    
    /* TRANSIÇÕES E ANIMAÇÕES */
    --transition-smooth: all 0.3s ease;
    --transition-slow: all 0.6s ease;
}

/* ========== RESET E ESTILOS GLOBAIS ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    background-color: var(--color-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ========== HEADER ========== */
.header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark) 100%);
    color: var(--color-white);
    padding: 3px 10px;
    position: relative;
    z-index: 100;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    font-family: var(--font-secondary);
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.logo h1 {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0;
    display: block;
}

.logo-icon {
    font-size: 1.5rem;
    animation: none;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.nav {
    display: flex;
    gap: 5px;
    list-style: none;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--color-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.75rem;
    position: relative;
    transition: var(--transition-smooth);
    padding: 3px 6px;
    border-radius: 3px;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(212, 175, 55, 0.3);
    color: var(--color-secondary);
}

.nav-link::after {
    display: none;
}

/* ========== HERO SECTION E CARROSSEL ========== */
.hero {
    margin-top: 0;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.carousel-container {
    width: 100%;
    height: 450px;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.slide-content {
    text-align: center;
    color: white;
    text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.5);
    animation: slideInUp 0.8s ease;
    backdrop-filter: blur(5px);
}

.slide-content h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    font-family: var(--font-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.slide-content p {
    font-size: 1.2rem;
    font-weight: 300;
    max-width: 500px;
    letter-spacing: 0.5px;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Botões de navegação do carrossel */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.carousel-btn:hover {
    background-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
    border-color: var(--color-secondary);
}

.carousel-btn.prev {
    left: var(--spacing-lg);
}

.carousel-btn.next {
    right: var(--spacing-lg);
}

/* Indicadores do carrossel */
.carousel-indicators {
    position: absolute;
    bottom: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--spacing-sm);
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.indicator.active {
    background-color: var(--color-secondary);
    width: 28px;
    border-radius: 6px;
    border-color: var(--color-secondary);
}

/* ========== SEÇÃO DE ATALHOS ========== */
.shortcuts {
    padding: var(--spacing-xxl) 0;
    background: linear-gradient(135deg, var(--color-white) 0%, var(--color-light) 100%);
}

.section-title {
    font-size: 2.3rem;
    text-align: center;
    margin-bottom: var(--spacing-xxl);
    color: var(--color-primary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--spacing-lg);
}

.card {
    background: linear-gradient(135deg, var(--color-white) 0%, rgba(212, 175, 55, 0.05) 100%);
    border-radius: 20px;
    padding: var(--spacing-xl);
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    transition: left 0.5s ease;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border-color: var(--color-secondary);
}

.card-icon {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
    transition: var(--transition-smooth);
    display: block;
}

.card:hover .card-icon {
    transform: scale(1.2) rotate(-8deg);
    animation: bounce 0.5s ease;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
    font-weight: 700;
}

.card p {
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ========== CONTEÚDO PRINCIPAL DAS PÁGINAS ========== */
.main-content {
    padding: var(--spacing-xxl) 0;
    min-height: calc(100vh - 300px);
}

.page-title {
    font-size: 3rem;
    text-align: center;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    font-family: var(--font-secondary);
    font-weight: 700;
}

.page-subtitle {
    font-size: 1.2rem;
    text-align: center;
    color: var(--color-highlight);
    margin-bottom: var(--spacing-xxl);
    font-style: italic;
}

/* ========== PÁGINA DE LENDAS ========== */
.legends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xxl);
}

.legend-card {
    background: var(--color-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: var(--transition-smooth);
    border: 2px solid transparent;
}

.legend-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    border-color: var(--color-secondary);
}

.legend-image {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.legend-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    transition: var(--transition-smooth);
}

.legend-card:hover .legend-image::after {
    background: rgba(0, 0, 0, 0.2);
}

.legend-emoji {
    font-size: 4rem;
    animation: float 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

.legend-content {
    padding: var(--spacing-lg);
}

.legend-content h3 {
    font-size: 1.4rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
    font-weight: 700;
}

.legend-content p {
    color: var(--color-text);
    line-height: 1.8;
    text-align: justify;
    font-size: 0.95rem;
}

/* ========== PÁGINA DE RECEITAS ========== */
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xxl);
}

.recipe-card {
    background: var(--color-white);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}

.recipe-card:hover {
    transform: scale(1.06) translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    border-color: var(--color-secondary);
}

.recipe-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.recipe-card:hover .recipe-image {
    filter: brightness(1.15) contrast(1.05);
    transform: scale(1.05);
}

.recipe-info {
    padding: var(--spacing-lg);
    text-align: center;
}

.recipe-info h3 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
    font-weight: 700;
}

.recipe-info p {
    color: var(--color-highlight);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--color-white);
    padding: var(--spacing-xxl);
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideInDown 0.3s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    right: var(--spacing-lg);
    top: var(--spacing-lg);
    font-size: 2rem;
    font-weight: bold;
    color: var(--color-primary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.modal-close:hover {
    color: var(--color-highlight);
}

.modal-recipe-name {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-lg);
    font-family: var(--font-secondary);
}

.modal-recipe-section {
    margin-bottom: var(--spacing-lg);
}

.modal-recipe-section h4 {
    color: var(--color-highlight);
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-recipe-section ul,
.modal-recipe-section ol {
    margin-left: var(--spacing-lg);
    line-height: 1.8;
}

.modal-recipe-section li {
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
}

/* ========== PÁGINA DE HISTÓRIA ========== */
.history-content {
    max-width: 900px;
    margin: 0 auto;
}

.history-section {
    background: var(--color-white);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-left: 5px solid var(--color-secondary);
    transition: var(--transition-smooth);
}

.history-section:hover {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    transform: translateX(5px);
}

.history-section h2 {
    font-size: 1.7rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-lg);
    font-family: var(--font-secondary);
    font-weight: 700;
}

.history-section p {
    text-align: justify;
    line-height: 2;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
    font-size: 0.95rem;
}

.history-section p:last-child {
    margin-bottom: 0;
}

.history-highlight {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark) 100%);
    color: var(--color-white);
}

.history-highlight h2 {
    color: var(--color-secondary);
}

.history-quote {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-highlight) 100%);
    padding: var(--spacing-xxl);
    border-radius: 15px;
    text-align: center;
    margin: var(--spacing-xxl) 0;
    box-shadow: 0 10px 35px rgba(212, 175, 55, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.history-quote blockquote {
    font-size: 1.4rem;
    font-style: italic;
    color: var(--color-white);
    font-family: var(--font-secondary);
    line-height: 1.9;
    margin: 0;
}

/* ========== ANIMAÇÕES GERAIS ========== */
.fade-in {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Delay para cards em sequência */
.legend-card:nth-child(1) { animation-delay: 0s; }
.legend-card:nth-child(2) { animation-delay: 0.1s; }
.legend-card:nth-child(3) { animation-delay: 0.2s; }

.recipe-card:nth-child(1) { animation-delay: 0s; }
.recipe-card:nth-child(2) { animation-delay: 0.1s; }
.recipe-card:nth-child(3) { animation-delay: 0.2s; }
.recipe-card:nth-child(4) { animation-delay: 0.3s; }
.recipe-card:nth-child(5) { animation-delay: 0.4s; }
.recipe-card:nth-child(6) { animation-delay: 0.5s; }

.history-section:nth-child(1) { animation-delay: 0s; }
.history-section:nth-child(2) { animation-delay: 0.1s; }
.history-section:nth-child(3) { animation-delay: 0.2s; }
.history-section:nth-child(4) { animation-delay: 0.3s; }
.history-section:nth-child(5) { animation-delay: 0.4s; }

/* ========== RODAPÉ ========== */
.footer {
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-primary) 100%);
    color: var(--color-white);
    text-align: center;
    padding: var(--spacing-xxl) 0;
    margin-top: var(--spacing-xxl);
}

.footer p {
    margin: var(--spacing-sm) 0;
    font-size: 0.95rem;
}

.footer p:first-child {
    font-weight: 700;
    font-size: 1.1rem;
}

/* ========== RESPONSIVIDADE ========== */

/* Tablets (até 768px) */
@media (max-width: 768px) {
    .header {
        padding: 3px 8px;
    }

    .header-content {
        gap: 8px;
    }

    .logo h1 {
        font-size: 0.8rem;
        display: block;
    }

    .logo-icon {
        font-size: 1.3rem;
    }

    .nav {
        gap: 3px;
    }

    .nav-link {
        font-size: 0.7rem;
        padding: 2px 4px;
    }

    .hero {
        margin-top: 0;
        min-height: 350px;
    }

    .carousel-container {
        height: 350px;
    }

    .slide-content h2 {
        font-size: 1.8rem;
    }

    .slide-content p {
        font-size: 0.95rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .carousel-btn.prev {
        left: var(--spacing-md);
    }

    .carousel-btn.next {
        right: var(--spacing-md);
    }

    .page-title {
        font-size: 1.8rem;
    }

    .page-subtitle {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .card {
        padding: var(--spacing-lg);
    }

    .card-icon {
        font-size: 2.8rem;
    }

    .card h3 {
        font-size: 1.2rem;
    }

    .legends-grid {
        grid-template-columns: 1fr;
    }

    .recipes-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .legend-emoji {
        font-size: 3.5rem;
    }

    .modal-content {
        width: 95%;
        padding: var(--spacing-lg);
    }

    .modal-close {
        right: var(--spacing-md);
        top: var(--spacing-md);
        font-size: 1.8rem;
    }

    .history-section {
        padding: var(--spacing-lg);
        border-left: 4px solid var(--color-secondary);
    }

    .history-section h2 {
        font-size: 1.4rem;
    }

    .history-section p {
        line-height: 1.7;
        font-size: 0.9rem;
    }

    .history-quote blockquote {
        font-size: 1.1rem;
    }

    .page-title {
        margin-bottom: var(--spacing-lg);
    }
}

/* Celulares (até 480px) */
@media (max-width: 480px) {
    :root {
        font-size: 13px;
    }

    .header {
        padding: 6px 10px;
    }

    .header-content {
        gap: var(--spacing-xs);
    }

    .logo-icon {
        font-size: 1.3rem;
    }

    .nav {
        gap: 4px;
        width: 100%;
        justify-content: center;
    }

    .nav-link {
        font-size: 0.7rem;
        padding: 3px 4px;
        border-radius: 3px;
    }

    .hero {
        margin-top: 35px;
        min-height: 280px;
    }

    .carousel-container {
        height: 280px;
        border-radius: 10px;
    }

    .slide-content h2 {
        font-size: 1.3rem;
        letter-spacing: 0;
        margin-bottom: var(--spacing-sm);
    }

    .slide-content p {
        font-size: 0.8rem;
        max-width: 100%;
    }

    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .carousel-btn.prev {
        left: 5px;
    }

    .carousel-btn.next {
        right: 5px;
    }

    .carousel-indicators {
        bottom: 8px;
        gap: 6px;
    }

    .indicator {
        width: 10px;
        height: 10px;
    }

    .indicator.active {
        width: 24px;
    }

    .page-title {
        font-size: 1.3rem;
        margin-bottom: var(--spacing-md);
    }

    .page-subtitle {
        font-size: 0.8rem;
        margin-bottom: var(--spacing-lg);
    }

    .section-title {
        font-size: 1.3rem;
        margin-bottom: var(--spacing-lg);
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .card {
        padding: var(--spacing-lg);
    }

    .card-icon {
        font-size: 2.5rem;
        margin-bottom: var(--spacing-sm);
    }

    .card h3 {
        font-size: 1.1rem;
    }

    .card p {
        font-size: 0.85rem;
    }

    .legends-grid {
        gap: var(--spacing-md);
    }

    .legend-card {
        border-radius: 15px;
    }

    .legend-image {
        height: 180px;
    }

    .legend-emoji {
        font-size: 3rem;
    }

    .legend-content {
        padding: var(--spacing-md);
    }

    .legend-content h3 {
        font-size: 1.2rem;
    }

    .legend-content p {
        font-size: 0.85rem;
        text-align: left;
        line-height: 1.6;
    }

    .recipes-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: var(--spacing-md);
    }

    .recipe-card:hover {
        transform: scale(1.03) translateY(-5px);
    }

    .recipe-image {
        height: 150px;
    }

    .recipe-info {
        padding: var(--spacing-md);
    }

    .recipe-info h3 {
        font-size: 1rem;
    }

    .recipe-info p {
        font-size: 0.8rem;
    }

    .modal-content {
        width: 98%;
        padding: var(--spacing-md);
        border-radius: 10px;
    }

    .modal-close {
        right: var(--spacing-sm);
        top: var(--spacing-sm);
        font-size: 1.5rem;
    }

    .modal-recipe-name {
        font-size: 1.2rem;
    }

    .modal-recipe-section h4 {
        font-size: 0.95rem;
    }

    .history-section {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-md);
        border-left: 3px solid var(--color-secondary);
    }

    .history-section h2 {
        font-size: 1.1rem;
        margin-bottom: var(--spacing-md);
    }

    .history-section p {
        text-align: left;
        font-size: 0.85rem;
        line-height: 1.6;
        margin-bottom: var(--spacing-sm);
    }

    .history-quote {
        padding: var(--spacing-lg);
        margin: var(--spacing-lg) 0;
    }

    .history-quote blockquote {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .main-content {
        padding: var(--spacing-lg) 0;
    }

    .footer {
        padding: var(--spacing-lg) 0;
    }

    .footer p {
        font-size: 0.75rem;
        margin: var(--spacing-xs) 0;
    }
}

/* Celulares muito pequenos (até 320px) */
@media (max-width: 320px) {
    :root {
        font-size: 12px;
    }

    .header {
        padding: 5px 8px;
    }

    .logo-icon {
        font-size: 1.2rem;
    }

    .nav-link {
        font-size: 0.65rem;
        padding: 2px 3px;
    }

    .carousel-container {
        height: 220px;
    }

    .slide-content h2 {
        font-size: 1.1rem;
    }

    .slide-content p {
        font-size: 0.75rem;
    }

    .carousel-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .page-title {
        font-size: 1.1rem;
    }

    .card-icon {
        font-size: 2rem;
    }

    .recipe-image {
        height: 120px;
    }
}
