/* Configurações gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #f4f9f4;
    color: #333;
    line-height: 1.6;
}

/* Classe para elementos visualmente ocultos mas acessíveis a leitores de tela */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link para acessibilidade de teclado */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background-color: #2e7d32;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Animações de entrada */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    background-color: #2e7d32;
    color: white;
    text-align: center;
    padding: 3rem 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    animation: fadeInDown 0.6s ease-out;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* Conteúdo Principal */
main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.intro {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.05) 0%, rgba(76, 175, 80, 0.05) 100%);
    border-radius: 10px;
    border-left: 4px solid #4caf50;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.intro h2 {
    color: #1b5e20;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.intro p {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.8;
}

/* Cards de Práticas */
.cards-container {
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.card {
    background-color: white;
    border-radius: 10px;
    padding: 1.5rem;
    flex: 1;
    min-width: 280px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    border-top: 5px solid #4caf50;
    border-bottom: 3px solid transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-bottom-color 0.3s ease;
    animation: fadeInUp 0.8s ease-out backwards;
}

.card:nth-child(1) { animation-delay: 0.3s; }
.card:nth-child(2) { animation-delay: 0.4s; }
.card:nth-child(3) { animation-delay: 0.5s; }

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-bottom-color: #4caf50;
}

.card:focus-within {
    outline: 3px solid #2e7d32;
    outline-offset: 2px;
}

.card h3 {
    color: #2e7d32;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Seção do Quiz */
.quiz-section {
    background-color: #e8f5e9;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    border: 2px dashed #81c784;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    align-items: center;
    border: none;
}

button, .quiz-button {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    width: 80%;
    max-width: 450px;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    font-weight: 600;
    letter-spacing: 0.5px;
    min-height: 48px;
}

button:hover, .quiz-button:hover {
    background-color: #388e3c;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

button:active, .quiz-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

button:focus, .quiz-button:focus {
    outline: 3px solid #2e7d32;
    outline-offset: 2px;
    background-color: #388e3c;
}

button:disabled, .quiz-button:disabled {
    background-color: #c8e6c9;
    cursor: not-allowed;
    opacity: 0.6;
}

.resultado {
    margin-top: 1.5rem;
    font-weight: bold;
    font-size: 1.2rem;
    padding: 1rem;
    border-radius: 5px;
    min-height: 40px;
}

.correto { 
    color: #1b5e20;
    background-color: #c8e6c9;
    border-left: 4px solid #4caf50;
}

.incorreto { 
    color: #c62828;
    background-color: #ffcdd2;
    border-left: 4px solid #d32f2f;
}

.quiz-status {
    background-color: #fff9c4;
    border-left: 4px solid #fbc02d;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    color: #f57f17;
    font-size: 0.95rem;
}

/* Rodapé */
footer {
    background-color: #1b5e20;
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
    border-top: 3px solid #4caf50;
}

footer p {
    font-size: 0.95rem;
    opacity: 0.95;
}

/* Responsividade para celulares e tablets */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .cards-container {
        gap: 1rem;
    }
    
    .card {
        min-width: 100%;
        width: 100%;
    }
    
    button, .quiz-button {
        width: 100%;
        max-width: none;
        padding: 16px 20px;
        font-size: 1.05rem;
    }
    
    .quiz-section {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .intro h2,
    .quiz-section h2 {
        font-size: 1.5rem;
    }
    
    .card h3 {
        font-size: 1.2rem;
    }
    
    .resultado {
        font-size: 1rem;
    }
    
    button, .quiz-button {
        padding: 14px 16px;
        font-size: 0.95rem;
    }
}