section{
  opacity: 0;
  transition: opacity 0.15s ease-in;
}

section.katex-ready{
  opacity: 1;
}

footer{
    width: 100%;
	padding-bottom: 25px;
	padding-top: 30px;
    margin-top: 20px;
	margin-bottom: 0;
    clear: both;
    left: 0;
    right: 0;
	border-top: 1px solid #AAAAAA;
}

footer div a{
	color: #000;
	cursor: pointer;
}

footer div a:visited{
	color: #000;
}

.icono-footer, .copy{
	box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    margin: auto;
}

.icono-footer img{
    vertical-align: middle;
}

.copy{
	padding-top: 5px;
	text-align: center;
	font-size: 10px;
	font-weight: bold;
}

.legal{
	box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    width: 80%;
    margin: auto;
}

.legal div{
	margin: 5px;
    text-align: center;
}

.modal{
    display: none; 
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
}

.modal-content{
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
}

.close-btn{
    padding: 10px 45px 8px 12px;
    color: #fff;
    font-size: 45px;
    cursor: pointer;
}

.indice-vertical{
    width: 80%;
    text-align: left;
    background-color: #fff;
    overflow-y: auto;
}

.indice-vertical h2{
    margin-left: 15px;
    margin-right: 25px;
}

.acordeon-btn{
    background-color: #eee;
    color: #444;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    font-weight: bold;
    transition: 0.4s;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
}

.acordeon-btn:hover, .active{
    background-color: #ccc;
}

.acordeon-content {
    padding: 0 18px;
    background-color: white;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
}

.acordeon-content a{
    display: block;
    padding: 15px 10px;
    text-decoration: none;
    color: #2c3e50;
    font-weight: bold;
    border-bottom: 1px solid #f1f1f1;
    font-size: 15px;
}

.tag-tema3{
    display: block;
    width: 80%;
    font-size: 1.2rem;
    margin: 0 auto;
    padding: 15px;
}

:root {
    --azul-fondo: #f0f7ff;
    --azul-borde: #cfe2ff;
    --amarillo-pastel: #fff9db;
    --amarillo-borde: #ffec99;
    --texto-color: #2c3e50;
}

.ejercicio {
    display: block;
    box-sizing: border-box;
    justify-content: center;
    width: 100%;
    margin: auto 0 20px 0;
    padding: 25px;
    background-color: var(--azul-fondo);
    border: 1px solid var(--azul-borde);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.ejercicio h3, .ejercicio p{
    width: 100%;
}

.ejercicio h3 {
    color: #d81b60;
    margin-top: 0;
    margin-bottom: 18px;
}

details summary{
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    list-style: none;
}

details.desarrollo summary {
    padding-top: 10px;
    padding-bottom: 10px;
    color: #0056b3;
    outline: none;
    transition: color 0.3s;
}

details.desarrollo summary::after {
    content: " 👇 Ver Solución"; 
    float: left;
}

details.desarrollo[open] summary::after {
    content: " 👆 Ocultar Solución";
}

.solucion {
    background-color: var(--amarillo-pastel);
    border-left: 5px solid var(--amarillo-borde);
    overflow-x: auto;
    padding: 10px;
    margin-top: 15px;
    border-radius: 0 8px 8px 0;
    color: #444;
}

.mcm{
    border-collapse: collapse;
    margin: 20px auto;
    width: auto;
}

.td1{
    padding: 10px;
    text-align: center;
}

.td2, .td3{
    padding: 10px;
    border-right: 2px solid black;
    text-align: center;
}

.td3{
    width: 56px;
}

.btn-link{
    color: blue;
}

.btn-link:hover{
    color: rgb(235, 16, 255);
}

details.faqs{
    margin: 17px auto;
    padding: 15px;
    width: 90%;
    border: 5px solid #3b44b7;
}

details.faqs p{
    padding-top: 16px;
}

details.faqs summary{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    cursor: pointer;
}

details.faqs summary::after {
    content: " 👇 "; 
    flex-shrink: 0;
    margin-left: auto;
}

details.faqs[open] summary::after {
    content: " 👆 ";
}

.tabla-seo {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: #fff;
}
.tabla-seo th, .tabla-seo td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
}
.tabla-seo th {
    background-color: #f0f7ff;
    color: #0056b3;
}

/* Grid de Tarjetas */
.contenedor-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.contenedor-cards a{
    text-decoration: none;
}

.card-tema {
    background-color: #f0f7ff; /* Tu azul claro */
    border: 1px solid #cfe2ff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s;
    cursor: pointer;
}

.card-tema:hover {
    transform: translateY(-5px); /* Efecto de elevación */
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.card-tema h3{
    color: #d81b60; /* Tu rosa para los H3 */
    margin-top: 0;
    margin-bottom: 18px;
}

.card-tema pre, .card-tema div.pre{
    background-color: #f4f4f4;
    padding: 8px;
    margin-top: 12px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 1rem;
    text-align: center;
    white-space: pre-line;
    color: #555;
    line-height: 1.2;
}

.card-tema p{
    color: black;
    line-height: 1.3;
}

.boton-enlace {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #0056b3;
    color: white;
    border-radius: 5px;
    font-weight: bold;
}

/* Tips y Errores */
.alerta-error{
    background-color: #fff5f5;
    border-left: 5px solid #ff4d4d;
}

.tips{
    background-color: var(--amarillo-pastel);
    border-left: 5px solid var(--amarillo-borde);
}

.alerta-error, .tips{
    display: block;
    box-sizing: border-box;
    justify-content: center;
    width: 100%;
    padding: 25px 15px 25px 15px;
    margin: 0 0 30px 0;
    border-radius: 0 10px 10px 0;
}

.alerta-error blockquote, .tips blockquote{
    font-family: 'Courier New', Courier, monospace;
    background: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 5px;
    color: #000;
}

/* Ejemplos de la Teoría */
.ejemplo-teoria {
    display: block;
    box-sizing: border-box;
    justify-content: center;
    background-color: var(--azul-fondo);
    border-left: 5px solid #0056b3;
    width: 100%;
    padding: 23px 15px 18px 15px;
    margin: 0 0 25px 0;
    font-style: italic;
}

/* Tabla de Multiplicar */
.tabla-pitagorica {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-family: sans-serif;
    font-size: 0.9rem;
}

.tabla-pitagorica th {
    background-color: #0056b3; /* Tu color azul corporativo */
    color: white;
    padding: 8px;
    border: 1px solid #ddd;
}

.tabla-pitagorica td {
    padding: 8px;
    border: 1px solid #eee;
}

.tabla-pitagorica tr:nth-child(even) {
    background-color: #f9f9f9;
}

.tabla-pitagorica td:hover {
    background-color: #d81b60;
    color: white;
    cursor: default;
}

.tabla-scroll {
    overflow-x: auto;
    margin: 0 0 10px 0;
}

@media only screen and (min-width: 800px){
    footer{
		margin-top: 100px;
	}

    .legal{
        width: 70%;
    }
}

@media only screen and (min-width: 1000px){
    .ejemplo-teoria{
        font-size: 20px;
    }

    .ejercicio{
        margin: 10px 0 40px 0;
        font-size: 20px;
    }

    .solucion{
        padding: 20px;
    }

    details.faqs{
        width: 94%;
    }

    details.faqs summary{
        font-size: 20px;
    }

    .alerta-error, .tips{
        padding: 35px 15px 35px 15px;
    }
}

/* --- Sección CTA Ventas --- */
.cta-ventas {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 35px;
    padding: 60px 20px;
    box-sizing: border-box;
}

/* --- Tarjeta Contenedora --- */
.cta-box {
    max-width: 800px;
    width: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 4px solid #2563eb;
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
}

/* --- Título Principal --- */
.cta-box h2 {
    color: #ffffff;
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 24px;
}

/* --- Párrafos --- */
.cta-box p {
    color: #cbd5e1; /* Gris claro de alta legibilidad */
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    margin-bottom: 16px;
}

.cta-box p strong {
    color: #38bdf8; /* Azul claro resaltado */
    font-weight: 600;
}

.cta-subtext {
    margin-top: 24px;
    color: #ffffff;
}

/* --- Contenedor de Botones --- */
.cta-buttons {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

/* --- Botón Primary (Convertidor) --- */
.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    padding: 18px 32px;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.6);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
}

/* --- Adaptabilidad Móvil --- */
@media (max-width: 640px) {
    .cta-ventas {
        padding: 30px 15px;
    }

    .cta-box {
        padding: 24px 18px;
    }

    .cta-box h2 {
        font-size: 1.4rem;
    }

    .btn-primary {
        width: 100%;
        padding: 16px 20px;
        font-size: 1rem;
        box-sizing: border-box;
    }
}