/* styles.css */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
    /* Evita que el header tape el contenido al hacer click en los enlaces */
}

body {
    background: linear-gradient(135deg, #1a1a1a 0%, #050505 100%);
    color: #f5f5f5;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 120px;
    /* Espacio para el header fijo */
    min-height: 100vh;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #b32424;
    /* Rojo mate */
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    max-height: 40px;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    background-color: #b32424;
    /* Mismo rojo mate que el header */
    color: #ffffff;
    border-radius: 10px;
    padding: 10px 15px;
    margin-top: 30px;
    display: inline-block;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.nav-link {
    border-color: #f86363;
    border-left: solid 3px;
}

header h1 {
    margin: 0;
    padding: 0;
    background-color: transparent;
    box-shadow: none;
    font-size: 1.6rem;
}

.heading-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.heading-container h2 {
    margin-top: 0;
}

div[id] {
    padding: 20px 40px;
    margin: 30px auto;
    max-width: 1000px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    animation: fadeIn 1s ease-in-out;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.cont-text {
    font-size: 1.05rem;
    text-align: left;
    margin-right: 50px;
}

table th,
table td {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
}

table thead tr {
    background-color: #b32424 !important;
    color: #fff !important;
}

table tbody tr {
    background-color: transparent !important;
    transition: background-color 0.3s ease;
}

table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

p,
ul,
li {
    line-height: 1.6;
    font-size: 1.05rem;
}

p {
    text-align: justify;
}

.creditos-lateral {
    position: fixed;
    bottom: 20px;
    right: 0;
    background-color: #b32424;
    color: #ffffff;
    padding: 15px;
    border-radius: 10px 0 0 10px;
    box-shadow: -4px 4px 8px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    max-width: 200px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-right: none;
    font-size: 0.8rem;
}

.creditos-lateral p {
    margin-right: 30px;
    line-height: 1.3;
    font-size: 0.8rem;
}

.creditos-lateral ul {
    margin: 5px 0 0 0;
    padding-left: 20px;
}

.creditos-lateral ul li {
    font-size: 0.8rem;
    line-height: 1.3;
    min-height: 16px;
}

/* Responsive (Mobile) */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 10px;
    }

    header h1 {
        font-size: 1.2rem;
        text-align: center;
    }

    .logo {
        flex-direction: column;
        gap: 5px;
    }

    nav ul {
        justify-content: center;
        gap: 10px;
        margin-top: 10px;
    }

    nav ul li a {
        padding: 6px 10px;
        font-size: 0.9rem;
    }

    body {
        padding-top: 170px;
        /* El header es más alto en móviles */
    }

    html {
        scroll-padding-top: 180px;
    }

    div[id] {
        padding: 15px 20px;
        margin: 20px 10px;
    }

    .heading-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .creditos-lateral {
        bottom: 10px;
        right: 0;
        max-width: 130px;
        font-size: 0.8rem;
    }
}