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;
    }
}