/**
 * Fenerbahçe Ankara Spor Okulları - Foto Galeri
 * Premium Gallery Grid Design - Container Compatible
 */

/* ===== Fenerbahçe Color Palette ===== */
:root {
    --fb-yellow: #FEE101;
    --fb-navy: #001489;
    --fb-dark-navy: #00104D;
    --fb-light-yellow: #FFF9CC;
}

/* ===== Gallery Header Section ===== */
.gallery-header {
    background: linear-gradient(135deg, var(--fb-navy) 0%, var(--fb-dark-navy) 100%);
    padding: 40px 30px;
    margin: 0 -15px 50px -15px;
    position: relative;
    overflow: hidden;
    border-radius: 0;
}

.gallery-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(254,225,1,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.gallery-header-content {
    position: relative;
    z-index: 2;
}

.gallery-title {
    margin: 0;
    padding: 0;
    color: var(--fb-yellow);
    font-size: 42px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.gallery-title i {
    margin-right: 15px;
}

.gallery-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin-top: 10px;
    letter-spacing: 1px;
}

.gallery-social {
    text-align: center;
    margin-top: 20px;
}

.gallery-social a {
    display: inline-block;
    width: 45px;
    height: 45px;
    line-height: 45px;
    background: rgba(254, 225, 1, 0.1);
    border: 2px solid var(--fb-yellow);
    border-radius: 50%;
    color: var(--fb-yellow);
    font-size: 18px;
    margin: 0 8px;
    transition: all 0.3s ease;
}

.gallery-social a:hover {
    background: var(--fb-yellow);
    color: var(--fb-navy);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 10px 20px rgba(254, 225, 1, 0.3);
}

/* ===== Gallery Grid ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ===== Gallery Card ===== */
.gallery-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 20, 137, 0.2);
}

/* ===== Image Container ===== */
.gallery-image-wrapper {
    position: relative;
    overflow: hidden;
    padding-top: 66.67%; /* 3:2 Aspect Ratio */
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.gallery-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===== Overlay Effect ===== */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(0, 20, 137, 0) 0%, 
        rgba(0, 20, 137, 0.4) 50%,
        rgba(0, 16, 77, 0.9) 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay-content {
    color: white;
    width: 100%;
}

.gallery-overlay-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--fb-yellow);
}

.gallery-overlay-date {
    font-size: 13px;
    opacity: 0.9;
    margin: 0;
}

/* ===== Card Content ===== */
.gallery-card-content {
    padding: 25px;
}

.gallery-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--fb-dark-navy);
    margin: 0 0 12px 0;
    line-height: 1.4;
    min-height: 56px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-card-title a {
    color: var(--fb-dark-navy);
    text-decoration: none;
    transition: color 0.3s ease;
}

.gallery-card-title a:hover {
    color: var(--fb-navy);
}

.gallery-card-date {
    color: #999;
    font-size: 13px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.gallery-card-date i {
    margin-right: 6px;
    color: var(--fb-yellow);
}

.gallery-card-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Card Footer ===== */
.gallery-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.gallery-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--fb-yellow) 0%, #FFD700 100%);
    color: var(--fb-dark-navy);
    font-weight: 600;
    font-size: 14px;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(254, 225, 1, 0.3);
}

.gallery-btn i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.gallery-btn:hover {
    background: linear-gradient(135deg, #FFD700 0%, var(--fb-yellow) 100%);
    color: var(--fb-dark-navy);
    transform: translateX(3px);
    box-shadow: 0 6px 20px rgba(254, 225, 1, 0.4);
    text-decoration: none;
}

.gallery-btn:hover i {
    transform: translateX(4px);
}

/* ===== Share Button ===== */
.gallery-share {
    position: relative;
}

.gallery-share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f8f8;
    color: var(--fb-navy);
    border: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-share-btn:hover {
    background: var(--fb-navy);
    color: var(--fb-yellow);
    border-color: var(--fb-navy);
    transform: rotate(90deg);
}

.gallery-share-menu {
    position: absolute;
    bottom: 50px;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 10px;
    display: none;
    min-width: 160px;
    z-index: 100;
}

.gallery-share.active .gallery-share-menu {
    display: block;
    animation: shareMenuSlideUp 0.3s ease;
}

@keyframes shareMenuSlideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-share-menu a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.gallery-share-menu a:hover {
    background: var(--fb-light-yellow);
    color: var(--fb-navy);
}

.gallery-share-menu i {
    width: 24px;
    font-size: 16px;
    margin-right: 10px;
}

/* ===== Photo Count Badge ===== */
.photo-count-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--fb-yellow) 0%, #FFD700 100%);
    color: var(--fb-dark-navy);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
}

.photo-count-badge i {
    font-size: 14px;
}

/* ===== Pagination ===== */
.pagination-wrapper {
    margin-top: 60px;
    padding: 30px 0;
    border-top: 2px solid #f0f0f0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: var(--fb-dark-navy);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination .page-numbers:hover {
    background: var(--fb-light-yellow);
    border-color: var(--fb-yellow);
    color: var(--fb-navy);
    transform: translateY(-2px);
}

.pagination .page-numbers.current {
    background: linear-gradient(135deg, var(--fb-yellow) 0%, #FFD700 100%);
    border-color: var(--fb-yellow);
    color: var(--fb-dark-navy);
    box-shadow: 0 4px 12px rgba(254, 225, 1, 0.3);
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next {
    font-weight: 600;
}

.pagination .page-numbers.dots {
    border: none;
    background: transparent;
    cursor: default;
}

.pagination .page-numbers.dots:hover {
    transform: none;
    background: transparent;
}

/* ===== Empty State ===== */
.gallery-empty {
    text-align: center;
    padding: 80px 20px;
}

.gallery-empty-icon {
    font-size: 80px;
    color: #ddd;
    margin-bottom: 20px;
}

.gallery-empty-text {
    font-size: 18px;
    color: #999;
    margin: 0;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 991px) {
    .gallery-title {
        font-size: 32px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .pagination .page-numbers {
        min-width: 40px;
        height: 40px;
        font-size: 14px;
        padding: 0 12px;
    }
}

@media (max-width: 768px) {
    .gallery-header {
        padding: 30px 20px;
        margin: 0 -15px 30px -15px;
    }
    
    .gallery-title {
        font-size: 28px;
        letter-spacing: 1px;
    }
    
    .gallery-title i {
        margin-right: 10px;
    }
    
    .gallery-card-content {
        padding: 20px;
    }
    
    .gallery-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .pagination-wrapper {
        margin-top: 40px;
    }
    
    .pagination {
        gap: 6px;
    }
    
    .pagination .page-numbers {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .gallery-title {
        font-size: 24px;
    }
    
    .gallery-subtitle {
        font-size: 14px;
    }
    
    .gallery-social a {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 16px;
        margin: 0 5px;
    }
    
    .gallery-grid {
        gap: 15px;
        margin-top: 20px;
    }
}
