
/* ==========================================
   CSS: HERO SUPERIOR (CON CONTRASTE)
   ========================================== */

.gallery-hero-clean {
    width: 100%;
    padding: 100px 20px 60px;
    text-align: center;
    /* Un gris sutil para que el área blanca del contenido resalte después */
    background-color: #f9f9f9; 
    border-bottom: 1px solid #ececec;
}

.gallery-container {
    max-width: 900px;
    margin: 0 auto;
}

.gallery-main-title {
    font-size: 2rem; /* Más grande y audaz */
    font-weight: 900;
    color: #1a1a1a;
    margin-bottom: 25px;
    text-transform: uppercase; /* Le da un aire más corporativo/premium */
    letter-spacing: -2px;
}

.gallery-hammer-text {
    font-size: 1.4rem;
    color: #444; /* Un poco más oscuro para que no se pierda */
    line-height: 1.5;
    max-width: 700px;
    margin: 0 auto;
}

/* Divisor con degradado para que no sea una línea aburrida */
.gallery-divider-container {
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, #28a745, #007bff); /* Tus colores: Verde a Azul */
    margin: 0 auto;
}

.gallery-hr {
    display: none; /* Quitamos el hr tradicional porque usamos el degradado arriba */
}

/* Ajuste para móviles */
@media (max-width: 768px) {
    .gallery-main-title {
        font-size: 1.5rem;
        letter-spacing: -1px;
    }
    
    .gallery-hero-clean {
        padding: 70px 20px 40px;
    }
}

/* ==========================================
   CSS PARTE 2: HERO FLEX (ESTILO PREMIUM)
   ========================================== */

.gallery-hero-clean {
    width: 100%;
    padding: 80px 0;
    /* Fondo con un degradado radial muy sutil para dar profundidad */
    background: radial-gradient(circle at top right, #fdfdfd, #f4f7f6);
}

.gallery-flex-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    padding: 0 20px;
}

/* --- LADO DEL TEXTO (FUERZA VISUAL) --- */
.text-side {
    flex: 1;
}

.text-side .gallery-main-title {
    font-size: 2rem; /* Título gigante e impactante */
    font-weight: 900;
    line-height: 0.95;
    margin-bottom: 25px;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: -3px;
    /* Un detalle de color en el borde izquierdo para amarrar con el logo */
    border-left: 8px solid #28a745; 
    padding-left: 20px;
}

.text-side .gallery-hammer-text {
    font-size: 1.35rem;
    color: #444;
    line-height: 1.5;
    max-width: 500px;
    font-weight: 500;
}

/* --- LADO DEL FORMULARIO (CONTENEDOR DE MARCA) --- */
.form-side {
    flex: 0 0 460px;
}

.iframe-wrapper {
    position: relative;
    width: 100%;
    /* Degradado de borde para que el motor resalte con tus colores */
    background: linear-gradient(135px, #28a745, #007bff); 
    padding: 12px; /* Este padding crea el efecto de marco de color */
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.iframe-wrapper iframe {
    width: 100%;
    height: 450px;
    border-radius: 15px; /* Redondeamos el iframe por dentro */
    border: none;
    display: block;
    background: #fff;
}

/* --- RESPONSIVO --- */
@media (max-width: 991px) {
    .gallery-flex-container {
        flex-direction: column;
        text-align: center;
        gap: 50px;
    }

    .text-side .gallery-main-title {
        font-size: 1rem;
        border-left: none;
        padding-left: 0;
        border-bottom: 6px solid #28a745;
        display: inline-block;
        padding-bottom: 10px;
    }

    .text-side .gallery-hammer-text {
        margin: 20px auto 0;
    }

    .form-side {
        width: 100%;
        max-width: 460px;
    }
}


/* ==========================================
   GALERÍA PREMIUM (MASONRY STYLE)
   ========================================== */

.gallery-main-section {
    padding: 60px 0;
    background-color: #fff;
}

.gallery-grid-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    /* Usamos columnas inteligentes */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: 250px; /* Base de altura */
    grid-auto-flow: dense; /* Rellena huecos vacíos */
    gap: 20px;
}

/* EFECTO MASONRY: Unas fotos más altas que otras */
.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: #f0f0f0;
}

/* Hacemos que cada 3ra y 5ta foto sea más grande para dar ritmo */
.gallery-card:nth-child(3n) {
    grid-row: span 2;
}
.gallery-card:nth-child(5n) {
    grid-column: span 1;
    grid-row: span 1.5;
}

/* Hover: Elevación y Sombra */
.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    z-index: 10;
}

.gallery-link {
    display: block;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

.gallery-photo {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Clave para que no se deformen */
    display: block;
    transition: transform 0.6s ease, filter 0.4s ease;
    filter: brightness(0.95);
}

/* Zoom suave al entrar */
.gallery-card:hover .gallery-photo {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* OVERLAY: Texto sutil que aparece al pasar el mouse */
.gallery-card::after {
    content: 'View Details';
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #333;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.gallery-card:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* BOTÓN DE ACCIÓN POST-GRID */
.gallery-footer-action {
    text-align: center;
    margin-top: 50px;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 20px;
}

.gallery-footer-action h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.gallery-home-btn {
    display: inline-block;
    padding: 18px 45px;
    background: linear-gradient(135deg, #28a745, #007bff); /* Tus colores */
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.3s ease;
    box-shadow: 0 10px 20px rgba(0,123,255,0.2);
}

.gallery-home-btn:hover {
    transform: scale(1.05);
}

/* RESPONSIVO */
@media (max-width: 768px) {
    .gallery-grid-wrapper {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
        grid-auto-rows: 300px;
    }
    
    .gallery-card:nth-child(n) {
        grid-row: span 1; /* En móvil todas iguales para evitar errores de visualización */
    }
}

/* Estilos para el Lightbox */
#tp-lightbox {
    position: fixed;
    z-index: 9999;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none; /* Oculto por defecto */
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

#tp-lightbox img {
    max-width: 90%;
    max-height: 80%;
    border: 4px solid #fff;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#tp-lightbox.active img {
    transform: scale(1);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}