/* ========================================= */
/* Estilo del contenedor principal (main)    */
/* ========================================= */
main {
    background: linear-gradient(to bottom, #E3F2FD, #E1F5FE);
    max-width: 1000px;
    margin: 20px auto;
    padding: 0;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    line-height: 1.6;
    color: #0D47A1;
    transition: all 0.4s ease;
}

main:hover {
    box-shadow: 0 8px 25px rgba(25, 118, 210, 0.15);
}

/* ========================================= */
/* Estilo del contenedor de artículo         */
/* ========================================= */
article {
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #90CAF9;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

article:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(25, 118, 210, 0.2);
    border: 1px solid #1976D2;
}

article::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

article:hover::after {
    opacity: 1;
}

/* ========================================= */
/* Estilo de los encabezados                 */
/* ========================================= */
main h1 {
    color: #1565C0;
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #1976D2;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

main h1:hover {
    text-shadow: 0 0 10px rgba(255, 214, 0, 0.4);
    letter-spacing: 1px;
}

main h2 {
    color: #1976D2;
    font-size: 1.6rem;
    margin-top: 35px;
    padding: 10px 15px;
    border-left: 5px solid #2196F3;
    background: linear-gradient(to right, rgba(33, 150, 243, 0.1), transparent);
    border-radius: 0 5px 5px 0;
    text-shadow: 0.5px 0.5px 2px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

main h2:hover {
    background: linear-gradient(to right, rgba(33, 150, 243, 0.3), transparent);
    transform: translateX(5px);
}

main h3 {
    color: #2196F3;
    font-size: 1.3rem;
    margin-top: 25px;
    transition: all 0.3s ease;
}

main h3:hover {
    color: #1565C0;
    text-decoration: underline wavy #3700ff;
}

/* ========================================= */
/* Estilo de los párrafos y listas           */
/* ========================================= */
main p, main li {
    font-size: 1.05rem;
    color: #0D47A1;
    transition: color 0.3s ease;
}

main p:hover {
    color: #1565C0;
}

main strong {
    color: #1565C0;
    position: relative;
}

main strong:hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #4400ff, #1976D2);
}

/* ========================================= */
/* Componentes Específicos                   */
/* ========================================= */
.section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #90CAF9;
    transition: all 0.3s ease;
}

.section:hover {
    border-bottom: 1px dashed #1976D2;
}

.section:last-child {
    border-bottom: none;
}

.highlight {
    background-color: #E3F2FD;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #0026ff;
    margin: 20px 0;
    color: #0D47A1;
    transition: all 0.4s ease;
}

.highlight:hover {
    background-color: #BBDEFB;
    box-shadow: inset 0 0 10px rgba(144, 202, 249, 0.3);
    transform: translateX(3px);
}

.principio-box {
    background: linear-gradient(to right, #E1F5FE, #FFFFFF);
    border-left: 5px solid #0051ff;
    padding: 18px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    color: #0D47A1;
    transition: all 0.4s ease;
}

.principio-box:hover {
    border-left: 5px solid #2f00ff;
    background: linear-gradient(to right, #BBDEFB, #FFFFFF);
}

/* ========================================= */
/* Tablas con efecto de iluminación          */
/* ========================================= */
.tabla-ley {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.fila-tabla {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.fila-tabla:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(25, 118, 210, 0.2);
}

.celda-titulo {
    flex: 1;
    background-color: #1976D2;
    color: white;
    padding: 15px;
    font-weight: bold;
    min-width: 200px;
    display: flex;
    align-items: center;
    transition: all 0.4s ease;
}

.celda-titulo:hover {
    background-color: #0004ff;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    
}

.celda-descripcion {
    flex: 3;
    background-color: #E3F2FD;
    padding: 15px;
    color: #0D47A1;
    transition: all 0.4s ease;
}

.celda-descripcion:hover {
    background-color: #BBDEFB;
}

/* ========================================= */
/* Conclusiones con efecto de aparición      */
/* ========================================= */
.conclusiones {
    background: linear-gradient(to right, #E3F2FD, #FFFFFF);
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid #001aff;
    margin-top: 30px;
    color: #0D47A1;
    opacity: 0.9;
    transition: all 0.4s ease;
}

.conclusiones:hover {
    opacity: 1;
    border-left: 5px solid #1976D2;
}

.conclusiones h2 {
    border-left: none;
    background: none;
    padding-left: 0;
    color: #1565C0;
}

/* ========================================= */
/* Enlaces con efectos de hover avanzados    */
/* ========================================= */
.enlace a {
    color: #0D47A1;
    display: block;
    margin: 8px 5px;
    padding: 10px 15px;
    font-size: 17px;
    cursor: pointer;
    text-decoration: none;
    border-radius: 6px;
    background: linear-gradient(to right, #E1F5FE, #BBDEFB);
    box-shadow: 0 2px 5px rgba(25, 118, 210, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.enlace a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: all 0.6s ease;
}

.enlace a:hover {
    color: #FFFFFF;
    background: linear-gradient(45deg, #1565C0, #0D47A1);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(21, 101, 192, 0.3);
}

.enlace a:hover::before {
    left: 100%;
}

/* ========================================= */
/* Cards con efecto 3D                       */
/* ========================================= */
.card-block {
    color: #0D47A1;
    display: block;
    margin: 15px 0;
    padding: 15px;
    border: 1px solid #90CAF9;
    border-radius: 8px;
    text-align: justify;
    background-color: #E3F2FD;
    min-width: 90%;
    border-bottom: 8px solid #64B5F6;
    border-top: 8px solid #64B5F6;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}

.card-block:hover {
    transform: translateY(-5px) rotateX(5deg);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.15), 
                0 10px 10px rgba(0, 0, 0, 0.12);
    border-bottom: 8px solid #1976D2;
    border-top: 8px solid #1976D2;
}

.card-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.4) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card-block:hover::before {
    opacity: 1;
}

.card-text {
    font-size: 17px;
    line-height: 2;
    transition: all 0.3s ease;
}

.card-block:hover .card-text {
    color: #1565C0;
}

/* ========================================= */
/* Listas con efectos interactivos           */
/* ========================================= */
main ol, main ul {
    padding-left: 25px;
}

main li {
    margin-bottom: 10px;
    position: relative;
    transition: all 0.3s ease;
}

main li:hover {
    color: #1565C0;
    transform: translateX(5px);
}



/* ========================================= */
/* Botones de Control Flotantes              */
/* ========================================= */
#botones {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    background: #FFFFFF;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

#botones button {
    padding: 12px;
    border: none;
    border-radius: 50%;
    background-color: #1976D2;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#botones button::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.6s, opacity 0.4s;
}

#botones button:hover {
    background-color: #1565C0;
    transform: scale(1.1);
    animation: pulse 1.5s infinite;
}

#botones button:hover::after {
    transform: scale(2);
    opacity: 0.6;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(25, 118, 210, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(25, 118, 210, 0); }
    100% { box-shadow: 0 0 0 0 rgba(25, 118, 210, 0); }
}

.icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

#botones button:hover .icon {
    transform: rotate(15deg);
}

#pauseResume {
    width: 45px;
}

/* ========================================= */
/* Elementos de Énfasis                      */
/* ========================================= */
.emoji {
    font-size: 1.3em;
    margin-right: 8px;
    display: inline-block;
    transition: all 0.3s ease;
}

.emoji:hover {
    transform: scale(1.2) rotate(10deg);
}

.resaltado {
    background-color: #c4ecff;
    padding: 2px 5px;
    border-radius: 3px;
    color: #1565C0;
    box-shadow: 0 0 0 1px #0099ff;
    transition: all 0.3s ease;
}

.resaltado:hover {
    background-color: #b3ffff;
    box-shadow: 0 0 0 2px #0044ff;
}

/* ========================================= */
/* Responsive Design                         */
/* ========================================= */
@media (max-width: 768px) {
    main {
        margin: 15px auto;
        padding: 0 15px;
    }

    main h1 {
        font-size: 1.8rem;
    }

    main h2 {
        font-size: 1.4rem;
    }

    main h3 {
        font-size: 1.2rem;
    }

    .fila-tabla {
        flex-direction: column;
    }

    .celda-titulo, .celda-descripcion {
        padding: 12px;
    }

    /* Suavizar efectos en móviles */
    .enlace a:hover {
        transform: none !important;
    }
    
    .card-block:hover {
        transform: translateY(-3px) !important;
    }
    
    article:hover {
        transform: none !important;
    }
}

@media (max-width: 480px) {
    main {
        margin: 10px auto;
        padding: 0 10px;
    }

    main h1 {
        font-size: 1.5rem;
    }

    main h2 {
        font-size: 1.2rem;
    }

    main h3 {
        font-size: 1.1rem;
    }

    article {
        padding: 15px;
    }

    #botones button {
        width: 40px;
        height: 40px;
    }
}
