/* ═══════════════════════════════════════════════════
   CAES Event Gallery — Frontend Styles
   Estilo: Corporate Luxury · Dorado y Azul Profundo
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&family=DM+Sans:wght@400;500;600&display=swap');

:root {
    --ceg-primary:      #1a1a2e;
    --ceg-accent:       #c8a96e;
    --ceg-accent-light: #e8c98e;
    --ceg-white:        #ffffff;
    --ceg-bg:           #f8f7f4;
    --ceg-shadow-sm:    0 2px 12px rgba(26,26,46,0.08);
    --ceg-shadow-md:    0 8px 32px rgba(26,26,46,0.14);
    --ceg-shadow-lg:    0 20px 60px rgba(26,26,46,0.2);
    --ceg-radius:       12px;
    --ceg-cols:         3;
    --ceg-gap:          24px;
    --ceg-img-ratio:    66%;
}

/* ── Wrapper ────────────────────────────────── */
.ceg-wrapper {
    font-family: 'DM Sans', sans-serif;
    color: var(--ceg-primary);
    position: relative;
}

/* ── Grid ───────────────────────────────────── */
.ceg-grid {
    display: grid;
    grid-template-columns: repeat(var(--ceg-cols), 1fr);
    gap: var(--ceg-gap);
}

@media (max-width: 1024px) {
    .ceg-grid { grid-template-columns: repeat(min(var(--ceg-cols), 2), 1fr); }
}
@media (max-width: 640px) {
    .ceg-grid { grid-template-columns: 1fr; }
}

/* ── Card ───────────────────────────────────── */
.ceg-card {
    cursor: pointer;
    border-radius: var(--ceg-radius);
    overflow: hidden;
    box-shadow: var(--ceg-shadow-sm);
    transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s ease;
    background: var(--ceg-white);
    animation: ceg-fade-up 0.5s ease both;
}

.ceg-card:nth-child(2) { animation-delay: 0.05s; }
.ceg-card:nth-child(3) { animation-delay: 0.1s; }
.ceg-card:nth-child(4) { animation-delay: 0.15s; }
.ceg-card:nth-child(5) { animation-delay: 0.2s; }
.ceg-card:nth-child(6) { animation-delay: 0.25s; }

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

.ceg-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--ceg-shadow-lg);
}

.ceg-card-inner { overflow: hidden; }

/* ── Card Image ─────────────────────────────── */
.ceg-card-img {
    position: relative;
    padding-bottom: var(--ceg-img-ratio);
    background-size: cover;
    background-position: center;
    background-color: #2d2d4e;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(.2,.8,.2,1);
}

.ceg-card:hover .ceg-card-img {
    transform: scale(1.04);
}

/* Subtle golden shimmer overlay */
.ceg-card-img::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(26,26,46,0) 0%,
        rgba(26,26,46,0.15) 50%,
        rgba(26,26,46,0.75) 100%
    );
    z-index: 1;
    transition: opacity 0.3s;
}

/* ── Card Overlay (hover) ───────────────────── */
.ceg-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
}

.ceg-count-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(26,26,46,0.6);
    backdrop-filter: blur(8px);
    color: var(--ceg-accent-light);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid rgba(200,169,110,0.3);
}

.ceg-card-action {
    align-self: flex-end;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s ease;
}

.ceg-card:hover .ceg-card-action {
    opacity: 1;
    transform: translateY(0);
}

.ceg-view-btn {
    display: inline-block;
    background: var(--ceg-accent);
    color: var(--ceg-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.ceg-view-btn:hover {
    background: var(--ceg-accent-light);
}

/* ── Card Body ──────────────────────────────── */
.ceg-card-body {
    padding: 16px 20px 18px;
    border-top: 1px solid rgba(26,26,46,0.06);
}

.ceg-card-title {
    margin: 0 0 6px !important;
    line-height: 1.3 !important;
    font-family: 'Cormorant Garamond', serif !important;
}

/* ── No Galleries ───────────────────────────── */
.ceg-no-galleries {
    padding: 40px;
    text-align: center;
    color: #9a9aaa;
    background: var(--ceg-bg);
    border-radius: var(--ceg-radius);
    border: 2px dashed #ddd;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 768px) {
    .ceg-modal-header { padding: 14px 16px; gap: 10px; }
    .ceg-modal-body   { padding: 16px; }
    .ceg-modal-title  { font-size: 17px !important; }
    .ceg-modal-grid   { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
    .ceg-modal-img-item.is-cover { grid-column: span 1; }
    .ceg-modal-back span { display: none; }
}

/* ── GLightbox Overrides ─────────────────────── */
.glightbox-container .ginner-container {
    border-radius: 12px;
    overflow: hidden;
}

.glightbox-container .gdesc-inner {
    font-family: 'DM Sans', sans-serif;
    background: rgba(26,26,46,0.95);
    padding: 12px 20px;
}
