html {
    scroll-behavior: smooth;
}


img[src$="mecatronica.png"] {
    display: block;
    max-width: 100%;
    margin: 1rem 0 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(22, 34, 45, 0.18);
}

img[src$="quees.jpg"] {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 1.25rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(22, 34, 45, 0.18);
}


h1 {
    display: inline-block;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.1;
    margin: 1rem 0 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 4px solid #e8a900;
}

h2 {
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    line-height: 1.2;
    margin: 3rem 0 1rem;
    padding-left: 0.75rem;
    border-left: 6px solid #e8a900;
}

h3 {
    margin: 0 0 0.4rem;
    color: #2f5d8a;
}


p {
    max-width: 70ch;
    margin: 0 0 1rem;
}


p:empty {
    display: none;
}


ul:not(#pista) {
    list-style: none;
    padding: 0;
    margin: 1rem 0 1.5rem;
    display: grid;
    gap: 0.6rem;
}

ul:not(#pista) li {
    background: white;
    border-left: 4px solid #2f5d8a;
    border-radius: 0 6px 6px 0;
    padding: 0.7rem 1rem;
    box-shadow: 0 1px 3px rgba(22, 34, 45, 0.1);
}


#detalle h3 {
    margin-top: 0;
}

#detalle p {
    margin-bottom: 0;
}


#pista li {
    transition: border-color 0.2s, transform 0.2s;
}

#pista li:hover {
    border-color: #2f5d8a;
    transform: translateY(-3px);
}


:focus-visible {
    outline: 3px solid #e8a900;
    outline-offset: 3px;
}


@media (max-width: 600px) {
    body {
        padding: 0.75rem;
    }

    h2 {
        margin-top: 2.2rem;
    }

    ul:not(#pista) li {
        padding: 0.6rem 0.8rem;
    }
}


@media (prefers-color-scheme: dark) {
    body {
        background-color: #101a23;
        color: #e6edf2;
    }

    h1, h2, h3 {
        color: #6fa3d6;
    }

    ul:not(#pista) li,
    #detalle,
    #pista li,
    button {
        background: #18252f;
        color: #e6edf2;
    }

    #pista li {
        border-color: #2c3e4c;
    }

    #pista li strong {
        color: #6fa3d6;
    }

    #pista li p {
        color: #9daebb;
    }

    button {
        border-color: #6fa3d6;
    }

    button:hover {
        background: #6fa3d6;
        color: #101a23;
    }
}




.carrusel {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#pista {
    display: flex;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

#pista li {
    flex: 0 0 240px;
    scroll-snap-align: start;
    text-align: center;
    background: white;
    border: 2px solid #bcc8d2;
    border-radius: 6px;
    padding: 1rem;
}

#pista li strong {
    display: block;
    color: #2f5d8a;
    margin-bottom: 0.4rem;
}

#pista li p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #51606d;
}

#pista img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    display: block;
    margin-bottom: 0.5rem;
}

#anterior, #siguiente {
    flex: 0 0 auto;
    font-size: 1.4rem;
    padding: 0.5rem 0.8rem;
    margin-right: 0;
    cursor: pointer;
}



:root {
    --fondo: #eaf2f8;
    --tarjeta: #ffffff;
    --texto: #16222d;
    --azul: #2f5d8a;
    --azul-oscuro: #1d3f61;
    --amarillo: #e8a900;
    --verde: #1f9d8a;
    --amarillo-suave: #fff6d9;
    --texto-boton: #ffffff;
}

@media (prefers-color-scheme: dark) {
    :root {
        --fondo: #0f1b26;
        --tarjeta: #18252f;
        --texto: #e6edf2;
        --azul: #6fa3d6;
        --azul-oscuro: #9cc2e8;
        --amarillo: #f2b705;
        --verde: #3cc4ae;
        --amarillo-suave: #2a2614;
        --texto-boton: #0f1b26;
    }
}


body {
    background: linear-gradient(180deg, var(--fondo) 0%, var(--tarjeta) 100%) fixed;
    color: var(--texto);
}


h1 {
    color: var(--azul-oscuro);
    border-bottom-color: var(--amarillo);
}

h2 {
    color: var(--azul);
    border-left-color: var(--amarillo);
    background: linear-gradient(90deg, rgba(47, 93, 138, 0.14), transparent 70%);
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

h3 {
    color: var(--azul);
}

img[src$="mecatronica.png"],
img[src$="quees.jpg"] {
    border: 3px solid var(--azul);
}


ul:not(#pista) li {
    background: var(--tarjeta);
    color: var(--texto);
}

ul:not(#pista) li:nth-child(3n+1) {
    border-left-color: var(--azul);
}

ul:not(#pista) li:nth-child(3n+2) {
    border-left-color: var(--amarillo);
}

ul:not(#pista) li:nth-child(3n+3) {
    border-left-color: var(--verde);
}


button {
    background: var(--azul);
    color: var(--texto-boton);
    border-color: var(--azul);
}

button:hover {
    background: var(--amarillo);
    color: #16222d;
    border-color: var(--amarillo);
}


#detalle {
    background: var(--amarillo-suave);
    color: var(--texto);
    border-left-color: var(--amarillo);
}


#pista li {
    background: var(--tarjeta);
    color: var(--texto);
    border-color: var(--azul);
    border-top: 5px solid var(--verde);
}

#pista li:hover {
    border-color: var(--azul);
    border-top-color: var(--amarillo);
}

#pista li strong {
    color: var(--azul);
}

#anterior,
#siguiente {
    background: var(--amarillo);
    color: #16222d;
    border-color: var(--amarillo);
}

#anterior:hover,
#siguiente:hover {
    background: var(--azul);
    color: var(--texto-boton);
    border-color: var(--azul);
}


body {
    font-size: 1.2rem;      /* antes era 1rem (unos 16 px); ahora unos 19 px */
    line-height: 1.7;
}

h1 {
    font-size: clamp(2.3rem, 6vw, 3.4rem);
}

h2 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
}

h3 {
    font-size: 1.5rem;
}


button {
    font-size: 1.1rem;
}

#anterior,
#siguiente {
    font-size: 1.6rem;
}


#pista li strong {
    font-size: 1.15rem;
}

#pista li p {
    font-size: 1rem;
    line-height: 1.5;
}


#pista li {
    flex: 0 0 270px;
}




img[src$="mecatronica.png"] {
    width: 100%;
    max-width: 600px;    
    height: auto;
}


img[src$="quees.jpg"] {
    width: 100%;
    max-width: 500px;    
    height: auto;
}



body {
    max-width: 1200px;     
    margin: 0 auto;        
    padding: 1.5rem 2rem;
}

p {
    max-width: none;       
}


.servo {
    display: grid;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
}

@media (min-width: 860px) {
    .servo {
        grid-template-columns: 1fr 1fr;
    }
}

.servo-intro {
    font-size: 1.3rem;
    margin: 0;
}

.rig {
    background: var(--tarjeta);
    border: 2px solid var(--azul);
    border-radius: 8px;
    padding: 1rem;
    max-width: 520px;
}

.rig svg {
    width: 100%;
    height: auto;
    display: block;
}

.s-marco  { fill: none; stroke: var(--azul); stroke-opacity: 0.3; stroke-width: 2; }
.s-arco   { fill: none; stroke: var(--azul); stroke-opacity: 0.4; stroke-width: 2; stroke-dasharray: 4 6; }
.s-objetivo { stroke: var(--amarillo); stroke-width: 3; stroke-dasharray: 3 5; }
.s-brazo  { fill: var(--azul); }
.s-base   { fill: var(--texto); }
.s-eje    { fill: var(--amarillo); stroke: var(--texto); stroke-width: 3; }

.lecturas {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0.5rem 0;
    font-variant-numeric: tabular-nums;
}

.rig input[type="range"] {
    width: 100%;
    accent-color: var(--azul);
    height: 2rem;
}

.nota {
    font-size: 0.9rem;
    margin: 0.25rem 0 0;
}

.barra {
    background: #1d3f61;
    border-bottom: 4px solid #e8a900;
    border-radius: 8px;
    padding: 0.9rem 1.25rem;
    margin-bottom: 1.5rem;
}

.marca {
    color: #ffffff;
    font-size: 1.7rem;
    font-weight: bold;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.marca:hover {
    color: #e8a900;
}


.pie {
    margin-top: 3rem;
    padding: 1.5rem 1rem;
    text-align: center;
    background: #1d3f61;
    border-top: 4px solid #e8a900;
    border-radius: 8px;
}

.pie p {
    max-width: none;
    margin: 0;
    color: #ffffff;
    font-size: 1rem;
}