:root {
    --navy: #1a2340;
    --gold: #f0c040;
}

/* ── Shared section wrapper ── */
.pg-section {
    padding: 60px 0 72px;
    background: #f7f5f0;
}

.pg-section--dark {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.pg-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ── Section headings ── */
.pg-section-heading {
    font-family: "Playfair Display", serif;
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 32px;
    position: relative;
    display: inline-block;
}

.pg-section-heading::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--gold) 0%, transparent 100%);
}

.pg-section-heading--light {
    color: var(--gold);
}

.pg-section-heading--light::after {
    background: linear-gradient(90deg, var(--gold) 0%, transparent 100%);
}

/* ── Photo caption ── */
.pg-caption {
    font-family: "Roboto", sans-serif;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin-top: 20px;
}

/* ── Masonry grid ── */
.pg-masonry {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 10px;
}

.pg-item {
    overflow: hidden;
    border-radius: 4px;
    background: #ddd;
    cursor: zoom-in;
    position: relative;
}

.pg-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition:
        transform 0.35s ease,
        opacity 0.2s;
}

.pg-item:hover img {
    transform: scale(1.04);
    opacity: 0.9;
}

/* Tall item: spans 2 rows */
.pg-item--tall {
    grid-row: span 2;
}

/* Wide item: spans 2 columns */
.pg-item--wide {
    grid-column: span 2;
}

/* ── Album grid ── */
.pg-albums {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.pg-album-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(244, 196, 48, 0.2);
    border-radius: 8px;
    overflow: hidden;
    transition:
        transform 0.25s,
        box-shadow 0.25s,
        border-color 0.25s;
    cursor: pointer;
}

.pg-album-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    border-color: var(--gold);
}

.pg-album-cover {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #111;
}

.pg-album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.pg-album-card:hover .pg-album-cover img {
    transform: scale(1.05);
}

.pg-album-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: flex-end;
    padding: 10px 12px;
    opacity: 0;
    transition: opacity 0.25s;
}

.pg-album-card:hover .pg-album-overlay {
    opacity: 1;
}

.pg-album-count {
    font-family: "Roboto", sans-serif;
    font-size: 0.78rem;
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pg-album-info {
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pg-album-title {
    font-family: "Playfair Display", serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

.pg-album-date {
    font-family: "Roboto", sans-serif;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Category tags */
.pg-album-tag {
    font-family: "Roboto", sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    width: fit-content;
}

.pg-album-tag--aaig {
    background: rgba(240, 192, 64, 0.2);
    color: var(--gold);
}
.pg-album-tag--dtaa {
    background: rgba(99, 179, 237, 0.2);
    color: #63b3ed;
}
.pg-album-tag--events {
    background: rgba(104, 211, 145, 0.2);
    color: #68d391;
}
.pg-album-tag--programs {
    background: rgba(246, 173, 85, 0.2);
    color: #f6ad55;
}

/* ── Photo lightbox ── */
.pg-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.93);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.pg-lightbox.open {
    display: flex;
}

.pg-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 3px;
    animation: pgLbIn 0.22s ease;
}

@keyframes pgLbIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.pg-lightbox-close {
    position: absolute;
    top: 18px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.4rem;
    cursor: pointer;
    opacity: 0.7;
    line-height: 1;
}

.pg-lightbox-close:hover {
    opacity: 1;
}

/* For Album */
.admin-actions-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 1 !important;
    z-index: 10;
}

.pg-item:hover .admin-actions-overlay {
    opacity: 1;
}

.admin-actions-overlay button {
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.admin-actions-overlay form,
.admin-actions-overlay button {
    position: relative;
    z-index: 10;
}

.pg-album-info .btn,
.pg-album-info form {
    position: relative;
    z-index: 10;
}

.pg-album-info .btn:hover {
    cursor: pointer;
}

/* Admin Side */
.input-group-custom {
    position: relative;
    display: flex;
    width: 100%;
}

.input-group-custom .form-control,
.input-group-custom .form-select {
    padding-right: 25px;
}

.required-asterisk {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #dc3545;
    font-weight: bold;
    pointer-events: none;
}

.input-group-custom input:not(:placeholder-shown) + .required-asterisk {
    display: none;
}

.border-gold {
    border: 1px solid var(--gold) !important;
}

.bg-navy {
    background-color: var(--navy) !important;
}

.text-gold {
    color: var(--gold) !important;
}

/* Modal Styling */
.modal-content {
    background-color: #ffffff;
    border: 2px solid var(--ust-gold);
}

.modal-header {
    background: linear-gradient(
        135deg,
        var(--ust-gold) 0%,
        var(--ust-light-gold) 100%
    );
    color: var(--ust-dark);
    border-bottom: 2px solid var(--ust-dark);
}

.modal-title {
    font-weight: 700;
}

.modal-body {
    color: #000000;
}

.modal-body label {
    color: #000000;
    font-weight: 600;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
    .pg-masonry {
        grid-template-columns: repeat(3, 1fr);
    }
    .pg-albums {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .pg-masonry {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }
    .pg-albums {
        grid-template-columns: repeat(2, 1fr);
    }
    .pg-item--tall {
        grid-row: span 1;
    }
    .pg-item--wide {
        grid-column: span 1;
    }
}

@media (max-width: 480px) {
    .pg-masonry {
        grid-template-columns: 1fr;
    }
    .pg-albums {
        grid-template-columns: 1fr;
    }
    .pg-container {
        padding: 0 16px;
    }
}
