/**
 * Buenos Empleos - Estilos Personalizados
 * Paleta: Rojo Oscuro (#b91c1c) + Gris Oscuro (#374151)
 */

/* === VARIABLES DE COLOR === */
:root {
    --color-primary: #b91c1c;        /* Rojo oscuro principal */
    --color-primary-dark: #991b1b;   /* Rojo más oscuro */
    --color-secondary: #374151;      /* Gris oscuro */
    --color-accent: #dc2626;         /* Rojo brillante */
}

/* === BADGE NUEVO === */
.empleo-badge-nuevo {
    position: absolute;
    top: 0.9rem;
    right: 0.8rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.375rem 0.575rem;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}



/* === EMPLEO CARD MEJORADO === */
.empleo-card {
    position: relative;
    background: white;
    padding: 1.75rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e5e7eb;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.empleo-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px rgba(0,0,0,0.12), 0 0 0 1px var(--color-primary);
    border-color: var(--color-primary);
}

.empleo-header {
    margin-bottom: 1rem;
}

.empleo-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.4;
}

.empleo-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s;
}

.empleo-title a:hover {
    color: var(--color-primary);
}

.empleo-empresa {
    color: #6b7280;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.empleo-empresa strong {
    color: var(--color-secondary);
}

.empleo-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.empleo-tag {
    background: #f3f4f6;
    padding: 0.375rem 0.875rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.empleo-tag-categoria {
    background: #fef2f2;
    color: var(--color-primary-dark);
}

.empleo-salario {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    padding: 0.875rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #86efac;
}

.empleo-salario-label {
    font-size: 0.875rem;
    color: #166534;
    font-weight: 600;
}

.empleo-salario-valor {
    font-size: 1.25rem;
    font-weight: 700;
    color: #15803d;
}

.empleo-salario-valor small {
    font-size: 0.875rem;
    font-weight: 500;
}

.empleo-excerpt {
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex: 1;
}

.empleo-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    margin-top: auto;
}

.empleo-footer .btn-ver-mas {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.95rem;
}

.empleo-footer .btn-ver-mas svg {
    transition: transform 0.2s;
}

.empleo-footer .btn-ver-mas:hover svg {
    transform: translateX(4px);
}

.empleo-fecha {
    font-size: 0.875rem;
    color: #9ca3af;
}

/* === BLOG CARD MEJORADO === */
.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px rgba(0,0,0,0.15);
    border-color: var(--color-primary);
}

.blog-card:hover .blog-image {
    transform: scale(1.08);
}

.blog-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: #f3f4f6;
}

.blog-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(185, 28, 28, 0.95);
    backdrop-filter: blur(8px);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.3s;
}

.blog-category:hover {
    background: rgba(153, 27, 27, 0.95);
    transform: translateY(-2px);
}

.blog-content {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.blog-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.blog-meta-item svg {
    opacity: 0.7;
}

.blog-title {
    font-size: 1.375rem;
    margin-bottom: 0.875rem;
    line-height: 1.4;
    font-weight: 700;
}

.blog-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s;
}

.blog-title a:hover {
    color: var(--color-primary);
}

.blog-excerpt {
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex: 1;
}

.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    margin-top: auto;
}

.blog-author {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    color: var(--color-secondary);
}

.blog-author-avatar {
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

.blog-read-more {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.blog-read-more::after {
    content: '→';
    transition: transform 0.3s;
}

.blog-read-more:hover {
    color: var(--color-primary-dark);
}

.blog-read-more:hover::after {
    transform: translateX(4px);
}

/* === ANIMACIONES DE ENTRADA === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.empleo-card,
.blog-card {
    animation: fadeInUp 0.6s ease backwards;
}

.empleo-card:nth-child(1), .blog-card:nth-child(1) { animation-delay: 0.05s; }
.empleo-card:nth-child(2), .blog-card:nth-child(2) { animation-delay: 0.1s; }
.empleo-card:nth-child(3), .blog-card:nth-child(3) { animation-delay: 0.15s; }
.empleo-card:nth-child(4), .blog-card:nth-child(4) { animation-delay: 0.2s; }
.empleo-card:nth-child(5), .blog-card:nth-child(5) { animation-delay: 0.25s; }
.empleo-card:nth-child(6), .blog-card:nth-child(6) { animation-delay: 0.3s; }

/* === LOADING SPINNER === */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === CTA SECTIONS === */
.cta-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin: 4rem 0;
    border-radius: 16px;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-button {
    background: white;
    color: var(--color-primary);
    padding: 1rem 2.5rem;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    box-shadow: 0 10px 15px rgba(0,0,0,0.2);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 20px rgba(0,0,0,0.3);
}

/* === BREADCRUMBS MEJORADO === */
.breadcrumbs {
    padding: 1rem 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.breadcrumbs a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}


/* === CONFESIONES: SECCIÓN HOME === */
.confesiones-section {
    padding: 4rem 0;
    background: #fafafa;
}

.confesiones-section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.confesiones-section-desc {
    color: #6b7280;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.confesion-cta-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.confesion-cta-btn-outline:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

/* === CONFESIONES: GRID === */
.confesiones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* === CONFESIONES: HERO === */
.confesiones-hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
    color: white;
    padding: 3.5rem 0;
    text-align: center;
}

.confesiones-hero h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.confesiones-hero-sub {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* === CONFESIONES: FILTROS === */
.confesiones-filtros {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
    padding: 1rem 0;
}

.confesion-filtro-pill {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    color: #374151;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.confesion-filtro-pill:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.confesion-filtro-pill.active {
    background: #312e81;
    color: white;
    border-color: #312e81;
}

.confesion-filtro-count {
    background: rgba(0,0,0,0.1);
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
}

.confesion-filtro-pill.active .confesion-filtro-count {
    background: rgba(255,255,255,0.2);
}

/* === CONFESIONES: CARD === */
.confesion-card {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: row;
    height: 100%;
}

.confesion-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    border-color: #818cf8;
}

.confesion-card-accent {
    width: 5px;
    min-height: 100%;
    background: linear-gradient(180deg, #6366f1 0%, #4338ca 100%);
    flex-shrink: 0;
}

.confesion-card:nth-child(2n) .confesion-card-accent {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.confesion-card:nth-child(3n) .confesion-card-accent {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}

.confesion-card:nth-child(4n+1) .confesion-card-accent {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

.confesion-badge-nuevo {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
    color: white;
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}

.confesion-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.confesion-categoria-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: #eef2ff;
    color: #4338ca;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 0.75rem;
    align-self: flex-start;
    transition: background 0.2s;
}

.confesion-categoria-tag:hover {
    background: #e0e7ff;
}

.confesion-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.625rem;
}

.confesion-card-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s;
}

.confesion-card-title a:hover {
    color: #4338ca;
}

.confesion-card-excerpt {
    color: #6b7280;
    font-size: 0.925rem;
    line-height: 1.7;
    flex: 1;
    margin-bottom: 1rem;
}

.confesion-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
    margin-top: auto;
}

.confesion-card-meta {
    display: flex;
    gap: 1rem;
}

.confesion-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

.confesion-meta-item svg {
    opacity: 0.6;
}

.confesion-card-fecha {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Animación para confesion-card */
.confesion-card {
    animation: fadeInUp 0.6s ease backwards;
}
.confesion-card:nth-child(1) { animation-delay: 0.05s; }
.confesion-card:nth-child(2) { animation-delay: 0.1s; }
.confesion-card:nth-child(3) { animation-delay: 0.15s; }
.confesion-card:nth-child(4) { animation-delay: 0.2s; }

/* === CONFESIONES: FORMULARIO === */
.confesion-form-wrapper {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    margin: 4rem 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    border: 1px solid #e5e7eb;
}

.confesion-form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.confesion-form-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.confesion-form-header p {
    color: #6b7280;
    font-size: 1rem;
}

.confesion-form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.confesion-form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.confesion-form-group input[type="text"],
.confesion-form-group select,
.confesion-form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    color: #1f2937;
    background: #fafafa;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
    box-sizing: border-box;
}

.confesion-form-group input:focus,
.confesion-form-group select:focus,
.confesion-form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: white;
}

.confesion-form-group textarea {
    resize: vertical;
    min-height: 160px;
}

.confesion-char-count {
    position: absolute;
    right: 1rem;
    bottom: 0.75rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

.confesion-form-footer {
    text-align: center;
    margin-top: 2rem;
}

.confesion-btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
    color: white;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.confesion-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.confesion-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.confesion-form-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #9ca3af;
}

/* === CONFESIONES: ÉXITO === */
.confesion-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 1rem;
    gap: 1rem;
}

.confesion-success h3 {
    font-size: 1.5rem;
    color: #16a34a;
}

.confesion-success p {
    color: #6b7280;
    max-width: 400px;
}

.confesion-btn-otra {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    margin-top: 0.5rem;
}

.confesion-btn-otra:hover {
    background: #e5e7eb;
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
    .confesiones-grid {
        grid-template-columns: 1fr;
    }

    .confesion-form-wrapper {
        padding: 1.5rem;
        margin: 2rem 0;
    }

    .confesiones-hero h1 {
        font-size: 1.75rem;
    }

    .confesiones-filtros {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
    }

    .confesion-filtro-pill {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* === ACCESIBILIDAD === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}