/* --- ESTILOS GENERALES --- */
:root {
    --primary-color: #0088cc; /* Azul corporativo CIIDE */
    --secondary-color: #8cc63f; /* Verde corporativo CIIDE */
    --text-color: #333;
    --light-bg: #f9f9f9;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HEADER & NAV --- */
header {
    background: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 60px; /* Esto asegura que quepa bien en la barra de 80px */
    width: auto;      /* Mantiene la proporción original para que no se deforme */
    display: block;   /* Elimina espacios extraños debajo de la imagen */
}

.nav-links {
    display: flex;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Icono menu hamburguesa (oculto en escritorio) */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* --- HERO SECTION --- */
.hero {
    /* IMPORTANTE: Sube una foto llamada hero-bg.jpg a tu carpeta img */
    background: linear-gradient(rgba(0, 50, 100, 0.8), rgba(0, 50, 100, 0.8)), url('../img/hero-bg.jpg');
    /* Fallback por si no has subido la foto aun: */
    background-color: #003264; 
    
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding-top: 80px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 30px auto;
}

.btn {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn:hover {
    background: #7ab035;
}

/* --- SECCIONES COMUNES --- */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.section-title p {
    max-width: 700px;
    margin: 0 auto;
    color: #666;
}

/* --- QUIENES SOMOS (Misión/Visión) --- */
#about {
    background: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.about-card {
    background: var(--light-bg);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    border-bottom: 4px solid var(--primary-color);
    transition: transform 0.3s;
}

.about-card:hover {
    transform: translateY(-5px);
}

.about-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-card h3 {
    margin-bottom: 15px;
}

/* --- CAPACITACIÓN Y SERVICIOS --- */
#services {
    background: var(--light-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.service-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    height: 100%; /* Esto ayuda a que las tarjetas tengan el mismo alto */
}

.service-content p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 15px;
    text-align: justify; /* <--- ESTO JUSTIFICA EL TEXTO */
}

.btn-course {
    display: inline-block;
    margin-top: auto; /* Empuja el botón al fondo de la tarjeta */
    padding: 8px 20px;
    background-color: var(--primary-color); /* Usa el azul corporativo */
    color: var(--white);
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
    transition: background 0.3s;
    align-self: flex-start; /* Alinea el botón a la izquierda */
}

.btn-course:hover {
    background-color: #006699; /* Un azul un poco más oscuro al pasar el mouse */
}

.service-tag {
    background: var(--primary-color);
    color: white;
    padding: 5px 10px;
    font-size: 0.8rem;
    text-transform: uppercase;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
}

.service-content h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.service-content p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 15px;
}

/* --- EQUIPO --- */
#team {
    background: var(--white);
}

.team-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.team-member {
    display: flex;
    flex-direction: column;
    background: var(--light-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

@media(min-width: 768px) {
    .team-member {
        flex-direction: row;
    }
    .team-img {
        width: 30%;
        min-width: 250px;
    }
    .team-info {
        width: 70%;
	text-align: justify;
    }
}

.team-img {
    background-color: #ddd;
    background-size: cover;
    background-position: center top; /* Enfoca la parte superior de la foto */
    min-height: 250px;
}

/* Referencias a las fotos del equipo */
/* Sube las fotos a la carpeta img con estos nombres */
.img-victor { 
    background-image: url('../img/victor.jpg'); 
}
.img-carolina { 
    background-image: url('../img/carolina.jpg'); 
}

.team-info {
    padding: 30px;
}

.team-info h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
}
.team-info h4 {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-weight: 400;
}

/* --- FOOTER --- */
footer {
    background: #222;
    color: var(--white);
    padding: 40px 0;
    text-align: center;
}

footer a {
    color: var(--secondary-color);
}

/* --- ESTILOS DEL FORMULARIO DE CONTACTO --- */

/* Contenedor flexible para poner info y formulario lado a lado */
.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    text-align: left;
    margin-top: 30px;
}

.contact-info {
    flex: 1;
    min-width: 250px;
    color: #ddd;
}

.contact-info h3 {
    color: var(--white);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--secondary-color);
    display: inline-block;
    padding-bottom: 5px;
}

.contact-info a {
    color: var(--secondary-color);
    transition: color 0.3s;
}

.contact-info a:hover {
    color: var(--white);
}

.logo-footer {
    margin-top: 40px;
}

.logo-footer h3 {
    font-size: 2rem;
    color: var(--primary-color);
    border: none;
    margin-bottom: 0;
}

/* Diseño del Formulario */
.contact-form {
    flex: 1.5;
    min-width: 300px;
    background: #333; /* Fondo oscuro para resaltar sobre el footer negro */
    padding: 30px;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 15px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #555;
    border-radius: 5px;
    background: #444;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #bbb;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: #555;
}

.contact-form button {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.copyright {
    margin-top: 50px;
    border-top: 1px solid #444;
    padding-top: 20px;
    color: #777;
    font-size: 0.9rem;
}

/* Ajuste responsive para celulares */
@media (max-width: 768px) {
    .contact-wrapper {
        flex-direction: column;
    }
}


/* --- RESPONSIVE (CELULARES) --- */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2rem; }
    
    .menu-toggle {
        display: block; /* Muestra el botón hamburguesa */
    }

    .nav-links {
        display: none; /* Oculta el menú normal */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 80px;
        left: 0;
        background: var(--white);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        text-align: center;
    }

    .nav-links.active {
        display: flex; /* Muestra el menú cuando JS agrega la clase active */
    }

    .nav-links li {
        margin: 15px 0;
    }
}