/* 
   Hoja de estilos para ofertas y convocatorias 
   Respetando variables de public\css\encuentramusico\encuentramusico.css
*/

:root {
    --local-bg-light: #f8fcfd;
    --local-border-color: rgba(0, 0, 0, 0.08);
}

/* --- Layout & Typography --- */
body {
    background-color: #fdfdfd;
}

.job-detail-page {
    width: 100%;
    /* overflow-x: hidden; REMOVED to allow sticky on mobile if parent. But usually overflow-x hidden on a parent breaks sticky. */
    /* Instead use overflow-clip if supported, or ensure parents are visible. */
    overflow: visible;
    position: relative;
    max-width: 100vw;
}

/* Re-apply overflow-x hidden only for desktop if needed or use clip */
@media (min-width: 992px) {
    .job-detail-page {
        overflow-x: hidden;
    }
}

.job-detail-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* Headings */
.section-heading {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--footer-heading-color);
    margin-bottom: 2rem;
    /* Increased spacing */
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    position: relative;
}

.section-heading::after {
    content: none !important;
    display: none !important;
}

/* --- Hero Section Premium --- */
.job-hero {
    background: var(--accent-gradient);
    color: #fff;
    padding: 4rem 0 5rem;
    margin-bottom: -3rem;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    width: 100%;
    /* Ensure full width */
}

.job-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.6;
}

.job-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.job-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    backdrop-filter: none;
}


.job-title {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.job-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.95;
    flex-wrap: wrap;
}

/* --- Grid Layout --- */
.job-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 3rem;
    position: relative;
    z-index: 10;
    margin-top: 2rem;
    /* Added "Air" from hero */
}

.main-column {
    min-width: 0;
}

.sidebar-column {
    min-width: 0;
}

/* --- Cards Premium Style --- */
.content-card,
.sidebar-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
    padding: 2.5rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow-wrap: anywhere;
    word-break: break-word;
    /* Prevent long words breaking layout */
}

.content-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.sidebar-card {
    padding: 2rem;
    position: sticky;
    top: 2rem;
}

/* --- Specialties Accordion (New) --- */
.spec-accordion {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 1rem;
}

.spec-accordion-item {
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.spec-accordion-item:last-child {
    border-bottom: none;
}

.spec-accordion-header {
    width: 100%;
    padding: 1rem 1.5rem;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.spec-accordion-header:hover {
    background: #f8fafc;
}

.spec-cuerpo-name {
    font-weight: 700;
    color: #2d3748;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spec-toggle-hint {
    font-size: 0.85rem;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.spec-toggle-hint i {
    transition: transform 0.3s ease;
}

/* Open State */
.spec-accordion-item.active .spec-toggle-hint i {
    transform: rotate(180deg);
}

.spec-accordion-item.active .spec-accordion-header {
    background: #f1f5f9;
    color: var(--accent-color);
}

.spec-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out;
    background: #fff;
}

/* Internal Table Layout */
.spec-table {
    padding: 0;
    margin: 0;
    list-style: none;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    color: #4a5568;
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-row:hover {
    background: #fdfdfd;
}

.spec-row .name {
    font-weight: 500;
}

.spec-row .slots-pill {
    background: var(--accent-color);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 576px) {
    .spec-accordion-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 1rem;
    }

    .spec-toggle-hint {
        width: 100%;
        justify-content: space-between;
    }

    .spec-row {
        padding: 0.75rem 1rem;
    }
}

/* --- Text Expander --- */
.description-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #444;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.description-content.collapsed {
    max-height: 250px;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

.description-content p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.description-content h3,
.description-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #2d3748;
    font-weight: 700;
}

.description-content ul,
.description-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.description-content li {
    margin-bottom: 0.5rem;
}

.description-content strong {
    color: #2d3748;
    font-weight: 600;
}

.btn-read-more {
    display: table;
    margin: 1rem auto 0;
    color: var(--accent-color);
    background: #fff;
    border: 1px solid var(--Local-border-color);
    /* Fallback */
    padding: 0.6rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.btn-read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    color: var(--accent-color);
}

/* --- Sidebar Actions & Status --- */
.status-wrapper {
    text-align: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--local-border-color);
}

.status-badge {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.status-badge.open {
    background: #e6fffa;
    color: #16bd9c;
    border: 1px solid #b2f5ea;
}

.status-badge.pending {
    background: #f7fafc;
    color: #718096;
    border: 1px solid #edf2f7;
}

.status-badge.closed {
    background: #fff5f5;
    color: #fc8181;
    border: 1px solid #fed7d7;
}

/* --- Countdown --- */
.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 1rem;
}

.countdown-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 0.5rem;
    text-align: center;
    border: 1px solid #edf2f7;
}

.countdown-val {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent-color);
    line-height: 1;
}

.countdown-lbl {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #a0aec0;
    font-weight: 600;
}

/* --- Action Buttons --- */
.action-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1.1rem 1.5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    color: var(--footer-heading-color);
    font-weight: 600;
    margin-bottom: 0.8rem;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.action-btn:hover {
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(26, 137, 188, 0.15);
}

.action-btn i {
    color: var(--accent-color);
    font-size: 1.1rem;
}

.action-btn.primary {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
}

.action-btn.primary i {
    color: #fff;
}

.action-btn.primary:hover {
    box-shadow: 0 8px 25px rgba(26, 137, 188, 0.3);
}

/* --- Boletines --- */
.boletin-item {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: #fbfbfb;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
}

.boletin-item:hover {
    background: #fff;
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* --- Donation Card --- */
.donation-card {
    background: #fff;
    border: 2px solid #F57C00;
    text-align: center;
}

.donation-card h4 {
    color: #F57C00;
    margin-bottom: 0.5rem;
}

.donation-btn {
    background: #F57C00;
    color: #fff !important;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    display: inline-block;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(245, 124, 0, 0.3);
    transition: transform 0.2s;
}

.donation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 124, 0, 0.4);
}

/* --- AdSense --- */
.job-ad-container {
    background: #f8fcfd;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    margin: 2rem 0;
    text-align: center;
}

.ad-label {
    font-size: 0.7rem;
    color: #cbd5e0;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

/* --- Mobile / Tablet --- */
@media (max-width: 991px) {
    .job-grid {
        grid-template-columns: 100%;
        gap: 2rem;
    }

    .job-hero {
        margin-bottom: 0;
        clip-path: none;
        border-radius: 0 0 2.5rem 2.5rem;
        padding-bottom: 4rem;
    }

    .sidebar-card {
        position: static;
        width: 100%;
    }
}

@media (max-width: 576px) {

    /* Reset margins/paddings that might cause overflow */
    .job-detail-container {
        padding: 0 1rem;
    }

    .job-hero {
        padding: 3rem 0 4rem;
        border-radius: 0 0 2rem 2rem;
    }

    .job-title {
        font-size: 1.8rem;
    }

    .content-card,
    .sidebar-card {
        padding: 1.5rem;
        border-radius: 16px;
    }

    /* Specialties - List Mode (Smart Display) */
    .spec-list {
        display: flex;
        flex-direction: column;
        gap: 0;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        overflow: hidden;
    }

    .spec-badge {
        width: 100%;
        margin: 0;
        border: none;
        border-bottom: 1px solid #edf2f7;
        border-radius: 0;
        background: #fff;
        justify-content: space-between;
        padding: 1rem;
    }

    .spec-badge:last-child {
        border-bottom: none;
    }

    .spec-badge:nth-child(even) {
        background: #fafafa;
    }
}



/* Badge Refinement Global */
.spec-badge {
    min-height: 2.5rem;
}

/* --- Join Section (Copied from Home) --- */
.join-section {
    padding: 6rem 1.5rem;
    background: #161f22;
    /* Footer bg color */
    text-align: center;
    border-radius: 40px 40px 0 0;
    color: #fff;
    margin-top: 4rem;
}

.join-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
    color: #fff;
}

.join-section p {
    color: #94a3b8;
    margin-bottom: 2.5rem;
    font-size: 1.2rem;
}

.btn-join {
    background: var(--secondary-color, #16bdd9);
    color: #fff !important;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
}

.btn-join:hover {
    background: #14a88b;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(22, 189, 156, 0.2);
    color: #fff !important;
}

/* --- Admin Link Modern --- */
.admin-link-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-color);
    text-decoration: none;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    transition: all 0.2s ease;
}

.admin-link-modern:hover {
    color: var(--secondary-color, #16bd9c);
    transform: translateX(3px);
}

.admin-link-modern i {
    font-size: 0.9rem;
    transition: margin-left 0.2s;
}

.admin-link-modern:hover i {
    margin-left: 5px;
}

/* Icon box styling */
.admin-icon-box {
    width: 42px;
    height: 42px;
    background: #f0f9ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Mobile adjustments */
.admin-link-modern.mobile {
    margin-top: 0;
    padding: 0;
    font-size: 0.8rem;
}

.admin-icon-box.mobile {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
}

/* --- Share Buttons Premium --- */
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: #fff !important;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

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

.share-btn.whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.share-btn.whatsapp:hover {
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.share-btn.twitter {
    background: #000;
    color: #fff;
}