:root {
    --dorado: #bfa046;
    --dorado-brillante: #ffcc33;
    --oscuro-deep: #020617;
    --oscuro-card: linear-gradient(145deg, #1e293b, #0f172a);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--oscuro-deep); color: white; font-family: 'Segoe UI', sans-serif; overflow-x: hidden; }

header {
    min-height: 45vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: linear-gradient(rgba(0,0,0,0.85), rgba(0,0,0,0.85)), url('fondo.jpg') center/cover;
    border-bottom: 5px solid var(--dorado); text-align: center; padding: 20px;
}
.logo-top { width: 140px; border-radius: 20px; border: 3px solid var(--dorado); margin-bottom: 15px; }

h1 { font-size: 2.8rem; color: var(--dorado-brillante); text-transform: uppercase; letter-spacing: 3px; line-height: 1.1; }
/* --- AQUÍ REEMPLAZAS LO VIEJO POR ESTO NUEVO --- */

.tagline {
    display: flex;
    justify-content: center;
    gap: 3px;
    font-size: 1.6rem;        /* Un poco más grande para que se lea bien */
    font-family: 'Segoe Script', 'Brush Script MT', cursive; /* Fuente cursiva */
    font-style: italic;
    color: var(--dorado-brillante); 
    text-shadow: 0 0 8px rgba(191,160,70,0.5);
    margin-top: 10px;
    overflow: hidden;
}
.letra-animada {
    display: inline-block;
    animation: entrarGirando 1.5s ease-out forwards;
}

@keyframes entrarGirando {
    0% {
        opacity: 0;
        transform: translateX(-100px) rotate(-360deg);
    }
    100% {
        opacity: 1;
        transform: translateX(0) rotate(0deg);
    }
}

/* --- Y AQUÍ CONTINÚA TU CÓDIGO NORMAL --- */

.proyectos-container {
    display: flex; flex-wrap: wrap; max-width: 1350px; margin: 30px auto; gap: 20px; padding: 10px; align-items: flex-start;
}
/* --- CONFIGURACIÓN DE MENÚ Y VISOR (Optimizado y Compacto) --- */
.menu-proyectos { 
    flex: 1; 
    min-width: 280px; 
    display: flex; 
    flex-direction: column; 
    gap: 4px; /* Reducido al mínimo para que los botones estén juntos */
}

.menu-titulo { 
    color: var(--dorado); 
    text-align: center; 
    margin-bottom: 8px; /* Reducido para acercar el título a los botones */
    font-size: 1.5rem;  /* Tamaño ajustado para pantallas pequeñas */
    text-transform: uppercase; 
}

/* --- ESTE ES EL BLOQUE DEFINITIVO PARA CENTRAR --- */
.ventana-visor {
    flex: 2.5; 
    width: 100%; 
    background: var(--oscuro-card); 
    border-radius: 20px; 
    padding: 15px; 
    min-height: 400px; 
    position: relative;
    
    /* Efectos premium */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid var(--dorado);
    
    /* Centrado */
    display: flex;
    flex-direction: column;
    align-items: center;    
    justify-content: center; 
    text-align: center;      
}
    
    /* ESTO ES LO QUE OBLIGA A CENTRAR TODO EL CONTENIDO */
    display: flex;
    flex-direction: column;
    align-items: center;    /* Centra horizontalmente */
    justify-content: center; /* Centra verticalmente */
    text-align: center;      /* Asegura que el texto interior se alinee al centro */
}

/* Ajuste específico para que los mensajes no se expandan a la izquierda */
#msg-inicio, .proyecto-detalle {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
/* Ajuste para que se vea bien en celulares */
@media (max-width: 768px) {
    .menu-proyectos {
        gap: 4px; 
        padding: 0 5px;
    }
    .ventana-visor {
        min-height: 300px; /* Mucho más compacto en móvil */
        padding: 10px;
    }
}
}
#msg-inicio { 
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra los elementos horizontalmente */
    justify-content: center;
    text-align: center; 
    padding-top: 50px; 
    width: 100%; 
}

#msg-inicio h2 { 
    font-size: 2.2rem; 
    color: var(--dorado-brillante); 
    margin-bottom: 0; /* Lo dejamos en 0 para que el divisor quede justo debajo */
}

.divisor { 
    width: 80px; 
    height: 3px; 
    background: var(--dorado); 
    margin: 15px auto; /* CAMBIO AQUÍ: 'auto' garantiza el centrado perfecto */
}

.instruccion-dorada {
    font-size: 1.2rem; 
    font-weight: 800; 
    color: var(--dorado-brillante); 
    margin-top: 30px;
    text-shadow: 0 0 10px rgba(255, 204, 51, 0.5); 
    animation: palpitar-dorado 2s infinite; 
    text-align: center;
    width: 100%; /* Asegura que ocupe el ancho para centrarse */
}

@keyframes palpitar-dorado {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.03); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

.btn-palpitar {
    background: linear-gradient(45deg, #bfa046, #ffcc33);
    color: black; border: none; padding: 20px; border-radius: 15px;
    font-weight: 900; font-size: 1.2rem; text-transform: uppercase; cursor: pointer;
    box-shadow: 0 0 15px rgba(255, 204, 51, 0.4); transition: 0.3s;
}
.btn-palpitar:hover { background: white; transform: scale(1.05); box-shadow: 0 0 25px var(--dorado-brillante); }
.btn-white { background: white !important; box-shadow: none; }

.btn-accion {
    padding: 12px 22px; border-radius: 50px; border: none; color: white;
    background: var(--dorado); font-weight: 800; margin: 5px; cursor: pointer; display: inline-block; text-decoration: none;
}
.bg-mapa { background: #4285F4 !important; box-shadow: 0 4px 10px rgba(66, 133, 244, 0.3); }

.btn-agendar {
    padding: 12px 22px; border-radius: 50px; border: 2px solid var(--dorado-brillante); color: black;
    background: white; font-weight: 800; margin: 5px; cursor: pointer; display: inline-block; text-decoration: none;
    transition: 0.3s;
}
.btn-agendar:hover { background: var(--dorado-brillante); }

.btn-regresar {
    background: transparent; color: var(--dorado-brillante); border: 2px solid var(--dorado);
    padding: 12px 25px; border-radius: 50px; cursor: pointer; margin-top: 20px;
    font-size: 0.9rem; font-weight: 800; text-transform: uppercase; transition: all 0.3s ease; width: 280px;
}
.btn-regresar:hover { background: var(--dorado); color: black; }

.desc-proyecto {
    margin: 20px auto; max-width: 650px; color: #cbd5e1; line-height: 1.6; font-size: 1.05rem;
    background: rgba(15, 23, 42, 0.6); padding: 25px; border-radius: 15px; border: 1px solid var(--dorado);
    text-align: left;
}
.desc-proyecto ul { margin-left: 20px; margin-top: 10px; }

.faq-section { max-width: 900px; margin: 60px auto; padding: 20px; }
.faq-item { background: #1e293b; margin-bottom: 10px; border-radius: 10px; overflow: hidden; border-left: 4px solid var(--dorado); }
.faq-question { padding: 20px; cursor: pointer; font-weight: bold; background: #263349; display: flex; justify-content: space-between; align-items: center; }
.faq-answer { padding: 20px; display: none; background: #1e293b; color: #cbd5e1; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 15px; margin-top: 25px; }
iframe { width: 100%; height: 220px; border-radius: 15px; border: 2px solid var(--dorado); }
.img-preview { width: 100%; max-width: 500px; border-radius: 15px; border: 3px solid var(--dorado); cursor: pointer; }

.wa-flotante { position: fixed; bottom: 25px; right: 25px; width: 65px; z-index: 9999; }
.wa-flotante img { width: 100%; }

@media (max-width: 600px) {
    h1 { font-size: 1.9rem; }
    .ventana-visor { padding: 20px; min-height: 500px; }
}

/* LIGHTBOX CORREGIDO */
#lightbox { 
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.95); z-index: 10000; flex-direction: column;
    justify-content: center; align-items: center;
}
.lightbox-controles { 
    display: flex; align-items: center; justify-content: center; width: 100%; gap: 30px;
}
#lightbox-img { 
    max-width: 70%; max-height: 80vh; border: 3px solid var(--dorado); border-radius: 10px;
}

/* Botones de navegación (el < y el >) */
.btn-navegacion {
    background: rgba(255, 255, 255, 0.1);
    color: var(--dorado-brillante);
    font-size: 4rem; 
    padding: 20px 30px;
    border: 2px solid var(--dorado);
    border-radius: 15px;
    cursor: pointer;
    transition: 0.3s;
}
.btn-navegacion:hover { background: var(--dorado); color: white; }

/* Botón cerrar (Rojo intenso) */
.btn-cerrar {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #dc2626;
    color: white;
    font-weight: bold;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10001;
    text-transform: uppercase;
}
.btn-cerrar:hover { background: #991b1b; }

footer { text-align: center; padding: 50px 20px; background: #000; }
.social-links { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.social-links img { width: 45px; }

.proyecto-detalle { display: none; text-align: center; animation: fadeIn 0.5s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.logo-v { width: 130px; background: white; padding: 8px; border-radius: 10px; margin-bottom: 10px; }
.titulo-p { font-size: 2.2rem; color: var(--dorado-brillante); text-transform: uppercase; }
