* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, li, .t, span, strong	 {
	font-family: "Roboto", Sans-serif; 
}

ol, ul {
    list-style-position: inside;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.logo {
    width: 260px;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

header {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: #f7f8fc;
    color: #000000;
    padding: 20px;
    flex-wrap: wrap;
}

.layout {
    padding: 40px 20px;
    flex: 1;
}

footer {
    text-align: center;
    padding: 20px;
    background-color:#f7f8fc;
    color: #000000;
    font-family: "Roboto", Sans-serif;
}

.layout {
    display: grid;
    grid-template-columns: 360px 1fr;
}

.nav {
    padding-right: 20px;
    border-right: 1px solid #e5e7eb;
    overflow: auto;
}

.content {
    padding: 24px;
    overflow: auto;
}

.accordion {
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}

.acc-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 5px 14px;
    background-color: #fff;
    border: 0;
    cursor: pointer;
    text-align: left;
}

.acc-header strong {
    font-size: 16px;
}

.acc-header span {
    font-size: 16px;
    opacity: .75;
}

.acc-body {
    display: none;
    padding: 0px 38px;
    background: #fff;
}

.accordion.open .acc-body {
    display: block;
}

.chapter {
    padding: 4px;
    cursor: pointer;
    display: grid;
    gap: 2px;
}

.chapter:hover {
    background: #eaeaea;
}

.chapter .t {
    font-size: 15px;
    font-weight: 500;
    padding: 0px 6px;
}

.chapter .s {
    font-size: 12px;
    opacity: .75;
}

.chapter.active {
    background: #d8d8d8;
}

/* contenido derecho */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
    font-family: "Roboto", Sans-serif; 
}

.icon {
    font-size: 12px;
    display: inline;
}

.content-header {
    display: flex;
    gap: 10px;
}

.content-button {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.title-chapter {
    font-size: 16px;
    font-weight: 400;
    color: #1141db;
    text-decoration: none;
}

.first-paragraph {
    padding-top: 20px;
}

.content-paragraph {
   display: flex;
   flex-direction: column;
   gap: 10px;
	font-weight: 300;
	line-height: 1.5; 
	color: #030303;
}

.list-paragraph {
    list-style: none;
}

/* ==================== TABLAS RESPONSIVAS ==================== */
.content-section table,
.mobile-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    font-family: "Roboto", Sans-serif; 
    border: 1px solid #e5e7eb;
}

.content-section th,
.content-section td,
.mobile-content th,
.mobile-content td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.content-section th,
.mobile-content th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.content-section tr:last-child td,
.mobile-content tr:last-child td {
    border-bottom: none;
}

.content-section tr:hover td,
.mobile-content tr:hover td {
    background: #f9fafb;
}

/* Contenedor para scroll en tablas */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 16px 0;
}

.table-wrapper table {
    margin: 0;
    min-width: 500px;
}

/* ==================== LAYOUT MOBILE ==================== */
.layout-mobile {
    display: none;
}

.mobile-home,
.mobile-detail {
    display: none;
}

.mobile-home.active {
    display: block;
}

.mobile-detail.active {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Cards de títulos en inicio móvil */
.mobile-title-card {
    background: #fff;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s, transform 0.15s;
}

.mobile-title-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.mobile-title-card:active {
    transform: scale(0.98);
}

.mobile-title-card-content {
    flex: 1;
}

.mobile-title-card-content strong {
    display: block;
    font-size: 15px;
	color: #1a1a1a;
    margin-bottom: 2px;
}

.mobile-title-card-content span {
    font-size: 13px;
	color: #666;
}

.mobile-title-card-arrow {
    color: #999;
    font-size: 20px;
    margin-left: 12px;
}

.mobile-title-card-arrow svg {
    width: 20px;
    height: 20px;
}

/* Breadcrumb móvil */
.mobile-breadcrumb {
    font-size: 14px;
    color: #3852a5;
    padding: 0 4px;
}

.mobile-breadcrumb a {
    color: #3852a5;
    text-decoration: none;
}

.mobile-breadcrumb a:hover {
    text-decoration: underline;
}

.mobile-breadcrumb span {
    color: #666;
}

/* Nav título en detalle móvil */
.mobile-title-nav {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.mobile-title-header {
    display: flex;
    align-items: flex-start;
    padding: 12px 14px;
    gap: 8px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.mobile-title-header .icon-toggle {
    margin-top: 2px;
    transition: transform 0.2s;
}

.mobile-title-header.open .icon-toggle {
    transform: rotate(90deg);
}

.mobile-title-header-content {
    flex: 1;
}

.mobile-title-header-content strong {
    display: block;
    font-size: 16px;
    color: #333;
}

.mobile-title-header-content span {
    font-size: 16px;
    color: #888;
}

/* Lista de capítulos en móvil */
.mobile-chapters-list {
    display: none;
    background: #fafafa;
}

.mobile-chapters-list.open {
    display: block;
}

.mobile-chapter-item {
    padding: 10px 16px;
    font-size: 16px;
    color: #212121;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background 0.15s;
	font-family: "Roboto", Sans-serif; 
}

.mobile-chapter-item:last-child {
    border-bottom: none;
}

.mobile-chapter-item:hover {
    background: #f0f0f0;
}

.mobile-chapter-item.active {
    background: #e8e8e8;
    font-weight: 600;
    color: #3852a5;
}

/* Contenido móvil */
.mobile-content {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
}

.mobile-content h2 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: #1a1a1a;
}

.mobile-content p {
    font-size: 14px;
    line-height: 1.6;
    color: #000000;
    margin-bottom: 12px;
}

.mobile-content ul {
    padding-left: 20px;
    margin-bottom: 12px;
}

.mobile-content li {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 4px;
}

/* Tablas en contenido móvil */
.mobile-content .table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 16px 0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.mobile-content .table-wrapper table {
    margin: 0;
    min-width: 100%;
    white-space: nowrap;
}

.mobile-content table {
    width: 100%;
    border-collapse: collapse;
}

.mobile-content table th,
.mobile-content table td {
    padding: 10px 12px;
    font-size: 13px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.mobile-content table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    position: sticky;
    top: 0;
}

.mobile-content table tr:last-child td {
    border-bottom: none;
}

.mobile-content table tr:nth-child(even) {
    background: #fafafa;
}

/* Scrollbar para tabla wrapper */
.mobile-content .table-wrapper::-webkit-scrollbar {
    height: 6px;
}

.mobile-content .table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.mobile-content .table-wrapper::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.mobile-content .table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Indicador de scroll (sombra lateral) */
.mobile-content .table-wrapper {
    position: relative;
}

.mobile-content .table-wrapper::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 6px;
    width: 24px;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.05));
    pointer-events: none;
    border-radius: 0 8px 8px 0;
}

/* ==================== RESPONSIVE ==================== */

/* Tablet y móvil (768px y menos) */
@media (max-width: 768px) {
    .layout-desktop {
        display: none !important;
    }

    .layout-mobile {
        display: block;
        padding: 20px 16px;
        flex: 1;
        background: #f5f5f5;
    }

    header {
        padding: 15px;
    }

    .title h1 {
        font-size: 1.4rem;
    }

    /* Tablas responsivas en tablet/móvil */
    .mobile-content .table-wrapper table {
        min-width: 450px;
    }
}

/* Celulares (480px y menos) */
@media (max-width: 480px) {
    .layout-mobile {
        padding: 16px 12px;
    }

    header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .logo {
        width: 120px;
    }

    .title h1 {
        font-size: 1.2rem;
    }

    .mobile-title-card {
        padding: 14px 16px;
    }

    .mobile-title-card-content strong {
        font-size: 14px;
    }

    .mobile-content {
        padding: 14px;
    }

    .mobile-content h2 {
        font-size: 1.1rem;
    }

    footer p {
        font-size: 0.85rem;
    }

    /* Tablas muy compactas en celulares */
    .mobile-content table {
        font-size: 12px;
        min-width: 400px;
    }

    .mobile-content th,
    .mobile-content td {
        padding: 8px 10px;
    }

    .mobile-content th {
        font-size: 11px;
    }
}