/* ============================================================
   VD Cloudinary Gallery Widget — gallery.css
   ============================================================ */

/* ── HERO ── */
.vd-cg-hero {
    position: relative;
    min-height: 460px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.vd-cg-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(90,10,10,0.72) 0%, rgba(60,10,10,0.55) 100%);
}
.vd-cg-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 200px 20px 60px; /* top clears header + breathing room */
    width: 100%;
}
.vd-cg-hero-title {
    font-family: 'Baloo Bhai 2', cursive;
    font-size: 52px;
    font-weight: 800;
    margin: 0 0 10px;
    color: #fff;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
    line-height: 1.1;
}
.vd-cg-hero-subtitle {
    font-size: 18px;
    opacity: 0.92;
    margin: 10px 0 0;
    color: #ffeac0;
    font-weight: 400;
}
.vd-cg-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 14px auto;
}
.vd-cg-ornament span:not(.vd-cg-diamond) {
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(to right, transparent, #E9B855, transparent);
    border-radius: 2px;
}
.vd-cg-diamond {
    color: #E9B855;
    font-size: 18px;
}
.vd-cg-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 6px 20px;
    border-radius: 30px;
    font-size: 14px;
    margin-top: 18px;
}
.vd-cg-breadcrumb a { color: #E9B855; text-decoration: none; font-weight: 600; }
.vd-cg-breadcrumb span:last-child { color: #fff; opacity: 0.8; }

/* ── TABS ── */
.vd-cg-tabs-section {
    background: #fff;
    border-bottom: 2px solid #f0e6d2;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.vd-cg-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 0;
    scrollbar-width: none;
}
.vd-cg-tabs::-webkit-scrollbar { display: none; }
.vd-cg-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1px solid #e0d0b0;
    border-radius: 30px;
    background: transparent;
    color: #5a2020;
    font-family: 'Baloo Bhai 2', cursive;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.vd-cg-tab:hover {
    background: rgba(122,25,26,0.08);
    border-color: #7A191A;
}
.vd-cg-tab.active {
    background: #7A191A;
    color: #fff;
    border-color: #7A191A;
    box-shadow: 0 4px 12px rgba(122,25,26,0.35);
}
.vd-cg-tab-emoji { font-size: 16px; }
.vd-cg-tab-icon {
    font-size: 14px;
    color: #7A191A;
}
.vd-cg-tab.active .vd-cg-tab-icon {
    color: #E9B855;
}

/* ── MAIN GRID ── */
.vd-cg-main-section {
    padding: 50px 0 30px;
    background: #FFFDF9;
}
.vd-cg-grid {
    display: grid;
    gap: 22px;
}
.vd-cg-cols-2 { grid-template-columns: repeat(2, 1fr); }
.vd-cg-cols-3 { grid-template-columns: repeat(3, 1fr); }
.vd-cg-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Hidden folders (beyond per-page) */
.vd-cg-folder-card.vd-hidden {
    display: none;
}
/* Filtered-out cards */
.vd-cg-folder-card.vd-filtered-out {
    display: none;
}

.vd-cg-folder-card {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.09);
    background: #fff;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}
.vd-cg-folder-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(122,25,26,0.2);
}
.vd-cg-card-img-wrap {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}
.vd-cg-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}
.vd-cg-folder-card:hover .vd-cg-card-img-wrap img {
    transform: scale(1.07);
}
.vd-cg-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 60%);
}
.vd-cg-card-info {
    position: absolute;
    bottom: 10px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}
.vd-cg-camera-icon {
    font-size: 14px;
    color: #E9B855;
}
.vd-cg-card-zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(122,25,26,0.85);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}
.vd-cg-folder-card:hover .vd-cg-card-zoom-icon {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}
.vd-cg-card-label {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.vd-cg-folder-emoji { font-size: 20px; flex-shrink: 0; }
.vd-cg-folder-icon {
    font-size: 18px;
    color: #7A191A;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: #fdf3e7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vd-cg-folder-name {
    font-family: 'Baloo Bhai 2', cursive;
    font-size: 16px;
    font-weight: 700;
    color: #7A191A;
    margin: 0;
    line-height: 1.2;
}

/* ── LOAD MORE ── */
.vd-cg-load-more-wrap {
    text-align: center;
    margin-top: 36px;
}
.vd-cg-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #7A191A;
    color: #fff;
    border: none;
    padding: 14px 36px;
    border-radius: 40px;
    font-family: 'Baloo Bhai 2', cursive;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(122,25,26,0.3);
}
.vd-cg-load-more-btn:hover {
    background: #5e1112;
    box-shadow: 0 8px 28px rgba(122,25,26,0.45);
    transform: translateY(-2px);
}
.vd-cg-load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ── RECENT GALLERY ── */
.vd-cg-recent-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #fff9f0 0%, #fff 100%);
    border-top: 3px solid #f0e6d2;
}
.vd-cg-recent-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
}
.vd-cg-recent-title {
    font-family: 'Baloo Bhai 2', cursive;
    font-size: 32px;
    font-weight: 800;
    color: #7A191A;
    margin: 0;
}
.vd-cg-recent-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.vd-cg-recent-card {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    background: #fff;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}
.vd-cg-recent-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(122,25,26,0.18);
}
.vd-cg-recent-img-wrap {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}
.vd-cg-recent-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    display: block;
}
.vd-cg-recent-card:hover .vd-cg-recent-img-wrap img { transform: scale(1.05); }
.vd-cg-recent-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(90,10,10,0.5) 0%, transparent 70%);
}
.vd-cg-recent-info {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.vd-cg-recent-date {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #888;
}
.vd-cg-recent-name {
    font-family: 'Baloo Bhai 2', cursive;
    font-size: 18px;
    font-weight: 700;
    color: #7A191A;
    margin: 0;
}
.vd-cg-recent-count {
    font-size: 13px;
    color: #888;
}
.vd-cg-recent-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #7A191A;
    text-decoration: none;
    border: 1.5px solid #7A191A;
    padding: 6px 16px;
    border-radius: 20px;
    transition: all 0.25s;
    width: fit-content;
}
.vd-cg-recent-btn:hover {
    background: #7A191A;
    color: #fff;
}

/* ── LIGHTBOX ── */
.vd-cg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(10,5,5,0.96);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.vd-cg-lightbox.open {
    opacity: 1;
    pointer-events: all;
}
.vd-cg-lb-backdrop {
    display: none;
}
.vd-cg-lb-close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 22px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100001;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vd-cg-lb-close:hover { background: #7A191A; }
.vd-cg-lb-prev, .vd-cg-lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 28px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100001;
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vd-cg-lb-prev { left: 20px; }
.vd-cg-lb-next { right: 20px; }
.vd-cg-lb-prev:hover { background: #7A191A; transform: translateY(-50%) scale(1.1); }
.vd-cg-lb-next:hover { background: #7A191A; transform: translateY(-50%) scale(1.1); }

.vd-cg-lb-content {
    position: relative;
    max-width: 90vw;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#vd-cg-lb-img {
    max-width: 90vw;
    max-height: 72vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    transition: opacity 0.25s;
    display: block;
}
.vd-cg-lb-caption {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    margin-top: 10px;
    text-align: center;
}
.vd-cg-lb-counter {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    margin-top: 4px;
}
.vd-cg-lb-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    display: none;
}
.vd-cg-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid rgba(255,255,255,0.15);
    border-top-color: #E9B855;
    border-radius: 50%;
    animation: vdSpin 0.8s linear infinite;
}
@keyframes vdSpin { to { transform: rotate(360deg); } }

.vd-cg-lb-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-top: 16px;
    max-width: 90vw;
    padding: 4px 0 8px;
    scrollbar-width: thin;
    scrollbar-color: #7A191A transparent;
}
.vd-cg-lb-thumbs::-webkit-scrollbar { height: 4px; }
.vd-cg-lb-thumbs::-webkit-scrollbar-thumb { background: #7A191A; border-radius: 2px; }
.vd-cg-lb-thumb {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    opacity: 0.55;
    border: 2px solid transparent;
    transition: all 0.2s;
    flex-shrink: 0;
}
.vd-cg-lb-thumb.active,
.vd-cg-lb-thumb:hover {
    opacity: 1;
    border-color: #E9B855;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
    .vd-cg-cols-4 { grid-template-columns: repeat(3, 1fr); }
    .vd-cg-hero-title { font-size: 40px; }
}
@media (max-width: 768px) {
    .vd-cg-hero-title { font-size: 30px; }
    .vd-cg-hero-subtitle { font-size: 15px; }
    .vd-cg-hero { min-height: 360px; }
    .vd-cg-hero-content { padding: 160px 16px 50px; }
    .vd-cg-cols-3,
    .vd-cg-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .vd-cg-cols-2 { grid-template-columns: 1fr; }
    .vd-cg-recent-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
    .vd-cg-recent-title { font-size: 22px; }
    .vd-cg-main-section { padding: 30px 0 20px; }
    .vd-cg-lb-prev { left: 8px; }
    .vd-cg-lb-next { right: 8px; }
    .vd-cg-lb-close { top: 12px; right: 12px; }
}
@media (max-width: 480px) {
    .vd-cg-hero-title { font-size: 24px; }
    .vd-cg-hero { min-height: 320px; }
    .vd-cg-hero-content { padding: 140px 14px 40px; }
    .vd-cg-hero-subtitle { font-size: 13px; }
    .vd-cg-breadcrumb { font-size: 12px; padding: 5px 14px; }
    .vd-cg-cols-2,
    .vd-cg-cols-3,
    .vd-cg-cols-4 { grid-template-columns: 1fr; }
    .vd-cg-recent-grid { grid-template-columns: 1fr; }
    .vd-cg-tabs { gap: 6px; }
    .vd-cg-tab { font-size: 12px; padding: 6px 12px; }
    .vd-cg-folder-name { font-size: 14px; }
    .vd-cg-lb-thumb { width: 48px; height: 36px; }
}
