/* Tema 2 - Algoritmos (Lógica de Programación)
   Página: EduPL1.php
   Estilo sobrio, educativo, fondo oscuro, texto claro y títulos en verde.
*/

:root {
    --alg-green: #00c853; /* mismo criterio de verde que eduPL */
    --alg-black: #000000;
    --alg-black-soft: #101010;
    --alg-black-alt: #080808;
    --alg-white: #ffffff;
}

/* Reset básico para esta página */
body {
    background-color: var(--alg-black);
    color: var(--alg-white);
    font-family: 'Raleway', sans-serif;
    font-size: 18px;
    font-weight: 400;
}

h1,
 h2,
 h3,
 h4,
 h5 {
    color: var(--alg-white);
    font-weight: 700;
}

/* =============================
   Hero / Introducción visual
   ============================= */
.alg-hero {
    position: relative;
    background: url('../images/edu/eduPL/bg-algoritmos.png') center center no-repeat;
    background-size: cover;
    padding-top: 80px;
    padding-bottom: 100px;
    text-align: center;
    color: var(--alg-white);
}

.alg-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.9));
    z-index: 1;
}

.alg-hero .container,
.alg-hero .row,
.alg-hero-content {
    position: relative;
    z-index: 2;
}

.alg-hero-title {
    display: inline-block;
    border: 2px solid var(--alg-white);
    padding: 24px 40px;
    margin: 32px 0 16px 0;
    letter-spacing: 6px;
    text-transform: uppercase;
}

.alg-hero-subtitle {
    color: var(--alg-green);
    font-size: 26px;
    margin-bottom: 18px;
}

.alg-hero-text {
    max-width: 720px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.8;
}

.alg-hero-btn {
    margin-top: 38px;
    background: transparent;
    border: 2px solid var(--alg-white);
    color: var(--alg-white);
    font-size: 16px;
    font-weight: 600;
    width: 200px;
    height: 56px;
    padding-top: 16px;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.alg-hero-btn:hover,
.alg-hero-btn:focus {
    background: var(--alg-green);
    border-color: var(--alg-green);
    color: var(--alg-black);
}

/* =============================
   Secciones base
   ============================= */
.alg-section {
    padding: 70px 20px;
    text-align: center;
    color: var(--alg-white);
}

.alg-section-title {
    color: var(--alg-green);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.alg-section-text {
    max-width: 860px;
    margin: 0 auto 16px auto;
    font-size: 16px;
    line-height: 1.8;
}

/* Sección 2 - Definición */
.alg-section-definition {
    background-color: #050505;
}

/* Sección 3 - Características (cards) */
.alg-section-features {
    background-color: var(--alg-black-soft);
}

/* Sección intermedia - Ejemplo simple */
.alg-section-example {
    background-color: #0c0c0c; /* ligero contraste respecto a la sección anterior */
}

.alg-example-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
}

.alg-example-text,
.alg-example-visual {
    flex: 1 1 320px;
    min-width: 0;
}

.alg-example-visual {
    display: flex;
    justify-content: center;
}

.alg-example-image {
    max-width: 90%;
    height: auto;
    display: block;
}

.alg-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.alg-card {
    background-color: #151515;
    border-radius: 12px;
    padding: 24px 20px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}

.alg-card-title {
    color: var(--alg-green);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.alg-card-text {
    color: var(--alg-white);
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

.alg-ejemplo-list {
    max-width: 640px;
    margin: 24px auto 20px auto;
    padding-left: 20px;
    text-align: left;
    color: var(--alg-white);
    font-size: 16px;
    line-height: 1.8;
}

/* Sección 4 - Importancia */
.alg-section-importance {
    background-color: var(--alg-black-alt);
}

.eduPL-next-wrapper {
    margin-top: 40px;
    text-align: center;
}

.eduPL-next-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    border: 1px solid var(--alg-green);
    color: var(--alg-green);
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.eduPL-next-btn:hover,
.eduPL-next-btn:focus {
    background-color: var(--alg-green);
    color: var(--alg-black);
    border-color: var(--alg-green);
}

/* =============================
   Responsivo
   ============================= */
@media (max-width: 992px) {
    .alg-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .alg-hero {
        padding-top: 70px;
        padding-bottom: 80px;
    }

    .alg-hero-title {
        font-size: 26px;
        padding: 18px 26px;
        letter-spacing: 4px;
    }

    .alg-hero-subtitle {
        font-size: 22px;
    }

    .alg-hero-text {
        font-size: 16px;
    }

    .alg-section {
        padding: 56px 18px;
    }

    .alg-section-title {
        font-size: 28px;
    }

    .alg-example-grid {
        flex-direction: column;
        align-items: stretch;
    }

    .alg-example-visual {
        margin-top: 12px;
    }

    .alg-cards {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .alg-card {
        padding: 22px 18px;
    }
}