/* Estilos básicos */
body, html {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: #f4f7f6; 
  color: #333; 
}

/* Encabezado */
header {
  background-color: #fff;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: relative; 
  z-index: 900; 
}

.header-content {
  display: flex;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px; 
}

.logo-container {
  margin-right: 20px;
}

.logo-container svg { 
    display: block; 
}

.title-container h1 {
  margin: 0;
  color: #1a2b4c;
  font-size: 2.2em; 
}

.title-container p {
  margin: 5px 0 0;
  color: #3a5078;
  font-size: 0.9em;
}

/* --- Navegación Principal --- */
nav {
  background-color: #1a2b4c;
  padding: 10px 0;
  color: white;
  position: sticky; 
  top: 0;
  z-index: 1000; 
  box-shadow: 0 2px 4px rgba(0,0,0,0.2); 
}

.nav-container {
  display: flex;
  /* justify-content: space-between; <-- Comentado/Eliminado */
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.menu {
  display: flex; 
  list-style-type: none;
  margin: 0; /* Reset inicial */
  margin-left: auto; /* <<< ESTE ES EL CAMBIO PRINCIPAL para alinear a la derecha */
  padding: 0;
  flex-wrap: wrap; 
}

.menu > li { 
  margin-right: 5px; 
  position: relative; 
}

.menu > li:last-child {
  margin-right: 0;
}

.menu a { 
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 10px 12px; 
  display: block;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.menu a:hover, 
.menu > li:hover > a, 
.menu a.active,
.menu a:focus-visible { 
  background-color: #3a5078; 
  outline: 2px solid transparent; 
  outline-offset: 2px;
}

.menu ul.submenu {
    display: none; 
    position: absolute;
    background-color: #1a2b4c; 
    list-style: none;
    padding: 5px 0; 
    margin: 0; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1005; 
}

.menu > li > ul.submenu {
    left: 0;
    top: 100%; 
    min-width: 230px; 
    border-radius: 0 0 4px 4px;
}

.menu > li > ul.submenu > li > ul.submenu {
    left: 100%; 
    top: -5px;   
    min-width: 250px; 
    border-radius: 4px; 
}

@media (min-width: 993px) {
    .menu > li:hover > ul.submenu,
    .menu > li > a:focus-visible + ul.submenu, 
    .menu > li > ul.submenu:hover { 
        display: block;
    }

    .menu > li > ul.submenu > li:hover > ul.submenu,
    .menu > li > ul.submenu > li > a:focus-visible + ul.submenu, 
    .menu > li > ul.submenu > li > ul.submenu:hover { 
        display: block;
    }
}

.menu ul.submenu li { 
    margin: 0;
    width: 100%;
    position: relative; 
}

.menu ul.submenu a { 
    padding: 10px 15px;
    white-space: nowrap; 
    font-size: 0.9em; 
}

.menu ul.submenu a:hover, 
.menu ul.submenu a.active,
.menu ul.submenu a:focus-visible { 
    background-color: #3a5078;
}

.menu .fa-chevron-down { 
    font-size: 0.7em;
    margin-left: 5px;
    pointer-events: none; 
}

.language-selector {
    margin-left: 15px; /* Mantiene el espacio entre el menú y el selector */
}

.language-selector select {
  padding: 8px 10px; 
  border-radius: 4px;
  border: 1px solid #ccc; 
  background-color: #fff;
  color: #1a2b4c;
  font-weight: 500;
}
.language-selector select:focus-visible {
    outline: 2px solid #3a5078;
    outline-offset: 1px;
    border-color: #3a5078;
}
/* --- Fin Navegación Principal --- */


/* --- Breadcrumbs (Migas de Pan) --- */
.breadcrumbs-container {
  background-color: #e8f0fe; 
  padding: 12px 0; 
  margin-bottom: 25px; 
  font-size: 0.9em; 
  border-bottom: 1px solid #dde2e8; 
  position: relative; 
  z-index: 950;      
}

.breadcrumbs {
  list-style: none; 
  padding: 0;
  margin: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px; 
  display: flex;
  align-items: center; 
  flex-wrap: wrap; 
}

.breadcrumb-item {
  display: flex; 
  align-items: center;
}

.breadcrumb-item a {
  color: #3a5078; 
  text-decoration: none;
  padding: 2px 4px; 
  border-radius: 3px; 
  transition: background-color 0.2s ease, color 0.2s ease;
}

.breadcrumb-item a:hover,
.breadcrumb-item a:focus-visible {
  text-decoration: none; 
  background-color: #d1dff0; 
  color: #1a2b4c; 
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/"; 
  padding: 0 0.6em; 
  color: #777;   
  font-size: 0.9em; 
}

.breadcrumb-item.active {
  color: #1a2b4c; 
  font-weight: 600; 
  padding: 2px 4px; 
}
/* --- Fin Breadcrumbs --- */

/* Contenido principal */
main { max-width: 1200px; margin: 20px auto; padding: 0 20px; }
/* Hero Section */
.hero-section { background-color: #1a2b4c; color: white; padding: 60px 20px; text-align: center; border-radius: 8px; margin-bottom: 40px; }
.hero-section h1 { font-size: 2.8rem; margin-bottom: 20px; color: white; font-weight: bold; }
.hero-section .subtitle { font-size: 1.3rem; margin-bottom: 30px; max-width: 800px; margin-left: auto; margin-right: auto; color: #e0e0e0; line-height: 1.5; }
.hero-section .lead-magnet-cta p { font-size: 1.1rem; color: #f0f0f0; margin-bottom: 10px; }
/* Servicios y Bloques de Valor */
.features-grid, .services-grid { display: flex; flex-wrap: wrap; justify-content: space-around; margin-top: 30px; gap: 25px; }
.feature-card, .service-card-main { flex-basis: calc(33.333% - 25px); background-color: white; padding: 25px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.08); margin-bottom: 20px; text-align: center; transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; }
.feature-card:hover, .service-card-main:hover { transform: translateY(-5px); box-shadow: 0 6px 15px rgba(0,0,0,0.12); }
.feature-card i, .service-card-main i.card-icon { font-size: 2.8em; color: #1a2b4c; margin-bottom: 20px; }
.feature-card h3, .service-card-main h3 { color: #1a2b4c; font-size: 1.4em; margin-bottom: 15px; }
.feature-card p, .service-card-main p { font-size: 0.95em; color: #555; flex-grow: 1; margin-bottom: 20px; }
.service-card-main a.learn-more-link { display: inline-block; margin-top: auto; color: #1a2b4c; text-decoration: none; font-weight: bold; }
.service-card-main a.learn-more-link:hover, .service-card-main a.learn-more-link:focus-visible { text-decoration: underline; }
.service-card-main a.learn-more-link i { margin-left: 5px; font-size: 0.9em; }
/* Footer */
footer { background-color: #1a2b4c; color: white; padding: 50px 20px 20px; margin-top: 60px; }
.footer-content { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.footer-column { flex: 1; min-width: 250px; margin-bottom: 30px; }
.footer-column:first-child { flex-basis: 40%; }
.footer-column h3 { margin-top: 0; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 10px; font-size: 1.2em; margin-bottom: 15px; }
.footer-column p { font-size: 0.9em; line-height: 1.7; color: #ccc; }
.footer-column ul { list-style-type: none; padding: 0; }
.footer-column li { margin-bottom: 12px; }
.footer-column a { color: #e0e0e0; text-decoration: none; transition: color 0.3s ease; }
.footer-column a:hover, .footer-column a:focus-visible { color: #fff; text-decoration: underline; outline: none; }
.footer-column li i { margin-right: 8px; color: #87ceeb; }
.social-icons { display: flex; margin-top: 20px; }
.social-icons a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; background-color: rgba(255,255,255,0.1); border-radius: 50%; margin-right: 10px; color: white; transition: background-color 0.3s ease, transform 0.3s ease; }
.social-icons a:hover, .social-icons a:focus-visible { background-color: rgba(255,255,255,0.2); transform: scale(1.1); outline: 2px solid skyblue; outline-offset: 1px; }
.social-icons i { font-size: 1.2em; }
.copyright { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.85em; color: #bbb; }
/* Estilos para diferentes secciones */
section { margin: 50px 0; padding: 40px 20px; background-color: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
section:last-of-type { margin-bottom: 0; }
section.page-title-section { background-color: #e8f0fe; padding: 40px 20px; margin-top: 0; margin-bottom: 40px; text-align: center; }
section.page-title-section h1 { color: #1a2b4c; font-size: 2.5em; margin-bottom: 10px; }
section h2, .section-title { color: #1a2b4c; text-align: center; margin-bottom: 40px; font-size: 2em; font-weight: bold; }
section p.centered-subtitle { text-align: center; color: #555; font-size: 1.1em; max-width: 700px; margin: -20px auto 30px auto; }
.centered { text-align: center; }
/* Botones */
.buttons { margin-top: 30px; }
.btn-primary, .btn-secondary { display: inline-block; padding: 12px 30px; border-radius: 5px; text-decoration: none; font-weight: bold; margin: 5px; transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease; border: 2px solid transparent; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.btn-primary:hover, .btn-secondary:hover, .btn-primary:focus-visible, .btn-secondary:focus-visible { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.15); }
.btn-primary:focus-visible, .btn-secondary:focus-visible { outline: 2px solid #ffc107; outline-offset: 2px; }
.btn-primary { background-color: #1a2b4c; color: white; border-color: #1a2b4c; }
.btn-primary:hover, .btn-primary:focus-visible { background-color: #3a5078; border-color: #3a5078; }
.btn-secondary { background-color: white; color: #1a2b4c; border: 2px solid #1a2b4c; }
.btn-secondary:hover, .btn-secondary:focus-visible { background-color: #1a2b4c; color: white; }
.btn-cta-lead { background-color: #ffc107; color: #1a2b4c; border-color: #ffc107; }
.btn-cta-lead:hover, .btn-cta-lead:focus-visible { background-color: #e0a800; border-color: #e0a800; color: #1a2b4c; }
.btn-cta-lead i { margin-left: 8px; }
.cta-expert-section { background-color: #e8f0fe; padding: 50px 20px; text-align: center; border-radius: 8px; margin: 50px 0; }
.cta-expert-section h2 { color: #1a2b4c; margin-bottom: 20px; }
.cta-expert-section p { color: #3a5078; margin-bottom: 30px; font-size: 1.1em; max-width: 700px; margin-left: auto; margin-right: auto; }
.btn-cta-expert { background-color: #28a745; color: white; border-color: #28a745; }
.btn-cta-expert:hover, .btn-cta-expert:focus-visible { background-color: #218838; border-color: #218838; }
.btn-cta-expert i { margin-left: 8px; }
.btn-footer-cta { margin-top:10px; padding: 8px 15px; font-size: 0.9em; }
/* WhatsApp Float */
.whatsapp-float { position: fixed; width: 60px; height: 60px; bottom: 40px; right: 40px; background-color: #25d366; color: #FFF; border-radius: 50px; text-align: center; font-size: 30px; box-shadow: 2px 2px 3px #999; z-index: 1000; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.whatsapp-float:hover, .whatsapp-float:focus-visible { background-color: #128C7E; outline: 2px solid white; outline-offset: -2px; }
/* --- Estilos Calculadora IRNR --- */
.calculator-container { margin-top: 2rem; padding: 1.5rem; background-color: #fff; border-radius: 0.5rem; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); border: 1px solid #a7f3d0; }
.calculator-container .section-title { color: #1a2b4c; margin-bottom: 1rem; }
.calculator-container .centered-subtitle { color: #4b5563; margin-bottom: 1.5rem; }
.calculator-step { padding: 1.5rem; margin-bottom: 1.5rem; border: 1px solid #e5e7eb; border-radius: 0.5rem; background-color: #f9fafb; }
.calculator-step.active-step { border-left: 5px solid #1a2b4c; background-color: #fff; }
.calculator-step-title { font-size: 1.25rem; font-weight: 600; color: #1a2b4c; margin-bottom: 1rem; display: flex; align-items: center; }
.calculator-step-title i { margin-right: 0.75rem; font-size: 1.3em; color: #3a5078; }
.calculator-feedback { margin-top: 1rem; padding: 0.75rem; border-radius: 0.375rem; font-size: 0.875rem; }
.calculator-feedback .text-green-600 { color: #059669; } .calculator-feedback .text-blue-600 { color: #2563eb; } .calculator-feedback .text-orange-600 { color: #ea580c; } .calculator-feedback i { margin-right: 0.5rem; }
.calculator-grid { display: grid; gap: 1.5rem; margin-bottom: 1.5rem; }
@media (min-width: 768px) { .calculator-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; } }
.calculator-label, .calculator-label-xs { display: block; font-weight: 600; color: #374151; margin-bottom: 0.25rem; }
.calculator-label { font-size: 0.875rem; } .calculator-label-xs { font-size: 0.75rem; }
.calculator-input, .calculator-select { margin-top: 0.25rem; display: block; width: 100%; padding: 0.625rem 0.75rem; border: 1px solid #D1D5DB; border-radius: 0.375rem; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); font-size: 0.875rem; line-height: 1.25rem; box-sizing: border-box; }
.calculator-input:focus-visible, .calculator-select:focus-visible { outline: 2px solid transparent; outline-offset: 2px; border-color: #1a2b4c; box-shadow: 0 0 0 3px rgba(26, 43, 76, 0.3); }
.calculator-select { padding-right: 2.5rem; -webkit-appearance: none; -moz-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236B7280'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 1.25em 1.25em; }
.calculator-dynamic-group { padding: 1rem; margin-top: 1rem; background-color: #f0f9ff; border-radius: 0.375rem; border-left: 3px solid #93c5fd; }
.calculator-dynamic-group .space-y-3 > * + * { margin-top: 0.75rem; } 
.calculator-group-title { font-size: 1rem; font-weight: 600; color: #1a2b4c; border-bottom: 1px solid #ddd; padding-bottom: 0.5rem; margin-bottom: 0.75rem; }
.calculator-warning { margin-top: 1rem; padding: 1rem; background-color: #fef3c7; border-left: 4px solid #f59e0b; color: #b45309; }
.calculator-warning .font-bold { font-weight: 700; } .calculator-warning .text-sm { font-size: 0.875rem; } .calculator-warning .mr-2 { margin-right: 0.5rem; }
.calculator-note { font-size: 0.75rem; color: #6b7280; margin-top: 0.25rem; }
.calculator-note .fa-exclamation-circle { color: #f97316; margin-right: 0.25rem; }
.calculator-info { margin-top: 0.5rem; padding: 0.75rem; background-color: #eff6ff; border: 1px solid #bfdbfe; border-radius: 0.375rem; }
.calculator-info .text-xs { font-size: 0.75rem; } .calculator-info .text-blue-700 { color: #1d4ed8; }
.calculator-result { margin-top: 2rem; padding: 1.5rem; background-color: #e8f0fe; border-radius: 0.5rem; box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05); }
.calculator-result-title { font-size: 1.125rem; font-weight: 600; color: #1a2b4c; margin-bottom: 1rem; border-bottom: 1px solid #93c5fd; padding-bottom: 0.5rem; }
.calculator-result .space-y-2 > * + * { margin-top: 0.5rem; } .calculator-result .text-gray-700 { color: #374151; } .calculator-result .text-sm { font-size: 0.875rem; } .calculator-result-value strong { color: #065f46; } 
.calculator-disclaimer { margin-top: 1.5rem; font-size: 0.75rem; color: #6b7280; line-height: 1.5; }
.calculator-disclaimer strong { font-weight: 600; } .calculator-disclaimer a { color: #1a2b4c; text-decoration: underline; } .calculator-disclaimer a:hover { color: #3a5078; } 
/* --- FIN Estilos Calculadora IRNR --- */

/* Responsive */
@media (max-width: 992px) { /* Tablets y escritorios más pequeños (menú se vuelve vertical) */
  .nav-container { 
    flex-direction: column; 
    align-items: center; 
  }
  .menu { 
    flex-direction: column; 
    width: 100%; 
    align-items: center; 
    margin-bottom: 10px; 
    margin-left: 0; /* <<< IMPORTANTE: Resetear margin-left para centrar menú en tablet/móvil */
  }
  .menu > li { 
    margin-right: 0; 
    width: 100%; 
    text-align: center; 
  }
  /* Comportamiento de submenús en vistas donde el menú es vertical (controlado por JS) */
  .menu ul.submenu { 
    position: static; 
    box-shadow: none;
    border-radius: 0;
    min-width: auto;
    background-color: #3a5078; 
    padding-left: 20px; 
    text-align: left; 
    /* display: none; YA NO ES NECESARIO AQUÍ, JS controla esto con style.display */
  }
  .menu ul.submenu ul.submenu {
    background-color: #4f6a9a; 
    padding-left: 30px; 
  }

  .language-selector { 
    margin-top: 10px; 
    margin-left: 0; 
    align-self: center; 
  }

  .title-container h1 { font-size: 1.8em; } 
  .hero-section h1 { font-size: 2.4rem; } 
  .hero-section .subtitle { font-size: 1.2rem; }
  .feature-card, .service-card-main { flex-basis: calc(50% - 20px); }
  .footer-column { flex-basis: calc(50% - 15px); } 
  .footer-column:first-child { flex-basis: 100%; }
  .breadcrumbs { padding: 0 15px; }
}

@media (max-width: 768px) { /* Móviles */
  .header-content { flex-direction: column; text-align: center; }
  .logo-container { margin-right: 0; margin-bottom: 15px; }
  .title-container h1 { font-size: 1.6em; } 
  .title-container p { font-size: 0.85em; }
  .hero-section h1 { font-size: 2rem; } 
  .hero-section .subtitle { font-size: 1.1rem; }
  section h2, .section-title { font-size: 1.8em; } 
  section p.centered-subtitle { font-size: 1em; }
  
  .menu a { padding: 12px; } 
  .menu ul.submenu a { font-size: 0.85em; } 
  .menu ul.submenu ul.submenu a { font-size: 0.8em; }
  
  .feature-card, .service-card-main { flex-basis: 100%; }
  .footer-column, .footer-column:first-child { flex-basis: 100%; }
  .whatsapp-float { width: 50px; height: 50px; bottom: 20px; right: 20px; font-size: 24px; }
  .calculator-grid { grid-template-columns: 1fr; }
  .breadcrumbs { padding: 0 10px; font-size: 0.8em; }
  .breadcrumb-item + .breadcrumb-item::before { padding: 0 0.3em; }
}

/* Helper classes */
.fa-xs { font-size: 0.75em; }
/* === ESTILOS PARA IMÁGENES DENTRO DE ARTÍCULOS DEL BLOG === */

.blog-post-inner-image {
    width: 100%;
    max-width: 700px; /* Puedes ajustar este valor */
    height: auto;
    border-radius: 8px;
    margin: 1.5rem auto 2rem auto; /* Espacio vertical y centrado horizontal */
    display: block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}