:root {
  --primary: #0c3f65;
  --primary-dark: #072942;
  --primary-light: #e6f1f9;
  --accent: #f9a826;
  --gray-900: #0f172a;
  --gray-700: #334155;
  --gray-500: #64748b;
  --gray-100: #f1f5f9;
  --gray-50: #f8fbff;
  --white: #ffffff;
  --max-width: 1100px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --shadow-soft: 0 20px 40px rgba(12, 63, 101, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--gray-900);
  background-color: var(--white);
  line-height: 1.6;
  scroll-behavior: smooth;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.85rem 1.8rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 12px 24px rgba(12, 63, 101, 0.25);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary-light);
}

.btn-outline {
  border: 1px solid var(--primary);
  color: var(--primary);
  padding-inline: 1.4rem;
  background: transparent;
}

.btn-outline:hover {
  background: var(--primary-light);
}

.btn-call {
  background: var(--accent);
  color: var(--primary);
  box-shadow: 0 12px 24px rgba(249, 168, 38, 0.35);
}

.btn-call:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(249, 168, 38, 0.45);
}

.btn-light {
  background: var(--white);
  color: var(--primary);
  font-weight: 700;
}

.btn-light:hover {
  background: var(--primary-light);
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}

.logo {
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--primary);
  text-decoration: none;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-weight: 500;
}

.nav-links a {
  color: var(--gray-700);
  transition: color 0.2s ease;
}

.nav-links a.btn {
  color: inherit;
}

.nav-links a:hover {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  width: 26px;
  height: 3px;
  background: var(--primary);
  border-radius: 10px;
}

.hero {
  padding-block: 8rem 5rem;
  background: linear-gradient(135deg, #f7fbff 0%, #f0f6fd 45%, #dce9f8 100%);
}

.hero .container {
  display: grid;
  align-items: center;
  gap: 3rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.hero-eyebrow {
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw + 1rem, 3.6rem);
  margin-bottom: 1.2rem;
}

.hero-subtitle {
  color: var(--gray-700);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.trust-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.trust-icon svg {
  width: 100%;
  height: 100%;
}

.calculator {
  padding-block: 5rem;
}

.calculator .container {
  display: grid;
  gap: 2.5rem;
  align-items: start;
  justify-items: stretch;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 960px) {
  .calculator .container {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  }
}

.calculator-copy {
  display: grid;
  gap: 1.2rem;
}

.calculator-copy h2 {
  font-size: clamp(1.9rem, 2vw + 1.2rem, 2.6rem);
}

.calculator-copy ul {
  list-style: none;
  display: grid;
  gap: 0.6rem;
  color: var(--gray-700);
}

.calculator-copy li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.calculator-copy li::before {
  content: '•';
  color: var(--accent);
  font-weight: 700;
  line-height: 1;
  transform: translateY(0.2rem);
}

.calculator-card {
  background: var(--white);
  padding: clamp(1.4rem, 4vw, 2.4rem);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(12, 63, 101, 0.08);
  display: grid;
  gap: 1.4rem;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  justify-items: stretch;
  align-content: start;
}

.calculator-card>* {
  min-width: 0;
}

.calculator-form {
  display: grid;
  gap: 1.1rem;
  width: 100%;
  max-width: 520px;
}

.calculator-hint {
  font-size: 0.85rem;
  color: var(--gray-500);
}

.form-row {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
  width: 100%;
}

.form-row--dates {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.form-row--dates>div {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

label {
  font-weight: 600;
  color: var(--gray-700);
}

input,
select,
textarea {
  font: inherit;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: var(--gray-50);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

input[type='date'] {
  appearance: none;
  -webkit-appearance: none;
}

.form-row--dates input[type='date'] {
  min-width: 0;
  width: 100%;
  font-size: 0.98rem;
}

@supports (-webkit-touch-callout: none) {
  .form-row--dates input[type='date'] {
    min-height: 3.25rem;
  }
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(12, 63, 101, 0.12);
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.input-group span {
  position: absolute;
  left: 1rem;
  color: var(--gray-500);
  font-weight: 600;
}

.input-group input {
  padding-left: 2.5rem;
  width: 100%;
}

.calculator-result {
  margin-top: 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--gray-700);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.calculator-result.has-result {
  background: var(--primary-light);
  border: 1px solid rgba(12, 63, 101, 0.18);
  border-radius: 18px;
  padding: 1.4rem 1.6rem;
}

.calculator-result h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  color: var(--primary);
}

.result-amount {
  font-size: clamp(1.8rem, 2vw + 1rem, 2.4rem);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.8rem;
}

.result-breakdown {
  list-style: none;
  display: grid;
  gap: 0.4rem;
  padding: 0;
  margin: 0 0 0.8rem;
}

.result-breakdown strong {
  color: var(--gray-900);
}

.result-observations {
  margin-bottom: 0.8rem;
  display: grid;
  gap: 0.4rem;
}

.result-observations h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--primary);
}

.result-observations ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.3rem;
  color: var(--gray-600);
}

.result-note {
  font-size: 0.85rem;
  color: var(--gray-500);
}

.calculator-legal {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--gray-500);
}

section {
  padding-block: 5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header p {
  color: var(--gray-500);
  margin-top: 0.8rem;
}

/* ==========================
   Dropdown "Artículos"
   ========================== */

.nav-item {
  position: relative;
}

.nav-link.nav-dropdown__toggle {
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--gray-700);
  cursor: pointer;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link.nav-dropdown__toggle:hover {
  color: var(--primary);
}

/* Desktop: mostrar menú al hover */
.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background: var(--white);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  padding: 0.6rem 0;
  list-style: none;
  z-index: 999;

  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.dropdown-menu a {
  display: block;
  padding: 0.7rem 1rem;
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-menu a:hover {
  background: var(--gray-100);
  color: var(--primary);
}

/* ==========================
   Mobile: integrar dropdown dentro del menú hamburguesa
   ========================== */

@media (max-width: 960px) {
  .nav-dropdown {
    width: 100%;
  }

  .nav-link.nav-dropdown__toggle {
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0;
    color: var(--gray-700);
  }

  .nav-link.nav-dropdown__toggle::after {
    content: "▾";
    font-weight: 700;
    color: var(--primary);
    margin-left: 0.75rem;
    transition: transform 0.18s ease;
  }

  /* En móvil, el dropdown deja de ser flotante */
  .dropdown-menu {
    position: static;
    min-width: 0;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0.35rem 0 0.2rem;
    transform: none;

    /* estado cerrado */
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    display: none;
  }

  /* Estado abierto en móvil */
  .nav-dropdown.is-open .dropdown-menu {
    display: block;
  }

  .nav-dropdown.is-open .nav-link.nav-dropdown__toggle::after {
    transform: rotate(180deg);
  }

  .dropdown-menu a {
    padding: 0.65rem 0.2rem;
    font-weight: 600;
  }
}

.services .grid {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.service-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 40px rgba(12, 63, 101, 0.12);
}

.process .timeline {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.step {
  background: var(--white);
  padding: 1.8rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(12, 63, 101, 0.08);
  position: relative;
  padding-top: 2.8rem;
}

.step-number {
  position: absolute;
  top: -20px;
  left: 20px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(12, 63, 101, 0.2);
}

.highlights {
  background: var(--primary);
  color: var(--white);
}

.highlights .container {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.highlight-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.highlight-card h3 {
  font-size: 2.4rem;
  margin-bottom: 0.4rem;
}

.testimonials {
  background: var(--gray-100);
}

.testimonial-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.testimonial-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.testimonial-card blockquote {
  font-size: 1.05rem;
  color: var(--gray-700);
  font-style: italic;
}

.testimonial-card figcaption {
  font-weight: 700;
  color: var(--primary);
}

.cta {
  background: linear-gradient(120deg, #0c3f65 0%, #115886 100%);
  color: var(--white);
}

.cta .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.faq .accordion {
  display: grid;
  gap: 1rem;
}

details {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.6rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-soft);
}

details summary {
  cursor: pointer;
  font-weight: 600;
}

details[open] summary {
  color: var(--primary);
}

details p {
  margin-top: 0.8rem;
  color: var(--gray-500);
}

.contact .container {
  display: grid;
  gap: 3rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
}

.contact-info {
  display: grid;
  gap: 1.4rem;
}

.contact-details {
  display: grid;
  gap: 0.8rem;
}

.contact-detail {
  display: grid;
  gap: 0.2rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(12, 63, 101, 0.12);
  background: var(--gray-50);
  color: var(--gray-700);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.contact-detail:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.contact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.contact-value {
  font-weight: 600;
  font-size: 1.05rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.55;
}

.checkbox input {
  margin: 0.2rem 0 0;
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}

.checkbox span {
  display: block;
}

.checkbox a {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 600;
}

.checkbox a:hover {
  color: var(--primary-dark);
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  padding: 1.3rem;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
  display: none;
  z-index: 9999;
}

.cookie-content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 0.8rem;
}

.cookie-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cookie-panel {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.cookie-panel .panel-content {
  background: #ffffff;
  padding: 1.8rem;
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  display: grid;
  gap: 1rem;
}

.footer {
  background: #0b1f36;
  color: rgba(255, 255, 255, 0.8);
  padding-top: 4rem;
}

.footer .container {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 3rem;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.9rem;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--white);
  font-size: 1.4rem;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 18px 30px rgba(249, 168, 38, 0.25);
}

.back-to-top.show {
  display: flex;
}

@media (max-width: 960px) {
  .nav-links {
    position: absolute;
    top: 70px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    display: none;
    min-width: min(320px, calc(100vw - 2rem));
    gap: 1rem;
  }

  .nav-links.open {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links a.btn {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .form-row--dates {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero {
    padding-block: 6rem 4rem;
  }

  .hero-actions {
    justify-content: stretch;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .hero-trust {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-row--dates {
    grid-template-columns: 1fr;
  }

  .calculator-card {
    padding: clamp(1.2rem, 6vw, 1.6rem);
    margin-inline: auto;
    max-width: 100%;
  }

  .calculator-form {
    max-width: 100%;
    gap: 1rem;
  }

  .form-row {
    gap: 0.5rem;
  }

  .cta .container {
    text-align: center;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 480px) {
  .calculator {
    padding-block: 4.5rem 3.5rem;
  }

  .calculator-copy ul {
    gap: 0.5rem;
  }

  .input-group span {
    left: 0.85rem;
  }

  .input-group input {
    padding-left: 2.3rem;
  }
}