/* =========================================================
   Iñaki Omarrementeria — Sitio financiero
   CSS claro, responsive y accesible
   ========================================================= */
:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --muted: #475569;
  --text: #0f172a;
  --primary: #2563eb;
  --primary-700: #1d4ed8;
  --accent: #06b6d4;
  --success: #10b981;
  --ring: rgba(16, 185, 129, .25);
  --card: #ffffff;
  --shadow: 0 8px 20px rgba(2, 6, 23, .08);
  --elevation-sm: 0 6px 14px rgba(2, 6, 23, .06);
  --radius: 14px;
  --radius-sm: 10px;
  --container: 1100px;
  --line: #e2e8f0;
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #ffffff, #f8fbff 40%, #f1f5f9);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block
}

a {
  color: var(--primary);
  text-decoration: none
}

a:hover {
  opacity: .9
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px
}

.grid {
  display: grid;
  gap: 32px
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr))
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr))
}

@media (max-width:980px) {

  .grid.two,
  .grid.three {
    grid-template-columns: 1fr
  }
}

.vcenter {
  align-items: center
}

.center {
  text-align: center
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease;
}

.site-header[data-scrolled="true"] {
  box-shadow: 0 6px 18px rgba(15, 23, 42, .07);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: relative;
}

.brand {
  font-weight: 700;
  color: var(--text);
  font-size: 1.05rem;
  letter-spacing: .3px;
  z-index: 51;
}

/* Navegación desktop */
.nav .nav-links {
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
}

.nav a {
  color: #334155;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  transition: all .18s ease;
  position: relative;
}

.nav a.active,
.nav a:hover {
  background: linear-gradient(90deg, #eef2ff, #f0f8ff);
  color: #0f172a;
  transform: translateY(-1px);
}

.nav a.cta {
  background: var(--primary);
  color: #fff;
  padding: 8px 14px;
  box-shadow: 0 6px 18px rgba(37, 99, 235, .12);
}

.nav a.cta:hover {
  background: var(--primary-700);
  box-shadow: 0 10px 30px rgba(29, 78, 216, .12);
  transform: translateY(-2px);
}

/* Botón hamburguesa simple */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background .2s ease;
}

.nav-toggle:hover {
  background: rgba(0, 0, 0, .05);
}

.nav-toggle:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (max-width:820px) {
  .nav-toggle {
    display: block;
  }
}

/* Navegación móvil simple y limpia */
@media (max-width:820px) {
  .nav .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid var(--line);
    border-top: none;
    padding: 16px 0;
    display: none;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  }

  .nav .nav-links.open {
    display: flex;
  }

  .nav .nav-links li {
    margin: 0;
  }

  .nav .nav-links a {
    display: block;
    padding: 12px 20px;
    margin: 2px 16px;
    border-radius: 8px;
    font-size: 1rem;
    transition: background .2s ease;
  }

  .nav .nav-links a:hover,
  .nav .nav-links a.active {
    background: #f8fafc;
    color: #0f172a;
  }

  .nav .nav-links a.cta {
    background: var(--primary);
    color: #fff;
    margin: 8px 16px;
    text-align: center;
    font-weight: 600;
  }

  .nav .nav-links a.cta:hover {
    background: var(--primary-700);
  }
}

/* Mejoras para pantallas muy pequeñas */
@media (max-width:480px) {
  .nav-wrap {
    height: 60px;
  }

  .brand {
    font-size: 1rem;
  }

  .nav-toggle {
    font-size: 1.2rem;
    padding: 6px;
  }

  .nav .nav-links {
    top: 60px;
    padding: 20px 0;
  }

  .nav .nav-links a {
    padding: 14px 20px;
    font-size: 1rem;
  }

  .nav .nav-links a.cta {
    margin: 8px 20px;
  }
}

/* Hero */
.hero {
  padding: 56px 0 24px
}

.hero-copy h1 {
  font-size: clamp(1.9rem, 3vw + 1rem, 3.6rem);
  line-height: 1.04;
  margin: 0 0 12px;
  letter-spacing: -0.6px
}

.accent {
  color: var(--primary)
}

.hero-copy p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 18px
}

.points {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: #64748b;
  font-size: .98rem
}

.hero-photo img {
  border-radius: var(--radius);
  box-shadow: var(--elevation-sm)
}

.strip {
  margin: 32px 0
}

.strip-inner {
  background: linear-gradient(90deg, #eef2ff, #e0f2fe);
  border: 1px solid #dbeafe;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-radius: var(--radius)
}

.strip.soft .btn {
  border-color: #cbd5e1
}

.strip .btn.white {
  background: #1f2937;
  color: #fff
}

/* small helpers */
.muted {
  color: var(--muted)
}

.shadow-hover {
  transition: box-shadow .18s ease, transform .18s ease
}

.shadow-hover:hover {
  box-shadow: 0 14px 40px rgba(2, 6, 23, .08);
  transform: translateY(-6px)
}

/* Cards home */
.home-services {
  padding: 14px 0 40px
}

.section-head h2 {
  margin: 0 0 6px
}

.section-head p {
  margin: 0 0 22px;
  color: #64748b
}

.cards {
  margin-top: 12px;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr))
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 22px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .22s ease, box-shadow .22s ease;
  min-height: 220px
}

.card-icon {
  font-size: 1.6rem
}

.card-figure {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: 0 10px 30px rgba(37, 99, 235, .08);
  background: linear-gradient(135deg, var(--primary), var(--accent))
}

.card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--text)
}

.card-desc {
  color: var(--muted);
  font-size: .95rem;
  margin-top: 6px
}

.card-link {
  margin-top: auto
}

.card:hover {
  box-shadow: 0 20px 50px rgba(2, 6, 23, .08);
  transform: translateY(-8px)
}

.card:focus-within,
.card:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .10), 0 20px 50px rgba(2, 6, 23, .06);
  transform: translateY(-6px)
}

/* make CTA inside card subtle but clear */
.card .btn {
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700
}

.card .btn.ghost {
  background: #fff;
  border-color: #eef6ff
}

@media (max-width:480px) {
  .card {
    padding: 16px;
    min-height: unset
  }

  .card-figure {
    width: 56px;
    height: 56px;
    font-size: 1.05rem
  }
}

/* Servicios detalle */
.svc {
  padding: 28px 0;
  border-bottom: 1px solid var(--line)
}

.svc.alt .illu {
  order: -1
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 10px 0 8px
}

.ticks li {
  padding-left: 26px;
  position: relative;
  margin: 8px 0
}

.ticks li:before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.1rem;
  color: #16a34a;
  font-weight: 700
}

.note {
  color: #64748b
}

/* About */
.about {
  padding: 24px 0 8px
}

.about.grid.two {
  gap: 16px;
  grid-template-columns: 300px 1fr;
  align-items: center
}

.about-photo {
  max-width: 300px;
  margin: 0
}

.about-photo img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px
}

@media (max-width:980px) {

  /* Fix móvil: forzamos 1 columna para la sección Sobre mí */
  .about.grid.two {
    grid-template-columns: 1fr
  }

  .about-photo {
    max-width: 420px;
    margin: 0 auto
  }

  .about-photo img {
    width: 100%
  }
}

.badges {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  flex-wrap: wrap
}

.badges li {
  background: #eef2ff;
  border: 1px solid #e2e8f0;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .9rem;
  color: #1e40af
}

.values {
  padding: 24px 0 40px
}

.mini-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow)
}

.mini-card:hover {
  box-shadow: var(--elevation-sm);
  transform: translateY(-4px);
  transition: all .18s ease
}

/* Contacto */
.hidden {
  display: none
}

.contact-form {
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow)
}

label {
  font-weight: 700;
  display: block;
  margin: 6px 0;
  color: var(--muted)
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #e6eef8;
  background: #fff;
  color: #0f172a;
  border-radius: 12px;
  padding: 12px;
  outline: none;
  transition: box-shadow .16s ease, border-color .16s ease, transform .12s ease
}

input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 6px 20px var(--ring);
  border-color: var(--primary);
  transform: translateY(-2px)
}

.form-msg {
  margin-top: 10px
}

.alt-contact {
  color: #475569;
  margin: 16px 0 0
}

.privacy-note {
  font-size: .9rem;
  color: #64748b
}

/* Blog */
.blog-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 8px 0 18px
}

#blog-search {
  flex: 1 1 260px;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.tag {
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--muted);
  transition: all .2s ease;
  font-weight: 500
}

.tag:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f8fafc
}

.tag.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .25);
  transform: translateY(-1px)
}

.blog-cards {
  margin-top: 8px
}

.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 280px;
  transition: all .3s cubic-bezier(0.25, 0.8, 0.25, 1)
}

.post-card .cover {
  display: block;
  min-height: 160px;
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
  position: relative;
  overflow: hidden
}

.post-card .cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.02);
  transition: background .3s ease
}

.post-card:hover .cover::after {
  background: rgba(0, 0, 0, 0)
}

.post-card .post-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1
}

.post-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  line-height: 1.4
}

.post-card h3 a {
  color: var(--text);
  transition: color .2s ease
}

.post-card:hover h3 a {
  color: var(--primary)
}

.post-card p {
  color: var(--muted);
  font-size: .95rem;
  margin: 0 0 16px;
  flex: 1
}

.post-card .meta {
  color: #94a3b8;
  font-size: .85rem;
  font-weight: 500;
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px
}

.post-card:hover {
  box-shadow: 0 20px 40px -5px rgba(2, 6, 23, .1), 0 10px 20px -5px rgba(2, 6, 23, .04);
  transform: translateY(-6px);
  border-color: rgba(37, 99, 235, 0.1)
}

/* Common */
.disclaimer {
  margin: 20px 0 8px;
  color: #475569;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  padding: 12px;
  border-radius: 12px
}

/* Buttons */
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px
}

.btn {
  display: inline-block;
  font-weight: 700;
  border-radius: 12px;
  padding: 12px 16px;
  border: 1px solid #dbeafe;
  color: #1e3a8a;
  background: #eef2ff
}

.btn.ghost {
  background: #ffffff;
  border-color: #e6eef8;
  color: #0f172a
}

.btn.primary {
  background: var(--primary);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 8px 28px rgba(37, 99, 235, .12)
}

.btn.primary:hover {
  background: var(--primary-700);
  transform: translateY(-3px)
}

/* small responsive tweaks */
@media (max-width:640px) {
  .nav .nav-links {
    gap: 6px
  }

  .hero {
    padding: 36px 0 12px
  }

  .grid {
    gap: 20px
  }
}

/* Footer */
.site-footer {
  margin: 28px 0 20px;
  color: #64748b
}

.site-footer .container {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap
}

.social {
  list-style: none;
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0
}

.social a {
  color: #334155
}

.social a:hover {
  color: #0f172a
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: .95rem;
  color: #64748b;
  margin: 12px 0
}

.breadcrumbs a {
  color: #334155
}