body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 20px;
    color: #333;
}

header {
    text-align: center;
    padding: 20px;
    background-color: #2c3e50;
    color: white;
    border-radius: 10px;
    margin-bottom: 30px;
}

h1 { margin: 0; font-size: 28px; }
.subtitulo { color: #f1c40f; font-weight: bold; margin-top: 5px; }

.formulario-proyecto {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    max-width: 600px;
    margin: 0 auto 30px auto;
}

.campo { margin-bottom: 15px; }
.campo label { display: block; margin-bottom: 5px; font-weight: bold; }
.campo input, .campo select, .campo textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.btn-guardar {
    background-color: #f1c40f;
    color: #2c3e50;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
}
.btn-guardar:hover { background-color: #f39c12; }

.seccion-busqueda {
    max-width: 1200px;
    margin: 0 auto 20px auto;
}
.input-busqueda {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #2c3e50;
    border-radius: 8px;
    box-sizing: border-box;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    outline: none;
}

.vitrina {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.tarjeta-proyecto {
    background: white;
    border-radius: 10px;
    padding: 0 20px 20px 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    border-top: 5px solid #2c3e50;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s;
    position: relative; 
    overflow: hidden;
}
.tarjeta-proyecto:hover { transform: translateY(-5px); }

.imagen-portada {
    width: 100%;
    height: 180px;
    object-fit: contain;
    object-position: center;
    border-radius: 8px 8px 0 0;
    margin-bottom: 15px;
    display: block;
    background-color: #f5f5f5;
    padding: 5px;
    box-sizing: border-box;
}

.btn-eliminar {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 10;
}
.btn-eliminar:hover { background: #c0392b; }

.categoria {
    background-color: #e8f4fd;
    color: #2980b9;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    align-self: flex-start;
}

.titulo-proyecto {
    font-size: 18px;
    margin: 15px 0 10px 0;
    color: #2c3e50;
}

.descripcion-proyecto {
    font-size: 14px;
    color: #7f8c8d;
    flex-grow: 1;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 60px;
    line-height: 1.4;
}
.btn-contacto {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}

/* --- ESTILOS PARA LA VENTANA MODAL FLOTANTE (ÚNICA VEZ, SIN DUPLICADOS) --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 62, 80, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    
}

.modal-contenido {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: deslizarAbajo 0.3s ease-out;
    max-height: 80vh;
    overflow-y: auto;

}

@keyframes deslizarAbajo {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.btn-cerrar-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #95a5a6;
    cursor: pointer;
    transition: color 0.2s;
}
.btn-cerrar-modal:hover { color: #e74c3c; }

#mensajeExito {
    display: none;
    text-align: center;
    padding: 20px;
    color: #27ae60;
    font-weight: bold;
}

/* --- ESTILOS PARA LOS BOTONES DE FILTRO --- */
.filtros-categoria {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-filtro {
    background-color: #eee;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    color: #2c3e50;
    transition: 0.3s;
}

.btn-filtro:hover { background-color: #2c3e50; color: white; }

/* --- NUEVO: ESTILOS PARA LA LANDING PAGE --- */
.landing-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    max-width: 900px;
    margin: 0 auto;
}

.landing-contenido {
    text-align: center;
    background: white;
    padding: 50px 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%;
}

.landing-contenido h2 {
    color: #2c3e50;
    font-size: 32px;
    margin-bottom: 10px;
}

.landing-eslogan {
    color: #7f8c8d;
    font-size: 18px;
    margin-bottom: 40px;
}

.landing-botones {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.landing-opcion {
    background: #f8f9fa;
    border: 3px solid #ddd;
    border-radius: 15px;
    padding: 30px 25px;
    width: 300px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.landing-opcion:hover {
    border-color: #f1c40f;
    background: #fffdf0;
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(241, 196, 15, 0.3);
}

.landing-icono {
    font-size: 50px;
    display: block;
    margin-bottom: 15px;
}

.landing-opcion h3 {
    color: #2c3e50;
    font-size: 20px;
    margin-bottom: 10px;
}

.landing-opcion p {
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.5;
}

/* Botón para volver al inicio */
.btn-volver {
    background: none;
    border: 2px solid #2c3e50;
    color: #2c3e50;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-volver:hover {
    background: #2c3e50;
    color: white;
}

/* ==========================================================================
   ALINEACIÓN EN UNA SOLA LÍNEA DE FILTROS - BAÚL DEL GENIO
   ========================================================================== */

/* Forzar a que las categorías y los filtros de ubicación se junten en una sola fila */
.filtros-categoria {
    display: flex !important;
    flex-direction: row !important; /* Fuerza la línea horizontal */
    justify-content: center !important; /* Centra todo en la pantalla */
    align-items: center !important; /* Alinea perfectamente las alturas */
    gap: 12px !important; /* Espacio uniforme entre cada botón y filtro */
    margin: 20px auto !important;
    max-width: 1200px !important;
    flex-wrap: wrap !important; /* Evita estrictamente que los filtros se caigan abajo */
    overflow-x: auto; /* Si la pantalla es muy pequeña (como un celular), permite deslizar de lado */
    padding: 5px 0;
}

/* Estilo unificado para los filtros de Región y Ciudad */
#filtroRegionComprador, 
#filtroCiudadComprador,
#filtroRegion,
#filtroCiudad {
    font-family: 'Segoe UI', sans-serif;
    padding: 10px 20px !important; /* Espacio interno idéntico a tus botones de arriba */
    border-radius: 25px !important; /* Cápsula redondeada impecable */
    border: 1.5px solid #dcdde1 !important; /* Borde sutil */
    background-color: #ffffff !important;
    font-size: 14px !important;
    font-weight: bold !important;
    color: #2c3e50 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
    outline: none;
    height: 40px !important; /* Forzamos la misma altura para todos */
    box-sizing: border-box;
}

/* Ajuste de ancho exacto para el buscador de ciudad */
#filtroCiudadComprador, #filtroCiudad {
    width: 200px !important;
}

/* Asegurar que los botones superiores de categorías tengan la misma altura */
.btn-filtro {
    height: 40px !important;
    display: inline-flex;
    align-items: center;
    padding: 0 20px !important;
    border-radius: 25px !important;
}

/* Efecto de iluminación dorada al pasar el mouse */
#filtroRegionComprador:hover, #filtroCiudadComprador:hover,
#filtroRegion:hover, #filtroCiudad:hover,
#filtroRegionComprador:focus, #filtroCiudadComprador:focus {
    border-color: #f1c40f !important;
    background-color: #fffdf0 !important;
    box-shadow: 0 6px 12px rgba(241, 196, 15, 0.15);
}

#modalMiCuenta {
    width: 100% !important;
    height: 100% !important;
}

.miniatura-formulario {
    width: 80px;
    height: 80px;
    object-fit: cover;
    object-position: center;
    border-radius: 5px;
    border: 2px solid #ddd;
}