/* --- VARIABLES (Consistencia con estetica.css) --- */
:root {
    --text-color: #3E2B26;
    --accent-color: #E86A46;
    --card-bg: #FBEFBC;
    /* Aumentamos un poco la opacidad del blanco para que tape más */
    --white-trans: rgba(253, 251, 247, 0.97); 
    --white: #ffffff;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Poppins', sans-serif;
}

/* --- REINICIO Y BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-sans);
    line-height: 1.8;
    color: var(--text-color);
    background-color: transparent; 
    overflow-x: hidden;
}

/* --- AJUSTE 1: FONDO MUCHO MÁS SUTIL --- */
.background-pattern {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background-image: url('fondo-flores.svg'); 
    background-repeat: repeat; background-size: 400px auto;
    animation: moveBackground 60s linear infinite; 
    
    /* CAMBIO CLAVE: Bajamos la opacidad de 0.6 a 0.25 */
    opacity: 0.25; 
    /* OPCIONAL: Un filtro para hacerlo más borroso y que compita menos */
    filter: grayscale(30%) blur(1px);
}
@keyframes moveBackground { 0% { background-position: 0 0; } 100% { background-position: 100% 100%; } }

/* --- TIPOGRAFÍA --- */
h1, h2, h3, .logo, .project-title { font-family: var(--font-serif); }
h1 { font-weight: 700; }
h2 { color: var(--accent-color); margin-bottom: 20px; font-size: 1.8rem; }
h3 { color: var(--text-color); margin-bottom: 15px; font-size: 1.4rem; }
p { margin-bottom: 20px; font-size: 1.05rem; color: #554; }

/* --- HEADER --- */
header {
    background-color: var(--white-trans); backdrop-filter: blur(10px); padding: 1rem 5%;
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 100; border-bottom: 1px solid rgba(62, 43, 38, 0.1);
}
.logo img {
    height: 70px; 
    width: auto; 
    display: block;
}
.logo a { font-family: var(--font-serif); font-size: 1.8rem; font-weight: 700; color: var(--text-color); text-decoration: none; }
.logo span { color: var(--accent-color); font-size: 2.5rem; line-height: 0;}
.navbar ul { display: flex; list-style: none; gap: 1rem; }
.nav-btn {
    display: inline-block; background-color: var(--accent-color); color: var(--white);
    padding: 10px 25px; border-radius: 50px; text-decoration: none; font-weight: 500; font-size: 0.9rem;
    transition: 0.3s; box-shadow: 0 2px 10px rgba(232, 106, 70, 0.2);
}
.nav-btn:hover { background-color: #d15634; transform: translateY(-2px); }
.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-color);}

/* --- DETALLES DEL PROYECTO --- */
.project-detail {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

/* --- AJUSTE 2: CAJA PARA EL TÍTULO PRINCIPAL --- */
.project-header { 
    text-align: center; 
    margin-bottom: 40px; 
    margin-top: 40px;
    
    /* Creamos una "caja" para que el texto se lea bien */
    background: var(--white-trans); /* Fondo blanco semitransparente */
    padding: 40px 30px;
    border-radius: 30px;
    backdrop-filter: blur(5px); /* Desenfoca el fondo detrás del título */
    box-shadow: 0 10px 30px rgba(62, 43, 38, 0.05); /* Sombra suave */
    border: 1px solid rgba(255, 255, 255, 0.5); /* Borde sutil */
}

.project-title { font-size: 3.5rem; color: var(--text-color); margin-bottom: 5px; line-height: 1.2; }
.project-client { font-style: italic; color: #666; margin-bottom: 20px; font-family: var(--font-serif); }

.project-meta {
    display: inline-block;
    background: var(--card-bg);
    color: var(--text-color);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 10px; /* Reducido porque ahora está dentro de la caja */
    border: 1px solid rgba(0,0,0,0.05);
}

/* --- VIDEO PRINCIPAL --- */
.video-responsive {
    position: relative; padding-bottom: 56.25%; padding-top: 25px; height: 0; width: 100%;
    border-radius: 25px; overflow: hidden;
    box-shadow: 0 15px 40px rgba(62, 43, 38, 0.2); /* Sombra más pronunciada para separar del fondo */
    margin-bottom: 60px;
    border: 5px solid var(--white); /* Marco blanco más grueso */
    background: var(--white);
}
.video-responsive iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* --- CONTENEDOR DE CONTENIDO (Tarjeta blanca) --- */
/* Aseguramos que este contenedor sea sólido */
.project-description {
    background: var(--white); /* Blanco sólido */
    padding: 60px 40px;
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(62, 43, 38, 0.08); /* Sombra para elevarlo */
    border: 1px solid rgba(62, 43, 38, 0.05);
    position: relative; /* Para asegurar z-index si hace falta */
    z-index: 2;
}

.text-block { max-width: 800px; margin: 0 auto 40px auto; text-align: left; }

.divider {
    border: 0; height: 1px; background: rgba(62, 43, 38, 0.1);
    margin: 50px auto; max-width: 800px;
}

/* --- GALERÍAS --- */
.logo-gallery {
    display: flex; justify-content: center; align-items: center; gap: 40px; margin-bottom: 40px; flex-wrap: wrap;
}
.logo-gallery img {
    height: 150px; width: auto; object-fit: contain;
    border-radius: 15px; padding: 15px;
    background: var(--white);
    border: 1px solid #eee;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}
.logo-gallery img:hover { transform: scale(1.05); }

.process-gallery {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin-bottom: 40px;
}
.process-gallery img {
    width: 100%; height: auto; border-radius: 15px;
    background: white; /* Fondo blanco para imágenes con transparencia */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); transition: transform 0.3s ease;
}
.process-gallery img:hover { transform: scale(1.02); }
.process-gallery figure { margin: 0; text-align: center; }
.process-gallery figcaption { margin-top: 10px; font-size: 0.9rem; color: #888; font-style: italic; }

.image-centered { text-align: center; margin: 40px 0; }
.image-centered img { max-width: 80%; height: auto; border-radius: 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.1); }

/* --- VIDEOS VERTICALES --- */
.vertical-videos-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 30px;
}
.vertical-video-wrapper { text-align: center; }
.vertical-video-wrapper iframe {
    width: 100%; aspect-ratio: 9/16; border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); border: 4px solid #fff; background: white;
}
.vertical-video-wrapper p { margin-top: 15px; font-weight: 600; color: var(--accent-color); }

/* --- TAGS --- */
.tech-list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; padding: 0; justify-content: center;}
.tech-list li {
    background: var(--card-bg); color: var(--text-color);
    padding: 8px 20px; border-radius: 50px; font-size: 0.9rem; font-weight: 600;
    border: 1px solid rgba(0,0,0,0.05);
}

/* --- SECCIÓN PDF --- */
.pdf-section {
    text-align: center; background: var(--white);
    margin-top: 60px; margin-bottom: 60px; padding: 60px 20px;
    border-radius: 30px; box-shadow: 0 5px 25px rgba(62, 43, 38, 0.08);
    position: relative; z-index: 2;
}
.pdf-viewer {
    width: 100%; height: 800px; border: none; border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); margin-top: 20px;
    background: #f4f4f4; /* Fondo gris claro mientras carga */
}

/* --- FOOTER --- */
footer { background-color: var(--text-color); color: #FDFBF7; padding: 3rem 5%; text-align: center; position: relative; z-index: 2; }
.social-icons a { color: #FDFBF7; font-size: 1.5rem; margin: 0 12px; transition: 0.3s; }
.social-icons a:hover { color: var(--accent-color); }
footer p { color: #FDFBF7; margin-top: 1rem; opacity: 0.7; font-size: 0.9rem; }

/* --- ANIMACIONES --- */
.fade-in-up { opacity: 0; animation: fadeInUp 1s ease-out forwards; }
.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .header { padding: 10px 5%; }
    .navbar { display: none; position: absolute; top: 70px; left: 0; width: 100%; background-color: var(--white); flex-direction: column; padding: 2rem; box-shadow: 0 5px 10px rgba(0,0,0,0.1); }
    .navbar.active { display: flex; }
    .nav-btn { display: block; width: 100%; text-align: center; }
    .menu-toggle { display: block; }
    
    .project-title { font-size: 2.5rem; }
    /* Ajuste de padding en móvil para las cajas blancas */
    .project-header, .project-description, .pdf-section { padding: 30px 20px; }
    
    .pdf-viewer { height: 500px; }
    .process-gallery { grid-template-columns: 1fr; }
    .logo-gallery { gap: 20px; }
    .logo-gallery img { height: 100px; }
}
