/* === gallery-style.css === */
/* Estilos específicos para la página de Galería de Acosta Flooring */

/* --- HERO BANNER DE GALERÍA --- */
.gallery-hero-banner {
    padding: 120px 0 80px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1505691938895-1758d7feb511?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1770&q=80');
    /* Reemplaza con una imagen de galería adecuada */
    background-size: cover;
    background-position: center;
    color: var(--text-light);
    text-align: center;
}

.gallery-hero-content .eyebrow-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--brand-highlight-color);
    /* O un blanco más brillante */
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    display: block;
}

.gallery-hero-content h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    text-transform: uppercase;
    margin-bottom: 0;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .gallery-hero-banner {
        padding: 100px 0 60px;
    }

    .gallery-hero-content h1 {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }
}

/* --- SECCIÓN DE FILTROS Y PROYECTOS --- */
.projects-section {
    padding: 60px 0;
    background-color: var(--bg-light);
    /* Fondo blanco para las tarjetas de proyecto */
    color: var(--text-dark);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    /* Para que los botones se ajusten en móvil */
    justify-content: center;
    gap: 10px;
    /* Espacio entre botones */
    margin-bottom: 40px;
}

.filter-btn {
    background-color: transparent;
    color: var(--text-secondary-dark);
    border: 2px solid #e0e0e0;
    /* Borde sutil */
    padding: 10px 20px;
    border-radius: 30px;
    /* Estilo píldora */
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: var(--brand-secondary-color);
    color: white;
    transform: translateY(-2px);
}

.filter-btn.active {
    background-color: var(--brand-highlight-color);
    color: var(--text-light);
    border-color: var(--brand-highlight-color);
    box-shadow: 0 2px 8px rgba(176, 141, 87, 0.3);
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Una columna por defecto */
    gap: 30px;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Dos columnas en tablets */
    }
}

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        /* Tres columnas en desktop */
        gap: 40px;
    }
}

.project-card {
    background-color: var(--bg-light);
    /* Tarjeta blanca */
    border-radius: 8px;
    overflow: hidden;
    /* Para que la imagen no se salga del borde redondeado */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    /* Para mejor control de la altura si es necesario */
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.project-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    /* O la proporción de tus imágenes */
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
    /* Sutil zoom en la imagen al pasar el cursor */
}

.project-info {
    padding: 20px 25px 25px;
    flex-grow: 1;
    /* Permite que esta sección crezca para llenar el espacio */
    display: flex;
    flex-direction: column;
}

.project-title {
    font-family: var(--font-display);
    /* O var(--font-primary) si prefieres Montserrat */
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.3;
}

.project-categories {
    font-size: 0.8rem;
    color: var(--brand-highlight-color);
    /* Color de acento para categorías */
    margin-bottom: 12px;
    font-weight: 600;
}

.project-description {
    font-size: 0.9rem;
    color: var(--text-secondary-dark);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    /* Empuja el link hacia abajo si el texto es corto */
}

.project-link {
    color: var(--brand-highlight-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    display: inline-flex;
    /* Para alinear la flecha */
    align-items: center;
    transition: color 0.3s ease;
    margin-top: auto;
    /* Empuja al final si es el último elemento */
}

.project-link .arrow {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.project-link:hover {
    color: #8c6d40;
    /* Un tono más oscuro del brand-highlight */
}

.project-link:hover .arrow {
    transform: translateX(5px);
}


@media (max-width: 768px) {
    .projects-section {
        padding: 40px 0;
    }

    .filter-buttons {
        gap: 8px;
        margin-bottom: 30px;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 0.85rem;
    }

    .project-title {
        font-size: 1.3rem;
    }
}

/* Estilo para el enlace activo en el menú principal cuando se está en gallery.html */
.main-nav a[href="gallery.html"].active-link {
    color: var(--brand-highlight-color);
    background-color: rgba(255, 255, 255, 0.1);
}

.main-nav.active a[href="gallery.html"] {
    color: var(--brand-highlight-color);
}

/* === ESTILOS PARA LA SECCIÓN DE DETALLES DEL PROYECTO === */

.project-details-section {
    padding: 80px 0;
    background-color: var(--bg-light);
    min-height: 100vh;
}

.project-details-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-top: 20px;
}

.project-details-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--text-dark);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.project-details-category {
    color: var(--brand-highlight-color);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-details-content {
    display: grid;
    gap: 40px;
}

/* Video Principal - YouTube Responsive */
.project-main-video {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.youtube-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #f0f0f0;
}

.youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Información Detallada */
.project-info-detailed {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.project-info-detailed h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.project-info-detailed p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.project-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.spec-item {
    padding: 15px;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--brand-highlight-color);
}

.spec-item h4 {
    color: var(--text-dark);
    font-size: 0.9rem;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.spec-item p {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

/* Galería de Fotos */
.project-photos-gallery {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.project-photos-gallery h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 25px;
    font-weight: 700;
    text-align: center;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    max-width: 900px;
    margin: 0 auto;
}

.photo-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:hover img {
    transform: scale(1.05);
}

.photo-item::before {
    /* Icono Font Awesome de expansión/zoom */
    content: '\f065' !important;
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    font-size: 24px !important;
    color: white !important;
    opacity: 0 !important;
    z-index: 4 !important;
    transition: all 0.3s ease !important;
    pointer-events: none !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
}

.photo-item:hover::before {
    opacity: 1 !important;
    transform: translate(-50%, -50%) scale(1.1) !important;
    animation: photoIconPulse 0.3s ease !important;
}

.photo-item:hover::after {
    opacity: 1 !important;
    animation: photoBackgroundGrow 0.3s ease !important;
}

/* Animaciones para el icono */
@keyframes photoIconPulse {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes photoBackgroundGrow {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Estilos responsivos para el icono */
@media (max-width: 768px) {
    .photo-item::before {
        font-size: 20px !important;
    }
    
    .photo-item:hover::after {
        width: 50px !important;
        height: 50px !important;
    }
}

@media (max-width: 480px) {
    .photo-item::before {
        font-size: 18px !important;
    }
    
    .photo-item:hover::after {
        width: 45px !important;
        height: 45px !important;
    }
}

/* === ANIMACIONES Y TRANSICIONES === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Transiciones suaves para el cambio de secciones */
.projects-section,
.project-details-section {
    animation: fadeIn 0.5s ease-in-out;
}

.project-card {
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Efectos hover mejorados */
.filter-btn:hover {
    background: var(--brand-secondary-color);
    color: white;
    transform: translateY(-2px);
}

.project-link:hover .arrow {
    transform: translateX(5px);
}

/* Loading states */
.project-main-video video {
    background: #f0f0f0;
    transition: opacity 0.3s ease;
}

.photo-item img {
    transition: transform 0.3s ease;
    background: #f0f0f0;
}

.photo-item:hover img {
    transform: scale(1.05);
}

/* Mejorar spacing en móvil */
@media (max-width: 768px) {
    .project-card {
        margin-bottom: 20px;
    }
  /* Estilos responsivos para el botón flotante */
@media (max-width: 768px) {
    .floating-back-btn {
        top: 100px;
        left: 15px;
        height: 44px;
        min-width: 120px;
        font-size: 0.8rem;
        padding: 0 16px;
        gap: 6px;
    }
    
    .floating-back-btn:hover {
        transform: scale(1.02) translateX(-3px);
    }
    
    .floating-back-btn:active {
        transform: scale(0.95) translateX(-1px);
    }
    
    .floating-back-btn .fa-arrow-left {
        font-size: 0.9rem;
    }
    
    .floating-back-btn span {
        font-size: 0.8rem;
        letter-spacing: 0.3px;
    }
}

/* Versión más compacta para pantallas muy pequeñas */
@media (max-width: 480px) {
    .floating-back-btn {
        top: 90px;
        left: 10px;
        height: 40px;
        min-width: 110px;
        font-size: 0.75rem;
        padding: 0 14px;
        gap: 5px;
    }
    
    .floating-back-btn span {
        font-size: 0.75rem;
    }
    
    .floating-back-btn .fa-arrow-left {
        font-size: 0.8rem;
    }
}
}

/* Botón flotante de regreso - Diseño moderno y creativo */
.floating-back-btn {
    position: fixed;
    top: 120px;
    left: 20px;
    width: auto;
    min-width: 140px;
    height: 48px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white !important;
    border: none;
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 
        0 8px 32px rgba(26, 26, 46, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    gap: 8px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    text-decoration: none;
    overflow: hidden;
    transform: scale(1);
}

.floating-back-btn:hover {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 30%, #0f3460 70%, #1e3c72 100%);
    transform: scale(1.05) translateX(-5px);
    box-shadow: 
        0 12px 48px rgba(26, 26, 46, 0.5),
        0 4px 16px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.floating-back-btn:active {
    transform: scale(0.98) translateX(-2px);
    transition: all 0.1s ease;
}

/* Animación del ícono - más moderna */
.floating-back-btn .fa-arrow-left {
    animation: floatingArrow 2s infinite ease-in-out;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

@keyframes floatingArrow {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    25% {
        transform: translateX(-2px) rotate(-2deg);
    }
    75% {
        transform: translateX(-1px) rotate(1deg);
    }
}

.floating-back-btn:hover .fa-arrow-left {
    transform: translateX(-3px) rotate(-5deg);
    animation-play-state: paused;
}

/* Texto del botón flotante - más elegante */
.floating-back-btn span {
    color: white !important;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

/* Animación de entrada del botón flotante - más dramática */
.floating-back-btn {
    animation: slideInBounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideInBounce {
    0% {
        transform: translateX(-120px) rotate(-10deg) scale(0.8);
        opacity: 0;
    }
    60% {
        transform: translateX(10px) rotate(2deg) scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: translateX(0) rotate(0deg) scale(1);
        opacity: 1;
    }
}

/* Efecto de partículas brillantes */
.floating-back-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent);
    border-radius: 26px;
    animation: shimmer 3s infinite;
    z-index: -1;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(300%) rotate(45deg);
    }
}

/* Efecto de ondas al hacer hover */
.floating-back-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.floating-back-btn:hover::after {
    width: 300px;
    height: 300px;
}

/* Micro-interacciones adicionales para el botón flotante */
.floating-back-btn:focus {
    outline: none;
    box-shadow: 
        0 12px 48px rgba(26, 26, 46, 0.5),
        0 4px 16px rgba(0, 0, 0, 0.25),
        0 0 0 3px rgba(15, 52, 96, 0.4);
}

/* Efecto de vibración sutil al hacer click */
.floating-back-btn.clicked {
    animation: gentleVibrate 0.3s ease-in-out;
}

@keyframes gentleVibrate {
    0%, 100% { transform: translateX(0) scale(1); }
    25% { transform: translateX(-1px) scale(0.98); }
    75% { transform: translateX(1px) scale(1.02); }
}

/* Mejora del estado de carga/transición */
.floating-back-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.floating-back-btn.loading .fa-arrow-left {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Efecto de partículas cuando aparece */
.floating-back-btn.appearing::before {
    animation: particleExplosion 0.8s ease-out;
}

@keyframes particleExplosion {
    0% {
        box-shadow: 
            0 0 0 0 rgba(255, 255, 255, 0.8),
            0 0 0 0 rgba(15, 52, 96, 0.6);
    }
    50% {
        box-shadow: 
            0 0 0 15px rgba(255, 255, 255, 0.2),
            0 0 0 25px rgba(15, 52, 96, 0.1);
    }
    100% {
        box-shadow: 
            0 0 0 30px rgba(255, 255, 255, 0),
            0 0 0 50px rgba(15, 52, 96, 0);
    }
}

/* Mejora de accesibilidad - mejor contraste en modo de alto contraste */
@media (prefers-contrast: high) {
    .floating-back-btn {
        background: linear-gradient(135deg, #000, #333);
        border: 2px solid #fff;
        color: #fff !important;
    }
}

/* Respeto por las preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .floating-back-btn,
    .floating-back-btn::before,
    .floating-back-btn::after,
    .floating-back-btn .fa-arrow-left {
        animation: none !important;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }
    
    .floating-back-btn:hover {
        transform: none;
    }
}

/* Responsive adicional para mejor experiencia móvil */
@media (max-width: 1024px) {
    .project-main-video {
        max-width: 100%;
        margin: 0 auto 30px;
    }
    
    .youtube-container {
        padding-bottom: 56.25%; /* Mantener aspect ratio 16:9 */
    }
}

@media (max-width: 768px) {
    .project-details-content {
        gap: 30px;
    }
    
    .project-info-detailed {
        padding: 20px;
    }
    
    .project-photos-gallery {
        padding: 20px;
    }
    
    .project-photos-gallery h3 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .project-details-content {
        gap: 20px;
    }
    
    .project-info-detailed,
    .project-photos-gallery {
        padding: 15px;
        margin: 0 10px;
    }
    
    .project-specs {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Mejoras para las fotos del proyecto */
.photo-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:hover img {
    transform: scale(1.05);
}

/* Segunda definición eliminada - ya definida arriba con Font Awesome */

/* Lightbox mejorado */
.photo-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
}

.photo-lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: var(--accent-gold, #D4AF37);
    color: var(--navy-blue, #0f3460);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10001;
}

.lightbox-close:hover {
    background: white;
    transform: scale(1.1);
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .photo-item:hover::after {
        display: none; /* Quitar el ícono en móviles */
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .lightbox-close {
        width: 30px;
        height: 30px;
        font-size: 16px;
        top: 15px;
        right: 15px;
    }
}