/* Modern Project Page Styles */
.project-hero-modern {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 700px;
    max-height: 900px;
    overflow: hidden;
    margin-top: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(1.05); }
    to { opacity: 1; transform: scale(1); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.4) 100%
    );
    z-index: 2;
}

.hero-content-modern {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.back-link-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    width: fit-content;
    margin-bottom: auto;
}

.back-link-modern:hover {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    transform: translateX(-5px);
}

.hero-title-container {
    text-align: center;
    margin: auto 0;
}

.project-badges-modern {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.badge-modern {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: #1e293b;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    letter-spacing: 0.3px;
}

.project-title-modern {
    font-family: var(--font-primary);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.1;
    letter-spacing: -2px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.project-location-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    font-weight: 400;
    background: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.scroll-indicator {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.project-gallery-modern .container {
    max-width: 100%;
    width: 100%;
    padding: 0;
}

.gallery-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* Layout adaptativo - más columnas en pantallas grandes */
@media (min-width: 1200px) {
    .gallery-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 1.5rem;
        padding: 0 3rem;
    }
}

@media (min-width: 1400px) {
    .gallery-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 1.75rem;
        padding: 0 4rem;
    }
}

@media (min-width: 1800px) {
    .gallery-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
        gap: 2rem;
        padding: 0 5rem;
    }
}

.gallery-item-modern {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
    background: #f1f5f9;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 300px;
}

/* Aspect ratios adaptativos según el tamaño */
.gallery-item-modern img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

/* Items más grandes para las primeras imágenes */
.gallery-item-modern:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
    min-height: 500px;
}

.gallery-item-modern:nth-child(2),
.gallery-item-modern:nth-child(3) {
    min-height: 350px;
}

/* En móviles, todas las imágenes ocupan el ancho completo */
@media (max-width: 768px) {
    .gallery-item-modern:nth-child(1) {
        grid-column: span 1;
        grid-row: span 1;
        min-height: 300px;
    }
}

.gallery-item-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.gallery-item-modern:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    opacity: 0;
}

.gallery-item-modern:hover .gallery-overlay {
    background: rgba(0, 0, 0, 0.5);
    opacity: 1;
}

.gallery-overlay svg {
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.gallery-item-modern:hover .gallery-overlay svg {
    transform: scale(1);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 8px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: fadeInLightbox 0.3s ease;
}

@keyframes fadeInLightbox {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav svg {
    width: 24px;
    height: 24px;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10001;
}

.project-info-modern .container {
    max-width: 100%;
    width: 100%;
    padding: 0;
}

.info-grid-modern {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 3rem;
    width: 100%;
}

@media (min-width: 1200px) {
    .info-grid-modern {
        padding: 0 5rem;
    }
}

@media (min-width: 1400px) {
    .info-grid-modern {
        padding: 0 7rem;
    }
}

@media (min-width: 1800px) {
    .info-grid-modern {
        padding: 0 10rem;
    }
}

.info-title-modern {
    font-family: var(--font-primary);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: #1e293b;
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.info-content-modern {
    color: #475569;
    line-height: 1.8;
    font-size: 1.05rem;
}

.info-content-modern p {
    margin-bottom: 1.5rem;
}

.info-content-modern p:last-child {
    margin-bottom: 0;
}

.info-card-modern {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    position: sticky;
    top: 90px;
}

.info-card-modern h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.info-list-modern {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.info-item-modern {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.info-item-modern:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1rem;
    color: #1e293b;
    font-weight: 500;
}

/* CTA Modern */
.project-cta {
    background: #f8fafc;
    padding: 5rem 0;
    text-align: center;
}

.project-cta h2 {
    font-family: var(--font-primary);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: #1e293b;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.project-cta p {
    color: #64748b;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Botón específico para CTA de proyectos */
.project-cta .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white !important;
    border: 2px solid var(--primary-color);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 1rem;
    padding: 1.25rem 3.5rem;
    box-shadow: 0 8px 25px rgba(0, 85, 164, 0.3);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.project-cta .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-color) 100%);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 85, 164, 0.4);
    border-color: var(--primary-dark);
}

.project-cta .btn-primary::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

/* Responsive */
@media (max-width: 968px) {
    .gallery-grid-modern {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .info-grid-modern {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .info-card-modern {
        position: static;
    }
}

@media (max-width: 768px) {
    .project-hero-modern {
        height: 100vh;
        min-height: 600px;
    }
    
    .hero-content-modern {
        padding: 1.5rem;
    }
    
    .project-title-modern {
        font-size: 2.5rem;
    }
    
    .gallery-grid-modern {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        gap: 1rem;
    }
    
    .gallery-item-modern {
        min-height: 250px;
    }
    
    .gallery-item-modern:nth-child(1) {
        grid-column: span 1;
        grid-row: span 1;
        min-height: 300px;
    }
    
    .project-gallery-modern {
        padding: 3rem 0;
    }
    
    .project-info-modern {
        padding: 3rem 0;
    }
    
    .project-cta {
        padding: 3rem 0;
    }
    
    .project-cta .btn-primary {
        padding: 1rem 2.5rem;
        font-size: 0.9rem;
    }
    
    .lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
    
    .lightbox-nav svg {
        width: 18px;
        height: 18px;
    }
    
    .lightbox-counter {
        bottom: 20px;
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}

