/* ========================================
   Gallery-specific styles
   Note: Background styling is centralized in styles.css
   ======================================== */

/* Gallery wrapper */
.gallery-wrapper {
    position: relative;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2em;
}

/* Photo grid layout */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2em;
    padding: 2em;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .photo-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5em;
        padding: 1em;
    }
}

/* Photo card styling with glass effect */
.photo-card {
    /* Remove background from card - image will fill the space */
    background: transparent;
    /* Extends glass-base - uses variables */
    backdrop-filter: blur(var(--glass-blur-gallery)) saturate(var(--glass-saturation-gallery));
    -webkit-backdrop-filter: blur(var(--glass-blur-gallery)) saturate(var(--glass-saturation-gallery));
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-medium);
    padding: 0; /* No padding - image fills to border */
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    isolation: isolate;
    box-shadow: 
        0 8px 32px rgba(93, 143, 179, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Glass highlight layer - border rim light effect */
.photo-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 2px; /* Matches border width for rim effect */
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0) 100%);
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.7;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 2;
}

/* Illumination layer */
.photo-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(93, 143, 179, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}

.photo-card:hover::before {
    opacity: 1;
}

.photo-card:hover::after {
    opacity: 0.8;
}

.photo-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 20px 48px rgba(93, 143, 179, 0.25),
        0 8px 16px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    /* Keep background transparent on hover - glass effect comes from backdrop-filter */
    background: transparent;
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Border radius = container radius (20px) - border width (2px) = 18px
       This ensures concentric rounded corners where the radius difference 
       equals the distance from border edge to image edge */
    border-radius: var(--radius-lg);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
    display: block;
}

.photo-card:hover img {
    transform: scale(1.05);
}

/* Gallery container for carousel functionality */
.gallery-container {
    overflow: hidden;
    white-space: nowrap;
    display: inline-block;
}

.gallery-item {
    display: inline-block;
    margin: 0 10px;
    transition: transform 0.5s ease;
}

.gallery-arrow {
    background: linear-gradient(135deg, rgba(93, 143, 179, 0.8) 0%, rgba(46, 46, 46, 0.9) 100%);
    color: white;
    border: 2px solid rgba(93, 143, 179, 0.5);
    border-radius: var(--radius-badge);
    padding: 10px 15px;
    cursor: pointer;
    z-index: 1;
    transition: all 0.3s ease;
}

.gallery-arrow:hover {
    background: linear-gradient(135deg, rgba(93, 143, 179, 1) 0%, rgba(46, 46, 46, 1) 100%);
    border-color: rgba(93, 143, 179, 0.8);
    transform: scale(1.05);
}

.gallery-arrow.left {
    margin-right: 10px;
}

.gallery-arrow.right {
    margin-left: 10px;
}