/* Directorio de Prestamos - Estilos */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #333; line-height: 1.6; background: #f7f7f7;
}
a { color: #0066cc; text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header { background: #fff; border-bottom: 1px solid #e5e5e5; padding: 18px 0; }
.site-header .container {
  max-width: 1180px; margin: 0 auto; padding: 0 20px;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 16px;
}
.site-header .logo { font-size: 22px; font-weight: 700; color: #1a5490; }
.site-header nav ul { list-style: none; display: flex; gap: 22px; flex-wrap: wrap; }
.site-header nav a { color: #444; font-weight: 500; font-size: 15px; }
.site-header nav a:hover { color: #1a5490; }
.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* Banner grande (ficha) */
.brand-banner {
  width: 100%; height: auto; display: block; border-radius: 8px;
  overflow: hidden; margin-bottom: 24px; position: relative;
}
.brand-banner svg { width: 100%; height: auto; display: block; }
.brand-banner .brand-logo-big {
  position: absolute; top: 30%; left: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%; background: white;
  object-fit: contain; padding: 7px;
}
@media (max-width: 600px) {
  .brand-banner .brand-logo-big { width: 44px; height: 44px; padding: 5px; }
}

/* Ficha */
main.ficha {
  background: #fff; margin: 30px auto; padding: 40px 50px;
  max-width: 900px; border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
@media (max-width: 700px) {
  main.ficha { padding: 24px 20px; margin: 16px; }
}
main.ficha h1 {
  font-size: 34px; color: #1a5490; margin-bottom: 22px;
  font-weight: 700; border-bottom: 3px solid #ffb400; padding-bottom: 10px;
}
main.ficha h2 { font-size: 24px; color: #1a5490; margin: 28px 0 14px; }
main.ficha h3 { font-size: 20px; color: #224b77; margin: 24px 0 10px; }
main.ficha p { margin-bottom: 14px; }
main.ficha ul { margin: 0 0 16px 22px; }
main.ficha ul li { margin-bottom: 6px; }

.intro {
  background: #fff8e6; border-left: 4px solid #ffb400;
  padding: 16px 18px; margin: 18px 0 24px; font-weight: 500;
}
.datos-box {
  background: #f5f9fc; border: 1px solid #dfe7ef; border-radius: 6px;
  padding: 18px 22px; margin: 18px 0 24px;
}
.datos-box h4 { color: #1a5490; margin-bottom: 6px; font-size: 16px; }
.datos-box ul { margin-bottom: 12px; }
.dato-plano { color: #444; font-weight: 500; }

/* Homepage */
main.home { max-width: 1180px; margin: 0 auto; padding: 30px 20px 40px; }
.hero {
  background: #fff; border-radius: 8px; padding: 40px 40px 30px;
  margin-bottom: 30px; box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  text-align: center;
}
.hero h1 { font-size: 36px; color: #1a5490; margin-bottom: 14px; font-weight: 700; }
.hero p.subtitle { color: #555; font-size: 17px; max-width: 800px; margin: 0 auto 20px; }
.hero h2.sub { font-size: 18px; color: #666; font-weight: 500; margin-top: 18px; }
.section-block {
  background: #fff; border-radius: 8px; padding: 30px 40px;
  margin-bottom: 30px; box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
@media (max-width: 700px) { .hero, .section-block { padding: 24px 20px; } }
.section-block h2 { color: #1a5490; font-size: 24px; margin-bottom: 16px; }
.section-block p { color: #555; margin-bottom: 12px; }

/* GRID DE EMPRESAS - CRITICO */
.empresas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px; margin-top: 10px;
}
.empresa-card {
  background: #fff; border: 1px solid #e5e5e5; border-radius: 8px;
  overflow: hidden; transition: transform 0.15s, box-shadow 0.15s;
  display: flex; flex-direction: column; text-decoration: none;
}
.empresa-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
  text-decoration: none;
}
.empresa-card .card-banner {
  height: 90px; width: 100%; display: block;
  position: relative; overflow: hidden; background: #1a5490;
}
.empresa-card .card-banner svg { width: 100%; height: 100%; display: block; }
.empresa-card .card-banner .brand-logo {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%; background: white;
  object-fit: contain; padding: 6px; z-index: 2;
}
.empresa-card .card-body {
  padding: 12px 14px; text-align: center; background: #fff; flex: 1;
}
.empresa-card .card-body h3 {
  font-size: 15px; color: #1a5490; font-weight: 600;
  margin: 0; line-height: 1.3;
}
.empresa-card .card-body .nuevo-badge {
  display: inline-block; background: #4cb7b1; color: white;
  font-size: 10px; padding: 2px 8px; border-radius: 10px;
  margin-top: 6px; text-transform: uppercase;
  letter-spacing: 0.4px; font-weight: 600;
}

/* CTA turquesa */
.cta-directorio {
  background: #fafafa; border: 1px solid #e5e5e5; border-radius: 8px;
  padding: 36px 30px; margin: 30px 0 20px;
}
.cta-directorio h2 {
  color: #555; font-size: 26px; font-weight: 400;
  margin-bottom: 18px; border: none; padding: 0;
}
.cta-directorio p { color: #666; font-size: 15px; margin-bottom: 22px; max-width: 720px; }
.cta-directorio .btn-cta {
  display: inline-block; background: #4cb7b1; color: #fff;
  padding: 14px 32px; border-radius: 4px;
  font-weight: 500; font-size: 16px; letter-spacing: 0.3px;
  transition: background 0.2s;
}
.cta-directorio .btn-cta:hover { background: #3ea29c; text-decoration: none; }

/* Related (ficha) */
.related { margin-top: 40px; padding-top: 24px; border-top: 1px solid #e5e5e5; }
.related h4 {
  font-size: 16px; color: #666; margin-bottom: 16px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.related-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px;
}
.related-grid a {
  display: block; background: #f5f9fc; border: 1px solid #dfe7ef;
  padding: 14px 12px; text-align: center; border-radius: 6px;
  color: #1a5490; font-weight: 500; font-size: 14px;
}
.related-grid a:hover { background: #e9f0f6; text-decoration: none; }

/* Footer */
footer {
  background: #2a2a2a; color: #aaa; text-align: center;
  padding: 24px 20px; font-size: 14px; margin-top: 40px;
}
footer a { color: #ffb400; }

/* Disclaimer */
.disclaimer {
  background: #fafafa; border-left: 3px solid #ccc;
  padding: 12px 16px; margin-top: 20px;
  font-size: 14px; color: #666;
}

/* Search */
.search-box { max-width: 480px; margin: 20px auto 8px; display: flex; gap: 8px; }
.search-box input {
  flex: 1; padding: 12px 16px; border: 1px solid #ddd; border-radius: 4px;
  font-size: 15px; outline: none; transition: border-color 0.2s;
}
.search-box input:focus { border-color: #1a5490; }
.search-box button {
  background: #1a5490; color: white; border: none; padding: 0 22px;
  border-radius: 4px; cursor: pointer; font-size: 15px; font-weight: 500;
}
.search-box button:hover { background: #133e6a; }
