/* ============================================
   RL Arquitetura - Style R11
   Fonte: Gabarito (Google Fonts)
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Gabarito', Arial, sans-serif;
    background: #f9f9f9;
    color: #222;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

/* ---- Header ---- */
header {
    background: #1a1a1a;
    color: #fff;
    padding: 0 24px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
header .logo { flex-shrink: 0; }
header .logo a { display: block; line-height: 0; }
header .logo img { height: 48px; width: auto; padding: 8px 0; }
header nav { flex: 1; display: flex; justify-content: flex-end; }
header nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
header nav ul li a {
    display: block; padding: 20px 14px; color: #ccc;
    font-size: 0.9rem; font-weight: 500; letter-spacing: 0.3px;
    transition: color 0.2s, background 0.2s; border-bottom: 3px solid transparent;
}
header nav ul li a:hover,
header nav ul li a.active { color: #fff; background: rgba(255,255,255,0.06); border-bottom-color: #e8a87c; }

/* ---- Footer ---- */
footer { background: #1a1a1a; color: #999; text-align: center; padding: 24px 16px; font-size: 0.85rem; margin-top: auto; }

/* ---- Home ---- */
.carrossel {
    position: relative; width: 100%; overflow: hidden;
    height: clamp(300px, 50vw, 600px); background: #e0dcd6;
    max-width: none; padding: 0;
}
.slides { display: flex; transition: transform 0.5s ease-in-out; width: 100%; height: 100%; }
.slides img { width: 100%; height: 100%; object-fit: cover; flex-shrink: 0; min-width: 100%; }

/* ---- Sections ---- */
section { max-width: 1120px; margin: 0 auto; padding: 48px 24px; }
.apresentacao, .localizacao, .galeria, .projeto-detalhe { text-align: left; }

.apresentacao h2, .localizacao h2, .galeria h2, .pagina-section h2 {
    font-size: 1.8rem; font-weight: 700; margin-bottom: 16px; color: #1a1a1a;
}
.apresentacao h3 { font-size: 1.3rem; font-weight: 600; margin-top: 32px; margin-bottom: 12px; color: #333; }
.apresentacao p, .projeto-detalhe p { color: #444; font-size: 1rem; line-height: 1.7; margin-bottom: 12px; }
.subtitulo { font-size: 1.1rem; color: #777; margin-bottom: 32px; font-weight: 400; }

/* ---- Equipe ---- */
.equipe { display: flex; justify-content: center; gap: 24px; margin-top: 24px; flex-wrap: wrap; }
.membro { text-align: center; }
.membro img { border-radius: 50%; width: 140px; height: 140px; object-fit: cover; border: 3px solid #e8a87c; margin-bottom: 8px; }
.membro p { font-weight: 500; color: #333; font-size: 0.95rem; }

/* ---- Filtros ---- */
.filtros {
    display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px;
    align-items: center; padding: 16px; background: #f0f0f0; border-radius: 12px;
}
.filtros label { font-weight: 600; font-size: 0.9rem; color: #555; }
.filtros select {
    padding: 8px 14px; border: 1px solid #ccc; border-radius: 8px;
    font-family: 'Gabarito', Arial, sans-serif; font-size: 0.88rem;
    background: #fff; cursor: pointer; min-width: 130px;
}
.filtros select:focus { outline: none; border-color: #e8a87c; }
.filtros .filtro-clear {
    padding: 8px 16px; background: #e8a87c; color: #fff; border: none;
    border-radius: 8px; cursor: pointer; font-family: 'Gabarito', Arial, sans-serif;
    font-size: 0.85rem; font-weight: 600; transition: background 0.2s;
}
.filtros .filtro-clear:hover { background: #d4946a; }
.filtro-contador { font-size: 0.85rem; color: #888; margin-left: auto; }

/* ---- Grid de Projetos / Galeria ---- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px; padding: 0;
}
.projeto {
    position: relative; width: 100%; aspect-ratio: 4/3;
    overflow: hidden; border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s, transform 0.3s; background: #eee;
}
.projeto:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.15); transform: translateY(-4px); }
.projeto a { display: block; width: 100%; height: 100%; position: relative; }
.projeto img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.projeto:hover img { transform: scale(1.08); }
.projeto-titulo {
    position: absolute; bottom: 0; left: 0; width: 100%;
    padding: 16px; background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white; text-align: center; font-weight: 600; font-size: 0.95rem;
}
.projeto-tag {
    position: absolute; top: 10px; right: 10px;
    background: rgba(232,168,124,0.9); color: #fff;
    font-size: 0.7rem; font-weight: 600; padding: 3px 10px;
    border-radius: 20px; z-index: 2;
}
.projeto.hidden { display: none; }

/* ---- Projeto Detalhe ---- */
.projeto-detalhe .imagem-principal { width: 100%; border-radius: 12px; margin: 20px 0; box-shadow: 0 2px 12px rgba(0,0,0,0.1); }
.projeto-detalhe h2 { font-size: 1.8rem; font-weight: 700; color: #1a1a1a; margin-bottom: 8px; }
.projeto-detalhe .data { color: #888; font-size: 0.9rem; margin-bottom: 16px; }
.galeria-projeto { margin: 40px 0; }
.galeria-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-top: 16px; }
.galeria-item { width: 100%; height: 180px; object-fit: cover; cursor: pointer; border-radius: 8px; transition: transform 0.3s ease, box-shadow 0.3s; }
.galeria-item:hover { transform: scale(1.03); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }

/* ---- Modal ---- */
.modal {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%; background: rgba(0,0,0,0.92);
    z-index: 1000; justify-content: center; align-items: center; padding: 40px;
}
.modal-conteudo { max-width: 95%; max-height: 90vh; object-fit: contain; border-radius: 4px; }
.modal-fechar {
    position: absolute; top: 20px; right: 30px; color: white;
    font-size: 36px; cursor: pointer; z-index: 1001; opacity: 0.7; transition: opacity 0.2s;
}
.modal-fechar:hover { opacity: 1; }
.modal-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    color: white; font-size: 28px; cursor: pointer;
    background: rgba(0,0,0,0.4); border: none; padding: 16px 20px;
    border-radius: 6px; transition: background 0.2s;
}
.modal-nav:hover { background: rgba(0,0,0,0.7); }
.modal-anterior { left: 20px; }
.modal-proximo  { right: 20px; }

/* ---- Cards de Conteudo ---- */
.conteudo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px; margin-top: 24px;
}
.card {
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    transition: box-shadow 0.3s, transform 0.3s;
}
.card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.12); transform: translateY(-4px); }
.card-img { height: 180px; background: #e8e3dc; display: flex; align-items: center; justify-content: center; }
.placeholder-img { font-size: 3rem; opacity: 0.6; }
.card-body { padding: 20px; }
.card-body h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; color: #1a1a1a; }
.card-body p { font-size: 0.92rem; color: #666; line-height: 1.5; margin-bottom: 12px; }
.card-tag {
    display: inline-block; background: #e8a87c; color: #fff;
    font-size: 0.78rem; font-weight: 600; padding: 4px 12px; border-radius: 20px;
}
.card.hidden { display: none; }

/* ---- Mapa ---- */
.localizacao iframe { border-radius: 12px; margin-top: 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }

/* ---- Blog Feed ---- */
.feed-grid { display: flex; flex-direction: column; gap: 24px; margin-top: 24px; }
.feed-item {
    display: flex; gap: 20px; background: #fff; border-radius: 12px;
    overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    transition: box-shadow 0.3s;
}
.feed-item:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.12); }
.feed-item-img { width: 200px; min-height: 140px; flex-shrink: 0; background: #e8e3dc; display: flex; align-items: center; justify-content: center; }
.feed-item-img .placeholder-img { font-size: 2rem; }
.feed-item-body { padding: 20px; flex: 1; }
.feed-item-body h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 6px; color: #1a1a1a; }
.feed-item-body .feed-meta { font-size: 0.82rem; color: #999; margin-bottom: 8px; }
.feed-item-body p { font-size: 0.92rem; color: #666; line-height: 1.5; }
.feed-item.hidden { display: none; }

/* ---- Responsivo ---- */
@media (max-width: 768px) {
    header { padding: 0 16px; flex-direction: column; align-items: stretch; }
    header .logo { display: flex; justify-content: center; border-bottom: 1px solid rgba(255,255,255,0.06); }
    header nav ul { justify-content: center; gap: 0; }
    header nav ul li a { padding: 14px 10px; font-size: 0.82rem; border-bottom-width: 2px; }
    section { padding: 32px 16px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
    .conteudo-grid { grid-template-columns: 1fr; }
    .galeria-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .apresentacao h2, .galeria h2, .pagina-section h2, .projeto-detalhe h2 { font-size: 1.4rem; }
    .modal { padding: 16px; }
    .modal-nav { padding: 10px 14px; font-size: 20px; }
    .modal-fechar { top: 10px; right: 16px; font-size: 28px; }
    .membro img { width: 110px; height: 110px; }
    .feed-item { flex-direction: column; }
    .feed-item-img { width: 100%; height: 160px; }
    .filtros { flex-direction: column; align-items: stretch; }
    .filtros select { min-width: auto; }
    .filtro-contador { margin-left: 0; text-align: right; }
}

@media (max-width: 480px) {
    header nav ul li a { padding: 12px 8px; font-size: 0.75rem; }
    .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .card-img { height: 140px; }
}
