<!DOCTYPE html>
<html lang="es">
<head>
  <meta charset="UTF-8">
  <title>Empleos</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <!-- Bootstrap -->
  <link rel="stylesheet" href="<?= base_url('css/bootstrap.min.css') ?>">

  <!-- Bootstrap iconos -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css" rel="stylesheet">

  <!-- css -->
  <link rel="stylesheet" href="<?= base_url('css/style.css') ?>">

</head>

<body>

  <!-- NAVBAR -->
<?php $title = 'Empleo'; ?>
<?= view('partials/header') ?>

  <!-- HERO -->
  <section class="hero hero-empleos">
    <div class="container">
      <h2 class="fw-bold">Explora oportunidades laborales</h2>
      <p>Encuentra el empleo ideal para ti</p>
    </div>
  </section>

  <div class="container mt-5">
    <div class="row">

      <!-- FILTROS -->
      <div class="col-md-3">
        <div class="filters">
          <h5>Filtros</h5>

          <input type="text" class="form-control mb-3" placeholder="Buscar empleo">

          <select class="form-select mb-3">
            <option>Categoría</option>
            <option>Tecnología</option>
            <option>Diseño</option>
            <option>Marketing</option>
          </select>

          <select class="form-select mb-3">
            <option>Ubicación</option>
            <option>Remoto</option>
            <option>Ciudad</option>
          </select>

          <button class="btn btn-primary w-100">Aplicar filtros</button>
        </div>
      </div>

      <!-- LISTA DE EMPLEOS -->
      <div class="col-md-9">

        <!-- CARD 1 -->
        <div class="job-card">
          <div class="d-flex justify-content-between">
            <div>
              <div class="job-title">Desarrollador Frontend</div>
              <div class="company">Empresa Tech</div>
            </div>
            <button class="btn btn-outline-primary btn-sm">Aplicar</button>
          </div>
          <div class="mt-2">
            <span class="tag">Remoto</span>
            <span class="tag">Tiempo completo</span>
          </div>
        </div>

        <!-- CARD 2 -->
        <div class="job-card">
          <div class="d-flex justify-content-between">
            <div>
              <div class="job-title">Diseñador UI/UX</div>
              <div class="company">Creative Studio</div>
            </div>
            <button class="btn btn-outline-primary btn-sm">Aplicar</button>
          </div>
          <div class="mt-2">
            <span class="tag">Híbrido</span>
            <span class="tag">Freelance</span>
          </div>
        </div>

        <!-- CARD 3 -->
        <div class="job-card">
          <div class="d-flex justify-content-between">
            <div>
              <div class="job-title">Marketing Digital</div>
              <div class="company">Agencia Pro</div>
            </div>
            <button class="btn btn-outline-primary btn-sm">Aplicar</button>
          </div>
          <div class="mt-2">
            <span class="tag">Tiempo parcial</span>
            <span class="tag">Presencial</span>
          </div>
        </div>

      </div>
    </div>
  </div>

  <!-- FOOTER -->
<?= view('partials/footer') ?>

  <script src="<?= base_url('js/bootstrap.bundle.min.js') ?>"></script>


<!-- ========================================================== -->
<!-- MODAL: LOGIN                                                -->
<!-- ========================================================== -->
<div class="modal fade" id="loginModal" tabindex="-1" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered">
    <div class="modal-content border-0 shadow-lg" style="border-radius: 20px;">
      <div class="modal-body p-5">
        <div class="text-center mb-4">
          <h3 class="fw-bold">Bienvenido de nuevo</h3>
          <p class="text-muted">Accede a las mejores ofertas</p>
        </div>

        <button class="btn btn-outline-dark w-100 mb-3 d-flex align-items-center justify-content-center py-2">
          <img src="<?= base_url('img/logo_google.png') ?>" style="width: 18px;" class="me-2">
          Continuar con Google
        </button>

        <div class="text-center my-3 text-muted small">o con tu correo</div>

        <form id="formLogin"  action="<?= base_url('login') ?>" method="POST">
          <?= csrf_field() ?>
          <div class="mb-3">
            <input type="email" name="email" class="form-control py-2" placeholder="Correo electrónico">
          </div>
          <div class="mb-3">
            <input type="password" name="password" class="form-control py-2" placeholder="Contraseña">
          </div>
          <button type="submit" class="btn btn-primary w-100 py-2 fw-bold shadow-sm">Entrar</button>
        </form>

        

        <div class="text-center">
          <p class="text-muted small mb-1">¿No tienes cuenta?
            <a href="#" class="text-primary text-decoration-none fw-bold"
               data-bs-dismiss="modal"
               data-bs-toggle="modal" data-bs-target="#registroModal">Regístrate como postulante</a>
          </p>
          <p class="text-muted small mb-0">¿Necesitas contratar?
            <a href="#" class="text-success text-decoration-none fw-bold"
               data-bs-dismiss="modal"
               data-bs-toggle="modal" data-bs-target="#empresaModal">Ingresa como empresa</a>
          </p>
        </div>
      </div>
    </div>
  </div>
</div>

<!-- ========================================================== -->
<!-- MODAL: REGISTRO POSTULANTE                                  -->
<!-- ========================================================== -->
<div class="modal fade" id="registroModal" tabindex="-1" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered">
    <div class="modal-content border-0 shadow-lg" style="border-radius: 20px;">
      <div class="modal-body p-5">
        <div class="text-center mb-4">
          <i class="bi bi-person-circle fs-1 text-primary"></i>
          <h3 class="fw-bold mt-2">Crear cuenta</h3>
          <p class="text-muted">Empieza a postular hoy mismo</p>
        </div>

        <form id="formRegistro" action="<?= base_url('registro') ?>" method="POST">
            <?= csrf_field() ?>
          <div class="mb-3">
            <input type="text" class="form-control py-2" name="nombre" placeholder="Nombre completo">
          </div>
          <div class="mb-3">
            <input type="text" class="form-control py-2" name="apellidos" placeholder="Apellidos completos">
          </div>
          <div class="mb-3">
            <input type="email" class="form-control py-2" name="email" placeholder="Correo electrónico">
          </div>
          <div class="mb-3">
            <input type="password" class="form-control py-2" name="password" placeholder="Crear contraseña">
          </div>
          <div class="mb-3">
            <select class="form-select py-2" name="puesto_deseado">
              <option selected disabled value="">Puesto deseado</option>
              <optgroup label="Tecnología">
                <option value="Frontend Developer">Frontend Developer</option>
                <option value="Backend Developer">Backend Developer</option>
                <option value="Fullstack Developer">Fullstack Developer</option>
                <option value="Soporte Técnico / IT">Soporte Técnico / IT</option>
                <option value="Analista de Datos">Analista de Datos</option>
              </optgroup>
              <optgroup label="Administración y Ventas">
                <option value="Administrador de Empresas">Administrador de Empresas</option>
                <option value="Asistente Administrativo">Asistente Administrativo</option>
                <option value="Vendedor / Ejecutivo de Ventas">Vendedor / Ejecutivo de Ventas</option>
                <option value="Servicio al Cliente">Servicio al Cliente</option>
              </optgroup>
              <optgroup label="Salud y Otros">
                <option value="Enfermería">Enfermería</option>
                <option value="Farmacéutico">Farmacéutico</option>
                <option value="Perito Mecánico">Perito Mecánico</option>
                <option value="Diseñador Gráfico / UI">Diseñador Gráfico / UI</option>
              </optgroup>
            </select>
          </div>
          <div class="mb-3">
            <select class="form-select py-2" name="departamento">
              <option selected disabled value="">Selecciona tu departamento</option>
              <option>Alta Verapaz</option><option>Baja Verapaz</option>
              <option>Chimaltenango</option><option>Chiquimula</option>
              <option>El Progreso</option><option>Escuintla</option>
              <option>Guatemala</option><option>Huehuetenango</option>
              <option>Izabal</option><option>Jalapa</option>
              <option>Jutiapa</option><option>Petén</option>
              <option>Quetzaltenango</option><option>Quiché</option>
              <option>Retalhuleu</option><option>Sacatepéquez</option>
              <option>San Marcos</option><option>Santa Rosa</option>
              <option>Sololá</option><option>Suchitepéquez</option>
              <option>Totonicapán</option><option>Zacapa</option>
            </select>
          </div>
          <button type="submit" class="btn btn-primary w-100 py-2 fw-bold shadow-sm">Crear Cuenta</button>
        </form>

        <hr class="my-4">
        <div class="text-center">
          <p class="text-muted small mb-1">¿Ya tienes cuenta?
            <a href="#" class="text-primary text-decoration-none fw-bold"
               data-bs-dismiss="modal"
               data-bs-toggle="modal" data-bs-target="#loginModal">Inicia sesión</a>
          </p>
          <p class="text-muted small mb-0">¿Necesitas contratar?
            <a href="#" class="text-success text-decoration-none fw-bold"
               data-bs-dismiss="modal"
               data-bs-toggle="modal" data-bs-target="#empresaModal">Regístrate como empresa</a>
          </p>
        </div>
        <p class="text-center text-muted small mt-3">
          Al registrarte, aceptas nuestros términos y condiciones.
        </p>
      </div>
    </div>
  </div>
</div>

<!-- ========================================================== -->
<!-- MODAL: REGISTRO EMPRESA                                     -->
<!-- ========================================================== -->
<div class="modal fade" id="empresaModal" tabindex="-1" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered">
    <div class="modal-content border-0 shadow-lg" style="border-radius: 20px;">
      <div class="modal-body p-5">
        <div class="text-center mb-4">
          <i class="bi bi-building fs-1 text-success"></i>
          <h3 class="fw-bold mt-2">Registrar empresa</h3>
          <p class="text-muted">Publica empleos y encuentra talento</p>
        </div>

        <form id="formEmpresa">
          <div class="mb-3">
            <input type="text" class="form-control py-2" id="emp_nombre_empresa" placeholder="Nombre de la empresa">
          </div>
          <div class="mb-3">
            <input type="email" class="form-control py-2" id="emp_email" placeholder="Correo electrónico">
          </div>
          <div class="mb-3">
            <input type="password" class="form-control py-2" id="emp_password" placeholder="Crear contraseña">
          </div>
          <div class="mb-3">
            <input type="text" class="form-control py-2" id="emp_sitio_web" placeholder="Sitio web (opcional)">
          </div>
          <div class="mb-3">
            <select class="form-select py-2" id="emp_ubicacion">
              <option selected disabled value="">Departamento donde opera</option>
              <option>Alta Verapaz</option><option>Baja Verapaz</option>
              <option>Chimaltenango</option><option>Chiquimula</option>
              <option>El Progreso</option><option>Escuintla</option>
              <option>Guatemala</option><option>Huehuetenango</option>
              <option>Izabal</option><option>Jalapa</option>
              <option>Jutiapa</option><option>Petén</option>
              <option>Quetzaltenango</option><option>Quiché</option>
              <option>Retalhuleu</option><option>Sacatepéquez</option>
              <option>San Marcos</option><option>Santa Rosa</option>
              <option>Sololá</option><option>Suchitepéquez</option>
              <option>Totonicapán</option><option>Zacapa</option>
            </select>
          </div>
          <button type="submit" class="btn btn-success w-100 py-2 fw-bold shadow-sm">Crear cuenta empresa</button>
        </form>

        <hr class="my-4">
        <div class="text-center">
          <p class="text-muted small mb-1">¿Ya tienes cuenta?
            <a href="#" class="text-primary text-decoration-none fw-bold"
               data-bs-dismiss="modal"
               data-bs-toggle="modal" data-bs-target="#loginModal">Inicia sesión</a>
          </p>
          <p class="text-muted small mb-0">¿Buscas empleo?
            <a href="#" class="text-primary text-decoration-none fw-bold"
               data-bs-dismiss="modal"
               data-bs-toggle="modal" data-bs-target="#registroModal">Regístrate como postulante</a>
          </p>
        </div>
        <p class="text-center text-muted small mt-3">
          Al registrarte, aceptas nuestros términos y condiciones.
        </p>
      </div>
    </div>
  </div>
</div>


</body>
</html>
