/* ============================================
   MI PINCHA - HOJA DE ESTILOS PRINCIPAL
   ============================================ */

:root {
    --brand-orange: #EE751B;
    --brand-blue: #163961;
    --dark-bg: #0f172a;
    --dark-card: #1e293b;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
}

/* ============================================
   SPLASH SCREEN
   ============================================ */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease;
}

#splash-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.splash-logo {
    width: min(128px, 30vw);
    height: auto;
    object-fit: contain;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.loading-bar-container {
    width: min(256px, 60vw);
    height: 4px;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 2rem;
}

.loading-bar {
    height: 100%;
    background: var(--brand-orange);
    border-radius: 9999px;
    animation: loading-bar 1.5s ease-in-out infinite;
}

@keyframes loading-bar {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* ============================================
   MENÚ HAMBURGUESA
   ============================================ */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.3s ease;
}

#mobileMenu.open {
    max-height: 800px;
    visibility: visible;
}

/* ============================================
   BOTTOM NAVIGATION - MÓVIL
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0 calc(0.5rem + var(--safe-bottom));
    z-index: 50;
    margin: 0;
}

.dark .bottom-nav {
    background: var(--dark-card);
    border-top-color: #334155;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.5rem;
    color: #6b7280;
    font-size: 0.7rem;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    flex: 1;
    max-width: 25%;
}

.bottom-nav-item.active {
    color: var(--brand-orange);
}

.bottom-nav-item svg {
    width: 22px;
    height: 22px;
}

/* ============================================
   COMPONENTES GENERALES
   ============================================ */
.btn-tactile {
    transition: all 0.15s ease;
    touch-action: manipulation;
    cursor: pointer;
}

.btn-tactile:active,
.btn-tactile.touch-active {
    transform: scale(0.97);
    opacity: 0.9;
}

.modal-bg {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.autocomplete-list {
    max-height: 200px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.kpi-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
}

.dark .kpi-card {
    background: var(--dark-card);
    border-color: #334155;
}

.kpi-value {
    font-size: clamp(1.5rem, 4vw, 1.875rem);
    font-weight: 800;
    color: var(--brand-orange);
    margin-bottom: 0.25rem;
}

.kpi-label {
    font-size: clamp(0.65rem, 2vw, 0.75rem);
    color: #6b7280;
    font-weight: 500;
}

.dark .kpi-label {
    color: #9ca3af;
}

.loc-checkbox {
    accent-color: var(--brand-orange);
}

/* ============================================
   HORMIGAS MÁS GRANDES EN BANNERS
   ============================================ */
.ant-hero-large {
    width: 100%;
    max-width: 420px;
}

@media (min-width: 1024px) {
    .ant-hero-large {
        max-width: 520px;
    }
}

.ant-banner-cta {
    width: 200px !important;
    height: 200px !important;
}

@media (min-width: 1024px) {
    .ant-banner-cta {
        width: 280px !important;
        height: 280px !important;
    }
}

/* ============================================
   LUPA MÁS GRANDE EN BUSCADOR PRINCIPAL
   ============================================ */
.search-icon-large {
    width: 24px !important;
    height: 24px !important;
    opacity: 0.8 !important;
}

/* ============================================
   AVATAR EN TARJETAS DE PUBLICACIONES
   ============================================ */
.job-avatar, .candidate-avatar {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    flex-shrink: 0;
}

.dark .job-avatar, .dark .candidate-avatar {
    border-color: #334155;
}

.candidate-avatar {
    border-radius: 50%;
    border-color: #EE751B;
}

/* ============================================
   INPUT DE ARCHIVO PERSONALIZADO
   ============================================ */
.file-upload-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-upload-preview {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px dashed #d1d5db;
    background: #f9fafb;
}

.dark .file-upload-preview {
    border-color: #4b5563;
    background: #1f2937;
}

.file-upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* ============================================
   CARRUSEL INFINITO DE EMPRESAS
   ============================================ */
.carousel-container {
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 2rem 0;
}

.carousel-track {
    display: flex;
    gap: 4rem;
    animation: scroll 30s linear infinite;
    width: max-content;
}

.carousel-track:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.carousel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.carousel-item:hover {
    opacity: 1;
}

.carousel-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.carousel-item:hover .carousel-logo {
    filter: grayscale(0%);
}

.carousel-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-align: center;
}

.dark .carousel-name {
    color: #9ca3af;
}

.carousel-link {
    font-size: 0.75rem;
    color: var(--brand-orange);
    text-decoration: none;
    transition: color 0.2s ease;
}

.carousel-link:hover {
    color: #d97706;
    text-decoration: underline;
}

/* ============================================
   TABS DEL BUSCADOR
   ============================================ */
.search-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.dark .search-tabs {
    border-bottom-color: #374151;
}

.search-tab {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.search-tab.active {
    color: var(--brand-orange);
    border-bottom-color: var(--brand-orange);
}

.search-tab:hover:not(.active) {
    color: #374151;
}

.dark .search-tab:hover:not(.active) {
    color: #d1d5db;
}

/* ============================================
   IMÁGENES RESPONSIVAS
   ============================================ */
img, svg {
    max-width: 100%;
    height: auto;
}

/* ============================================
   BREAKPOINTS RESPONSIVE
   ============================================ */
@media (max-width: 479px) {
    html { font-size: 14px; }
    .bottom-nav-item { font-size: 0.65rem; padding: 0.4rem 0.3rem; }
    .bottom-nav-item svg { width: 20px; height: 20px; }
    main { padding-bottom: 4.5rem; }
    footer { margin-bottom: 4.5rem; }
    input, select, textarea { font-size: 16px; }
}

@media (min-width: 480px) and (max-width: 768px) {
    main { padding-bottom: 5rem; }
    footer { margin-bottom: 5rem; }
    input, select, textarea { font-size: 16px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .bottom-nav { display: none; }
    main { padding-bottom: 0; }
    footer { margin-bottom: 0; }
}

@media (min-width: 1025px) {
    .bottom-nav { display: none; }
    main { padding-bottom: 0; }
    footer { margin-bottom: 0; }
}

@media (orientation: landscape) and (max-height: 500px) {
    .bottom-nav { padding: 0.3rem 0 calc(0.3rem + var(--safe-bottom)); }
    .bottom-nav-item { padding: 0.3rem 0.5rem; font-size: 0.6rem; }
    .bottom-nav-item svg { width: 18px; height: 18px; }
}

/* ============================================
   UTILIDADES
   ============================================ */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

*:focus-visible {
    outline: 2px solid var(--brand-orange);
    outline-offset: 2px;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
.dark ::-webkit-scrollbar-track { background: #1e293b; }
::-webkit-scrollbar-thumb { background: #888; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #555; }