/* ==========================================================================
   Mafficking Gallery Core Styles (Gothic-Victorian Theme)
   ========================================================================== */

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

/* Toolbar & Sorting */
.gallery-toolbar {
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.gallery-toolbar button {
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid #333;
    background: #1a1a1a;
    color: #dfdfdf;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.2s ease, color 0.2s ease;
}

.gallery-toolbar button:hover {
    background: #2a2a2a;
    color: #fff;
}

.gallery-toolbar button.active {
    background: #4a1525; /* Sleek Dark Velvet/Burgundy Accent */
    color: #fff;
    border-color: #6b2339;
}

/* Album Grid View */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.album-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.album-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
	max-width:400px;
	min-height:300px;
}

.album-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    border-color: #4a1525;
}

.album-cover {
    position: relative;
    width: 100%;
	max-width:400px;
    height: 180px;
    background: #0a0a0a;
    overflow: hidden;
}

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

.album-card:hover .album-cover img {
    filter: brightness(1.1);
}

.album-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.album-title {
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
}

.album-meta {
    font-size: 0.85em;
    color: #aaa;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.badge-recent {
    background: #271219;
    color: #e57373;
    border: 1px solid #4a1525;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Event Detail View & Media Grid */
.event-meta-block {
    margin-bottom: 24px;
    border-left: 3px solid #4a1525;
    padding-left: 15px;
}

.event-desc-text {
    margin-bottom: 35px;
    font-size: 1em;
    line-height: 1.6;
    color: #ccc;
    max-width: 900px;
}

.thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.thumb-item {
    width: 100%;
	max-width:400px;
    background: #111;
    border: 1px solid #222;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.thumb-item:hover {
    transform: scale(1.02);
    border-color: #4a1525;
    z-index: 2;
}

.thumb-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
}

.thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-video-icon {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: rgba(74, 21, 37, 0.85);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    border: 1px solid #6b2339;
}

/* Lightbox overlay custom modules */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.lightbox-content {
    position: relative;
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image,
.lightbox-video {
    max-width: 100%;
    max-height: 82vh;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    border: 1px solid #222;
}

.lightbox-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #4a1525;
    color: #fff;
    border: 1px solid #6b2339;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2em;
    transition: background 0.2s;
}

.lightbox-close:hover {
    background: #6b2339;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.lightbox-arrow {
    pointer-events: auto;
    cursor: pointer;
    color: #fff;
    font-size: 2.5em;
    padding: 20px;
    user-select: none;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    transition: color 0.2s;
}

.lightbox-arrow:hover {
    color: #e57373;
}

.lightbox-caption {
    margin-top: 12px;
    color: #fff;
    font-size: 1em;
    text-align: center;
}

.lightbox-index {
    margin-top: 6px;
    color: #888;
    font-size: 0.85em;
}

/* ==========================================================================
   VICTORIAN GALLERY VAULT TILE (Compact ~300px Height)
   ========================================================================== */

.pg-gallery-vault-card {
    background-color: var(--parchment-aged, #E8DCC4);
    color: #111111;
    border: 4px double #111111;
    outline: 2px solid #2B1B10;
    outline-offset: -5px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    padding: 1.15rem 1rem; /* Tightened vertical padding */
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    box-sizing: border-box;
    transform: rotate(-0.8deg);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.pg-gallery-vault-card:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.pg-gallery-vault-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-align: center;
}

.pg-gallery-vault-title {
    font-family: var(--font-headings, serif);
    font-size: 1.15rem; /* Scaled down slightly */
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.2;
    margin: 0;
    color: #111111;
}

.pg-gallery-vault-divider {
    height: 4px;
    width: 80%;
    margin: 0.5rem auto; /* Reduced vertical spacing */
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M0,5 L40,5 L45,0 L50,10 L55,0 L60,5 L100,5' stroke='%23111' stroke-width='2' fill='none'/%3E%3C/svg%3E") repeat-x;
    border: none;
    opacity: 0.85;
}

.pg-gallery-vault-desc {
    font-family: var(--font-prose, Georgia, serif);
    font-size: 0.88rem;
    line-height: 1.4;
    font-style: italic;
    margin: 0 0 0.85rem 0; /* Reduced bottom gap */
    color: #111111;
    flex-grow: 1;
}

.pg-gallery-vault-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem; /* Tightened gap between button and subtext */
    align-items: center;
    margin-top: auto;
}

.pg-gallery-vault-btn {
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
    background-color: #111111;
    color: var(--parchment-aged, #E8DCC4) !important;
    text-decoration: none;
    font-family: var(--font-headings, sans-serif);
    font-weight: bold;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 7px 10px; /* Reduced vertical padding */
    border: 1px solid #111111;
    transition: all 0.2s ease;
    text-align: center;
}

.pg-gallery-vault-btn:hover {
    background-color: transparent;
    color: #111111 !important;
}

.pg-gallery-vault-subtext {
    font-family: var(--font-prose, Georgia, serif);
    font-size: 0.78rem;
    font-style: italic;
    margin: 0;
    color: #111111;
}

.pg-gallery-vault-sublink {
    color: #111111 !important;
    font-weight: bold;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

.pg-gallery-vault-sublink:hover {
    opacity: 0.7;
}
/* ==========================================================================
   VICTORIAN GALLERY VAULT TILE (First Card in Gallery Grid)
   ========================================================================== */

.pg-gallery-vault-card {
    background-color: var(--parchment-aged, #E8DCC4);
    color: #111111;
    border: 4px double #111111;
    outline: 2px solid #2B1B10;
    outline-offset: -7px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    padding: 1.3rem 1.2rem;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%; /* Ensures tile stretches to match row height */
    box-sizing: border-box;
    transform: rotate(-0.8deg);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.pg-gallery-vault-card:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.pg-gallery-vault-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-align: center;
}

.pg-gallery-vault-header {
    margin-bottom: 0.5rem;
}

.pg-gallery-vault-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.25rem;
    line-height: 1;
}

.pg-gallery-vault-title {
    font-family: var(--font-headings, serif);
    font-size: 1.15rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.2;
    margin: 0;
    color: #111111;
}

.pg-gallery-vault-divider {
    height: 6px;
    width: 85%;
    margin: 0.50rem auto;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M0,5 L40,5 L45,0 L50,10 L55,0 L60,5 L100,5' stroke='%23111' stroke-width='2' fill='none'/%3E%3C/svg%3E") repeat-x;
    border: none;
    opacity: 0.85;
}

.pg-gallery-vault-desc {
    font-family: var(--font-prose, Georgia, serif);
    font-size: 0.90rem;
    line-height: 1.5;
    font-style: italic;
    margin: 0 0 1.5rem 0;
    color: #111111;
    flex-grow: 1; /* Pushes action buttons down to align with bottom of grid */
}

.pg-gallery-vault-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    margin-top: auto;
}

.pg-gallery-vault-btn {
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
    background-color: #111111;
    color: var(--parchment-aged, #E8DCC4) !important;
    text-decoration: none;
    font-family: var(--font-headings, sans-serif);
    font-weight: bold;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 7px 14px;
    border: 1px solid #111111;
    transition: all 0.2s ease;
    text-align: center;
}

.pg-gallery-vault-btn:hover {
    background-color: transparent;
    color: #111111 !important;
}

.pg-gallery-vault-subtext {
    font-family: var(--font-prose, Georgia, serif);
    font-size: 0.82rem;
    font-style: italic;
    margin: 0;
    color: #111111;
}

.pg-gallery-vault-sublink {
    color: #111111 !important;
    font-weight: bold;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

.pg-gallery-vault-sublink:hover {
    opacity: 0.7;
}