/* components.css — héroes, botones, cards, formularios, bloques y ayudas visuales */

/* Hero */
.hero {
  margin-top: 18px;
  margin-bottom: 10px;
  padding: 28px;
  border: 2px solid rgba(37, 99, 235, .15);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .94));
  box-shadow: 0 16px 40px rgba(37, 99, 235, .1);
  animation: fadeInUp .6s ease-out;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(18px, 2.8vw, 32px);
  line-height: 1.2;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.4px;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 500;
}

.hero-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* HERO mobile optimization */
@media (max-width: 640px){

  .hero-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
  }

  .hero-actions .btn-primary{
    grid-column:1 / -1;
  }

  .hero-actions .btn{
    padding:10px 12px;
    font-size:14px;
  }

  .hero h2{
    font-size:22px;
    line-height:1.25;
  }

  .hero p{
    font-size:14px;
  }

  .trust{
    grid-template-columns:1fr;
    gap:8px;
  }

  .trust-item{
    padding:10px 12px;
  }

  .trust-note{
    font-size:13px;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .8));
  color: var(--text);
  cursor: pointer;
  transition: all .25s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-weight: 700;
  letter-spacing: .05px;
  box-shadow: 0 8px 16px rgba(2, 6, 23, .08);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,.4) 0%, transparent 70%);
  opacity: 0;
  transition: opacity .4s ease;
}

.btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .92));
  box-shadow: 0 14px 28px rgba(2, 6, 23, .12);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(2, 6, 23, .06);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus), 0 14px 28px rgba(2, 6, 23, .12);
}

.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1831a8 100%);
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(37, 99, 235, .35);
  transform: translateY(-3px);
}

.btn-primary:active {
  background: linear-gradient(135deg, #1e40af 0%, #1831a8 100%);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Cards grid */
/* Cards grid */
.grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  animation: fadeIn .6s ease-out;
}

.card {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow2);
  padding: 18px;
  transition: all .3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  animation: fadeInUp .5s ease-out forwards;
  opacity: 0;
}

.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.15s; }
.card:nth-child(3) { animation-delay: 0.25s; }

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -3px;
  width: 3px;
  height: 100%;
  background: var(--accent);
  transition: width .3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(37, 99, 235, .25);
}

.card:hover::before {
  width: 6px;
}

.card h2 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.3px;
}

.card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.card .card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(37, 99, 235, .15), rgba(37, 99, 235, .08));
  border: 1px solid rgba(37, 99, 235, .25);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  transition: all .25s ease;
  letter-spacing: 0.3px;
}

.tag:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, .2), rgba(37, 99, 235, .12));
  border-color: var(--accent);
}

/* Tool page layout */
.tool-wrap {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow2);
  padding: 14px;
}

.panel h2 {
  margin: 0 0 10px;
  font-size: 18px;
  margin-top: 18px;
}

.form {
  display: grid;
  gap: 10px;
}

.field label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .88);
  color: var(--text);
  outline: none;
}

.field input:focus,
.field select:focus {
  box-shadow: 0 0 0 4px var(--focus);
  border-color: rgba(37, 99, 235, .35);
}

.field input::placeholder {
  color: rgba(11, 18, 32, .38);
}

.result {
  display: grid;
  gap: 10px;
}

.kpi {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--line);
}

.kpi .label {
  font-size: 12px;
  color: var(--muted);
}

.kpi .value {
  font-size: 22px;
  font-weight: 850;
  margin-top: 6px;
}

.note {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.note-callout {
  margin-top: 15px;
  text-align: center;
  font-weight: 600;
  color: #2563eb;
}

.note-top {
  margin-top: 10px;
}

.note-caption {
  font-size: 0.95em;
  color: #64748b;
}

.section-gap {
  margin-bottom: 40px;
}

.table-scroll {
  overflow-x: auto;
  margin: 20px 0;
}

.table-clean {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
}

.table-clean th,
.table-clean td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.table-clean thead {
  background: #f1f5f9;
}

.table-clean tr.table-head-row {
  border-bottom: 2px solid #cbd5e1;
}

.table-clean tbody tr:last-child td {
  border-bottom: none;
}

.table-clean .row-divider td {
  border-bottom: 1px solid #e2e8f0;
}

.table-clean .cell-center {
  text-align: center;
}

.table-clean .cell-strong {
  font-weight: 600;
}

.ad-wrap {
  margin: 50px 0;
  text-align: center;
}

.ad-wrap .adsbygoogle {
  display: block;
}

.last-updated {
  margin-top: 20px;
  font-weight: 600;
  color: #2563eb;
}

.note-error {
  display: none;
  color: #d32f2f;
}

.kpi-gap {
  margin-top: 12px;
}

.mt-12 {
  margin-top: 12px;
}

.mt-10 {
  margin-top: 10px;
}

.center {
  text-align: center;
}

.mt-24 {
  margin-top: 1.5rem;
}

.mt-6 {
  margin-top: 6px;
}

.kpi-accent {
  border-left: 4px solid transparent;
}

.kpi-accent-blue {
  border-left-color: #2563eb;
}

.kpi-accent-red {
  border-left-color: #dc2626;
}

.kpi-accent-orange {
  border-left-color: #f97316;
}

.legal-list {
  margin-left: 1.5rem;
  margin-top: 0.75rem;
}

.notfound-intro {
  text-align: center;
  margin-top: 40px;
}

.notfound-lead {
  font-size: 18px;
  margin-bottom: 30px;
  color: var(--muted);
}

.notfound-cta {
  display: inline-block;
}

.notfound-links {
  margin-top: 60px;
}

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

.notfound-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: center;
  text-decoration: none;
  color: inherit;
}

.notfound-card-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.notfound-card-sub {
  font-size: 14px;
  color: var(--muted);
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 14px 0;
}

/* FAQ */
.faq {
  margin-top: 16px;
}

.faq h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

details {
  border: 2px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, .65));
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: all .3s ease;
  cursor: pointer;
}

details[open] {
  background: rgba(37, 99, 235, .06);
  border-color: rgba(37, 99, 235, .2);
  box-shadow: 0 8px 24px rgba(37, 99, 235, .08);
}

summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  transition: color .25s ease;
  user-select: none;
  padding: 4px 0;
}

summary:hover {
  color: var(--accent);
}

details p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 500;
}

/* FAQ cards (simple blocks) */
.faq .card { margin-bottom: 10px; }
.faq .card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

/* Ajustes responsive generales */
/* Desktop tweaks */
@media (min-width: 900px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .tool-wrap {
    grid-template-columns: 1.1fr .9fr;
  }
}

@media (max-width: 520px) {
  .container {
    padding: 16px 14px 40px;
  }

  .header-inner {
    padding: 10px 14px;
  }

  .card {
    padding: 14px;
  }

  .card .card-actions {
    gap: 8px;
  }

  .card .card-actions .btn {
    width: 100%;
  }

  .guias-home ul {
    font-size: 12.5px;
  }
}

/* Bloques de confianza y secciones */
/* Premium trust block (home) */
.trust {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.trust-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .88), rgba(248, 250, 252, .9));
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), 0 4px 12px rgba(2, 6, 23, .04);
  cursor: default;
  position: relative;
}

.trust-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 999px;
  background: rgba(37, 99, 235, .45);
}

.trust-item:nth-child(2)::before {
  background: rgba(2, 132, 199, .45);
}

.trust-item:nth-child(3)::before {
  background: rgba(22, 163, 74, .45);
}

.trust-ic {
  font-size: 18px;
  line-height: 1;
  color: #2556c8;
  opacity: .95;
}

.trust-item:nth-child(2) .trust-ic {
  color: #0e7490;
}

.trust-item:nth-child(3) .trust-ic {
  color: #15803d;
}

.trust-ic .material-symbols-rounded {
  font-size: 20px;
  line-height: 1;
}

.trust-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trust-txt strong {
  font-size: 13px;
  letter-spacing: .2px;
}

.trust-txt span {
  font-size: 13px;
  color: var(--muted);
}

.trust-note {
  grid-column: 1 / -1;
  margin: 8px 2px 0;
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 760px) {
  .trust {
    grid-template-columns: 1fr;
  }

  .trust-item {
    justify-content: flex-start;
  }
}

/* Home: Secciones (Calculadoras / Desempleo) */
.section-block {
  margin-top: 52px;
  margin-bottom: 52px;
  padding: 32px 20px 0;
  border-radius: 24px;
  position: relative;
}

.section-block:nth-child(odd) {
  background: linear-gradient(180deg, rgba(37, 99, 235, .04) 0%, transparent 70%);
}

.section-block::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: 2px;
  opacity: 0.6;
}

.section-head {
  margin: 6px 0 20px;
  padding-bottom: 0;
}

.section-head h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 800;
}

.section-head p {
  margin: 12px 0 0 52px;
  color: var(--muted);
  max-width: 760px;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 500;
}

@media (max-width: 760px) {
  .section-head h2 {
    font-size: 24px;
    align-items: flex-start;
  }

  .section-head p {
    margin-left: 0;
  }
}

@media (max-width: 400px) {
  .hero {
    padding: 20px;
  }

  .card {
    padding: 12px;
  }

  .section-block {
    margin-top: 36px;
    margin-bottom: 36px;
    padding: 22px 12px 0;
  }

  .section-head h2 {
    font-size: 21px;
    gap: 8px;
  }

  .section-ic {
    width: 42px;
    height: 42px;
    font-size: 22px;
  }
}

.section-ic {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(37, 99, 235, .15), rgba(37, 99, 235, .08));
  border: 2px solid rgba(37, 99, 235, .25);
  flex: 0 0 auto;
  font-size: 28px;
  transition: all .3s ease;
}

.section-block:nth-child(even) .section-ic {
  background: linear-gradient(135deg, rgba(16, 185, 129, .15), rgba(16, 185, 129, .08));
  border-color: rgba(16, 185, 129, .25);
}

.section-block:nth-child(3n) .section-ic {
  background: linear-gradient(135deg, rgba(249, 115, 22, .15), rgba(249, 115, 22, .08));
  border-color: rgba(249, 115, 22, .25);
}

.section-block .grid{
  margin-top: 12px;
}

.card-emoji {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(37, 99, 235, .15), rgba(37, 99, 235, .08));
  border: 2px solid rgba(37, 99, 235, .25);
  margin-bottom: 12px;
  font-size: 26px;
  transition: all .3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:hover .card-emoji {
  transform: translateY(-4px) scale(1.1);
  background: linear-gradient(135deg, rgba(37, 99, 235, .25), rgba(37, 99, 235, .15));
  border-color: var(--accent);
}

.card-featured{
  background: linear-gradient(180deg, #eef6ff 0%, #ffffff 80%);
  border-color: rgba(37,99,235,.22);
  box-shadow: 0 18px 45px rgba(37, 99, 235, .12);
}


.list{margin:0; padding-left:18px; color:var(--text);}
.list li{margin:8px 0; color:var(--text);} 
.help{margin:6px 0 0; font-size:12px; color:var(--muted);} 


/* Material Symbols helpers */
.material-symbols-rounded{
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  line-height: 1;

  font-variation-settings: 'opsz' 24, 'wght' 400, 'FILL' 0, 'GRAD' 0;
}

.card-icon{
  font-size: 22px;
  color: var(--accent);
}

/* --- Trust / sources blocks (AdSense + UX) --- */
.trust-block{
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--accent-soft), rgba(255,255,255,0));
}
.trust-block h2{
  margin: 0 0 10px 0;
  font-size: 1rem;
  line-height: 1.25;
}
.trust-block ul{
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.trust-block li{ margin: 6px 0; }
.trust-block a{ text-decoration: underline; text-underline-offset: 2px; }


/* Scroll-to-top */
.scroll-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(37, 99, 235, .2);
  background: var(--card);
  color: var(--accent);
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(37, 99, 235, .15);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, .25);
}

.scroll-top:active {
  transform: translateY(0);
}

@media (max-width: 640px) {
  .scroll-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  .muted {
    font-size: 14px;
    line-height: 1.5;
  }
}
/* Tool cards subtle background for calculators/simulators */
a.card[href*="/tools/"]{background:#f3f8ff;border:1px solid #e3edff;}
a.card[href*="/tools/"]:hover{background:#eaf3ff;}
