:root {
    --bg-main: #0b0f19;
    --bg-card: #161c2a;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --accent: #ff385c;
    --neon-cyan: #00f2fe;
    --neon-purple: #4facfe;
    --border-color: rgba(255, 255, 255, 0.08);
    --radius-lg: 24px;
    --radius-md: 16px;
    --font: 'Plus Jakarta Sans', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background-color: var(--bg-main);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content { flex: 1; max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 24px; }

/* NAVBAR */
.navbar { position: sticky; top: 0; background: rgba(11, 15, 25, 0.8); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-color); z-index: 100; }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }
.logo-icon { width: 26px; color: var(--accent); }
.neon-text { background: linear-gradient(45deg, var(--neon-cyan), var(--neon-purple)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 14px; margin-left: 20px; }

/* HERO & SEARCH BAR */
.hero-section { text-align: center; padding: 50px 0 30px 0; }
.hero-text h2 { font-size: 36px; margin-bottom: 12px; }
.hero-text p { color: var(--text-muted); margin-bottom: 30px; }
.search-wrapper { display: flex; justify-content: center; }
.search-bar { display: flex; align-items: center; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 50px; padding: 8px 8px 8px 24px; width: 100%; max-width: 700px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.search-input-group { display: flex; align-items: center; gap: 12px; width: 100%; }
.search-icon { width: 20px; color: var(--text-muted); }
.search-bar input { background: transparent; border: none; outline: none; color: var(--text-main); font-size: 16px; width: 100%; }
.btn-search { background: linear-gradient(135deg, var(--accent), #bd1e51); border: none; border-radius: 24px; padding: 12px 24px; color: white; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.btn-icon { display: none; width: 20px; height: 20px; }

/* LOADING SPINNER */
.loading-spinner { text-align: center; color: var(--neon-cyan); padding: 20px; font-weight: 500; }

/* GRID Y TARJETAS (IMÁGENES CORREGIDAS) */
.results-section { margin-top: 30px; }
.section-title { font-size: 22px; margin-bottom: 24px; }
.grid-resultados { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }

.card { background: var(--bg-card); border-radius: var(--radius-md); border: 1px solid var(--border-color); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.3s; }
.card:hover { transform: translateY(-5px); }

/* Contenedor de imagen real */
.card-img-container { height: 200px; width: 100%; position: relative; background: #1e2640; }
.card-img { width: 100%; height: 100%; object-fit: cover; }

.score-badge { position: absolute; top: 15px; right: 15px; background: rgba(11, 15, 25, 0.8); backdrop-filter: blur(8px); padding: 6px 12px; border-radius: 20px; border: 1px solid var(--neon-cyan); font-weight: 700; color: var(--neon-cyan); font-size: 14px; }
.card-content { padding: 20px; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }
.card-header-info { display: flex; justify-content: space-between; align-items: baseline; }
.postal-code { font-size: 12px; color: var(--text-muted); background: rgba(255,255,255,0.05); padding: 2px 6px; border-radius: 4px; }
.card-text { font-size: 14px; color: var(--text-muted); line-height: 1.5; }

.features-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.05); }
.tag { font-size: 11px; padding: 4px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.04); color: #cbd5e1; }
.tag.positive { background: rgba(16, 185, 129, 0.1); color: #10b981; }

/* FOOTER PROFESIONAL */
.site-footer { background: #070a12; border-top: 1px solid var(--border-color); padding: 48px 24px 24px 24px; margin-top: 60px; }
.footer-container { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; }
.footer-brand { max-width: 300px; }
.footer-brand p { color: var(--text-muted); font-size: 14px; margin-top: 12px; }
.footer-links-group { display: flex; gap: 60px; }
.footer-col h4 { font-size: 14px; color: var(--text-main); margin-bottom: 16px; font-weight: 600; }
.footer-col a { display: block; color: var(--text-muted); text-decoration: none; font-size: 14px; margin-bottom: 10px; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { max-width: 1200px; margin: 40px auto 0 auto; padding-top: 24px; border-top: 1px solid var(--border-color); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--text-muted); }
.credits a { color: var(--neon-cyan); text-decoration: none; font-weight: 600; }
.credits a:hover { text-decoration: underline; }

/* RESPONSIVE MÓVIL */
@media (max-width: 768px) {
    .hero-text h2 { font-size: 28px; }
    .search-bar { padding: 6px 6px 6px 16px; }
    .btn-text { display: none; }
    .btn-icon { display: block; }
    .btn-search { padding: 12px; border-radius: 50%; }
    .grid-resultados { grid-template-columns: 1fr; }
    .footer-links-group { gap: 30px; width: 100%; justify-content: space-between; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

/* AJUSTES PARA LA INFORMACIÓN AMPLIADA EN LA TARJETA */
.provincia-tag {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
    display: inline-block;
    margin-left: 4px;
}

.datos-ampliados {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.dato-item {
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dato-item strong {
    color: #e5e7eb;
    font-weight: 500;
}

.dato-item span {
    color: var(--text-muted);
}

/* EFECTO HOVER EN LAS IMÁGENES REALES */
.card-img {
    transition: transform 0.5s ease;
}
.card:hover .card-img {
    transform: scale(1.06);
}
/* DISEÑO DE LA CAJA DE COMENTARIOS */
.comment-box {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--accent);
    padding: 10px 12px;
    border-radius: 4px;
    margin: 6px 0;
}

.comment-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--neon-cyan);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.comment-text {
    font-size: 13px;
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Ajuste del tamaño del grid para soportar mejor el nuevo contenido */
.grid-resultados {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}