/**
 * FSS Photo Gallery Styles
 */

/* Single Gallery Page */
.fss-gallery-single {
    padding: 60px 0;
}

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

/* Gallery Header */
.gallery-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #ecf0f1;
}

.gallery-header h1 {
    font-size: 36px;
    color: #2c3e50;
    margin-bottom: 20px;
}

.gallery-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    font-size: 16px;
    color: #666;
}

.meta-item {
    display: inline-block;
}

.meta-item strong {
    color: #2c5f8d;
}

/* Gallery Description */
.gallery-description {
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: center;
    font-size: 16px;
    line-height: 1.6;
    color: #555;
}

/* Gallery Grid */
.fss-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #f8f9fa;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.gallery-item a {
    display: block;
    position: relative;
    padding-bottom: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Gallery Count */
.gallery-count {
    text-align: center;
    font-size: 18px;
    color: #666;
    font-weight: 500;
    margin-bottom: 30px;
}

/* Navigation */
.gallery-navigation {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #ecf0f1;
}

.back-to-galleries {
    display: inline-block;
    padding: 12px 24px;
    background: #2c5f8d;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.back-to-galleries:hover {
    background: #1f4564;
    color: white;
}

/* Gallery Archive/Landing Page */
.fss-gallery-archive {
    padding: 60px 0;
}

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

.archive-header {
    text-align: center;
    margin-bottom: 50px;
}

.archive-header h1 {
    font-size: 42px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.archive-header p {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Gallery Cards Grid */
.galleries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.gallery-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.gallery-card-image {
    position: relative;
    padding-bottom: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
    background: #f0f0f0;
}

.gallery-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-card-image img {
    transform: scale(1.08);
}

.gallery-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(44, 95, 141, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* Type badge — distinguishes officer-curated event galleries from owner-uploaded sloop photos */
.gallery-card-type-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: white;
}

.gallery-card-type-badge--event {
    background: rgba(44, 95, 141, 0.95);
}

.gallery-card-type-badge--sloop {
    background: rgba(45, 117, 88, 0.95);
}

/* Sloop gallery cards get a distinct accent border for at-a-glance differentiation */
.gallery-card--sloop {
    border-left: 4px solid #2d7558;
}

.gallery-card--event {
    border-left: 4px solid #2c5f8d;
}

.gallery-card-content {
    padding: 25px;
}

.gallery-card-title {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 12px;
    line-height: 1.3;
}

.gallery-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.gallery-card-title a:hover {
    color: #2c5f8d;
}

.gallery-card-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
    flex-wrap: wrap;
}

.gallery-card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.gallery-card-description {
    font-size: 15px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 15px;
}

.gallery-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #ecf0f1;
}

.gallery-image-count {
    font-size: 14px;
    color: #2c5f8d;
    font-weight: 600;
}

.gallery-view-link {
    color: #2c5f8d;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s ease;
}

.gallery-view-link:hover {
    color: #1f4564;
}

/* Responsive */
@media (max-width: 768px) {
    .fss-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .galleries-grid {
        grid-template-columns: 1fr;
    }

    .gallery-header h1 {
        font-size: 28px;
    }

    .gallery-meta {
        flex-direction: column;
        gap: 10px;
    }

    .archive-header h1 {
        font-size: 32px;
    }
}
