/* Estilos generales del cuerpo */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #e4e4e4;
}

/* Estilo del encabezado */
header {
    background-color: #4A154B; /* Color de fondo oscuro */
    color: #222222; /* Color de texto claro */
    text-align: center;
    padding: 20px;
}

#page-title {
    margin: 0;
    margin-bottom: 20px;
    font-size: 2.5em;
    font-weight: bold;
}


/* Estilos básicos para la tabla */
table {
    opacity: 0;
    transition: opacity 0.8s ease;
    width: 70%;
    max-width: 1200px;
    margin: 10px auto;
    border-collapse: collapse;
    font-size: 16px;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden; /* Esconde bordes redondeados */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
table.visible {
    opacity: 1;
}

/* Encabezados de la tabla */
th, td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    overflow: hidden; /* Esconde contenido que excede el tamaño */
    text-overflow: ellipsis; /* Añade puntos suspensivos si el texto es demasiado largo */
    white-space: "text-wrap"; /* Impide el salto de línea en celdas */
}

th {
    background-color: #4A154B; /* Color de fondo de los encabezados */
    color: #ffffff;
    max-width: 150px;
    min-width: 80px;
}

td {
    color: #000;
}

/* Resaltar filas al pasar el mouse */
tr:hover {
    background-color: #f1f1f1;
}

/* Estilo para celdas de porcentaje */
td:nth-child(2), td:nth-child(3) {
    text-align: center;
}

/* Estilo para celdas de números en currency */
td:nth-child(4) {
    text-align: center;
}

/* Estilo CLIENTES */
td:nth-child(5) {
    text-align: center;
}

/* Estilo para celdas de fecha */
td:nth-child(6) {
    text-align: center;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    margin-bottom: 30px;
    width: 100%;
}

.spinner-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #4A154B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-top: 10px;
}

.loading-text {
    font-size: 21px;
    color: black;
    text-align: center;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.last-update {
    margin-top: 10px;
    font-size: 14px;
    color: #999;
    text-align: center;
}
.especial-match {
    margin-top: 10px;
    font-size: 14px;
    color: #999;
    text-align: center;
}
.simulador-container {
    background: #f1f1f1;
    padding: 15px 30px;
    margin: 10px auto;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 70%;
    max-width: 1140px;
    gap: 15px;
}

.simulador-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    color: #333;
    text-align: center;
}

.simulador-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
    text-align: center;
}

.input-container {
    position: relative;
    width: 30%;
}

.currency-symbol {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: bold;
    color: #555;
    pointer-events: none;
}

.input-container input {
    width: 100%;
    padding: 10px 15px 10px 35px;
    font-size: 18px;
    font-weight: bold;
    border: 1px solid #ccc;
    border-radius: 8px;
    text-align: left;
    background: #fafafa;
    color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    box-sizing: border-box; /* 🔥 Agregar esta línea */
}

.input-container input:focus {
    border-color: #4A154B;
    outline: none;
    background: #fff;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.main-header {
    background: #f9f9f9; /* Fondo muy suave */
    padding: 30px 20px 20px 20px;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Sombra leve */
}

.main-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #3d3d3d;
    margin: 0;
    display: block; /* 🔥 que sea bloque completo, no inline-flex */
}

.header-underline {
    width: 0;
    height: 3px;
    background-color: #4A154B;
    border-radius: 2px;
    margin: auto;
    animation: grow-line 1s ease forwards; /* 🔥 animación */
}

@keyframes grow-line {
    to {
        width: 500px; /* 🔥 se expande a 50px */
    }
}
/* .main-header h1::after {
    content: "";
    width: 50px;
    height: 3px;
    background-color: #4CAF50;
    border-radius: 2px;
} */

.main-header .flag {
    font-size: 28px; /* Más pequeño para que combine */
    vertical-align: middle;
}

.header-subtitle {
    margin-top: 20px;
    font-size: 16px;
    font-weight: 500;
    color: #666;
}
.info-section {
    background: #f9f9f9;
    padding: 20px 30px;
    margin-top: 60px;
    font-size: 16px;
    color: #444;
    width: 80%; /* 🔥 Igual que la tabla */
    max-width: 1000px; /* 🔥 opcional para no pasarse en pantallas muy grandes */
    margin-left: auto;
    margin-right: auto;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.info-section h2 {
    font-size: 24px;
    margin-top: 20px;
    color: #222;
    border-bottom: 2px solid #4A154B;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.info-section h3 {
    font-size: 20px;
    margin-top: 25px;
    color: #333;
}

.info-section p {
    margin-top: 10px;
    line-height: 1.6;
    color: #555;
}
.faq-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.faq-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #222;
}

.faq-item p, .faq-item ul {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
}

.faq-item ul {
    padding-left: 20px;
    margin-top: 10px;
}

.faq-item ul li {
    margin-bottom: 6px;
}
.accordion-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 15px;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    overflow: hidden;
}

.accordion-button {
    width: 100%;
    padding: 15px 20px;
    text-align: left;
    font-size: 18px;
    font-weight: 600;
    background-color: #fff;
    border: none;
    outline: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.accordion-button:hover {
    background-color: #f9f9f9;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 20px;
    background-color: #fafafa;
}

.accordion-content p, .accordion-content ul {
    margin: 15px 0;
    color: #555;
}

.guide-steps {
    padding-left: 20px;
    margin-top: 15px;
    list-style-type: decimal;
    color: #555;
}

.guide-steps li {
    margin-bottom: 12px;
}

.glossary-list {
    padding-left: 20px;
    margin-top: 15px;
    list-style-type: disc;
    color: #555;
}

.glossary-list li {
    margin-bottom: 10px;
}

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

.resource-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: transform 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-5px);
}

.resource-card.locked {
    opacity: 0.7;
    position: relative;
}

.resource-button {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #4A154B;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.resource-button:hover {
    background-color: #721174;
}

.locked-button {
    background-color: #aaa;
}

.locked-button:hover {
    background-color: #4A154B;
}

.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.navbar-logo {
    font-size: 22px;
    font-weight: bold;
    color: #4A154B;
    text-decoration: none;
}

.navbar-menu {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.navbar-menu li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-menu li a:hover {
    color: #4A154B;
}

.navbar-button {
    background-color: #4A154B;
    color: white !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.navbar-button:hover {
    background-color: #4A154B;
}
.logo-img {
    height: 50px;
    width: auto;
    display: block;
}

/* ======== Hero Section ======== */
.hero {
    background: #f9f9f9;
    text-align: center;
    padding: 100px 20px 80px;
}

.hero h1 {
    font-size: 36px;
    font-weight: 700;
    color: #222;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto 30px;
}

.hero-button {
    display: inline-block;
    background-color: #4A154B;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    font-size: 18px;
    transition: background-color 0.3s ease;
}

.hero-button:hover {
    background-color: #4A154B;
}

/* ======== About Section ======== */
.about {
    background: #ffffff;
    padding: 80px 20px;
    text-align: center;
}

.about-content h2 {
    font-size: 30px;
    color: #222;
    margin-bottom: 20px;
}

.about-content p {
    font-size: 18px;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
}

/* ======== Stats Section ======== */
.stats {
    background: #f1f1f1;
    padding: 60px 20px;
    text-align: center;
}

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
}

.stat-card {
    background: #ffffff;
    padding: 30px 40px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    width: 220px;
}

.stat-card h3 {
    font-size: 32px;
    color: #4A154B;
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 16px;
    color: #555;
}

/* ======== Resources Promo ======== */
.resources-promo {
    background: #ffffff;
    padding: 80px 20px;
    text-align: center;
}

.resources-promo h2 {
    font-size: 30px;
    color: #222;
    margin-bottom: 15px;
}

.resources-promo p {
    font-size: 18px;
    color: #555;
    margin-bottom: 30px;
}

/* ======== YouTube Promo Section ======== */
.youtube-promo {
    background: #f9f9f9;
    padding: 80px 20px;
    text-align: center;
}

.youtube-promo h2 {
    font-size: 30px;
    color: #222;
    margin-bottom: 30px;
}

.youtube-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.youtube-grid iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
}

/* ======== CTA Final ======== */
.cta-final {
    background: #4A154B;
    color: white;
    text-align: center;
    padding: 80px 20px;
}

.cta-final h2 {
    font-size: 30px;
    margin-bottom: 20px;
}

/* ======== Footer ======== */
.main-footer {
    background: #f9f9f9;
    text-align: center;
    padding: 40px 20px;
    font-size: 15px;
    color: #777;
    margin-top: 40px;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.03);
}

.main-footer p {
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.resource-card-wide {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    grid-column: span 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    opacity: 0.7;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.resource-card-wide:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
h1 {
    font-size: 2.5em;
    font-weight: 700;
    text-align: center;
    color: #2c2c2c;
    margin-top: 40px;
    margin-bottom: 10px;
  }
  
  .section-subtitle {
    text-align: center;
    font-size: 1.2em;
    color: #555;
    margin-bottom: 40px;
  }
  
  .tools-header h1::after {
    content: "";
    display: block;
    height: 4px;
    width: 0;
    margin: 10px auto 0;
    background-color: #400b43;
    border-radius: 2px;
    animation: grow-line 1s ease forwards;
}

@keyframes grow-line {
    to {
        width: 400px;
    }
}
/* ======== Tools Header Section ======== */
.tools-header {
}

.modal {
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex; align-items: center; justify-content: center;
  }
  
  .modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }
  
  .modal-content h2 {
    margin-top: 0;
    color: #4A154B;
  }
  
  .modal-content input {
    padding: 10px;
    width: 80%;
    margin: 15px 0;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
  }
  
  .modal-content button {
    background-color: #4A154B;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  .modal-content button:hover {
    background-color: #721174;
  }
  
  .error-msg {
    color: red;
    margin-top: 10px;
    font-size: 14px;
  }

/* Reducir el ancho de la columna de Condiciones */
td:nth-child(5),
th:nth-child(5) {
    max-width: 120px;
    white-space: normal;
    word-break: break-word;
}


/* Colorear "Sí" en verde y "No" en rojo para columnas específicas */
td:nth-child(7),
td:nth-child(8) {
    font-weight: bold;
}

/* Clases genéricas para texto "Sí" y "No" */
.texto-si {
    color: #2EB67D;
    font-weight: bold;
}

.texto-no {
    color: #E01E5A;
    font-weight: bold;
}

/* Estilo para columna de Intereses Mensuales */
td:nth-child(6) {
    text-align: center;
    color: #2EB67D;
    font-weight: bold;
}