/* css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #28a745; /* Un verde similar al de Cazachambas */
    --secondary-color: #007bff; /* Azul para algunos detalles */
    --text-color: #333;
    --light-text-color: #666;
    --background-light: #f8f9fa;
    --background-white: #ffffff;
    --border-color: #dee2e6;
    --shadow-light: rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header and Navigation */
header {
    background-color: var(--background-white);
    box-shadow: 0 2px 5px var(--shadow-light);
    padding: 15px 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo a {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

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

.burger {
    display: none; /* Oculto por defecto en desktop */
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(to right, #e6ffe6, #d4ffdb); /* Fondo suave verde claro */
    padding: 80px 20px;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2em;
    color: var(--light-text-color);
    margin-bottom: 30px;
}

.search-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap; /* Para que se adapte en móviles */
}

.search-bar input {
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    width: 300px;
    max-width: 45%; /* Para que cada input ocupe menos de la mitad */
}

.search-bar button {
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-bar button:hover {
    background-color: #218838; /* Verde más oscuro al pasar el ratón */
}

.popular-searches {
    font-size: 0.9em;
    color: var(--light-text-color);
}

.popular-searches a {
    color: var(--secondary-color);
    text-decoration: none;
    margin: 0 5px;
}

.popular-searches a:hover {
    text-decoration: underline;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    flex-grow: 1; /* Permite que el contenido principal crezca y empuje el footer hacia abajo */
}

.latest-jobs-section h2, .how-it-works-section h2 {
    text-align: center;
    font-size: 2.2em;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.job-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.job-card {
    background-color: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 10px var(--shadow-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.job-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.job-card h3 {
    font-size: 1.5em;
    color: var(--text-color);
    margin-bottom: 10px;
}

.job-card p {
    font-size: 0.95em;
    color: var(--light-text-color);
    margin-bottom: 8px;
}

.job-card p i {
    margin-right: 8px;
    color: var(--secondary-color);
}

.job-card .description {
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1; /* Permite que la descripción empuje el botón hacia abajo */
}

.job-card .job-type {
    display: inline-block;
    background-color: #e0f2f1; /* Color de fondo suave para el tipo de empleo */
    color: #00796b; /* Color de texto para el tipo de empleo */
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 15px;
}

.job-card .job-type.full-time {
    background-color: #e8f5e9; /* Verde claro */
    color: #2e7d32; /* Verde oscuro */
}

.job-card .job-type.part-time {
    background-color: #fff3e0; /* Naranja claro */
    color: #e65100; /* Naranja oscuro */
}

.job-card .btn-detail {
    display: block;
    width: 100%;
    padding: 10px 15px;
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    margin-top: auto; /* Para alinear los botones en la parte inferior de las tarjetas */
}

.job-card .btn-detail:hover {
    background-color: #0056b3; /* Azul más oscuro al pasar el ratón */
}

.load-more-btn {
    display: block;
    margin: 30px auto;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.load-more-btn:hover {
    background-color: #218838;
}

/* How It Works Section */
.how-it-works-section {
    background-color: var(--background-white);
    padding: 60px 20px;
    margin-top: 50px;
    border-radius: 10px;
    box-shadow: 0 4px 10px var(--shadow-light);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: center;
}

.step-card {
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: #fcfcfc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.step-card i {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.step-card h3 {
    font-size: 1.4em;
    color: var(--text-color);
    margin-bottom: 10px;
}

.step-card p {
    font-size: 0.95em;
    color: var(--light-text-color);
}

/* Footer */
footer {
    background-color: #2c3e50; /* Un gris oscuro, similar al de Cazachambas */
    color: white;
    padding: 40px 20px 20px;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 20px;
}

.footer-section {
    flex: 1;
    min-width: 280px;
    margin: 20px;
}

.footer-section h3 {
    font-size: 1.3em;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer-section p {
    font-size: 0.9em;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-section.contact p i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    font-size: 0.85em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5em;
    }

    .hero-content p {
        font-size: 1em;
    }

    .search-bar input,
    .search-bar button {
        width: 100%;
        max-width: 100%;
        margin-bottom: 10px;
    }

    .job-grid {
        grid-template-columns: 1fr; /* Una columna en pantallas pequeñas */
    }

    .nav-links {
        position: absolute;
        right: 0;
        height: 92vh;
        top: 8vh;
        background-color: #2c3e50;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 60%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        z-index: 10;
    }

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

    .nav-links li a {
        color: white;
    }

    .burger {
        display: block; /* Muestra el icono de la hamburguesa */
    }

    .nav-active {
        transform: translateX(0%);
    }

    @keyframes navLinkFade {
        from {
            opacity: 0;
            transform: translateX(50px);
        }
        to {
            opacity: 1;
            transform: translateX(0px);
        }
    }

    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .toggle .line2 {
        opacity: 0;
    }
    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0 10px;
    }
    .logo a {
        font-size: 24px;
    }
    .hero-content h1 {
        font-size: 2em;
    }
    .search-bar {
        flex-direction: column;
    }
    .search-bar input, .search-bar button {
        margin-bottom: 10px;
    }
    .footer-section {
        min-width: 100%;
        text-align: center;
    }
}

/* Estilos para job-detail.html */
.job-detail-section {
    padding: 30px;
    background-color: var(--background-white);
    border-radius: 10px;
    box-shadow: 0 4px 10px var(--shadow-light);
    margin-bottom: 30px;
}

.job-detail-card h2 {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.job-detail-card p.detail-company,
.job-detail-card p.detail-location,
.job-detail-card p.detail-type {
    font-size: 1.1em;
    color: var(--light-text-color);
    margin-bottom: 10px;
}

.job-detail-card p.detail-company i,
.job-detail-card p.detail-location i,
.job-detail-card p.detail-type i {
    color: var(--secondary-color);
    margin-right: 8px;
}

.job-detail-card .job-description {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.job-detail-card .job-description h3,
.job-detail-card h4 {
    font-size: 1.6em;
    color: var(--text-color);
    margin-bottom: 15px;
}

.job-detail-card .job-description p {
    font-size: 1em;
    line-height: 1.7;
    margin-bottom: 20px;
}

.job-detail-card ul {
    list-style: none;
    margin-bottom: 20px;
}

.job-detail-card ul li {
    font-size: 1em;
    line-height: 1.8;
    color: var(--light-text-color);
    margin-bottom: 8px;
}

.job-detail-card ul li i {
    color: var(--primary-color);
    margin-right: 10px;
}

.btn-apply {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: none;
    margin-top: 20px;
}

.btn-apply i {
    margin-right: 10px;
}

.btn-apply:hover {
    background-color: #218838;
}

.btn-back {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #6c757d; /* Gris para botón de volver */
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.btn-back:hover {
    background-color: #5a6268;
}

/* Clases para "no-results" */
.no-results {
    text-align: center;
    font-size: 1.2em;
    color: var(--light-text-color);
    padding: 40px;
    background-color: var(--background-white);
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-light);
}
