/* ============================================
   HOME PAGE — FindYourLocalJob
   Estilo landing tipo Airbnb
   ============================================ */

html {
    overflow-x: clip;
    width: 100%;
    background: #1a1a2e;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: clip;
    width: 100%;
    max-width: 100%;
    position: relative;
    background: #fff;
    color: #1a1a2e;
}

/* Corrige la línea de sub-píxel del borde derecho en móvil */
@media (max-width: 768px) {
    .hero,
    .categories-section,
    .recent-jobs-section,
    .map-banner-section,
    .how-section,
    .cta-section,
    .home-footer {
        margin-right: -2px;
        padding-right: 2px;
    }

    .hero-bg {
        right: -2px;
    }

    .nav-header {
        width: 100vw !important;
    }
}

/* ── Contenedor genérico ── */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 32px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.section-header .section-title {
    margin: 0;
}

.section-see-all {
    color: #0077B5;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}

.section-see-all:hover {
    gap: 10px;
}

/* ══════════════════════════════════════
   HERO
   ══════════════════════════════════════ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 56px; /* nav height */
    box-sizing: border-box;
    width: 100%;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #0077B5 0%, #005885 40%, #1a1a2e 100%);
    z-index: 0;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(0, 160, 220, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 24px;
    max-width: 800px;
    width: 100%;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    line-height: 1.1;
    margin: 0 0 20px 0;
    letter-spacing: -1px;
}

.hero h1 span {
    background: linear-gradient(135deg, #00D4FF, #00A0DC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 40px 0;
    line-height: 1.5;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Barra de búsqueda ── */
.hero-search {
    display: flex;
    align-items: stretch;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
    overflow: visible;
    max-width: 680px;
    margin: 0 auto 28px;
    position: relative;
}

.hero-search-field {
    flex: 1;
    padding: 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.hero-search-field label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-search-field label i {
    color: #0077B5;
    font-size: 0.75rem;
}

.hero-search-field input {
    border: none;
    outline: none;
    font-size: 0.95rem;
    color: #333;
    background: none;
    padding: 0;
    width: 100%;
}

.hero-search-field input::placeholder {
    color: #aaa;
}

.hero-search-field--location {
    position: relative;
}

.hero-location-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 100;
    max-height: 260px;
    overflow-y: auto;
}

.hero-location-suggestions.active {
    display: block;
}

.hero-suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    transition: background 0.15s;
    border-bottom: 1px solid #f0f0f0;
}

.hero-suggestion-item:last-child {
    border-bottom: none;
}

.hero-suggestion-item:hover {
    background: #f0f7ff;
}

.hero-suggestion-item i {
    color: #0077B5;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.hero-suggestion-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-search-divider {
    width: 1px;
    background: #e8e8e8;
    margin: 12px 0;
    flex-shrink: 0;
}

.hero-search-btn {
    background: linear-gradient(135deg, #0077B5, #005885);
    color: white;
    border: none;
    padding: 0 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s;
    flex-shrink: 0;
    border-radius: 0 16px 16px 0;
}

.hero-search-btn:hover {
    background: linear-gradient(135deg, #006399, #004a6e);
}

/* ── CTA mapa ── */
.hero-map-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 28px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    transition: all 0.3s;
}

.hero-map-cta:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
    transform: translateY(-2px);
}

.hero-map-cta i {
    font-size: 1.1rem;
}

/* ── Scroll hint ── */
.hero-scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    animation: bounceDown 2s ease-in-out infinite;
}

@keyframes bounceDown {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ══════════════════════════════════════
   CATEGORÍAS
   ══════════════════════════════════════ */

.categories-section {
    padding: 80px 0 60px;
    background: #f8fafc;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    background: white;
    border-radius: 16px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
    transition: all 0.25s;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 119, 181, 0.12);
    border-color: #0077B5;
}

.category-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #e8f4fd, #d6ecf9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #0077B5;
    transition: all 0.25s;
}

.category-card:hover .category-icon {
    background: linear-gradient(135deg, #0077B5, #00A0DC);
    color: white;
}

/* ══════════════════════════════════════
   EMPLEOS RECIENTES
   ══════════════════════════════════════ */

.recent-jobs-section {
    padding: 60px 0 80px;
}

.jobs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.jobs-grid-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.jobs-grid-loading i {
    font-size: 2rem;
    margin-bottom: 12px;
    color: #0077B5;
}

.job-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.job-card-header {
    background: #0077B5;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 16px 16px 0 0;
}

.job-card-company-name {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.job-card-company-btn {
    font-size: 0.78rem;
    color: #0077B5;
    background: #fff;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
}

.job-card-company-btn:hover {
    background: #e6f0f7;
    transform: scale(1.03);
}

.job-card-content {
    padding: 14px 16px 0;
}

.job-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.job-card-body {
    padding: 0 16px;
    flex: 1;
}

.job-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.job-card-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: #666;
    background: #f5f7fa;
    padding: 4px 10px;
    border-radius: 6px;
}

.job-card-tag i {
    color: #0077B5;
    font-size: 0.75rem;
}

.job-card-description {
    display: none;
}

.job-card-footer {
    padding: 12px 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.job-card-salary {
    display: none;
}

.job-card-action {
    font-size: 0.85rem;
    color: #0077B5;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.job-card-apply-btn {
    background: #0077B5;
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
}
.job-card-apply-btn:hover {
    background: #005f8f;
}

.jobs-grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.jobs-grid-empty i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 16px;
    display: block;
}

/* ══════════════════════════════════════
   BANNER MAPA
   ══════════════════════════════════════ */

.map-banner {
    padding: 60px 0;
    background: linear-gradient(160deg, #f0f6fc 0%, #e3f0fa 100%);
}

.map-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.map-banner-text h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.map-banner-text h2 i {
    color: #0077B5;
}

.map-banner-text p {
    color: #555;
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0 0 28px 0;
}

.map-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #0077B5, #005885);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(0, 119, 181, 0.3);
}

.map-banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 119, 181, 0.4);
}

/* Mockup del mapa */
.map-preview-mockup {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: linear-gradient(145deg, #d4e8d1 0%, #c8dcc5 30%, #b8d0b5 60%, #e8e0d0 100%);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.map-preview-mockup::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 48%, rgba(180, 180, 200, 0.3) 48%, rgba(180, 180, 200, 0.3) 52%, transparent 52%),
        linear-gradient(0deg, transparent 48%, rgba(180, 180, 200, 0.3) 48%, rgba(180, 180, 200, 0.3) 52%, transparent 52%);
    background-size: 80px 80px;
    opacity: 0.5;
}

.map-preview-pin {
    position: absolute;
    width: 36px;
    height: 36px;
    background: #0077B5;
    border: 3px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: pinFloat 3s ease-in-out infinite;
    z-index: 1;
}

.map-preview-pin:nth-child(2) { animation-delay: 0.5s; }
.map-preview-pin:nth-child(3) { animation-delay: 1s; }
.map-preview-pin:nth-child(4) { animation-delay: 1.5s; }
.map-preview-pin:nth-child(5) { animation-delay: 2s; }

@keyframes pinFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.map-preview-user {
    position: absolute;
    top: 48%;
    left: 50%;
    width: 44px;
    height: 44px;
    background: #ff9800;
    border: 3px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 0 0 8px rgba(255, 152, 0, 0.2);
    z-index: 2;
}

/* ══════════════════════════════════════
   CÓMO FUNCIONA
   ══════════════════════════════════════ */

.how-section {
    padding: 80px 0;
}

.how-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
}

.how-step {
    text-align: center;
    max-width: 260px;
    position: relative;
}

.how-step-number {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 32px;
    height: 32px;
    background: #0077B5;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    z-index: 1;
}

.how-step-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #e8f4fd, #d6ecf9);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #0077B5;
}

.how-step h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #1a1a2e;
}

.how-step p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.how-step-arrow {
    display: flex;
    align-items: center;
    color: #ccc;
    font-size: 1.5rem;
    padding-top: 30px;
}

/* ══════════════════════════════════════
   CTAs
   ══════════════════════════════════════ */

.cta-section {
    padding: 60px 0 80px;
    background: #f8fafc;
}

.cta-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.cta-card {
    padding: 40px;
    border-radius: 20px;
    text-align: center;
}

.cta-candidate {
    background: linear-gradient(135deg, #0077B5 0%, #005885 100%);
    color: white;
}

.cta-company {
    background: linear-gradient(135deg, #1a1a2e 0%, #2a2a4e 100%);
    color: white;
}

.cta-card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.cta-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 12px 0;
}

.cta-card p {
    font-size: 1rem;
    opacity: 0.85;
    line-height: 1.5;
    margin: 0 0 24px 0;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.cta-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: white;
    color: #0077B5;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.cta-company .cta-card-btn {
    color: #1a1a2e;
}

.cta-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ══════════════════════════════════════
   FOOTER
   ══════════════════════════════════════ */

.home-footer {
    background: #1a1a2e;
    color: white;
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-brand .footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-brand .footer-logo img {
    height: 28px;
    width: 28px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

.footer-links h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 16px 0;
    color: rgba(255, 255, 255, 0.5);
}

.footer-links a {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 4px 0;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #00D4FF;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */

@media (max-width: 1024px) {
    .hero h1 {
        font-size: 2.8rem;
    }

    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }

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

    .map-banner-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .map-banner-preview {
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 100vh;
        padding-top: 50px; /* mobile nav height */
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-search {
        flex-direction: column;
        border-radius: 16px;
    }

    .hero-search-divider {
        width: 100%;
        height: 1px;
        margin: 0;
    }

    .hero-search-btn {
        padding: 14px;
        justify-content: center;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .category-card {
        padding: 18px 12px;
    }

    .jobs-grid {
        grid-template-columns: 1fr;
    }

    .how-steps {
        flex-direction: column;
        align-items: center;
    }

    .how-step-arrow {
        transform: rotate(90deg);
        padding: 0;
    }

    .cta-cards {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .categories-section {
        padding: 60px 0 40px;
    }

    .recent-jobs-section {
        padding: 40px 0 60px;
    }

    .how-section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-map-cta {
        font-size: 0.9rem;
        padding: 10px 20px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .category-card {
        padding: 16px 10px;
        gap: 8px;
        font-size: 0.8rem;
    }

    .category-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
        border-radius: 12px;
    }

    .cta-card {
        padding: 28px 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .map-banner-content {
        gap: 30px;
    }

    .map-banner-text h2 {
        font-size: 1.4rem;
    }
}
