/* ═══════════════════════════════════════════════════════
   GALLERY PAGE STYLES
   NextCore Theme - Galeri Sayfası Stilleri
═══════════════════════════════════════════════════════ */

/* ── Variables -- */
:root {
    --gallery-primary: #2c9440;
    --gallery-primary-dark: #1e7a30;
    --gallery-primary-darker: #165a23;
    --gallery-accent: #82cb30;
    --gallery-accent-light: #a3e055;
    --gallery-white: #FFFFFF;
    --gallery-off-white: #F8FAF6;
    --gallery-light-green: #EFF7E8;
    --gallery-gray-50: #F9FAFB;
    --gallery-gray-100: #F3F4F6;
    --gallery-gray-200: #E5E7EB;
    --gallery-gray-300: #D1D5DB;
    --gallery-gray-400: #9CA3AF;
    --gallery-gray-500: #6B7280;
    --gallery-gray-600: #4B5563;
    --gallery-gray-700: #374151;
    --gallery-gray-800: #1F2937;
    --gallery-gray-900: #111827;
}

/* ── Container -- */
.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 768px) {
    .gallery-container {
        padding: 0 20px;
    }
}

/* ═══════════════════════════════════════════════════════
   GALLERY HERO SECTION
═══════════════════════════════════════════════════════ */
.gallery-hero {
    position: relative;
    padding: 140px 0 100px;
    background: linear-gradient(135deg, var(--gallery-primary-darker) 0%, var(--gallery-primary) 50%, var(--gallery-primary-dark) 100%);
    overflow: hidden;
    text-align: center;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
        radial-gradient(ellipse at 20% 20%, rgba(130, 203, 48, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(130, 203, 48, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.gallery-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, transparent 50%);
    pointer-events: none;
}

.gallery-hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
}

.gallery-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px 8px 10px;
    background: rgba(130, 203, 48, 0.15);
    border: 1px solid rgba(130, 203, 48, 0.3);
    border-radius: 50px;
    margin-bottom: 24px;
    backdrop-filter: blur(12px);
}

.gallery-hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gallery-accent);
    animation: pulse 2s ease infinite;
}

.gallery-hero-badge-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--gallery-accent-light);
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.5); opacity: 0; }
}

.gallery-hero-title {
    font-family: var(--font-display, 'DM Serif Display', Georgia, serif);
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.15;
    color: var(--gallery-white);
    margin-bottom: 20px;
}

.gallery-hero-desc {
    font-size: clamp(15px, 2vw, 18px);
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.75);
}

.gallery-hero-shape {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 80px;
    z-index: 3;
}

.gallery-hero-shape svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ═══════════════════════════════════════════════════════
   GALLERY FILTER SECTION
═══════════════════════════════════════════════════════ */
.gallery-section {
    padding: 80px 0 100px;
    background: var(--gallery-off-white);
}

/* Filter Buttons */
.gallery-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--gallery-white);
    border: 2px solid var(--gallery-gray-200);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gallery-gray-600);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.filter-btn svg {
    width: 18px;
    height: 18px;
}

.filter-btn:hover {
    border-color: var(--gallery-primary);
    color: var(--gallery-primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--gallery-primary) 0%, var(--gallery-primary-dark) 100%);
    border-color: var(--gallery-primary);
    color: var(--gallery-white);
    box-shadow: 0 4px 15px rgba(44, 148, 64, 0.3);
}

@media (max-width: 640px) {
    .gallery-filter {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
}

/* ═══════════════════════════════════════════════════════
   GALLERY GRID
═══════════════════════════════════════════════════════ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-item.hidden {
    display: none;
}

.gallery-item-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Gallery Placeholders */
.gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--gallery-light-green) 0%, var(--gallery-gray-50) 100%);
    border: 2px dashed var(--gallery-gray-200);
}

.gallery-placeholder svg {
    width: 48px;
    height: 48px;
    color: var(--gallery-primary);
    opacity: 0.6;
}

.gallery-placeholder span {
    font-size: 13px;
    color: var(--gallery-gray-500);
    font-weight: 500;
}

.gallery-placeholder--tesis { background: linear-gradient(135deg, #E8F4EF 0%, #D4EDE0 100%); }
.gallery-placeholder--yemek { background: linear-gradient(135deg, #FFF8E8 0%, #FFF0CC 100%); }
.gallery-placeholder--etkinlik { background: linear-gradient(135deg, #EBF3FF 0%, #D6E7FF 100%); }
.gallery-placeholder--ekip { background: linear-gradient(135deg, #F0EEFF 0%, #E0DCFF 100%); }
.gallery-placeholder--sertifika { background: linear-gradient(135deg, #FFF0F0 0%, #FFE0E0 100%); }

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(22, 90, 35, 0.9) 100%);
    display: flex;
    align-items: flex-end;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay-content {
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-item:hover .gallery-overlay-content {
    transform: translateY(0);
}

.gallery-item-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--gallery-white);
    margin-bottom: 4px;
}

.gallery-item-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
}

.gallery-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--gallery-white);
    color: var(--gallery-primary);
    font-size: 13px;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-view-btn svg {
    width: 14px;
    height: 14px;
}

.gallery-view-btn:hover {
    background: var(--gallery-accent);
    color: var(--gallery-white);
    transform: scale(1.05);
}

/* Grid Responsive */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 640px) {
    .gallery-section {
        padding: 60px 0 80px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .gallery-item {
        border-radius: 12px;
    }
    
    .gallery-overlay {
        padding: 16px;
    }
    
    .gallery-item-title {
        font-size: 14px;
    }
    
    .gallery-item-desc {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════
   LOAD MORE BUTTON
═══════════════════════════════════════════════════════ */
.gallery-load-more {
    text-align: center;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    background: var(--gallery-white);
    border: 2px solid var(--gallery-gray-200);
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    color: var(--gallery-gray-700);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.load-more-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.load-more-btn:hover {
    border-color: var(--gallery-primary);
    color: var(--gallery-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.load-more-btn:hover svg {
    transform: rotate(90deg);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════
   LIGHTBOX MODAL
═══════════════════════════════════════════════════════ */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--gallery-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-close svg {
    width: 24px;
    height: 24px;
}

.lightbox-close:hover {
    background: var(--gallery-primary);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--gallery-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-nav svg {
    width: 28px;
    height: 28px;
}

.lightbox-nav:hover {
    background: var(--gallery-primary);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image-wrapper {
    position: relative;
    max-width: 100%;
    max-height: 70vh;
    border-radius: 12px;
    overflow: hidden;
}

.lightbox-image-wrapper img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.lightbox-info {
    text-align: center;
    margin-top: 24px;
    padding: 0 20px;
}

.lightbox-info h4 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gallery-white);
    margin-bottom: 8px;
}

.lightbox-info p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
}

.lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 14px;
    color: var(--gallery-white);
    font-weight: 600;
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 44px;
        height: 44px;
    }
    
    .lightbox-nav svg {
        width: 20px;
        height: 20px;
    }
    
    .lightbox-prev {
        left: 12px;
    }
    
    .lightbox-next {
        right: 12px;
    }
    
    .lightbox-info h4 {
        font-size: 18px;
    }
    
    .lightbox-info p {
        font-size: 14px;
    }
    
    .lightbox-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }
}

/* ═══════════════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════════════ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item {
    animation: fadeInUp 0.6s ease forwards;
}

.gallery-item:nth-child(1) { animation-delay: 0.05s; }
.gallery-item:nth-child(2) { animation-delay: 0.1s; }
.gallery-item:nth-child(3) { animation-delay: 0.15s; }
.gallery-item:nth-child(4) { animation-delay: 0.2s; }
.gallery-item:nth-child(5) { animation-delay: 0.25s; }
.gallery-item:nth-child(6) { animation-delay: 0.3s; }
.gallery-item:nth-child(7) { animation-delay: 0.35s; }
.gallery-item:nth-child(8) { animation-delay: 0.4s; }
