/* ==========================================================================
   Estilos de la página pública de empleos (/empleos).
   Extraído del <style> inline de resources/views/empleos.blade.php.
   ========================================================================== */

body { background: #f8fafc; }
.empleos-page { padding: 32px 0 64px; }

/* Mismos márgenes que el home (.container de landing-styles.css). */
.empleos-container { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
@media (max-width: 640px) { .empleos-container { padding: 0 16px; } }
@media (max-width: 380px) { .empleos-container { padding: 0 14px; } }

.empleos-header { margin-bottom: 28px; }
.empleos-eyebrow {
    display: inline-block; font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px; text-transform: uppercase; letter-spacing: .22em;
    color: #0f5edd; margin-bottom: 12px;
}
.empleos-title { font-size: 32px; font-weight: 800; color: #0f172a; line-height: 1.1; margin: 0; }
@media (min-width: 640px) { .empleos-title { font-size: 40px; } }
.empleos-sub { color: #64748b; margin-top: 10px; font-size: 15px; }

.empleos-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 16px; }
.empleos-breadcrumb a { color: #64748b; text-decoration: none; }
.empleos-breadcrumb a:hover { color: #0f5edd; }
.empleos-breadcrumb .sep { color: #cbd5e1; }
.empleos-breadcrumb [aria-current="page"] { color: #0f172a; font-weight: 600; }

/* Intro editorial por categoría */
.empleos-intro {
    color: #475569; font-size: 15px; line-height: 1.7; max-width: 760px;
    margin: 0 0 8px;
}

/* Buscador */
.empleos-search {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
    padding: 6px 6px 6px 16px; margin: 24px 0 8px;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.empleos-search:focus-within { border-color: #0f5edd; box-shadow: 0 4px 16px rgba(15,94,221,.12); }
.empleos-search > svg { color: #94a3b8; flex-shrink: 0; }
.empleos-search button svg { color: #fff; flex-shrink: 0; }
.empleos-search input {
    flex: 1; border: 0; outline: 0; background: transparent;
    font-size: 15px; color: #0f172a; min-width: 0;
}
.empleos-search input::placeholder { color: #94a3b8; }
.empleos-search button {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 40px; padding: 0 20px; border: 0; border-radius: 10px; cursor: pointer;
    background: linear-gradient(135deg, #0f5edd, #25ed8d); color: #fff;
    font-size: 14px; font-weight: 600; transition: transform .15s ease, filter .15s ease;
}
.empleos-search button:hover { transform: translateY(-1px); filter: brightness(1.05); }
.empleos-search .clear {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 8px; color: #94a3b8;
    text-decoration: none; flex-shrink: 0; transition: all .15s ease;
}
.empleos-search .clear:hover { background: #f1f5f9; color: #475569; }

/* Botón de filtros + panel */
.empleos-filterbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 4px; }
.empleos-filter-toggle {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 9px 16px; border-radius: 10px; border: 1px solid #e2e8f0;
    background: #fff; color: #475569; font-size: 14px; font-weight: 600;
    transition: all .15s ease;
}
.empleos-filter-toggle:hover { border-color: #0f5edd; color: #0f5edd; }
.empleos-filter-toggle .badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
    background: linear-gradient(135deg, #0f5edd, #25ed8d); color: #fff;
    font-size: 11px; font-weight: 700;
}
.empleos-filter-clear { font-size: 13px; color: #0f5edd; font-weight: 600; text-decoration: none; }
.empleos-filter-clear:hover { text-decoration: underline; }

.empleos-filters {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
    padding: 20px; margin: 12px 0 8px;
    display: grid; gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.empleos-filters[hidden] { display: none; }
.empleos-field { display: flex; flex-direction: column; gap: 8px; }
.empleos-field > legend,
.empleos-field > .label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .08em; color: #64748b; padding: 0; margin: 0;
}
.empleos-field select,
.empleos-field input[type="number"] {
    width: 100%; height: 42px; padding: 0 12px;
    border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc;
    font-size: 14px; color: #0f172a; outline: 0;
}
.empleos-field select:focus,
.empleos-field input[type="number"]:focus { border-color: #0f5edd; background: #fff; }
.empleos-salary-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Chips de radio (modalidad / tipo / moneda) */
.empleos-chipset { display: flex; flex-wrap: wrap; gap: 8px; }
/* Usamos box-shadow inset como "borde" para que el estado activo con
   degradado tenga esquinas redondeadas limpias (sin costura del
   border transparent). */
.empleos-rchip {
    position: relative; display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 14px; border-radius: 999px; border: 0;
    background: #fff; color: #475569; font-size: 13px; font-weight: 500;
    box-shadow: inset 0 0 0 1px #e2e8f0;
    cursor: pointer; transition: all .15s ease; user-select: none;
}
.empleos-rchip:hover { color: #0f5edd; box-shadow: inset 0 0 0 1px #0f5edd; }
.empleos-rchip input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.empleos-rchip:has(input:checked) {
    background: linear-gradient(135deg, #0f5edd, #25ed8d);
    color: #fff; box-shadow: 0 2px 10px rgba(15, 94, 221, .25);
}
.empleos-rchip .ic { display: inline-flex; align-items: center; }
.empleos-rchip .ic svg { width: 15px; height: 15px; }
.empleos-rchip .ic .sym { font-size: 15px; font-weight: 700; line-height: 1; }

/* Input de dinero con prefijo de moneda */
.empleos-money {
    display: flex; align-items: center; gap: 6px;
    border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc;
    padding: 0 10px; height: 42px;
}
.empleos-money:focus-within { border-color: #0f5edd; background: #fff; }
.empleos-money .cur { font-size: 13px; font-weight: 600; color: #94a3b8; flex-shrink: 0; }
.empleos-money input {
    border: 0 !important; background: transparent !important; height: 100% !important;
    padding: 0 !important; width: 100%; outline: 0; font-size: 14px; color: #0f172a;
}
.empleos-toggles { display: flex; flex-direction: column; gap: 10px; }
.empleos-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: #334155; }
.empleos-toggle input { width: 16px; height: 16px; accent-color: #0f5edd; }
.empleos-toggle svg { width: 15px; height: 15px; flex-shrink: 0; }
.empleos-toggle .star { color: #f59e0b; }
.empleos-toggle .zap { color: #ef4444; }

/* El campo de salario ocupa más ancho para inputs más largos */
.empleos-field--salary { grid-column: span 2; }
@media (max-width: 720px) { .empleos-field--salary { grid-column: span 1; } }
.empleos-filters-actions {
    grid-column: 1 / -1; display: flex; gap: 10px; align-items: center;
    justify-content: flex-end; border-top: 1px solid #f1f5f9; padding-top: 16px;
}
.empleos-filters-actions .reset {
    font-size: 14px; color: #64748b; text-decoration: none; font-weight: 500; padding: 0 8px;
}
.empleos-filters-actions .reset:hover { color: #0f172a; }
.empleos-filters-actions .apply {
    display: inline-flex; align-items: center; gap: 7px;
    height: 42px; padding: 0 24px; border: 0; border-radius: 10px; cursor: pointer;
    background: linear-gradient(135deg, #0f5edd, #25ed8d); color: #fff;
    font-size: 14px; font-weight: 600; transition: transform .15s ease, filter .15s ease;
}
.empleos-filters-actions .apply:hover { transform: translateY(-1px); filter: brightness(1.05); }

/* Cards de categorías */
.empleos-cats-label {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px; text-transform: uppercase; letter-spacing: .14em;
    color: #94a3b8; margin: 28px 0 12px;
}
.empleos-cats {
    display: grid; gap: 12px; margin-bottom: 8px;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}
.empleos-cat {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-radius: 14px;
    background: #fff; border: 1px solid #e2e8f0;
    text-decoration: none; transition: all .15s ease;
}
.empleos-cat:hover { border-color: #0f5edd; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,23,42,.06); }
.empleos-cat.is-active { border-color: transparent; background: linear-gradient(135deg, #0f5edd, #25ed8d); box-shadow: 0 6px 18px rgba(15,94,221,.22); }
.empleos-cat-icon {
    width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; background: rgba(15,94,221,.08); color: #0f5edd;
}
.empleos-cat.is-active .empleos-cat-icon { background: rgba(255,255,255,.22); color: #fff; }
.empleos-cat-body { min-width: 0; }
.empleos-cat-name {
    font-weight: 700; font-size: 14px; color: #0f172a; line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.empleos-cat.is-active .empleos-cat-name { color: #fff; }
.empleos-cat-count { font-size: 12px; color: #64748b; margin-top: 2px; }
.empleos-cat.is-active .empleos-cat-count { color: rgba(255,255,255,.85); }

.empleos-chips {
    display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 32px;
    padding-bottom: 8px;
}
.empleos-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 999px;
    background: #fff; border: 1px solid #e2e8f0;
    color: #475569; font-size: 13px; font-weight: 500;
    text-decoration: none; transition: all .15s ease;
    white-space: nowrap;
}
.empleos-chip:hover { border-color: #0f5edd; color: #0f5edd; }
.empleos-chip.is-active {
    background: linear-gradient(135deg, #0f5edd, #25ed8d);
    border-color: transparent; color: #fff;
}
.empleos-chip .count { font-size: 11px; opacity: .7; font-weight: 400; }
.empleos-chip.is-active .count { opacity: .9; }

.empleos-empty {
    text-align: center; padding: 64px 24px;
    background: #fff; border: 1px dashed #cbd5e1; border-radius: 16px;
}
.empleos-empty h3 { font-size: 18px; font-weight: 700; color: #0f172a; margin: 0 0 8px; }
.empleos-empty p { color: #64748b; font-size: 14px; margin: 0; }

/* Override del carrusel global de landing-styles.css: en /empleos
   queremos una grilla que se apile en filas (uno debajo de otro),
   no un scroll horizontal. Usamos !important + mayor especificidad. */
.hapleo-jc-scope .jobs-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px !important;
    overflow: visible !important;
    scroll-snap-type: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.hapleo-jc-scope .jobs-grid > .job-card {
    flex: initial !important;
    max-width: none !important;
    width: auto !important;
    scroll-snap-align: none !important;
}
@media (max-width: 960px) { .hapleo-jc-scope .jobs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 640px) { .hapleo-jc-scope .jobs-grid { grid-template-columns: 1fr !important; } }

/* Scroll infinito: spinner + fin de lista */
.empleos-loader { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 36px 0 8px; }
.empleos-loader[hidden] { display: none; }
.empleos-spinner {
    width: 30px; height: 30px; border-radius: 50%;
    border: 3px solid #e2e8f0; border-top-color: #0f5edd;
    animation: empleos-spin .7s linear infinite;
}
@keyframes empleos-spin { to { transform: rotate(360deg); } }
.empleos-loader-text { font-size: 13px; color: #94a3b8; }
.empleos-end { text-align: center; padding: 32px 0 8px; color: #94a3b8; font-size: 13px; }
.empleos-end[hidden] { display: none; }

.empleos-pagination { margin-top: 40px; display: flex; justify-content: center; }
.empleos-pagination nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.empleos-pagination span, .empleos-pagination a {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 12px; border-radius: 10px;
    font-size: 14px; font-weight: 500; text-decoration: none;
    background: #fff; border: 1px solid #e2e8f0; color: #475569;
    transition: all .15s ease;
}
.empleos-pagination a:hover { border-color: #0f5edd; color: #0f5edd; }
.empleos-pagination .bg-blue-600,
.empleos-pagination [aria-current="page"] > span {
    background: #0f5edd; color: #fff; border-color: #0f5edd;
}
.empleos-pagination .cursor-not-allowed,
.empleos-pagination [aria-disabled="true"] { opacity: .5; }
