/* =========================
   Calculadoras360 - Claro SaaS Premium 2026
   DEFINITIVO + UNIFICADO
   ========================= */

/* =========================
   Variables
   ========================= */
:root{
  --bg: #F6F8FC;
  --bg2: #EEF2F9;
  --card: #FFFFFF;

  --text: #0F172A;
  --heading: #374151;
  --muted: #334155;

  --border: rgba(15, 23, 42, 0.10);

  --primary: #1D4ED8;
  --primary-hover: #1E40AF;

  --online: #22FF66;
  --online-strong: #00FF88;

  --shadow-sm: 0 6px 16px rgba(15, 23, 42, 0.08);
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.10);

  --radius: 18px;
  --container: 1040px;
  --container-pad: 22px;

  --focus-ring: 0 0 0 5px rgba(29, 78, 216, 0.14);
}

/* =========================
   Reset + Base
   ========================= */
*{ box-sizing:border-box; }

html, body{
  height:100%;
  overflow-x:hidden;
}

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height:1.6;
  color:var(--text);
  background:
    radial-gradient(1200px 700px at 50% -80px, rgba(29,78,216,0.10), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
}

:focus-visible{
  outline:none;
  box-shadow:var(--focus-ring);
}

a{
  color:inherit;
  text-decoration:none;
}

small{
  color:var(--muted);
}

/* =========================
   Texto contenido
   ========================= */
.container p,
.container li,
.container dd{
  color:var(--muted);
}

p{
  margin:0 0 14px;
}

ul,
ol{
  margin:0 0 14px;
  padding-left:22px;
}

li{
  margin:6px 0;
}

label,
h1,
h2,
h3,
h4,
.brand{
  color:var(--heading);
}

/* =========================
   Layout
   ========================= */
.container{
  width:100%;
  max-width:var(--container);
  margin:0 auto;
  padding:88px var(--container-pad) var(--container-pad);
}

/* =========================
   Header
   ========================= */
.site-header{
  position:fixed;
  top:0;
  left:0;
  right:0;
  width:100%;
  z-index:99999;
  background:#FFFFFF;
  border-bottom:1px solid var(--border);
}

.header-inner{
  width:100%;
  max-width:var(--container);
  margin:0 auto;
  padding:12px var(--container-pad);
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:28px;
}

/* =========================
   Brand
   ========================= */
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:600;
  font-size:18px;
}

.brand-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:radial-gradient(circle at 30% 30%, #66FF99, var(--online-strong));
}

/* =========================
   Navegación
   ========================= */
.main-nav{
  display:flex;
  align-items:center;
  gap:18px;
  flex-wrap:wrap;
  margin-left:30px;
}

.nav-link{
  display:inline-flex;
  align-items:center;
  color:var(--muted);
  font-weight:600;
  font-size:14px;
  padding:6px 8px;
  border-radius:10px;
  line-height:1.2;
  transition:background .15s ease, color .15s ease;
}

.nav-link:hover{
  background:rgba(15,23,42,0.06);
  color:#475569;
}

/* =========================
   Dropdown menú hover
   ========================= */
.nav-item{
  position:relative;
  display:inline-block;
  padding-bottom:12px;
  margin-bottom:-12px;
}

.nav-link-dropdown{
  cursor:default;
  user-select:none;
}

.nav-link-dropdown::after{
  content:" \25BE";
  font-size:12px;
  margin-left:4px;
  color:var(--muted);
}

.nav-item .dropdown{
  display:none;
  position:absolute;
  top:100%;
  left:0;
  min-width:180px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  box-shadow:0 14px 32px rgba(15,23,42,0.08);
  padding:6px;
  z-index:99999;
  opacity:0;
  transform:translateY(4px);
  transition:opacity .15s ease, transform .15s ease;
}

.nav-item .dropdown a{
  display:block;
  padding:6px 8px;
  border-radius:10px;
  font-size:14px;
  font-weight:600;
  color:var(--muted);
  white-space:nowrap;
  line-height:1.2;
  transition:background .15s ease, color .15s ease;
}

.nav-item .dropdown a:hover{
  background:rgba(15,23,42,0.06);
  color:#475569;
}

.nav-item:hover > .dropdown,
.nav-item:focus-within > .dropdown{
  display:block;
  opacity:1;
  transform:translateY(0);
}

/* =========================
   Titulares
   ========================= */
h1{
  font-size:34px;
  margin:0 0 8px;
}

h2{
  font-size:20px;
  margin-bottom:10px;
}

h3{
  font-size:16px;
  margin-bottom:8px;
}

h4{
  font-size:15px;
  margin:0 0 10px;
}

p.lead{
  font-size:16px;
}

/* =========================
   Negritas refinadas
   ========================= */
.container strong,
.container b{
  font-weight:600;
  color:var(--heading);
}

/* =========================
   Botones globales
   ========================= */
.btn-soft,
button,
input[type="submit"],
input[type="button"]{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:10px 22px;
  border-radius:12px;
  border:none;
  background:var(--primary);
  color:#fff;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 10px 24px rgba(29,78,216,0.30);
  transition:background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.btn-soft:hover,
button:hover{
  background:var(--primary-hover);
  box-shadow:0 14px 28px rgba(30,64,175,0.36);
}

/* =========================
   Footer
   ========================= */
.site-footer{
  border-top:1px solid var(--border);
  margin-top:26px;
  padding:20px 0;
}

.site-footer-inner{
  width:100%;
  max-width:var(--container);
  margin:0 auto;
  padding:0 var(--container-pad);
  text-align:center;
}

.site-footer nav{
  display:flex;
  justify-content:center;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.site-footer nav a{
  display:inline-flex;
  align-items:center;
  color:var(--muted);
  font-weight:600;
  font-size:14px;
  padding:6px 8px;
  border-radius:10px;
  line-height:1.2;
  transition:background .15s ease, color .15s ease;
}

.site-footer nav a:hover{
  background:rgba(15,23,42,0.06);
  color:#475569;
}

.site-footer small{
  display:block;
  color:var(--muted);
}

/* =========================
   Cards
   ========================= */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(290px, 1fr));
  gap:16px;
}

.cards-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:16px;
  align-items:stretch;
}

.cards-grid .card{
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  min-height:220px;
  height:100%;
  margin-top:0;
}

.cards-grid .card p{
  flex-grow:1;
  margin-bottom:16px;
}

.cards-grid .btn-soft{
  margin-top:auto;
  align-self:flex-start;
}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px;
  box-shadow:var(--shadow-sm);
  width:100%;
  max-width:100%;
}

form.card,
section.card{
  width:100%;
  max-width:100%;
}

/* =========================
   Card destacada global
   ========================= */
.card-destacada{
  max-width:520px;
  margin:0 auto 18px;
  text-align:center;
}

.card-destacada .btn-soft,
.card-destacada button{
  margin-top:0;
}

/* =========================
   Separación automática tarjetas
   ========================= */
.card + .card{
  margin-top:18px;
}

form.card + .card,
.card + form.card{
  margin-top:18px;
}

/* En grids no queremos ese margen superior */
.cards-grid .card + .card{
  margin-top:0;
}

/* =========================
   Calculadoras - estilo calculadora plateada definitivo
   ========================= */
.card-calculadora{
  max-width:360px;
  margin:0 auto 24px;
  padding:22px;
  display:flex;
  flex-direction:column;
  background:
    linear-gradient(180deg,#f8fafc 0%,#e5e7eb 48%,#d1d5db 100%);
  border:1px solid #cbd5e1;
  border-radius:22px;
  box-shadow:
    0 18px 36px rgba(15,23,42,0.14),
    inset 0 2px 0 rgba(255,255,255,0.85),
    inset 0 -2px 6px rgba(100,116,139,0.16);
}

.card-calculadora label{
  font-weight:700;
  font-size:12px;
  margin-top:14px;
  color:#475569;
  letter-spacing:.2px;
}

.card-calculadora input,
.card-calculadora select{
  margin-top:6px;
  width:100%;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid #cbd5e1;
  background:
    linear-gradient(180deg,#f8fafc 0%,#e2e8f0 100%);
  color:#0f172a;
  font-size:15px;
  font-weight:600;
  box-shadow:
    inset 0 1px 2px rgba(255,255,255,0.75),
    inset 0 -1px 2px rgba(148,163,184,0.18);
  transition:border .2s ease, box-shadow .2s ease;
}

.input-calculadora{
  text-align:right;
  font-size:22px;
  font-weight:700;
  letter-spacing:.6px;
  color:#334155;
  background:
    linear-gradient(180deg,#eef2f7 0%,#dbe4ee 100%);
  box-shadow:
    inset 0 3px 4px rgba(0,0,0,0.08),
    inset 0 -2px 3px rgba(255,255,255,0.8);
}

.card-calculadora input:focus,
.card-calculadora select:focus{
  outline:none;
  border-color:#94a3b8;
  box-shadow:
    0 0 0 3px rgba(148,163,184,0.18),
    inset 0 1px 2px rgba(255,255,255,0.75);
}

.card-calculadora .btn-soft,
.card-calculadora button{
  margin-top:20px;
  align-self:center;
  min-width:150px;
  font-size:15px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.3px;
  color:#1f2937;
  background:
    linear-gradient(180deg,#f8fafc 0%,#d1d5db 100%);
  border:1px solid #cbd5e1;
  border-radius:12px;
  box-shadow:
    0 6px 12px rgba(15,23,42,0.12),
    inset 0 1px 0 rgba(255,255,255,0.9),
    inset 0 -2px 4px rgba(148,163,184,0.25);
  transition:all .15s ease;
}

.card-calculadora .btn-soft:hover,
.card-calculadora button:hover{
  background:
    linear-gradient(180deg,#e5e7eb 0%,#cbd5e1 100%);
  box-shadow:
    0 4px 10px rgba(15,23,42,0.12),
    inset 0 1px 0 rgba(255,255,255,0.8),
    inset 0 -2px 4px rgba(148,163,184,0.2);
  transform:translateY(1px);
}

/* =========================
   Resultado calculadora
   ========================= */
.card-resultado{
  max-width:360px;
  margin:0 auto 18px;
  padding:22px;
  background:
    linear-gradient(180deg,#f8fafc 0%,#e5e7eb 48%,#d1d5db 100%);
  color:#0f172a;
  border:1px solid #cbd5e1;
  border-radius:22px;
  box-shadow:
    0 18px 36px rgba(15,23,42,0.14),
    inset 0 2px 0 rgba(255,255,255,0.85),
    inset 0 -2px 6px rgba(100,116,139,0.16);
}

.card-resultado h2{
  color:#374151;
  margin:0 0 16px;
  font-size:19px;
  font-weight:700;
}

.card-resultado ul{
  list-style:none;
  margin:0;
  padding:0;
}

.card-resultado li{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:8px 0;
  font-size:17px;
  color:#334155;
}

.card-resultado li:last-child{
  margin-top:10px;
  padding-top:14px;
  border-top:1px solid rgba(15,23,42,0.15);
  font-size:22px;
  font-weight:700;
  color:#0f172a;
}

.card-resultado li b,
.card-resultado li strong{
  color:#0f172a;
  font-weight:700;
}

form.card.card-calculadora{
  width:100%;
  max-width:360px;
  margin:0 auto 24px;
}

section.card.card-resultado{
  width:100%;
  max-width:360px;
  margin:0 auto 18px;
}

/* =========================
   Cookie Banner
   ========================= */
#cookie-banner.cookie-banner{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  width:100%;
  background:rgba(15,23,42,0.78);
  border-top:1px solid rgba(255,255,255,0.12);
  padding:14px 18px;
  backdrop-filter:blur(8px);
  z-index:99999;
}

#cookie-banner .cookie-content{
  max-width:var(--container);
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

.cookie-text{
  font-size:14px;
  line-height:1.5;
  color:#e2e8f0;
  margin:6px 0;
}

.cookie-text a{
  color:#93c5fd;
  text-decoration:underline;
}

.cookie-buttons{
  display:flex;
  gap:10px;
  flex-shrink:0;
}

#accept-cookies,
#reject-cookies{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:10px 22px;
  border-radius:12px;
  font-weight:700;
  cursor:pointer;
  transition:background .2s ease, box-shadow .2s ease, transform .2s ease;
}

#accept-cookies{
  background:#1d4ed8;
  color:#fff;
  border:1px solid rgba(255,255,255,0.08);
  box-shadow:0 8px 20px rgba(29,78,216,0.22);
}

#accept-cookies:hover{
  background:#1e40af;
  box-shadow:0 10px 22px rgba(30,64,175,0.26);
}

#reject-cookies{
  background:rgba(255,255,255,0.06);
  color:#f1f5f9;
  border:1px solid rgba(255,255,255,0.18);
  box-shadow:none;
}

#reject-cookies:hover{
  background:rgba(255,255,255,0.10);
}

body.has-cookie-banner{
  padding-bottom:90px;
}

/* =========================
   Breadcrumbs
   ========================= */
.breadcrumbs{
  margin:10px 0 20px;
  font-size:14px;
}

.breadcrumbs-list{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.breadcrumbs-list li{
  display:flex;
  align-items:center;
}

.breadcrumbs-list li::after{
  content:"›";
  margin:0 6px;
  color:#94a3b8;
}

.breadcrumbs-list li:last-child::after{
  content:"";
}

.breadcrumbs a{
  text-decoration:none;
  color:var(--heading);
  font-weight:600;
}

.breadcrumbs a:hover{
  text-decoration:underline;
}

.breadcrumbs span{
  color:#475569;
}

/* =========================
   Responsive
   ========================= */
@media (max-width:640px){

  .container{
    padding:130px 18px 18px;
  }

  .header-inner{
    flex-direction:column;
    align-items:flex-start;
    gap:12px;
  }

  .main-nav{
    flex-wrap:wrap;
    gap:10px;
    margin-left:0;
  }

  h1{
    font-size:28px;
    line-height:1.2;
    margin-top:6px;
  }

  .cards-grid{
    grid-template-columns:1fr;
  }

  #cookie-banner .cookie-content{
    max-width:var(--container);
    margin:0 auto;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
  }

  .cookie-buttons{
    width:100%;
    justify-content:flex-end;
  }
}