:root {
    --bg-dark: #181938;
    --text-light: #f0f0f0;
    --accent: #25D366;
    --card-bg: rgba(255,255,255,0.05);
    --overlay-bg: rgba(0,0,0,0.7);
    --filtro-bg: rgba(255,255,255,0.1);
    --filtro-hover: rgba(37, 211, 102, 0.2);
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Cabeçalho */
.galeria-header {
    background: linear-gradient(135deg, #0f0f2d 0%, #1a1a4e 100%);
    padding: 60px 20px 40px;
    text-align: center;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ccc;
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 20px;
    transition: color 0.3s;
}
.back-link:hover { color: var(--accent); }

.galeria-header h1 {
    font-size: 2.5rem;
    margin: 10px 0;
}

.galeria-header p {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* ====== Barra de pesquisa e filtros ====== */
.filtros-container {
    max-width: 1400px;
    margin: 30px auto 0;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-box {
    position: relative;
    max-width: 500px;
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 30px;
    background: rgba(255,255,255,0.08);
    color: var(--text-light);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s, background 0.3s;
}

.search-box input::placeholder {
    color: #aaa;
}

.search-box input:focus {
    border-color: var(--accent);
    background: rgba(255,255,255,0.12);
}

.search-box ion-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    color: #aaa;
    pointer-events: none;
}

.filtro-botoes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filtro-btn {
    padding: 8px 20px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 30px;
    background: var(--filtro-bg);
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.filtro-btn:hover {
    background: var(--filtro-hover);
    border-color: var(--accent);
}

.filtro-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
    font-weight: bold;
}

/* ====== Grid de cards (mesmo anterior) ====== */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.cliente-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: var(--card-bg);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 1 / 1;
}

.cliente-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.4);
}

.cliente-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.cliente-card:hover img {
    transform: scale(1.05);
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--overlay-bg);
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cliente-card:hover .overlay {
    transform: translateY(0);
}

.overlay .nome {
    font-weight: bold;
    font-size: 1.1rem;
}

.overlay .tipo {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ====== Lightbox (mantido) ====== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    cursor: pointer;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90%;
    max-height: 75vh;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.caption {
    text-align: center;
    margin-top: 20px;
}

.caption h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.caption p {
    font-size: 1rem;
    opacity: 0.8;
}

.close-btn {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.3s;
}
.close-btn:hover {
    transform: scale(1.2);
}

/* Rodapé */
.galeria-footer {
    background: #0f0f2d;
    padding: 30px 20px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

.galeria-footer a {
    color: var(--accent);
    text-decoration: none;
    margin-top: 10px;
    display: inline-block;
}