/* 
=================================================================
ADAMS - STYLE.CSS (Versión Final - Columnas Restauradas)
=================================================================
*/

/* 1. IMPORTACIÓN DE FUENTES OFICIALES (Guía Adams) */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&family=Sarabun:wght@300;400;600&display=swap');

/* 2. VARIABLES DE COLOR (Guía Adams) */
:root {
    --adams-bg: #f7f7f7;          /* Cultured */
    --adams-text: #35475b;        /* Charcoal */
    --adams-green: #33af83;       /* Jungle Green */
    --adams-yellow: #e69f00;      /* Mustard Yellow */
    --adams-white: #FFFFFF;
    --adams-grey-text: #35475b;    /* Charcoal */
    --adams-border-light: #e0e0e0;
}

/* 3. ESTILOS BASE */
body, html {
    font-family: 'Sarabun', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--adams-text);
    background-color: var(--adams-bg);
    line-height: 1.6;
}

h1, h2, h3, .course-name, .sidebar-links h3, .hamburger-button, .column-title {
    font-family: 'Outfit', sans-serif;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 4. BOTÓN UNIVERSAL (Con padding y margen corregido) */
.btn {
    font-family: 'Outfit', sans-serif;
    background-color: var(--adams-yellow);
    border: 1px solid var(--adams-yellow);
    color: var(--adams-white) !important;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 25px;       /* Margen interno a los lados del texto */
    height: 44px;          
    gap: 10px;             
    
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-sizing: border-box;
    font-size: 0.85rem;
}

.btn:hover {
    background-color: var(--adams-green);
    border-color: var(--adams-green);
}

.adams-svg-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* 5. CABECERA */
.header .main-image {
    background-image: url('assets/images/header_banner.png');
    background-size: cover;
    background-position: center;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header .main-title {
    background-color: var(--adams-green);
    color: var(--adams-white);
    padding: 1.5rem 0;
    text-align: center;
}

.header .main-title h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

/* 6. SUB-HEADER Y BÚSQUEDA */
.sub-header {
    background-color: #eeeeee;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--adams-border-light);
}

.sub-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.search-form {
    display: flex;
    gap: 10px;
    flex-grow: 1;
    max-width: 600px;
}

.search-form input[type="search"] {
    flex-grow: 1;
    height: 44px;
    padding: 0 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: 'Sarabun', sans-serif;
}

/* 7. LAYOUT PRINCIPAL E INDEX */
#primary { padding: 40px 0; }
.main-layout { display: flex; gap: 3rem; }
.main-layout .sidebar { flex: 0 0 320px; }
.main-layout .main-content { flex: 1; }

.sidebar-links {
    background-color: var(--adams-white);
    padding: 15px;
    border: 1px solid var(--adams-yellow);
}

.sidebar-links h3 { margin-top: 0; margin-bottom: 1rem; color: var(--adams-green); }

.sidebar-links a {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--adams-grey-text);
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-links a:hover, .sidebar-links a.active {
    background-color: var(--adams-green);
    color: var(--adams-white);
}

.hamburger-button { display: none; }

.course-list .course-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--adams-border-light);
    background-color: var(--adams-white);
    margin-bottom: 12px;
}

/* 8. FICHA DEL CURSO (Dos columnas arregladas) */
.main-layout > .ficha-container { flex: 1; }

.ficha-container {
    background-color: var(--adams-white);
    border: 1px solid var(--adams-border-light);
    padding: 35px 45px;
    box-sizing: border-box;
    border-radius: 6px;
}

.ficha-volver {
    display: inline-flex;
    margin-bottom: 25px;
    color: var(--adams-green);
    text-decoration: none;
    font-weight: 600;
}

.ficha-main-title h1 { color: var(--adams-green); font-size: 2.3rem; font-weight: 800; margin: 0; }

.intro-layout { display: flex; flex-wrap: wrap; gap: 40px; margin: 30px 0; }
.intro-description-column { flex: 2; min-width: 300px; }
.intro-video-column { flex: 1.2; min-width: 280px; }

.video-container {
    position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
    background: #000; border-radius: 8px;
}
.video-container iframe { position: absolute; top:0; left:0; width:100%; height:100%; border:0; }

.ficha-meta-info {
    display: flex; flex-wrap: wrap; gap: 35px; padding: 20px 0;
    border-top: 1px solid var(--adams-border-light);
    border-bottom: 1px solid var(--adams-border-light);
    color: var(--adams-green);
    font-weight: 600;
}

/* AQUÍ ESTÁ EL ARREGLO DE LAS DOS COLUMNAS (Objetivos y Programa) */
.course-details-columns { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 40px; 
    margin-top: 30px; 
}

.column-item { 
    flex: 1 1 calc(50% - 20px); /* Forzamos el 50% menos la mitad del espacio (gap) */
    min-width: 300px; /* Para que en móviles se apilen si no caben los 300px */
}

.column-title {
    color: var(--adams-green);
    font-size: 1.6rem;
    border-bottom: 3px solid var(--adams-yellow);
    padding-bottom: 8px;
    margin-bottom: 20px;
}

/* 9. MODAL DE INFORMACIÓN (Oculto por defecto) */
.modal {
    display: none; 
    position: fixed;
    z-index: 2000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(53, 71, 91, 0.8);
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: var(--adams-white);
    margin: 5vh auto;
    padding: 40px;
    width: 90%;
    max-width: 650px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.close-button {
    position: absolute; right: 25px; top: 15px;
    font-size: 32px; font-weight: bold; cursor: pointer; color: #ccc;
}

.info-form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.form-group { margin-bottom: 15px; }
.form-group label {
    display: block; margin-bottom: 8px;
    font-family: 'Outfit', sans-serif; font-weight: 600;
}

.form-group input, .form-group textarea {
    width: 100%; padding: 12px 15px;
    border: 1px solid var(--adams-border-light);
    border-radius: 5px; box-sizing: border-box;
}

/* 10. FOOTER */
footer { background-color: var(--adams-green); color: #fff; padding: 50px 0 30px; margin-top: 60px; }
footer h3 { color: var(--adams-white); margin-bottom: 20px; }

/* 11. RESPONSIVE DESIGN */
@media (max-width: 992px) {
    .main-layout { flex-direction: column; }
    .main-layout .sidebar { flex: 0 0 auto; width: 100%; }
    
    .hamburger-button {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 15px 20px;
        background-color: var(--adams-green);
        color: #fff;
        border: 1px solid var(--adams-yellow);
        border-radius: 5px;
        cursor: pointer;
        font-weight: bold;
        justify-content: space-between;
    }
    
    .sidebar-links { display: none; margin-top: 5px; }
    .sidebar-links.is-active { display: block; }
}

@media (max-width: 768px) {
    /* En móvil sí que deben aparecer una debajo de la otra */
    .sub-header-content, .intro-layout, .info-form .form-grid, .course-list .course-item {
        flex-direction: column;
    }
    .column-item { flex: 1 1 100%; }
    .btn { width: 100%; }
}