/* 
   Gallery/Index.cshtml - Ultra Modern Gallery CSS
   Kırmızı & Siyah Tema | Premium Masonry Layout
*/

/*===========================================
  GALLERY HERO
===========================================*/
.gallery-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    padding: 7rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.gallery-hero .container {
    position: relative;
    z-index: 1;
}

.hero-icon-large {
    width: 120px;
    height: 120px;
    background: rgba(220, 0, 0, 0.15);
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 15px 40px rgba(220, 0, 0, 0.3);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

.hero-icon-large i {
    font-size: 4rem;
    color: var(--primary-color);
}

.gallery-hero h1 {
    color: var(--white);
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
}

.hero-breadcrumb .breadcrumb {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    display: inline-flex;
}

.hero-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: rgba(255, 255, 255, 0.5);
}

.hero-breadcrumb .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition-fast);
}

.hero-breadcrumb .breadcrumb-item a:hover {
    color: var(--white);
}

.hero-breadcrumb .breadcrumb-item.active {
    color: var(--white);
}

/*===========================================
  GALLERY SECTION
===========================================*/
.gallery-section {
    padding: 5rem 0;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.section-title .divider {
    width: 100px;
    height: 4px;
    background: var(--gradient-red);
    margin: 0 auto;
    border-radius: 2px;
}

/* Gallery Info */
.gallery-info {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-size: 1.0625rem;
}

.gallery-info strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* Back Button */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: var(--white);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-back:hover {
    background: var(--gradient-red);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateX(-5px);
}

/*===========================================
  MASONRY GRID - MODERN
===========================================*/
.gallery-grid {
    column-count: 3;
    column-gap: 1.5rem;
}

@media (min-width: 1400px) {
    .gallery-grid {
        column-count: 4;
    }
}

@media (max-width: 1200px) {
    .gallery-grid {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        column-count: 2;
        column-gap: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        column-count: 1;
    }
}

/*===========================================
  GALLERY ITEM - ULTRA MODERN
===========================================*/
.gallery-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/*===========================================
  GALLERY IMAGE
===========================================*/
.gallery-image {
    position: relative;
    overflow: hidden;
    display: block;
    cursor: pointer;
}

.gallery-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/*===========================================
  GALLERY OVERLAY - MODERN
===========================================*/
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(220, 0, 0, 0.95) 0%, rgba(160, 0, 0, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.gallery-link {
    width: 70px;
    height: 70px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.75rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.gallery-link:hover {
    transform: scale(1.2) rotate(360deg);
    color: var(--primary-dark);
    box-shadow: 0 12px 35px rgba(255, 255, 255, 0.5);
}

/*===========================================
  GALLERY CAPTION - MODERN
===========================================*/
.gallery-caption {
    padding: 1.5rem;
}

.gallery-caption h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--secondary-color);
    line-height: 1.4;
}

.product-badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: var(--gradient-red);
    color: var(--white);
    border-radius: 50px;
    font-size: 0.813rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(220, 0, 0, 0.3);
}

.product-badge a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition-fast);
}

.product-badge a:hover {
    opacity: 0.9;
}

.gallery-description {
    font-size: 0.938rem;
    color: var(--text-light);
    line-height: 1.7;
    margin: 0;
}

/*===========================================
  PAGINATION - MODERN
===========================================*/
.pagination-wrapper {
    margin-top: 4rem;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.page-item {
    list-style: none;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    background: var(--white);
    color: var(--text-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.page-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: var(--gradient-red);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(220, 0, 0, 0.3);
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/*===========================================
  CTA SECTION - MODERN
===========================================*/
.cta-section {
    background: var(--gradient-dark);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(220, 0, 0, 0.2) 0%, transparent 70%);
}

.cta-section h2 {
    color: var(--white);
    font-size: 2.5rem;
    font-weight: 700;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.125rem;
    line-height: 1.7;
}

.pulse-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.125rem 3rem;
    background: var(--gradient-red);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.125rem;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 8px 25px rgba(220, 0, 0, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(220, 0, 0, 0.4);
    }
    50% {
        box-shadow: 0 8px 35px rgba(220, 0, 0, 0.6);
    }
}

.pulse-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    color: var(--white);
    box-shadow: 0 12px 40px rgba(220, 0, 0, 0.6);
}

/*===========================================
  BACK TO TOP - MODERN
===========================================*/
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    background: var(--gradient-red);
    color: var(--white);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(220, 0, 0, 0.4);
    border: 3px solid var(--white);
    text-decoration: none;
}

.back-to-top.active {
    display: flex;
    animation: bounceIn 0.5s ease-out;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 30px rgba(220, 0, 0, 0.6);
}

.back-to-top i {
    font-size: 1.25rem;
}

/*===========================================
  ANIMATIONS
===========================================*/
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger Delays */
.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; }
.gallery-item:nth-child(9) { animation-delay: 0.45s; }
.gallery-item:nth-child(10) { animation-delay: 0.5s; }
.gallery-item:nth-child(11) { animation-delay: 0.55s; }
.gallery-item:nth-child(12) { animation-delay: 0.6s; }

/*===========================================
  EMPTY STATE
===========================================*/
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    background: var(--light-bg);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.empty-state-icon i {
    font-size: 4rem;
    color: var(--text-light);
}

.empty-state h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-color);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

/*===========================================
  LIGHTBOX OVERRIDE
===========================================*/
.lb-data .lb-caption {
    font-family: 'Poppins', 'Segoe UI', sans-serif !important;
    font-weight: 500;
    font-size: 1rem;
}

.lb-nav a.lb-prev,
.lb-nav a.lb-next {
    opacity: 0.8;
}

.lb-nav a.lb-prev:hover,
.lb-nav a.lb-next:hover {
    opacity: 1;
}

/*===========================================
  LOADING STATE
===========================================*/
.gallery-loading {
    text-align: center;
    padding: 3rem 0;
}

.gallery-loading .spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(220, 0, 0, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/*===========================================
  RESPONSIVE
===========================================*/
@media (max-width: 991.98px) {
    .gallery-hero {
        padding: 5rem 0 3rem;
    }
    
    .gallery-hero h1 {
        font-size: 2.75rem;
    }
    
    .hero-icon-large {
        width: 100px;
        height: 100px;
    }
    
    .hero-icon-large i {
        font-size: 3rem;
    }
    
    .gallery-section {
        padding: 4rem 0;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .cta-section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 767.98px) {
    .gallery-hero {
        padding: 4rem 0 2.5rem;
    }
    
    .gallery-hero h1 {
        font-size: 2.25rem;
    }
    
    .hero-icon-large {
        width: 80px;
        height: 80px;
        margin-bottom: 1.5rem;
    }
    
    .hero-icon-large i {
        font-size: 2.5rem;
    }
    
    .gallery-section {
        padding: 3rem 0;
    }
    
    .section-title h2 {
        font-size: 1.75rem;
    }
    
    .gallery-item {
        margin-bottom: 1rem;
    }
    
    .gallery-caption {
        padding: 1.25rem;
    }
    
    .gallery-caption h3 {
        font-size: 1rem;
    }
    
    .gallery-link {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .back-to-top {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    .pagination {
        gap: 0.375rem;
    }
    
    .page-link {
        width: 40px;
        height: 40px;
        font-size: 0.875rem;
    }
    
    .cta-section {
        padding: 4rem 0;
    }
    
    .cta-section h2 {
        font-size: 1.75rem;
    }
    
    .pulse-btn {
        width: 100%;
        justify-content: center;
    }
}

/*===========================================
  PRINT STYLES
===========================================*/
@media print {
    .back-to-top,
    .gallery-overlay,
    .cta-section,
    .pagination-wrapper,
    .btn-back {
        display: none !important;
    }
    
    .gallery-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .gallery-grid {
        column-count: 2;
    }
}
