/* ==========================================================================
   Variables de Diseño y Reset
   ========================================================================== */
:root {
    --primary-color: #1b5e20;
    --primary-light: #4c8c4a;
    --accent-green: #2e7d32;
    --danger-color: #c62828;
    --danger-light: #ef5350;
    --text-color: #2c3e50;
    --bg-gradient: linear-gradient(135deg, #f1f8e9 0%, #dcedc8 50%, #a5d6a7 100%);
    --card-bg: rgba(255, 255, 255, 0.9);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Fondo estético sobre el medio ambiente (Requisito a) */
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background: var(--bg-gradient);
    background-attachment: fixed;
    line-height: 1.7;
    padding-bottom: 40px;
}

/* ==========================================================================
   Header y Animación del Título (Requisito b)
   ========================================================================== */
header {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
}

.titulo-movil {
    display: inline-block;
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    animation: moverSuave 12s ease-in-out infinite alternate;
}

@keyframes moverSuave {
    0% { transform: translateX(-20%); }
    100% { transform: translateX(20%); }
}

/* ==========================================================================
   Contenedor Principal (Efecto Glassmorphism)
   ========================================================================== */
.container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 40px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

h2::after {
    content: '';
    flex: 1;
    height: 3px;
    background: linear-gradient(90deg, #81c784, transparent);
    margin-left: 15px;
    border-radius: 2px;
}

/* ==========================================================================
   Tarjetas de Introducción y Objetivos (Requisito a)
   ========================================================================== */
.grid-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 20px;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #edf2f7;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card h2::after {
    display: none; /* Quita la línea larga dentro de las tarjetas */
}

.card h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5rem;
    color: var(--accent-green);
}

.lista-objetivos {
    list-style: none;
}

.lista-objetivos li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
}

.lista-objetivos li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: bold;
}

/* ==========================================================================
   Cuadro Comparativo Estilizado (Requisito c)
   ========================================================================== */
.tabla-wrapper {
    overflow-hidden;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid #edf2f7;
    margin: 25px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    padding: 18px 20px;
    text-align: left;
}

th {
    font-weight: 600;
    font-size: 1.1rem;
    color: white;
    letter-spacing: 0.5px;
}

.th-ventajas { background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%); }
.th-desventajas { background: linear-gradient(135deg, #c62828 0%, #e53935 100%); }

td {
    border-bottom: 1px solid #f0f4f8;
    vertical-align: top;
    font-size: 0.95rem;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #fcfdfe;
}

/* Pequeñas etiquetas dentro de la tabla */
.tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    margin-bottom: 6px;
    text-transform: uppercase;
}
.tag-ventaja { background-color: #e8f5e9; color: #2e7d32; }
.tag-desventaja { background-color: #ffebee; color: #c62828; }

/* ==========================================================================
   Caja de Reflexión de Alta Gama (Requisito d)
   ========================================================================== */
.reflexion-box {
    background: linear-gradient(to right, #f9fbf7, #f1f8e9);
    border-left: 5px solid var(--accent-green);
    padding: 30px;
    font-style: italic;
    border-radius: 0 16px 16px 0;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.01);
    position: relative;
}

.reflexion-box p {
    font-size: 1.05rem;
    color: #34495e;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Contenedor de Video (Requisito e)
   ========================================================================== */
.subtitulo-video {
    margin-bottom: 15px;
    color: #666;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ==========================================================================
   Footer y Responsividad
   ========================================================================== */
footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
    background: #2c3e50;
    color: #e2e8f0;
    border-radius: 0;
    font-size: 1rem;
}

footer strong {
    color: #a5d6a7;
}

.footer-sub {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 5px;
}

@media (max-width: 768px) {
    .grid-intro {
        grid-template-columns: 1fr;
    }
    .container {
        margin: 20px;
        padding: 20px;
    }
    .titulo-movil {
        animation: none; /* Desactiva el movimiento en móviles para evitar problemas de lectura */
        font-size: 1.8rem;
    }
    th, td {
        padding: 12px;
    }
}