/*
Theme Name: Buenos Empleos
Theme URI: https://buenosempleos.com
Author: Buenos Empleos Team
Author URI: https://buenosempleos.com
Description: Tema profesional para portal de empleos con SEO optimizado
Version: 2.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: buenos-empleos
Tags: employment, jobs, seo-optimized, responsive, custom
*/

/* ============================================
   RESET Y BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #b91c1c;
    --primary-dark: #991b1b;
    --primary-light: #dc2626;
    --secondary: #374151;
    --accent: #dc2626;
    --text: #1f2937;
    --text-light: #6b7280;
    --gray: #6b7280;
    --light-gray: #f3f4f6;
    --border: #e5e7eb;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
    --gradient-primary: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: #fafbfc;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: relative;
}

.site-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s;
}

.site-logo a:hover {
    opacity: 0.85;
}

.site-logo img {
    height: 45px;
    width: auto;
    display: block;
}

.site-logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
}

.site-logo-text .highlight {
    color: var(--primary);
}

/* ============================================
   NAVEGACIÓN
   ============================================ */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.main-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-nav li {
    margin: 0;
}

.main-nav a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s;
    display: block;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
    color: var(--primary);
}

.main-nav a:hover::after,
.main-nav .current-menu-item > a::after,
.main-nav .current_page_item > a::after {
    width: 100%;
}

/* ============================================
   HERO
   ============================================ */
.hero-section {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ============================================
   BÚSQUEDA
   ============================================ */
.search-box {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    max-width: 900px;
    margin: 0 auto;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 1rem;
}

.search-input {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.1);
}

.btn-search {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-search:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* ============================================
   EMPLEOS
   ============================================ */
.empleos-section {
    padding: 4rem 0;
    background: #fafbfc;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

.empleos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.empleo-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.empleo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.empleo-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.empleo-title a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s;
}

.empleo-title a:hover {
    color: var(--primary);
}

.empleo-empresa {
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.empleo-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.empleo-tag {
    background: var(--light-gray);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.empleo-excerpt {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.btn-ver-mas {
    background: var(--primary);
    color: var(--white);
    padding: 0.625rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-ver-mas:hover {
    background: var(--primary-dark);
    transform: translateX(2px);
}

/* ============================================
   BLOG
   ============================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.blog-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.blog-card:hover .blog-image {
    transform: scale(1.05);
}

.blog-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: var(--light-gray);
}

.blog-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary);
    color: var(--white);
    padding: 0.375rem 0.875rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-content {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.blog-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.blog-meta-item::before {
    content: '•';
    color: var(--border);
    font-weight: bold;
}

.blog-meta-item:first-child::before {
    content: '';
}

.blog-title {
    font-size: 1.375rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    font-weight: 700;
}

.blog-title a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s;
}

.blog-title a:hover {
    color: var(--primary);
}

.blog-excerpt {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    flex: 1;
}

.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.blog-read-more {
    color: var(--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(--primary-dark);
}

.blog-read-more:hover::after {
    transform: translateX(4px);
}

/* ============================================
   SINGLE POST
   ============================================ */
.single-post-header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.single-post-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.post-meta-single {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    opacity: 0.95;
}

.post-content {
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.post-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.post-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.375rem;
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--text);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumbs {
    padding: 1rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .empleos-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* ============================================
   RESPONSIVE - MÓVIL
   ============================================ */
@media (max-width: 768px) {
    .search-form {
        grid-template-columns: 1fr;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .empleos-grid,
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .post-content {
        padding: 2rem 1.5rem;
    }
    
    .single-post-header h1 {
        font-size: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .search-box {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .blog-grid {
        gap: 1rem;
    }
    
    .post-content {
        padding: 1.5rem 1rem;
    }
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card {
    animation: fadeInUp 0.6s ease backwards;
}

.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }
.blog-card:nth-child(4) { animation-delay: 0.4s; }
.blog-card:nth-child(5) { animation-delay: 0.5s; }
.blog-card:nth-child(6) { animation-delay: 0.6s; }

/* ============================================
   ACCESIBILIDAD
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Foco visible para teclado */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}