/*
Theme Name: Mi Chamba Perú
Theme URI: https://michambaperu.com
Author: Mi Chamba Perú
Author URI: https://michambaperu.com
Description: Tema oficial y 100% responsivo para el portal de empleo y capacitación en Perú: Oportunidades, Empresas (3x9), Cursos (3x3), Cómo Funciona, Widget oficial y WhatsApp 935 401 943.
Version: 2.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: mi-chamba-peru
Tags: jobs, responsive-layout, grid-layout, full-width-template
*/

/* 1. RESET Y BASE */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --mcp-red: #D90429;
  --mcp-red-dark: #B8001F;
  --mcp-dark-950: #020617;
  --mcp-dark-900: #0F172A;
  --mcp-dark-800: #1E293B;
  --mcp-slate-500: #64748B;
  --mcp-slate-100: #F1F5F9;
  --mcp-slate-50: #F8FAFC;
  --mcp-emerald: #10B981;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--mcp-slate-50);
  color: #0f172a;
  line-height: 1.5;
  overflow-x: hidden;
  width: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 2. CONTENEDOR FLUIDO */
.mcp-container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

@media (min-width: 768px) {
  .mcp-container {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* 3. BARRA SUPERIOR Y HEADER RESPONSIVO */
.mcp-topbar {
  background-color: var(--mcp-red-dark);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 0;
  text-align: center;
}

.mcp-navbar {
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mcp-navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  position: relative;
}

.mcp-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #0f172a;
}

.mcp-logo-badge {
  background: var(--mcp-red);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 4px 6px rgba(217, 4, 41, 0.25);
}

.mcp-logo-text {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.mcp-logo-text span {
  color: var(--mcp-red);
}

.mcp-logo-sub {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  display: block;
}

.mcp-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.mcp-nav-link {
  display: inline-block;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 800;
  color: #334155;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.mcp-nav-link:hover, .mcp-nav-link.active {
  background-color: var(--mcp-red);
  color: #ffffff;
}

.mcp-mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: #0f172a;
  padding: 6px;
}

@media (max-width: 900px) {
  .mcp-mobile-toggle {
    display: block;
  }

  .mcp-nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 2px solid var(--mcp-red);
    padding: 16px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }

  .mcp-nav-links.open {
    display: flex;
  }

  .mcp-nav-link {
    width: 100%;
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
  }
}

/* 4. HERO BANNER UNIFICADO */
.mcp-hero {
  background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #020617 100%);
  color: #ffffff;
  padding: 48px 0;
  border-bottom: 1px solid #1e293b;
}

@media (min-width: 768px) {
  .mcp-hero {
    padding: 64px 0;
  }
}

.mcp-badge-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(220, 38, 38, 0.2);
  color: #f87171;
  border: 1px solid rgba(220, 38, 38, 0.4);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.mcp-hero-title {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 12px;
  color: #ffffff;
}

@media (min-width: 768px) {
  .mcp-hero-title {
    font-size: 42px;
  }
}

.mcp-hero-title span {
  color: var(--mcp-red);
}

.mcp-hero-desc {
  font-size: 15px;
  color: #cbd5e1;
  margin-bottom: 24px;
  max-width: 700px;
  line-height: 1.6;
}

/* 5. FORMULARIO DE FILTRO RESPONSIVO */
.mcp-filter-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 768px) {
  .mcp-filter-card {
    grid-template-columns: 2fr 1.2fr 1fr 1fr auto;
    align-items: center;
    padding: 14px 18px;
  }
}

.mcp-input, .mcp-select {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background-color: #f8fafc;
  color: #0f172a;
}

.mcp-input:focus, .mcp-select:focus {
  outline: none;
  border-color: var(--mcp-red);
  background-color: #ffffff;
}

.mcp-btn-buscar {
  background-color: var(--mcp-red);
  color: #ffffff;
  border: none;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 800;
  border-radius: 10px;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.2s;
  text-align: center;
}

.mcp-btn-buscar:hover {
  background-color: var(--mcp-red-dark);
}

/* 6. CUADRÍCULAS RESPONSIVAS */
.mcp-grid-cards, .mcp-grid-3x9, .mcp-grid-3x3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .mcp-grid-cards, .mcp-grid-3x9, .mcp-grid-3x3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .mcp-grid-cards, .mcp-grid-3x9, .mcp-grid-3x3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 7. TARJETAS */
.mcp-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease-in-out;
}

.mcp-card:hover {
  border-color: var(--mcp-red);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

.mcp-badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #065f46;
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 3px 8px;
  border-radius: 999px;
}

.mcp-card-salary {
  font-size: 16px;
  font-weight: 900;
  color: var(--mcp-red);
  margin: 10px 0 6px;
}

.mcp-card-meta {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 14px;
}

.mcp-card-footer {
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mcp-btn-postular {
  background-color: var(--mcp-red);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  padding: 9px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
  display: inline-block;
}

.mcp-btn-postular:hover {
  background-color: var(--mcp-red-dark);
}

/* 8. BOTÓN OFICIAL DE WHATSAPP FLOTANTE */
.mcp-whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25d366;
  color: #ffffff;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
  z-index: 9999;
  text-decoration: none;
  transition: transform 0.2s;
}

@media (min-width: 768px) {
  .mcp-whatsapp-float {
    width: 64px;
    height: 64px;
    bottom: 28px;
    right: 28px;
  }
}

.mcp-whatsapp-float:hover {
  transform: scale(1.1);
}

/* 9. FOOTER UNIFORME OFICIAL */
.mcp-footer {
  background-color: #020617;
  color: #94a3b8;
  padding: 64px 0 32px;
  border-top: 1px solid #1e293b;
  margin-top: 60px;
  width: 100%;
}

.mcp-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid #1e293b;
}
