﻿/* ============================================
   JOB DETAIL  Página pública de oferta
   ============================================ */

/*  Animations  */
@keyframes jobFadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes jobPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/*  Container  */
.job-page-container {
    max-width: 820px;
    margin: 2.5rem auto;
    padding: 0 1.25rem;
}

/*  Card  */
.job-page-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    animation: jobFadeInUp 0.4s ease-out both;
}

/*  Header  */
.job-page-header {
    background: #ffffff;
    padding: 2.5rem 2.5rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.job-page-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.job-page-header-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.job-page-header-actions .btn-apply {
    min-width: unset;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 6px;
    margin: 0;
}

.job-page-header-actions .btn-apply.applied {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.btn-icon-save {
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 1.6rem;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-save:hover {
    color: #111827;
}

.btn-icon-save.saved {
    color: #be185d;
}

.job-page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.job-page-header .company-name {
    font-size: 1.1rem;
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.job-page-header .company-name a {
    color: #0077B5;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.job-page-header .company-name a:hover {
    color: #005f94;
    text-decoration: underline;
}

.job-page-header .company-name i {
    color: #9ca3af;
}

/*  Body  */
.job-page-body {
    padding: 2rem 2.5rem;
    background: #ffffff;
}

/*  Info Grid  */
.job-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem 1rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f3f4f6;
}

.job-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.job-info-item .icon {
    font-size: 1.25rem;
    color: #0077B5;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.job-info-item .label {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.job-info-item .value {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1f2937;
    line-height: 1.3;
}

/*  Sections (collapsible cards)  */
.job-section {
    margin-bottom: 1.5rem;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.job-section h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: #ffffff;
    border-bottom: 1px solid transparent;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.job-section h3:hover {
    background: #f9fafb;
}

.job-section.open h3 {
    border-bottom-color: #e5e7eb;
}

.job-section h3 i:first-child {
    color: #6b7280;
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Chevron toggle */
.job-section-chevron {
    margin-left: auto;
    font-size: 0.875rem !important;
    color: #9ca3af !important;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.job-section.open .job-section-chevron {
    transform: rotate(180deg);
}

/* Collapsible body */
.job-section-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out, padding 0.2s ease-out;
    padding: 0 1.5rem;
    background: #ffffff;
}

.job-section.open .job-section-body {
    max-height: 2000px;
    padding: 1.5rem;
    transition: max-height 0.3s ease-in, padding 0.2s ease-in;
}

.job-section-content {
    color: #374151;
    line-height: 1.6;
    font-size: 0.95rem;
}

.job-schedule-note {
    margin-top: 1rem;
    color: #4b5563;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.job-schedule-note i {
    color: #9ca3af;
}

/*  Tags  */
.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.job-tag {
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 500;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: background-color 0.2s ease;
}

.job-tag:hover {
    background: #e5e7eb;
}

.job-tag i {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Subtle color variations for tags if needed, but keeping them muted */
.job-tag.blue {
    background: #eff6ff;
    color: #1d4ed8;
}

.job-tag.blue i {
    color: #3b82f6;
}

.job-tag.orange {
    background: #fff7ed;
    color: #c2410c;
}

.job-tag.orange i {
    color: #f59e0b;
}

.job-tag.purple {
    background: #faf5ff;
    color: #7e22ce;
}

.job-tag.purple i {
    color: #a855f7;
}

.job-tag.green {
    background: #f0fdf4;
    color: #15803d;
}

.job-tag.green i {
    color: #22c55e;
}

/*  Actions Bar  */
.job-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.job-actions-bar .btn {
    flex: 1;
    min-width: 160px;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.btn-apply {
    background: #0077B5;
    color: #ffffff;
    border: 1px solid transparent;
}

.btn-apply:hover {
    background: #005f94;
}

.btn-save {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-save:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-save.saved {
    background: #fdf2f8;
    color: #be185d;
    border-color: #fbcfe8;
}

.btn-save.saved i {
    color: #be185d;
}

.btn-save.saved:hover {
    background: #fce7f3;
    border-color: #f9a8d4;
}

.btn-map-link {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-map-link:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-map-link i {
    color: #6b7280;
}

/*  Share Section  */
.share-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.share-section h4 {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #4b5563;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s ease;
    text-decoration: none;
}

.share-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
}

.share-btn i {
    font-size: 1rem;
}

.share-btn.whatsapp:hover {
    color: #25D366;
    border-color: #25D366;
}

.share-btn.telegram:hover {
    color: #0088cc;
    border-color: #0088cc;
}

.share-btn.twitter:hover {
    color: #14171a;
    border-color: #14171a;
}

.share-btn.linkedin:hover {
    color: #0077B5;
    border-color: #0077B5;
}

.share-btn.copy:hover {
    color: #4b5563;
    border-color: #9ca3af;
}

/*  Loading & Error  */
.job-loading,
.job-error {
    text-align: center;
    padding: 6rem 2rem;
}

.job-loading i {
    font-size: 2rem;
    color: #0077B5;
    margin-bottom: 1rem;
    display: block;
    animation: jobPulse 1.5s ease-in-out infinite;
}

.job-loading p {
    color: #6b7280;
    font-size: 1rem;
    font-weight: 500;
}

.job-error i {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 1rem;
    display: block;
}

.job-error h2 {
    color: #111827;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.job-error p {
    color: #6b7280;
    margin-bottom: 0.5rem;
}

/*  Applied banner  */
.job-applied-banner {
    padding: 0.75rem 1.5rem;
    background: #f0fdf4;
    border-radius: 8px;
    color: #15803d;
    font-weight: 500;
    flex: 1;
    text-align: center;
    border: 1px solid #bbf7d0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/*  Tablet  */
@media (max-width: 768px) {
    .job-page-container {
        margin: 1.5rem auto;
    }

    .job-page-header {
        padding: 2rem 1.5rem 1.5rem;
    }

    .job-page-body {
        padding: 1.5rem;
    }

    .job-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .job-actions-bar {
        gap: 0.75rem;
    }

    .job-actions-bar .btn {
        min-width: 140px;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/*  Mobile  */
@media (max-width: 600px) {
    .job-page-container {
        margin: 1rem auto;
        padding: 0 0.75rem;
    }

    .job-page-card {
        border-radius: 10px;
    }

    .job-page-header {
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .job-page-header h1 {
        font-size: 1.35rem;
    }

    .job-page-header .company-name {
        font-size: 1rem;
    }

    .job-page-body {
        padding: 1.25rem;
    }

    .job-info-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .job-info-item {
        padding: 0.875rem;
    }

    .job-section h3 {
        font-size: 1rem;
        padding: 1rem 1.25rem;
    }

    .job-section-body {
        padding: 0 1.25rem;
    }

    .job-section.open .job-section-body {
        padding: 1.25rem;
    }

    .job-actions-bar {
        flex-direction: column;
    }

    .job-actions-bar .btn {
        min-width: unset;
        width: 100%;
    }

    .share-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .share-btn {
        justify-content: center;
        padding: 0.625rem;
        font-size: 0.85rem;
    }
}