/* ============================================================
   Dablion Services Grid — public.css
   Pixel-perfect match: Figma specs (Neue Power Ultra / 353×589)
   ============================================================ */

/* ── Google / Fontshare: Neue Power (Ultra/Black) ────────────── */
/* ── Fallback stack para Neue Power ──────────────────────────── */
:root {
    --dsg-font-display: 'NeuePower', 'Neue Power', 'Arial Black', sans-serif;
}

/* ── CSS vars padrão (sobrescritas via inline do shortcode) ──── */
.dsg-grid {
    --dsg-bg:        transparent;
    --dsg-card-bg:   #000000;
    --dsg-title:     #ffffff;
    --dsg-desc:      #ffffff;
    --dsg-border:    #ffffff;
    --dsg-gap-row:   55px;
    --dsg-gap-col:   45px;
    --dsg-ratio:     353/364;   /* proporção exata da imagem do Figma */
    --dsg-cols:      4;
}

/* ── Grid container ─────────────────────────────────────────── */
.dsg-grid {
    display: grid;
    grid-template-columns: repeat(var(--dsg-cols), 1fr);
    row-gap: var(--dsg-gap-row);
    column-gap: var(--dsg-gap-col);
    background-color: var(--dsg-bg);
    padding: 0;
    box-sizing: border-box;
    width: 100%;
}

/* ============================================================
   CARD
   ============================================================ */
.dsg-card {
    position: relative;            /* ancora o stretched link */
    background-color: var(--dsg-card-bg);
    border: 3px solid var(--dsg-border);   /* borda branca #FFFFFF 3px */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dsg-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

/* ── Stretched link — cobre 100% do card ─────────────────────── */
.dsg-card__link {
    position: absolute;
    inset: 0;
    z-index: 2;
    text-decoration: none;
    color: transparent;
    border-radius: 0;
}

/* Tags acima do link */
.dsg-card__tags { position: relative; z-index: 3; }

/* ============================================================
   ÁREA DA IMAGEM (topo do card)
   Proporção Figma: 353.77 × 364  ≈ aspect-ratio 353/364
   ============================================================ */
.dsg-card__img-wrap {
    position: relative;
    height: 350px;                    /* altura fixa conforme especificação */
    overflow: hidden;
    background: #0d0d0d;
    flex-shrink: 0;
}

.dsg-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease, filter 0.35s ease;
}

.dsg-card:hover .dsg-card__img {
    transform: scale(1.06);
    filter: brightness(0.7);
}

.dsg-card__img--placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

/* ── Overlay escuro APENAS no topo (para legibilidade do título) ─ */
.dsg-card__img-overlay {
    position: absolute;
    inset: 0;
    /* gradiente sutil do topo: garante leitura do título */
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.55) 0%,
        rgba(0, 0, 0, 0.15) 40%,
        rgba(0, 0, 0, 0.0)  70%
    );
    pointer-events: none;
    transition: background 0.3s ease;
}

.dsg-card:hover .dsg-card__img-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.65) 0%,
        rgba(0, 0, 0, 0.30) 50%,
        rgba(0, 0, 0, 0.10) 100%
    );
}

/* ── Título — TOPO-ESQUERDO da imagem (Figma: X≈37, Y≈40 relativo) ─ */
.dsg-card__title-wrap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 18px 20px 0;          /* topo + laterais alinhados ao Figma */
    pointer-events: none;
    z-index: 1;
}

.dsg-card__title {
    font-family: var(--dsg-font-display);
    font-weight: 900;              /* Neue Power Ultra = weight 900 */
    font-size: 20px;               /* Figma spec: 20px */
    line-height: 0.986;            /* Figma spec: 98.6% */
    letter-spacing: 0;             /* Figma spec: 0% */
    text-transform: uppercase;
    color: #ffffff;
    margin: 0;
    max-width: 90%;
}

/* ============================================================
   ÁREA DE TEXTO (parte inferior preta)
   Figma: height ≈ 225px de um total 589px = ~38%
   ============================================================ */
.dsg-card__body {
    flex: 1;
    background-color: #000000;
    padding: 22px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
    /* sem border-top: a separação é dada pelo corte natural imagem/fundo */
}

.dsg-card__desc {
    font-family: 'Neue Power', 'Georgia', serif;
    font-weight: 400;
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    line-height: 1.55;
    color: #ffffff;
    margin: 0;
    flex: 1;
}

/* Tags (opcionais, abaixo da descrição) */
.dsg-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 14px;
}

.dsg-tag {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    font-family: var(--dsg-font-display);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 9px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.15);
    transition: background 0.2s, color 0.2s;
}

.dsg-tag:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* ── Estado vazio ─────────────────────────────────────────── */
.dsg-empty {
    color: #555;
    text-align: center;
    padding: 60px;
    grid-column: 1 / -1;
    font-family: var(--dsg-font-display);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ── Responsivo ───────────────────────────────────────────── */
@media (max-width: 1200px) {
    .dsg-grid { grid-template-columns: repeat(min(var(--dsg-cols), 3), 1fr); }
}
@media (max-width: 860px) {
    .dsg-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
    .dsg-grid { grid-template-columns: 1fr; }
    .dsg-card__title { font-size: 1rem; }
}

/* ══════════════════════════════════════════════════════════════
   CARD ACTIONS
   ══════════════════════════════════════════════════════════════ */

/* Stretched button (modal) — sem estilo visual */
.dsg-card__link--modal {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════════ */
.dsg-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    animation: dsg-fade-in 0.2s ease;
}

.dsg-modal-overlay[hidden] {
    display: none;
}

@keyframes dsg-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.dsg-modal {
    position: relative;
    background: #000;
    border: 3px solid #fff;
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    animation: dsg-slide-up 0.25s ease;
}

@keyframes dsg-slide-up {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.dsg-modal__close {
    position: absolute;
    top: 12px;
    right: 16px;
    z-index: 10;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    transition: opacity 0.2s;
}

.dsg-modal__close:hover { opacity: 0.6; }

.dsg-modal__img-wrap {
    width: 100%;
    height: 340px;
    overflow: hidden;
    flex-shrink: 0;
}

.dsg-modal__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dsg-modal__body {
    padding: 32px 36px 40px;
}

.dsg-modal__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.dsg-modal__tag {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    font-family: 'NeuePower', 'Neue Power', sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 10px;
    border: 1px solid rgba(255,255,255,0.15);
}

.dsg-modal__title {
    font-family: 'NeuePower', 'Neue Power', 'Arial Black', sans-serif;
    font-weight: 900;
    font-size: clamp(1.4rem, 4vw, 2rem);
    line-height: 0.986;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 20px;
}

.dsg-modal__desc {
    font-size: 1rem;
    line-height: 1.65;
    color: rgba(255,255,255,0.8);
    margin: 0;
}

/* Linha accent no topo do modal body */
.dsg-modal__body::before {
    content: '';
    display: block;
    height: 3px;
    background: var(--modal-accent, #c8a96e);
    margin-bottom: 28px;
    width: 48px;
}

@media (max-width: 600px) {
    .dsg-modal__img-wrap { height: 220px; }
    .dsg-modal__body { padding: 24px 20px 32px; }
    .dsg-modal__title { font-size: 1.3rem; }
}
