/* Gallery Detail Styles */

/* ── Page Container ──────────────────────────────── */
.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.page-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1a2a4d 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
    margin-top: 20px;
}

.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

.content-section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    margin-top: 80px;
}

/* ── Gallery Detail Section ──────────────────────── */
.gd-section {
    background: #ffffff;;
    padding: 50px 0 80px;
    min-height: 60vh;
}

.gd-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
    width: 100%;
}

.gd-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    background: var(--accent-color, #ff6b00);
    color: white;
    font-weight: 700;
    text-decoration: none;
    border: none;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    transition: all 0.25s ease;
}

.gd-back-btn:hover {
    transform: translateY(-2px);
    background: #e25f00;
    color: white;
}

/* ── Header ──────────────────────────────────────── */
.gd-header {
    margin-bottom: 40px;
}

.gd-title {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.gd-desc {
    font-family: 'Lato', sans-serif;
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 12px;
}

.gd-underline {
    width: 50px;
    height: 3px;
    background: var(--accent-color);
}

/* ── Thumbnail Grid ──────────────────────────────── */
.gd-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

/* ── Thumbnail card ──────────────────────────────── */
.gd-thumb {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border: none;
    padding: 0;
    cursor: pointer;
    background: #1e293b;
    display: block;
    width: 100%;
}

.gd-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gd-thumb:hover .gd-thumb-img {
    transform: scale(1.07);
}

.gd-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 107, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gd-thumb:hover .gd-thumb-overlay {
    opacity: 1;
}

/* ── Empty ───────────────────────────────────────── */
.gd-empty {
    text-align: center;
    padding: 80px 20px;
    font-family: 'Lato', sans-serif;
    font-size: 1.1rem;
    color: #64748b;
}

/* ── Lightbox Backdrop ───────────────────────────── */
.lb-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lb-backdrop.active {
    display: flex;
}

.lb-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Lightbox Image ──────────────────────────────── */
.lb-img-wrap {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    display: block;
    border: 2px solid rgba(255,255,255,0.1);
}

/* ── Close Button ────────────────────────────────── */
.lb-close {
    position: absolute;
    top: 24px;
    right: 28px;
    background: var(--accent-color);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.3s ease;
}

.lb-close:hover {
    background: #e65100;
}

/* ── Arrows ──────────────────────────────────────── */
.lb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 107, 0, 0.85);
    color: white;
    border: none;
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.3s ease;
    clip-path: polygon(20% 0, 100% 0, 100% 80%, 80% 100%, 0 100%, 0 20%);
}

.lb-arrow:hover {
    background: var(--accent-color);
}

.lb-prev {
    left: 24px;
}

.lb-next {
    right: 24px;
}

/* ── Counter ─────────────────────────────────────── */
.lb-counter {
    position: absolute;
    bottom: 24px;
    right: 28px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 16px;
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 1200px) {
    .page-header h1 {
        font-size: 2.8rem;
    }

    .gd-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .gd-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gd-container {
        padding: 0 30px;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 60px 20px;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    .content-section {
        padding: 60px 20px;
        margin-top: 60px;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 40px 15px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .content-section {
        padding: 40px 15px;
        margin-top: 40px;
    }

    .gd-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .gd-container {
        padding: 0 16px;
    }

    .lb-prev {
        left: 10px;
    }

    .lb-next {
        right: 10px;
    }
}
