/* EstiloProyecto.css */

/* Gallery Container */
.gallery-container {
    padding: 60px 20px;
    background-color: #f8f9fa;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Gallery Item Card */
.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    height: 250px;
    /* Fixed height for uniformity */
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Overlay Effect */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 51, 102, 0.7);
    /* UNITEK Blue with opacity */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
    font-size: 2rem;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1);
}

.projects-hero {
    background: #ffffff;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 80px;
    position: relative;
}

.hero-glass-card {
    padding: 2rem;
    max-width: 800px;
    animation: fadeIn 0.8s ease-out;
}

.hero-glass-card h1 {
    font-size: 3.2rem;
    color: #003366;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.hero-glass-card h1 span {
    color: #0066cc;
}

.hero-glass-card p {
    font-size: 1.1rem;
    color: #4a5568;
    /* Softer gray for cleaner look */
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .projects-hero {
        height: 250px;
    }

    .hero-glass-card h1 {
        font-size: 2.2rem;
    }
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 7, 20, 0.9);
    z-index: 20000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content-wrapper {
    position: relative;
    max-width: 85%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 20001;
}

.lightbox-content {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 16px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s ease;
    object-fit: contain;
}

/* Photo Counter */
.lightbox-counter {
    position: absolute;
    bottom: -45px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 16px;
    border-radius: 30px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 1px;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 35px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
    z-index: 20002;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.lightbox-close:hover {
    color: #ffffff;
    opacity: 1;
    background: rgba(255, 61, 0, 0.2);
    transform: rotate(90deg);
}

/* Lightbox Navigation */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 20002;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
    left: 40px;
}

.lightbox-nav.next {
    right: 40px;
}

/* Lightbox Image Smooth Loading */
#lightbox-img {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    .lightbox-nav.prev {
        left: 15px;
    }

    .lightbox-nav.next {
        right: 15px;
    }
}