/* Tema 3 - Análisis de problemas y tipos de algoritmos (Lógica de Programación)
   Página: eduPL2.php
   Estilo coherente con Tema 2 (Algoritmos): fondo oscuro, texto claro y títulos en verde.
*/

:root {
    --ap-green: #00c853;
    --ap-black: #000000;
    --ap-black-soft: #101010;
    --ap-black-alt: #080808;
    --ap-white: #ffffff;
}

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

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

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

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

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

.ap-hero-title {
    display: inline-block;
    border: 2px solid var(--ap-white);
    padding: 22px 36px;
    margin: 28px 0 14px 0;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 22px;
}

.ap-hero-subtitle {
    color: var(--ap-green);
    font-size: 24px;
    margin-bottom: 16px;
}

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

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

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

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

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

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

/* Sección 2 - Análisis de problemáticas */
.ap-section-analysis {
    background-color: #050505;
}

/* Sección 3 - Requisitos del problema */
.ap-section-requirements {
    background-color: var(--ap-black-soft);
}

/* Sección intermedia - Ejemplo puente */
.ap-section-bridge {
    background-color: #050505;
}

.ap-section-subtitle {
    max-width: 720px;
    margin: 0 auto 20px auto;
    font-size: 17px;
    line-height: 1.7;
    color: var(--ap-white);
}

.ap-bridge-card {
    max-width: 640px;
    margin: 26px auto 0 auto;
    padding: 24px 24px 26px 24px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background-color: #111111;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
    text-align: left;
}

.ap-bridge-line {
    margin-bottom: 8px;
    font-size: 15px;
    line-height: 1.7;
}

.ap-bridge-list {
    margin: 6px 0 14px 18px;
    padding-left: 0;
    font-size: 15px;
    line-height: 1.7;
}

.ap-bridge-list li {
    margin-bottom: 4px;
}

.ap-bridge-remate {
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.7;
    font-style: italic;
}

.ap-requirements-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 28px;
}

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

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

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

/* Sección 4 - Descomposición de problemas */
.ap-section-decomposition {
    background-color: #0c0c0c;
}

/* Sección 5 - Tipos de algoritmos */
.ap-section-types {
    background-color: var(--ap-black-alt);
}

.alg-types-section {
    margin-top: 30px;
}

.alg-types-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: flex-start;
}

.alg-types-col {
    text-align: left;
}

.ap-types-block {
    background-color: transparent;
}

.alg-types-image {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.alg-types-image img {
    max-width: 70%;
    height: auto;
    display: block;
}

.alg-types-single {
    margin-top: 36px;
    display: flex;
    justify-content: center;
}

.alg-types-single .ap-types-block {
    max-width: 520px;
    text-align: left;
}

.ap-note {
    max-width: 760px;
    margin: 10px auto 0 auto;
    font-size: 15px;
    line-height: 1.8;
    color: #e0e0e0;
}

/* Sección 6 - Cierre */
.ap-section-closing {
    background-color: #050505;
}

.ap-closing-text {
    font-style: italic;
}

/* Botón de continuidad hacia el siguiente tema (estilo coherente con eduPL1) */
.eduPL-next-wrapper {
    margin-top: 32px;
    margin-bottom: 0;
    text-align: center;
}

.eduPL-next-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    border: 2px solid var(--ap-green);
    color: var(--ap-green) !important;
    background-color: transparent;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    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(--ap-green);
    color: var(--ap-black) !important;
    border-color: var(--ap-green);
}

/* =============================
   Responsivo
   ============================= */
@media (max-width: 992px) {
    .ap-requirements-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .alg-types-row {
        grid-template-columns: 1fr;
    }
}

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

    .ap-hero-title {
        font-size: 20px;
        padding: 18px 22px;
        letter-spacing: 3px;
    }

    .ap-hero-subtitle {
        font-size: 20px;
    }

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

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

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