/* 1. Variables Globales: Tu "Paleta de Identidad" */
:root {
    --bg-color: #f4f7f6;
    --text-color: #2d3436;
    --primary-color: #0984e3;
    --accent-color: #6c5ce7;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.1s;

    /* Colores por Módulo */
    --color-win: #00a4ef;
    --color-word: #2b579a;
    --color-excel: #217346;
    --color-ppt: #d24726;
    --color-pub: #077568;
    --color-net: #ffb900;
}

/* 2. Reset Básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 3. Header y Footer */
header {
    background: #2c3e50;
    background: linear-gradient(to right, #0f2027, #203a43, #2c3e50);
    color: var(--white);
    padding: .5rem 1rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

footer {
    text-align: center;
    padding: 1rem;
    margin-top: auto;
    background: #2d3436;
    color: #dfe6e9;
    font-size: 0.9rem;
    border-top: 5px solid var(--primary-color);
    width: 100%;
}

/* 4. Layout con CSS Grid */
.container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 1rem auto;
    padding: 3rem;
    flex: 1;
    width: 100%;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* 5. Estilo de las Tarjetas (Cards) */
.card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-top: 5px solid var(--primary-color);
    z-index: 1;
}

.card:hover {
    transform: translateY(-10px);
    rotate: 1.5deg;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.card h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--text-color);
}

/* 6. Enlaces de Navegación */
.links {
    display: flex;
    gap: .5rem;
    margin-top: 1rem;
}

.links a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
    padding: 0.5rem .8rem;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    transition: var(--transition);
    flex: 1;
    text-align: center;
}

.links a:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* 7. Colores específicos para cada módulo */
.card:nth-child(1) {
    border-top-color: var(--color-win);
}

.card:nth-child(2) {
    border-top-color: var(--color-word);
}

.card:nth-child(3) {
    border-top-color: var(--color-ppt);
}

.card:nth-child(4) {
    border-top-color: var(--color-excel);
}

.card:nth-child(5) {
    border-top-color: var(--color-pub);
}

.card:nth-child(6) {
    border-top-color: var(--color-net);
}


/* Estilos adicionales para los Índices de Módulo */
.breadcrumb-nav {
    background: #fff;
    padding: 0.2rem 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 1rem;
}

.breadcrumb-nav a {
    text-decoration: none;
    color: var(--primary-color);
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

/* Estilos para los modulos */
.module-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.module-section h2 {
    color: var(--color-excel);
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}
.module-section-pub {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.module-section-xls {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.module-section-pub h2 {
    color: var(--color-pub);
    border-bottom: 2px solid #eee;
    border-bottom-color: var(--color-pub);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}
.module-section-xls h2 {
    color: var(--color-excel);
    border-bottom: 2px solid #eee;
    border-bottom-color: var(--color-excel);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.module-section-doc {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.module-section-doc h2 {
    color: var(--color-word);
    border-bottom: 2px solid #eee;
    border-bottom-color: var(--color-word);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.item-list {
    list-style: none;
}
.item-list-pub {
    list-style: none;
}
.item-list-xls {
    list-style: none;
}

.item-list-doc {
    list-style: none;
}

.item-list li {
    margin-bottom: 1rem;
}
.item-list-pub li {
    margin-bottom: 1rem;
}
.item-list-xls li {
    margin-bottom: 1rem;
}

.item-list a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    padding: 0.8rem;
    border-radius: 6px;
    background: #f9f9f9;
    color: var(--text-color);
    transition: var(--transition);
    border: 1px solid transparent;
}
.item-list-pub a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    padding: 0.8rem;
    border-radius: 6px;
    background: #f9f9f9;
    color: var(--text-color);
    transition: var(--transition);
    box-shadow: 1px 1px 2px var(--color-pub);
}
.item-list-xls a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    padding: 0.8rem;
    border-radius: 6px;
    background: #f9f9f9;
    color: var(--text-color);
    transition: var(--transition);
    box-shadow: 1px 1px 2px var(--color-excel);
}

.item-list-doc a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    padding: 0.8rem;
    border-radius: 6px;
    background: #f9f9f9;
    color: var(--text-color);
    transition: var(--transition);
    box-shadow: 1px 1px 2px var(--color-word);
}

.item-list a:hover {
    background: #fff;
    border-color: var(--color-excel);
    transform: translateX(5px);
}
.item-list-pub a:hover {
    background: #fff;
    border-color: var(--color-pub);
    transform: translateX(10px);
    border-left: 5px solid var(--color-pub);
}
.item-list-xls a:hover {
    background: #fff;
    border-color: var(--color-excel);
    transform: translateX(10px);
    border-left: 5px solid var(--color-excel);
}

.item-list-doc a:hover {
    background: #fff;
    border-color: var(--color-word);
    transform: translateX(10px);
    border-left: 5px solid var(--color-word);
}

/* Estilos complementarios */
.item-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.item-title {
    font-weight: bold;
}
.badge {
    display: inline-block;
    background: #cecece;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 10px;
    color: #555;
    font-weight: bold;
}