/* ============================================================
   PORTAL PÚBLICO — Estilos
   ============================================================ */

/* ---------- BASE ---------- */
.layout-public {
    background: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.public-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.public-main { flex: 1; }

/* ---------- TOPBAR ---------- */
.public-topbar {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.public-topbar__inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.public-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.public-brand:hover { text-decoration: none; }
.public-brand__logo {
    height: 46px;
    width: auto;
}
.public-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}
.public-nav__link {
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background .15s, color .15s;
}
.public-nav__link:hover {
    background: #f3f4f6;
    color: #1e40af;
    text-decoration: none;
}
.public-nav__link.active {
    color: #1e40af;
    font-weight: 600;
}

/* ---------- HERO ---------- */
.public-hero {
    background: linear-gradient(135deg, #1e40af 0%, #0ea5e9 100%);
    color: #ffffff;
    padding: 64px 0 72px;
}
.public-hero__title {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}
.public-hero__subtitle {
    font-size: 17px;
    opacity: .9;
    margin-bottom: 32px;
}

.public-search {
    display: flex;
    gap: 8px;
    background: #ffffff;
    padding: 8px;
    border-radius: 12px;
    max-width: 720px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.public-search__input {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
}
.public-search__icon {
    font-size: 18px;
    color: #9ca3af;
}
.public-search__input input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 0;
    font-size: 15px;
    font-family: inherit;
    background: transparent;
    color: #111827;
}

/* ---------- CONTENT ---------- */
.public-content {
    padding: 40px 0 64px;
}

.public-results-count {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
}

/* ---------- FILTROS ---------- */
.public-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 24px;
}
.public-filters__label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
    margin-right: 4px;
}
.public-filters__item {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    text-decoration: none;
    transition: all .15s;
}
.public-filters__item:hover {
    border-color: #1e40af;
    color: #1e40af;
    text-decoration: none;
}
.public-filters__item.is-active {
    background: #1e40af;
    color: #ffffff;
    border-color: #1e40af;
}

/* ---------- GRID ---------- */
.public-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

/* ---------- JOB CARD ---------- */
.job-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: all .2s;
    position: relative;
}
.job-card:hover {
    border-color: #1e40af;
    box-shadow: 0 8px 24px rgba(30,64,175,.12);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}
.job-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.job-card__badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.job-card__badge--presencial { background: #dbeafe; color: #1e40af; }
.job-card__badge--remoto     { background: #d1fae5; color: #065f46; }
.job-card__badge--hibrido    { background: #ede9fe; color: #5b21b6; }

.job-card__date {
    font-size: 12px;
    color: #9ca3af;
}
.job-card__title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.3;
}
.job-card__location {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
}
.job-card__description {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.55;
    margin-bottom: 20px;
    flex: 1;
}
.job-card__footer {
    border-top: 1px solid #f3f4f6;
    padding-top: 14px;
}
.job-card__cta {
    font-size: 13px;
    font-weight: 600;
    color: #1e40af;
}

/* ---------- EMPTY ---------- */
.public-empty {
    text-align: center;
    padding: 80px 20px;
    background: #ffffff;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
}
.public-empty__icon {
    font-size: 52px;
    display: block;
    margin-bottom: 16px;
    opacity: .5;
}
.public-empty h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #111827;
}
.public-empty p {
    color: #6b7280;
    margin-bottom: 20px;
}

/* ============================================================
   DETALLE DE VACANTE
   ============================================================ */
.public-detail-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 32px 0;
}
.public-back {
    display: inline-block;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
    text-decoration: none;
}
.public-back:hover {
    color: #1e40af;
    text-decoration: none;
}
.public-detail-header__content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}
.public-detail-title {
    font-size: 32px;
    font-weight: 800;
    color: #111827;
    margin: 8px 0 12px;
    line-height: 1.2;
}
.public-detail-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #6b7280;
}

.public-detail-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
}

.public-detail-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.public-detail-block {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px;
}
.public-detail-block--info {
    background: #eff6ff;
    border-color: #bfdbfe;
}
.public-detail-block__title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 14px;
}
.public-detail-block__content {
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
}

.public-detail-cta {
    background: linear-gradient(135deg, #1e40af 0%, #0ea5e9 100%);
    color: #ffffff;
    padding: 32px;
    border-radius: 12px;
    text-align: center;
}
.public-detail-cta h3 {
    font-size: 20px;
    margin-bottom: 8px;
}
.public-detail-cta p {
    opacity: .9;
    margin-bottom: 20px;
    font-size: 14px;
}

.public-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 96px;
}
.public-sidebar-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}
.public-sidebar-card--cta {
    background: #f8fafc;
    text-align: center;
}
.public-sidebar-card__title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #6b7280;
    margin-bottom: 14px;
}
.public-summary-list {
    list-style: none;
}
.public-summary-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}
.public-summary-list li:last-child { border-bottom: none; }
.public-summary-list__label { color: #6b7280; }
.public-summary-list__value { color: #111827; font-weight: 600; text-align: right; }

.btn--lg {
    padding: 14px 28px;
    font-size: 15px;
}

/* ---------- FOOTER ---------- */
.public-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 48px 0 24px;
    margin-top: 64px;
}
.public-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}
.public-footer__title {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}
.public-footer__list {
    list-style: none;
}
.public-footer__list li {
    margin-bottom: 8px;
    font-size: 13px;
}
.public-footer__list a {
    color: #94a3b8;
    text-decoration: none;
}
.public-footer__list a:hover {
    color: #ffffff;
    text-decoration: none;
}
.public-footer__bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 20px;
    text-align: center;
    font-size: 12px;
}

/* ============================================================
   FORMULARIO DE APLICACIÓN
   ============================================================ */

.public-apply {
    padding: 40px 0 64px;
}

.public-apply__header {
    margin-bottom: 32px;
}
.public-apply__title {
    font-size: 30px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 6px;
}
.public-apply__subtitle {
    font-size: 15px;
    color: #6b7280;
}

.public-apply__grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
}

.public-apply__main {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px;
}

.public-apply__instructions {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #1e40af;
}
.public-apply__instructions p {
    margin-top: 4px;
    color: #374151;
}

.public-apply__form .form-group {
    margin-bottom: 22px;
}

.public-apply__sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 96px;
}

.apply-steps {
    padding-left: 20px;
    font-size: 13px;
    line-height: 1.7;
    color: #4b5563;
}
.apply-steps li { margin-bottom: 8px; }

/* ---------- FILE UPLOAD ---------- */
.file-upload {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    transition: all .15s;
    overflow: hidden;
}
.file-upload:hover {
    border-color: #1e40af;
    background: #eff6ff;
}
.file-upload.is-invalid {
    border-color: #dc2626;
    background: #fef2f2;
}
.file-upload.has-file {
    border-color: #10b981;
    background: #f0fdf4;
}

.file-upload input[type="file"] {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.file-upload__label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    cursor: pointer;
    text-align: center;
    gap: 6px;
}
.file-upload__icon {
    font-size: 32px;
    margin-bottom: 4px;
}
.file-upload__text {
    font-size: 14px;
    font-weight: 600;
    color: #1e40af;
}
.file-upload__hint {
    font-size: 12px;
    color: #9ca3af;
}
.file-upload.has-file .file-upload__text { color: #065f46; }

/* ---------- TERMS BOX ---------- */
.terms-box {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 4px;
}
.terms-box strong {
    display: block;
    padding: 10px 14px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
}
.terms-box__content {
    padding: 14px;
    font-size: 13px;
    line-height: 1.6;
    color: #4b5563;
    max-height: 180px;
    overflow-y: auto;
}

/* ============================================================
   PANTALLA DE GRACIAS
   ============================================================ */

.public-thanks {
    padding: 64px 0;
}

.thanks-card {
    max-width: 640px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 48px 40px;
    text-align: center;
    box-shadow: 0 12px 32px rgba(0,0,0,.06);
}

.thanks-card__icon {
    font-size: 64px;
    margin-bottom: 16px;
    line-height: 1;
}

.thanks-card__title {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 12px;
}

.thanks-card__message {
    font-size: 15px;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 20px;
}

.thanks-card__vacante {
    display: inline-block;
    background: #eff6ff;
    color: #1e40af;
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 15px;
    margin-bottom: 24px;
}

.thanks-card__info {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 28px;
    text-align: left;
    font-size: 14px;
}
.thanks-card__info p {
    margin: 4px 0;
    color: #374151;
}

.thanks-card__steps {
    text-align: left;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 28px;
}
.thanks-card__steps h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #065f46;
    margin-bottom: 12px;
}
.thanks-card__steps ul {
    list-style: none;
    padding: 0;
}
.thanks-card__steps li {
    font-size: 14px;
    color: #374151;
    padding: 6px 0;
    line-height: 1.5;
}

.thanks-card__actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .public-apply__grid { grid-template-columns: 1fr; }
    .public-apply__sidebar { position: static; }
    .public-apply__main { padding: 20px; }
    .thanks-card { padding: 32px 24px; }
    .thanks-card__title { font-size: 22px; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .public-hero__title { font-size: 28px; }
    .public-search { flex-direction: column; }
    .public-search .btn { width: 100%; }
    .public-detail-grid { grid-template-columns: 1fr; }
    .public-detail-sidebar { position: static; }
    .public-footer__grid { grid-template-columns: 1fr; gap: 24px; }
    .public-detail-header__content { flex-direction: column; align-items: flex-start; }
}