/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f5f5f5;
    font-family: Arial, sans-serif;
}

/* GRID */
.grid-section {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: repeat(3, 220px);
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* CARD BASE */
.grid-section > div {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    cursor: pointer;

    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* OVERLAY */
.grid-section > div::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.6),
        rgba(0,0,0,0.1)
    );
    z-index: 1;
    transition: 0.4s;
}

/* HOVER */
.grid-section > div:hover {
    transform: scale(1.04);
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.grid-section > div:hover::before {
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.75),
        rgba(0,0,0,0.2)
    );
}

/* ===== BLOCOS (CAMINHOS CORRETOS 🔥) ===== */

.top1 {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    background-image: url('../images/grid/grid6.png');
}

.top2 {
    grid-column: 2 / 4;
    grid-row: 1 / 2;
    background-image: url('../images/grid/grid9.png');
}

.midL {
    grid-column: 2 / 3;
    grid-row: 2 / 4;
    background-image: url('../images/grid/grid7.png');
}

.midR {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
    background-image: url('../images/grid/grid14.png');
}

.bottomL {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
    background-image: url('../images/grid/grid8.png');
}

.bottomR {
    grid-column: 3 / 4;
    grid-row: 3 / 4;
    background-image: url('../images/grid/grid15.png');
}

/* ===== CONTEÚDO ===== */

.top1-content {
    position: absolute;
    bottom: 30px;
    left: 30px;
    z-index: 2;
    color: white;
}

/* TEXTO */
.top1-content h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.top1-content p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ===== BOTÕES ===== */

.cta-group {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.btn {
    padding: 10px 24px;
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.7);
    color: white;
    text-decoration: none;
    font-size: 0.9rem;

    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);

    transition: all 0.3s ease;
}

.btn.primary {
    background: white;
    color: black;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    background: white;
    color: black;
}


  /* =========================
   RESPONSIVIDADE (AJUSTADO)
========================= */

/* TABLET GRANDE */
@media (max-width: 1024px) {
    .grid-section {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 220px;
        gap: 20px; /* ↑ mais espaço */
        padding: 20px;
    }

    .grid-section > div {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    /* HERO */
    .top1 {
        grid-column: 1 / 3;
        min-height: 300px;
    }

    .top1-content h2 {
        font-size: 1.6rem;
    }
}

/* TABLET */
@media (max-width: 768px) {
    .grid-section {
        grid-template-columns: 1fr;
        grid-auto-rows: 240px;
        gap: 18px; /* ↑ respiro */
        padding: 18px;
    }

    .grid-section > div {
        min-height: 240px;
    }

    /* HERO continua maior */
    .top1 {
        min-height: 340px;
    }

    .top1-content {
        bottom: 20px;
        left: 20px;
    }

    .top1-content h2 {
        font-size: 1.4rem;
    }

    .cta-group {
        gap: 12px;
        flex-wrap: wrap;
    }
}

/* MOBILE */
@media (max-width: 480px) {
    .grid-section {
        gap: 16px;
        padding: 16px;
    }

    .grid-section > div {
        min-height: 220px;
    }

    .top1 {
        min-height: 300px;
    }

    .top1-content {
        bottom: 15px;
        left: 15px;
    }

    .top1-content h2 {
        font-size: 1.2rem;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

/* MOBILE PEQUENO */
@media (max-width: 360px) {
    .grid-section {
        gap: 14px;
    }

    .grid-section > div {
        min-height: 200px;
    }

    .top1 {
        min-height: 260px;
    }

    .cta-group {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}