/* ===== Estilo Base ===== */
body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

.container {
    max-width: 900px;
    width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
    background-color: #fff;
    min-height: 100vh;
}

/* Logo no topo */
.logo {
    font-size: 1.8rem;
    text-decoration: none;
    color: #222;
    transition: color 0.3s ease, transform 0.2s ease;
}

    .logo:hover {
        color: #0077cc;
        transform: scale(1.05);
    }

/* Header */
header {
    display: flex;
    align-items: center;
    padding: 1rem 0;
}

    header h1 {
        margin: 0;
        font-size: 2rem;
        font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        font-weight: 400;
        color: #333;
    }

/* Botões */
button {
    background-color: #007BFF;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

    button:hover {
        background-color: #0056b3;
    }

/* Seções */
section h2 {
    margin: 1rem 0 0.5rem 0;
    text-align: center;
}

section p {
    margin: 0 0 1rem 0;
    color: #555;
    text-align: center;
    font-weight: 600;
}

/* Grid de Artigos */
.grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    padding-bottom: 2rem;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 280px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: left;
}

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }

    .card img {
        width: 100%;
        height: 180px;
        object-fit: cover;
    }

.card-content {
    padding: 1rem;
}

    .card-content h3 {
        margin: 0 0 0.5rem 0;
        font-size: 1.2rem;
    }

    .card-content p {
        margin: 0;
        color: #555;
        font-size: 0.9rem;
        line-height: 1.4;
    }

/* Artigo Individual */
main {
    padding: 2rem 0;
}

.nav-article {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
}

    .nav-article button {
        padding: 0.5rem 1rem;
        cursor: pointer;
    }

/* Formulário de comentário/email */
.comentarios {
    margin-top: 2rem;
}

    .comentarios textarea,
    .comentarios input {
        width: 100%;
        padding: 0.5rem;
        margin: 0.5rem 0;
        box-sizing: border-box;
        font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    }

    .comentarios button {
        padding: 0.5rem 1rem;
        cursor: pointer;
    }

/* Código Destacado */
pre {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    margin: 1rem 0;
}

code {
    font-family: 'Courier New', Courier, monospace;
}

/* Tabela REST x SOAP */
main table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

    main table th,
    main table td {
        border: 1px solid #ccc;
        padding: 0.75rem;
        text-align: left;
    }

    main table th {
        background-color: #f0f0f0;
        font-weight: bold;
    }

/* Animação Fade-in */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

    .fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }

/* Responsividade */
@media screen and (max-width: 768px) {
    .grid {
        gap: 1rem;
    }

    .card {
        width: 45%;
    }
}

@media screen and (max-width: 480px) {
    .card {
        width: 100%;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .nav-article {
        flex-direction: column;
        gap: 1rem;
    }
}
