/* ================= RESET ================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Raleway', sans-serif;
    background-color: #f4f6f9;
    color: #333;
    line-height: 1.5;
}

/* ================= HEADER ================= */
header {
    background-color: #0d1113;
    padding: 10px 0;
    position: relative;
    z-index: 1000;
    margin-bottom: 20px;
}

header .header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

header .logo {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 10px;
}

header .logo img {
    width: 100px;
    height: auto;
}

header .nav-links {
    display: flex;
    justify-content: center;
    width: 100%;
}

header .nav-links ul {
    list-style: none;
    display: flex;
    gap: 20px;
    text-align: center;
}

header .nav-links ul li a {
    color: #e4e7e7;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

header .nav-links ul li a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: #e4e7e7;
    bottom: -5px;
    left: 0;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

header .nav-links ul li a:hover::after,
header .nav-links ul li a.active::after {
    transform: scaleX(1);
}

header .menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #e4e7e7;
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

/* ================= MAIN ================= */
main {
    background-color: #fff;
    padding: 80px 20px;
}

h2 {
    font-size: 2.8rem;
    margin-bottom: 40px;
    text-align: center;
    color: #2c3e50;
    font-weight: 800;
    letter-spacing: -1px;
}

/* ================= POSTS ================= */
.posts {
    padding: 80px 20px;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 30px;
}

.post-box {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.post-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.post-box img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 20px;
}

.post-box h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 700;
}

.post-box p {
    font-size: 1rem;
    color: #777;
    flex-grow: 1;
    line-height: 1.8;
}

.post-box a {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #3498db;
    color: #fff;
    border-radius: 8px;
    text-align: center;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.post-box a:hover {
    background-color: #2980b9;
}

/* ================= FOOTER ================= */
footer {
    background-color: #0d1113;
    padding: 30px 0;
    border-top: 1px solid #333;
    color: #e4e7e7;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

footer .footer-left {
    display: flex;
    flex: 1 1 60%;
    align-items: center;
}

footer .footer-logo {
    width: 100px;
    height: auto;
    margin-right: 20px;
}

footer .footer-description {
    font-size: 14px;
    line-height: 1.5;
    max-width: 450px;
}

footer .footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    flex: 1 1 30%;
}

footer .social-icons {
    margin-bottom: 10px;
    display: flex;
    gap: 20px;
}

footer .social-icon {
    color: #e4e7e7;
    font-size: 24px;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

footer .social-icon:hover {
    color: #ccc;
    transform: scale(1.1);
}

footer .rights-text {
    font-size: 12px;
    color: #b0b0b0;
    margin-top: 10px;
    font-weight: 300;
}

footer .rights-text strong {
    color: #e4e7e7;
}

footer .rights-text a {
    color: #b0b0b0;
    text-decoration: none;
}

footer .rights-text a:hover {
    color: #e4e7e7;
}

/* ================= RESPONSIVIDADE (Menu móvel ajustado) ================= */
@media (max-width: 768px) {
    header .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
    }

    header .logo {
        justify-content: flex-start;
        width: auto;
    }

    header .menu-toggle {
        display: block;
    }

    header .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-end;
        background-color: #0d1113;
        position: absolute;
        top: 100%;
        right: 0;
        z-index: 999;
        padding: 10px 20px;
    }

    header .nav-links.active {
        display: flex;
    }

    header .nav-links ul {
        flex-direction: column;
        gap: 10px;
        width: auto;
        text-align: right;
    }

    header .nav-links ul li {
        position: relative;
    }

    header .nav-links ul li a {
        padding: 10px;
        display: block;
        position: relative;
    }

    header .nav-links ul li a::after {
        content: '';
        position: absolute;
        width: 0;
        height: 3px;
        background-color: #e4e7e7;
        bottom: 0;
        right: 0;
        transition: width 0.3s ease;
    }

    header .nav-links ul li a:hover::after {
        width: 100%;
        left: 0;
    }

    .post-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) {
    .post-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 1024px) {
    .post-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}
