/* =========================================
   ESTILOS GENERALES
   ========================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}

body {
    font-family: "Roboto", Arial, sans-serif;
    color: black;
}


/* =========================================
   CABECERA
   ========================================= */

.padre {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.padre_izdo {
    margin: 10px;
    padding: 5px;
}

.padre_centro {
    margin: 10px;
    padding: 5px;
}

.padre_decho {
    margin-right: 20px;
    padding: 5px;
}


/* =========================================
   MENÚ SUPERIOR
   ========================================= */

.padre_decho ul {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.padre_decho a {
    position: relative;
    display: inline-block;

    padding: 8px 4px;

    text-decoration: none;
    color: black;
    font-weight: 500;

    transition: color 0.3s ease;
}

.padre_decho a::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: 0;

    width: 0;
    height: 3px;

    background-color: red;

    transition: width 0.3s ease;
}

.padre_decho a:hover {
    color: blue;
}

.padre_decho a:hover::after {
    width: 100%;
}


/* =========================================
   LOGO DE LA CABECERA
   ========================================= */

.padre_izdo img {
    border: 3px solid black;
    border-radius: 50%;
}


/* =========================================
   LÍNEAS HORIZONTALES
   ========================================= */

hr {
    background-color: red;
    width: 100%;
    height: 1px;
    border: none;
}

/* =========================================================
   TEMA - DEFINICIONES PERMISO AM
   ========================================================= */

.tema {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}


/* ---------------------------------------------------------
   CABECERA DEL TEMA
   --------------------------------------------------------- */

.tema-header {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: white;
    padding: 30px 35px;
    margin-bottom: 25px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
}

.tema-header h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.3;
    font-weight: 700;
}


/* ---------------------------------------------------------
   APARTADOS
   --------------------------------------------------------- */

.apartado {
    background: #ffffff;
    padding: 28px 30px;
    margin-bottom: 25px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.apartado h2 {
    margin: 0 0 18px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
    color: #1f2937;
    font-size: 21px;
}

.apartado p {
    color: #4b5563;
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 12px;
}


/* ---------------------------------------------------------
   LISTA DE TIPOS DE VEHÍCULOS
   --------------------------------------------------------- */

.apartado ol {
    counter-reset: lista;
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.apartado ol li {
    counter-increment: lista;
    position: relative;

    padding: 15px 18px 15px 55px;
    margin-bottom: 10px;

    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 9px;

    color: #374151;
    font-weight: 600;
}


/* Número de la lista */

.apartado ol li::before {
    content: counter(lista);

    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);

    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #2563eb;
    color: white;

    border-radius: 50%;

    font-size: 13px;
    font-weight: bold;
}


/* ---------------------------------------------------------
   LISTA DE DEFINICIONES
   --------------------------------------------------------- */

.lista-definiciones {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}


.definicion {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 18px;
}


.lista-definiciones .definicion {
    margin-bottom: 0;
    transition: all 0.2s ease;
}


.lista-definiciones .definicion:hover {
    transform: translateY(-2px);
    border-color: #93c5fd;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
}


.definicion h3 {
    margin: 0 0 12px 0;
    color: #1f2937;
    font-size: 17px;
}


.definicion p {
    margin-bottom: 12px;
}


/* ---------------------------------------------------------
   BOTÓN DE VÍDEO
   --------------------------------------------------------- */

.btn-video {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 10px 17px;

    border: none;
    border-radius: 8px;

    background: #dc2626;
    color: white;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition: all 0.2s ease;
}


.btn-video:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}


.btn-video:active {
    transform: translateY(0);
}


/* ---------------------------------------------------------
   NOTA / DEFINICIÓN ESPECIAL
   --------------------------------------------------------- */

.nota {
    margin-top: 20px;
    padding: 18px 20px;

    background: #eff6ff;

    border-left: 4px solid #2563eb;

    border-radius: 0 9px 9px 0;
}


.nota h4 {
    margin: 0 0 8px 0;

    color: #1e40af;

    font-size: 15px;
}


.nota p {
    margin: 0 0 8px 0;

    color: #374151;

    font-size: 14px;
    line-height: 1.7;
}


.nota p:last-child {
    margin-bottom: 0;
}


/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 800px) {

    .tema-header {
        padding: 25px;
    }

    .tema-header h1 {
        font-size: 23px;
    }

    .apartado {
        padding: 22px;
    }

    .lista-definiciones {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 500px) {

    .tema-header {
        padding: 20px;
        border-radius: 10px;
    }

    .tema-header h1 {
        font-size: 20px;
    }

    .apartado {
        padding: 18px;
        border-radius: 10px;
    }

    .apartado h2 {
        font-size: 19px;
    }

    .apartado p {
        font-size: 14px;
    }

}

/* =====================================================
   SUBMENÚ
   ===================================================== */

.menu-grupo {
    width: 100%;
}


/* Botón que abre/cierra el submenú */

.menu-toggle {
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}


/* Flecha */

.menu-flecha {
    margin-left: auto;
    font-size: 10px;
    transition: transform 0.2s ease;
}


/* Submenú */

.submenu {
    display: none;
    padding: 5px 0 8px 42px;
}


/* Cuando está abierto */

.submenu.abierto {
    display: block;
}


/* Elementos del submenú */

.submenu-item {
    display: block;

    padding: 9px 12px;

    margin-bottom: 3px;

    color: #9ca3af;

    text-decoration: none;

    font-size: 13px;

    border-radius: 6px;

    transition: all 0.2s ease;
}


.submenu-item:hover {
    background: #1f2937;
    color: white;
}


.submenu-item.activo {
    background: #374151;
    color: white;
}


/* Girar la flecha cuando está abierto */

.menu-toggle.abierto .menu-flecha {
    transform: rotate(180deg);
}

/* LLamada de importancia */
.importante {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.importante-icono img {
    margin-right: 20px;
    width: 35px;
    height: 70px;
}

.importante-contenido ul {
    margin: 0;
}