@font-face {
  font-family: 'IgnisEtGlaciesSharpBold';
  src: url('../fonts/ignis-et-glacies-sharp-bold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
}

.gallery-wrapper {
    font-family: 'IgnisEtGlaciesSharpBold', sans-serif;
    background: linear-gradient(135deg, #00aaff 0%, #4b4ca2 100%);
   
    padding: 40px 20px;

    margin: 0 auto;
    overflow: hidden;
    cursor: pointer;
    width: 100%;
   
}

.gallery-header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInDown 0.8s ease-out;
}

.gallery-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    letter-spacing: -1px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.gallery-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    letter-spacing: 0.5px;
}

.gallery-container {
    background: #000;
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out 0.2s both;
    overflow: hidden;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    grid-auto-flow: dense;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    height: 280px;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: scaleIn 0.6s ease-out both;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }

.gallery-item.tall {
    grid-row: span 2;
    height: 584px;
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    z-index: 10;
}

.image-wrapper-gal {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.image-wrapper-gal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
    display: block;
}

.gallery-item:hover .image-wrapper-gal img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #00aaff 0%, #4b4ca2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.view-btn {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
}

.gallery-item:hover .view-btn {
    transform: scale(1) rotate(90deg);
}

.view-btn:hover {
    background: #ffffff;
    transform: scale(1.15) rotate(90deg);
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.97);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #ffffff;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10002;
    background: rgba(255, 255, 255, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
}

.close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
    border-color: rgba(255, 255, 255, 0.4);
}

.lightbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1400px;
    gap: 30px;
    position: relative;
}

.lightbox-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    max-height: 80vh;
}

.lightbox-image-container img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.image-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 8px 24px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.arrow {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.arrow:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.arrow:active {
    transform: scale(0.95);
}

.lightbox-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
   
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.progress-bar {
    width: 200px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
   
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00aaff 0%, #4b4ca2 100%);
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 1200px) {
    .gallery-title {
        font-size: 2.8rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .gallery-wrapper{
        margin: 0%;
        padding: 0px;
        margin-bottom: 20px;
        
    }

    .gallery-title {
        font-size: 2.2rem;
    }

    .gallery-subtitle {
        font-size: 1rem;
    }

    .gallery-container {
        padding: 10px;
        border-radius: 20px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 2fr));
        gap: 16px;
    }

    .gallery-item,
    .gallery-item.tall {
        height: 240px;
        grid-row: span 1;
    }

    .close {
        top: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 40px;
    }

    .arrow {
        width: 50px;
        height: 50px;
    }

    .arrow svg {
        width: 24px;
        height: 24px;
    }

    .lightbox-content {
        gap: 15px;
    }

    .lightbox-controls {
        bottom: 20px;
        padding: 12px 20px;
    }

    .progress-bar {
        width: 120px;
    }

    .image-counter {
        font-size: 0.95rem;
        padding: 6px 16px;
        bottom: -35px;
    }
}

@media (max-width: 480px) {
    .gallery-title {
        font-size: 1.8rem;
    }

    .gallery-header {
        margin-bottom: 30px;
    }

    .lightbox-controls {
        scale: 0.9;
    }

    .arrow {
        width: 45px;
        height: 45px;
    }
}
