/*
 * styles.css
 *
 * Hoja de estilos principal del sitio. Contiene variables globales, reseteos,
 * estilos para componentes comunes (header, footer, botones, formularios) y
 * layouts generales para las páginas públicas.
 */

/* ========================================= */
/* === Variables Globales y Normalización === */
/* ========================================= */
:root {
  --bg: #ffffff;
  --surface: #f9fafb;
  --primary: #6b21a8;
  --accent: #fbbf24;
  --muted: #6b7280;
  --text: #0f172a;
  --radius: 10px;
  --gap: 1rem;
  --container-max: 1200px;
  --shadow-sm: 0 6px 18px rgba(15,23,42,0.06);
  --shadow-lg: 0 12px 32px rgba(15,23,42,0.08);
  --transition: 200ms ease;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* --- Scrollbar Moderno (WebKit) --- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #c5c5c5;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* --- Estilos de Placeholder Consistentes --- */
::placeholder { color: #9ca3af; opacity: 1; }
::-webkit-input-placeholder { color: #9ca3af; }
::-moz-placeholder { color: #9ca3af; opacity: 1; }

/* --- Reseteo Básico --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ========================================= */
/* === Header (Barra de Navegación) === */
/* ========================================= */
.header {
    background-color: #fff;
    box-shadow: var(--shadow-sm);
    position: sticky; 
    top: 0;
    z-index: 1000; 
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}

.logo img {
    height: 60px;
    width: auto;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary); 
}

.logo h1 span {
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.logo:hover h1 span {
  color: #facc15;
}

.nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* === Animación de entrada del logo === */
@keyframes logoFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.logo {
  animation: logoFadeIn 0.6s ease-out;
}

/* === Hover animado del logo === */
.logo {
  transition: transform 0.3s ease, filter 0.3s ease;
}

.logo:hover {
  transform: translateY(-2px) scale(1.03);
  filter: drop-shadow(0 6px 12px rgba(107, 33, 168, 0.25));
}

/* --- Botones del Header --- */
.btn {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    border-radius: 0.375rem;
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    transition: all 0.3s ease; 
}

.purple {
    background-color: #8b5cf6;
}

.purple:hover {
    background-color: #6b21a8;
}

.yellow {
    background-color: #facc15;
    color: #ffffff;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    transition: all 0.3s ease; 
}

.yellow:hover {
    background-color: #eab308;
    color: white;
}

/* --- Menú Desplegable (Dropdown) --- */
.dropdown {
    position: relative;
}

.dropdown-content {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 100%;
  right: 0;

  background: #ffffff;
  border-radius: 12px;
  padding: 8px 0;

  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);

  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s ease;

  z-index: 1000;
}

.dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-content a {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;

  color: #4b5563;
  text-decoration: none;

  transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-content a:hover {
  background: rgba(124, 58, 237, 0.08);
  color: #6b21a8;
}

.dropdown-content::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 20px;

  width: 12px;
  height: 12px;
  background: white;
  transform: rotate(45deg);

  box-shadow: -3px -3px 6px rgba(0, 0, 0, 0.04);
}

@media (min-width: 769px) {
  .dropdown:hover .dropdown-content {
    display: block;
  }
}

.dropdown-content.active {
  display: block;
}

.dropdown-content a {
    display: block;
    padding: 0.85rem 1.2rem;
    font-size: 0.95rem;
    text-decoration: none;
    color: #4c1d95;
    transition: background-color 0.2s ease;
    -webkit-transition: background-color 0.2s ease;
    -moz-transition: background-color 0.2s ease;
}

.dropdown-content a:focus,
.dropdown-content a:active {
  background: rgba(124, 58, 237, 0.08);
  outline: none;
}

.no-underline {
    text-decoration: none;
}

.user-img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.5rem;
    vertical-align: middle;
}

#foto-perfil {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ========================================= */
/* === Sección Hero (Banner Principal) === */
/* ========================================= */

.hero {
    position: relative;
    padding: 12.5rem 0;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(255, 248, 183, 0.705); /* default overlay */
    z-index: 0;
    filter: blur(2px);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #4c1d95;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero-content h2 {
    font-size: 3.2rem;
    line-height: 1.2;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
}

.hero-content p {
    font-size: 1.1rem;
    color: #444;
    margin-top: 0.5rem;
}

.hero--principal {
    background-image: url('../Images/principal-bg.jpg');
}
.hero--principal::before {
    background-color: rgba(250, 242, 175, 0.705);
}

.hero--reclutador {
    background-image: url('../Images/reclutador-bg.jpg');
}
.hero--reclutador::before {
    background-color: rgba(250, 242, 175, 0.705);
}

.hero--principal .primary-btn {
    background-color: #7e22ce;
}

.hero--principal .primary-btn:hover {
    background-color: #5b21b6;
}

.hero--reclutador .primary-btn {
    background-color: #fabd15;
    color: whitesmoke;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero--reclutador .primary-btn:hover {
    background-color: #ea9b08;
    color: white;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.hero--reclutador .secondary-btn {
    background-color: #7e22ce;
    color: white;
    padding: 0.75rem 1.5rem;
    margin: 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.hero--reclutador .secondary-btn:hover {
    background-color: #5b21b6;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.hero--quienes-somos {
    background-image: url('../Images/quienessomos-bg.jpg');
    background-position: center -160px;
    min-height: 500px;
    padding: 6rem 0;
}

.hero--quienes-somos::before {
  background-color: rgba(255, 247, 199, 0.65);
  filter: blur(1.5px);
}

@media (max-width: 768px) {
    .hero--quienes-somos {
        background-position: center center; 
    }
}

/* ========================================= */
/* === Barra de Búsqueda (Hero) === */
/* ========================================= */
.search-bar {
    display: flex;
    background-color: white; 
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 650px;
    margin-top: 1rem;
    align-items: center;
}

.search-bar input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #555;
}

.search-bar input:first-of-type {
    border-right: 1px solid #e0e0e0;
}

.search-bar select:last-of-type {
    border-right: none;
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.search-bar button {
    background-color: #facc15;
    color: white;
    padding: 1rem 2rem; 
    border: none;
    border-radius: 0 0.5rem 0.5rem 0;
    white-space: nowrap;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1rem;
}

.search-bar button:hover {
    background-color: #eab308;
}

.search-bar select#ubicacion-select {
    flex: 1;
    padding: 1rem 1.25rem;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #555;
    background-color: white;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b21a8'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    background-size: 1rem;
    cursor: pointer;
}

.hero-content p {
    font-size: 1.1rem;
    color: #444;
    margin-top: 1rem;
}

/* --- Responsividad de la Barra de Búsqueda --- */
@media (max-width: 768px) {
    .hero {
        padding: 8rem 0;
    }
    .hero-content h2 {
        font-size: 2.5rem;
    }
    .search-bar {
        flex-direction: column;
        padding: 0;
        border-radius: 0.5rem;
        max-width: 90%; 
    }

    .search-bar input {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        border-radius: 0;
    }

    .search-bar input:first-of-type {
        border-top-left-radius: 0.5rem;
        border-top-right-radius: 0.5rem;
    }

    .search-bar input:last-of-type {
        border-bottom: none;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .search-bar button {
        width: 100%;
        border-radius: 0 0 0.5rem 0.5rem;
        padding: 1rem;
    }

    .logo img {
        height: 45px; 
    }

    .logo h1 {
        display: none;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* ========================================= */
/* === Sección "Pasos" (Index) === */
/* ========================================= */
.steps {
    background-color: white;
    padding: 3rem 0;
}

.steps .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    text-align: center;
}

.step img {
    height: 100px;
    margin-bottom: 1rem;
}

.step h3 {
    color: #7e22ce;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.step p {
    color: #555;
    font-size: 0.95rem;
}

/* ========================================= */
/* === Sección "Etiquetas Populares" (Index) === */
/* ========================================= */
.tags {
    background-color: #f3f4f6;
    padding: 3rem 0;
}

.tags h2 {
    font-size: 1.75rem;
    font-weight: bold;
    margin-bottom: 2rem;
    color: #7e22ce;
    text-align: left;
}

.tag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.job-etiquetas {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin: 10px 0;
}

.tag {
    background: #f3f4f6;
    color:#111827;
    padding:4px 10px;
    border-radius:999px;
    font-size:0.85rem;
    white-space:nowrap;
}

.tag h3 {
    color: #facc15;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.tag p {
    font-size: 0.875rem;
    color: #555;
}

/* ========================================= */
/* === Sección "Planes" === */
/* ========================================= */
.plans {
    background-color: #f8fafc;
    padding: 4rem 1rem;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 40px;
    font-weight: 700;
}

.plan-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5rem;
}

.plan-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    width: 100%;
    max-width: 340px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    text-align: left;
    border-top: 4px solid;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.plan-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.plan-card.free { border-color: #22c55e; } /* Verde */
.plan-card.premium { border-color: #f59e0b; } /* Amarillo */
.plan-card.verified { border-color: #3b82f6; } /* Azul */

/* Estilo para destacar el plan premium */
.plan-card.premium {
    transform: scale(1.05);
    border-width: 3px;
}
.plan-card.premium:hover {
    transform: scale(1.1) translateY(-10px);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f59e0b;
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.plan-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: #333;
    text-align: center;
}

.plan-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin: 0.5rem 0 1.5rem;
}
.plan-price .price-period {
    font-size: 1rem;
    font-weight: 400;
    color: var(--muted);
}

.plan-card ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 2rem;
    flex-grow: 1; /* Empuja el botón hacia abajo */
}

.plan-card ul li {
    margin-bottom: 0.8rem;
    padding-left: 1.8rem;
    position: relative;
    color: #555;
}

.plan-card ul li::before {
    content: '✅';
    position: absolute;
    left: 0;
    color: #22c55e;
    font-size: 1.1rem;
}

.plan-cta-btn {
    display: block;
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: var(--primary);
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
}

.plan-cta-btn:hover {
    background-color: #581c87;
}

.form-select {
  display: inline-block;
  width: auto;
  padding: 8px 32px 8px 12px;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
  color: #333;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  appearance: none; /* Oculta la flecha por defecto del navegador */
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  cursor: pointer;
}

.form-select:focus {
  border-color: #8800ff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(136, 0, 255, 0.25);
}

.form-select option:hover {
  background-color: #8800ff;
  color: #f9fafb;
}

.empty-filter-message {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 1rem;
  color: #6b7280;
  background-color: #f9fafb;
  border: 2px dashed #e5e7eb;
  border-radius: 8px;
  font-weight: 500;
}

/* ========================================= */
/* === Página "¿Quiénes Somos?" === */
/* ========================================= */
.container-quienes{
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 1rem;
    text-align: justify;
}

.quienes-section {
    margin-bottom: 3rem;
}

.quienes-section p {
    color: #333;
    font-size: 1rem;
    line-height: 1.8;
    margin-top: 0.5rem;
}

.section-title {
    font-size: 2rem;
    color: #4c1d95;
    margin-bottom: 1rem;
    font-weight: bold;
}

.subheading {
    color: #7e22ce;
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.bullet-list {
    margin-left: 1.5rem;
    list-style-type: disc;
    color: #4c1d95;
}

.bullet-list li {
    margin-bottom: 0.5rem;
    color: #333;
}

/* ========================================= */
/* === Formularios de Autenticación === */
/* ========================================= */
.auth-container {
    max-width: 500px;
    display: block;
    margin: 5rem auto;
    background-color: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    font-family: 'Inter', sans-serif;
}

/* --- Pestañas (Login/Registro) --- */
.auth-tabs {
    display: flex;
    justify-content: space-around;
    background-color: #7e22ce4d;
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
    overflow: hidden;
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    text-align: center;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

.auth-tab.active {
    background-color: #8800ff;
    color: white;
}

/* --- Formulario Activo --- */
.auth-form {
    padding: 2rem;
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form button {
    width: 100%;
    padding: 1.25rem;
    background-color: #f3c200;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 0.75rem;
    font-size: 1.25rem;
    transition: background 0.3s ease;
}

.auth-form button:hover {
    background-color: #a77e05;
}

.auth-form .small {
    font-size: 13px;
    display: block;
    text-align: center;
    margin-top: 1.25rem;
    color: #666;
}

/* --- Grupo de Inputs con Icono --- */
.container-input {
    position: relative;
    margin-bottom: 1.5rem;
    min-height: 54px;
    display: grid;
    align-items: end;
    grid-template-columns: 1fr; 
}

.container-input input {
    width: 100%;
    padding: 18px 52px 18px 52px !important;
    box-sizing: border-box !important;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 18px;
    line-height: 1.2;
    background-color: #fff;
    color: #333;
    outline: none;
    transition: border-color 0.3s ease;
}

.container-input ion-icon {
    position: absolute !important;
    top: 50% !important;
    left: 12px !important;
    transform: translateY(-50%) !important;
    color: #888 !important;
    font-size: 24px !important;
    pointer-events: none !important;
    z-index: 2 !important;
}

.container-input:focus-within ion-icon {
    color: #8800ff;
}

.container-input input:focus {
    border-color: #8800ff;
}

.toggle-password {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important;
    border: none !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    color: #888 !important;
    padding: 0 !important;
    z-index: 3 !important;
}

.toggle-password ion-icon {
    position: static !important;
    transform: none !important;
    color: inherit !important;
    font-size: 20px !important;
}

.toggle-password:hover {
    color: #8800ff;
}

/* ========================================= */
/* === Página "Mi Perfil" (Usuario) === */
/* ========================================= */
.perfil-container {
    padding: 4rem 1rem;
    background-color: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.perfil-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    padding: 2rem;
}

.perfil-left,
.perfil-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.perfil-card {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.perfil-personal {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.perfil-datos {
    width: 100%;
    text-align: left;
    margin-top: 1rem;
}

.perfil-datos p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.perfil-datos ion-icon {
    font-size: 1.2rem;
    color: #8800ff;
}

.contenedor-foto {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 4px solid #facc15;
    margin-bottom: 1rem;
}

.foto-perfil {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.contenedor-foto::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
}

.contenedor-foto:hover::after {
    background-color: rgba(0, 0, 0, 0.4);
}

.foto-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgb(255, 255, 255);
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.foto-overlay-span {
    color: #fff;
    text-align: center;
}

.contenedor-foto:hover .foto-overlay {
    opacity: 1;
}

.foto-overlay ion-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.perfil-card h2 {
    font-size: 1.4rem;
    color: #4c1d95;
    margin-bottom: 0.5rem;
}

.perfil-card .perfil-section-header {
    margin-bottom: 15px;
}

.perfil-section-header {
    display: flex;
    gap: 1rem;
    font-weight: 600;
    justify-content: space-between;
    font-size: 1.1rem;
    align-items: center;
}

.perfil-section-header h3 {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.1rem;
}

.perfil-section-header h3 ion-icon {
    display: inline-flex;
    vertical-align: middle;
    font-size: 1.2rem;
}

.perfil-section-header ion-icon {
    font-size: 1.2rem;
}

.btn-cv {
    text-decoration: none;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    background-color: #7e22ce;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-sm:hover {
    background-color: #5b21b6;
}

.perfil-lista {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.perfil-lista li {
    background-color: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

@media (max-width: 960px) {
    .perfil-wrapper {
        /* Cambiamos a flexbox para apilar y centrar las columnas */
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 1rem; /* Reducimos el padding en móvil */
    }
    .perfil-left,
    .perfil-right {
        width: 100%; /* Asegura que ocupen el ancho disponible */
        max-width: 500px; /* Limita el ancho máximo para que las columnas puedan centrarse */
        align-items: center; /* Centra las tarjetas dentro de cada columna */
    }
    .perfil-card {
        width: 100%; /* Asegura que la tarjeta ocupe el ancho de su contenedor */
        max-width: 400px; /* Limita el ancho de las tarjetas individuales */
    }
}

.editar-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--texto);
    margin-left: 8px;
    font-size: 1em;
    padding: 0;
}

.editar-btn ion-icon {
    vertical-align: middle;
}

.perfil-cv-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 16px;
}

.perfil-acciones-botones {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    width: 100%; 
    align-items: center;
}

.perfil-acciones-botones .btn-cv,
.perfil-acciones-botones .btn-editar-info {
    width: 80%;
    max-width: 200px;
    text-align: center;
    display: inline-block;
}

/* === SweetAlert2 Common Base Styles === */
.custom-swal-popup {
    overflow: visible !important;
}

.swal-form-group label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
    width: 100%;
    text-align: left;
}

.custom-swal-input {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.5rem !important;
    font-size: 1rem !important;
    color: #374151 !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #f9fafb !important;
    line-height: 1.5;
    box-sizing: border-box;
}

.custom-swal-input:focus {
    border-color: #8800ff !important;
    box-shadow: 0 0 0 3px rgba(136, 0, 255, 0.2) !important;
    outline: none !important;
}

.swal2-html-container select.custom-swal-input {
  height: var(--swal-input-height) !important;
}

.swal-form-group-full {
    grid-column: 1 / -1;
}

.swal-date-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75em;
}

.swal2-actions {
    margin-top: 1.5em !important;
    margin-bottom: 0 !important;
    padding-bottom: 1.25em !important;
    justify-content: center;
    display: flex;
    gap: 10px;
}

body .swal2-container {
    overflow-y: auto !important;
}

.swal2-confirm-button-custom {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: bold;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.3s ease; 
    background-color: #8800ff;
    color: white;
}

.swal2-confirm-button-custom:hover {
    background-color: #400079;
}

.swal2-cancel-button-custom {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: bold;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.3s ease; 
    background-color: #dc3545;
    color: white;
}

.swal2-cancel-button-custom:hover {
    background-color: #a71d2a;
}

.custom-swal-html-container {
    text-align: left !important;
    padding: 1.25em 2em 1rem !important;
    margin: 0 !important;
    overflow: visible !important;
}

.swal-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 1.5rem;
    margin-right: 34px;
}

.swal-form-group {
    display: flex;
    flex-direction: column;
}

.swal2-popup {
    width: auto !important;
    max-width: 600px !important;
    padding: 0 !important;
}

.swal2-html-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding: 1.25em 2.5em 1rem 2.5em !important;
    margin: 0 !important;
    overflow: visible !important;
}

/* ========================================= */
/* === Styles for 'Agregar estudio' === */
/* ========================================= */
.estudio-swal-checkbox-group {
    grid-column: 1 / -1;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-top: 1em;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
}

.estudio-swal-checkbox-group input[type="checkbox"] {
    width: 1.2em;
    height: 1.2em;
    cursor: pointer;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

.estudio-swal-checkbox-group .checkbox-label {
    margin: 0 !important;
    font-weight: normal;
    cursor: pointer;
    text-align: left;
    flex-grow: 1 !important;
    padding-right: 0.5em;
}

.swal2-input .custom-swal-input,
.swal2-textarea.custom-swal-input {
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 600px) {
    .swal2-html-container {
        padding: 1em 1em 0.8rem 1em !important;
    }

    .swal-form-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    .custom-swal-html-container {
        padding: 1em 1em 0.8rem !important;
    }

    .swal2-actions {
        padding-left: 1em !important;
        padding-right: 1em !important;
    }
}

/* ========================================= */
/* === Iconos de Acción (Perfil Usuario) === */
/* ========================================= */
.icono-eliminar-perfil, .icono-eliminar-curso, .icono-eliminar-cert, .icono-eliminar-idioma, .icono-eliminar-exp{
    color: #dc3545;
    font-size: 1.2em;
    transition: color 0.2s;
}
.icono-eliminar-perfil:hover, .icono-eliminar-curso:hover, .icono-eliminar-cert:hover, .icono-eliminar-idioma:hover, .icono-eliminar-exp:hover {
    color: #a71d2a;
}

.icono-editar-perfil, .icono-editar-curso, .icono-editar-cert, .icono-editar-idioma, .icono-editar-exp {
    color: #8800ff;
    font-size: 1.2em;
    transition: color 0.2s;
}

.icono-editar-perfil:hover, .icono-editar-curso:hover, .icono-editar-cert:hover, .icono-editar-idioma:hover, .icono-editar-exp:hover {
    color: #333;
}

/* ========================================= */
/* === Alertas Flotantes (Toasts) === */
/* ========================================= */
.alert {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #323232;
    color: #fff;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.alert.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
}

.alert.success {
    background-color: #28a745;
}

.alert.error {
    background-color: #dc3545;
}

.alert button {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

/* ========================================= */
/* === Página de Búsqueda de Ofertas === */
/* ========================================= */

.hero-busqueda {
  background: var(--surface);
  padding: 5rem 1rem;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-busqueda h1 {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 2rem;
}

.form-busqueda {
  display: flex;
  flex-direction: row; /* Diseño horizontal */
  align-items: center; /* Centra verticalmente los elementos */
  flex-wrap: wrap; /* Permite que los elementos se envuelvan si no hay espacio */
  gap: 1rem;
  padding: 2rem;
  background-color: var(--bg);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.etiquetas-container {
  position: relative;
  min-width: 300px;
  max-width: 520px;
  flex: 1;
}

#input-etiquetas {
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  outline: none;
  background-color: #f8fafc;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  color: var(--text);
}

#input-etiquetas:hover {
  border-color: #cbd5e1;
  background-color: #ffffff;
}

#input-etiquetas:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(107, 33, 168, 0.1);
  background-color: #ffffff;
}

#input-etiquetas::placeholder {
  color: #9ca3af;
  font-size: 0.95rem;
}

.chips-container {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
  min-height: 0;
  max-height: 120px;
  overflow-y: auto;
  padding: 2px;
}

/* Scrollbar para el contenedor de chips */
.chips-container::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.chips-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.chips-container::-webkit-scrollbar-thumb {
  background: #c5c5c5;
  border-radius: 3px;
}

.chips-container::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 20px;
  background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
  color: #6b21a8;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid rgba(107, 33, 168, 0.15);
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  line-height: 1;
}

.chip:hover {
  background: linear-gradient(135deg, #e9d5ff 0%, #ddd6fe 100%);
  box-shadow: 0 2px 4px rgba(107, 33, 168, 0.15);
  transform: translateY(-1px);
}

/* Botón de eliminar chip */
.chip .remove {
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: bold;
  background-color: #a78bfa;
  color: #ffffff;
  width: 18px;
  height: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  line-height: 0;
  padding: 0;
  flex-shrink: 0;
  margin: 0;
}

.chip .remove:hover {
  background-color: #7c3aed;
  transform: rotate(90deg) scale(1.1);
}

.chip .remove:active {
  transform: rotate(90deg) scale(0.95);
}

.suggestions {
  position: absolute;
  z-index: 50;
  left: 0;
  right: 0;
  margin-top: 6px;
  list-style: none;
  padding: 4px 0;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  background: #ffffff;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  backdrop-filter: blur(10px);
}

.suggestion-item {
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #374151;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 4px;
  border-radius: 6px;
}

/* Scrollbar para sugerencias */
.suggestions::-webkit-scrollbar {
  width: 8px;
}

.suggestions::-webkit-scrollbar-track {
  background: #f9fafb;
}

.suggestions::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.suggestions::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Items de sugerencias */
.suggestion-item {
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #374151;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.suggestion-item::before {
  content: '🏷️';
  font-size: 1rem;
  opacity: 0.6;
}

.suggestion-item:hover,
.suggestion-item[aria-selected="true"] {
  background: linear-gradient(90deg, #f3e8ff 0%, #faf5ff 100%);
  color: #6b21a8;
}

.suggestion-item:active {
  background: #e9d5ff;
}

.hint {
  color: #6b7280;
  font-size: 0.8rem;
  margin-top: 6px;
  font-style: italic;
}

.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.chips-container:empty {
  display: none;
}

/* Animación para nuevos chips */
@keyframes chip-appear {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.chip {
  animation: chip-appear 0.2s ease-out;
}

/* Responsividad */
@media (max-width: 768px) {
  .etiquetas-container {
    min-width: 100%;
    max-width: 100%;
  }

  #input-etiquetas {
    font-size: 0.95rem;
    padding: 0.6rem 0.8rem;
  }

  .chip {
    font-size: 0.8rem;
    padding: 5px 8px;
  }

  .suggestions {
    max-height: 200px;
  }

  .suggestion-item {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
}

/* Estado de carga */
.etiquetas-container.loading #input-etiquetas {
  background-image: linear-gradient(90deg, #f8fafc 25%, #e5e7eb 50%, #f8fafc 75%);
  background-size: 200% 100%;
  animation: loading-gradient 1.5s ease-in-out infinite;
}

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

/* Mejora visual cuando hay muchos chips */
.chips-container.has-many-chips {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px;
  background-color: #fafafa;
}

/* Contador de etiquetas seleccionadas */
.etiquetas-counter {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

/* Indicador de límite alcanzado */
.etiquetas-container.limit-reached #input-etiquetas {
  border-color: #fbbf24;
  background-color: #fffbeb;
}

.etiquetas-container.limit-reached #input-etiquetas::placeholder {
  color: #f59e0b;
}

/* ====== ANIMACIONES DE BÚSQUEDA ====== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

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

/* Animación para skeleton loader */
.skeleton-loader {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite linear;
}

/* ====== TARJETAS DE EMPLEOS ====== */
/* Contenedor de dos columnas para la página de búsqueda de ofertas */
.resultados-busqueda .job-list-container {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 3rem;
    margin-top: 2rem;
    margin: 2rem auto;
    animation: fadeIn 0.5s ease-out;
    min-height: 400px; /* Altura mínima para evitar saltos de layout */
}

/* Contenedor de una sola columna para "Mis Postulaciones" y "Favoritos" */
.postulaciones-wrapper {
    display: block; /* Asegura que ocupe todo el ancho */
}

.job-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 200px;
}

/* Animación para la lista al cargar */
.job-list.loading {
  opacity: 0.6;
  pointer-events: none;
}

.cta-button {
  width: auto;
  margin-top: 10px;
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--radius);
  background-color: var(--primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition), box-shadow var(--transition), transform var(--transition);
  white-space: nowrap; /* Evita que el texto del botón se envuelva */
  -webkit-transition: background-color var(--transition), box-shadow var(--transition), transform var(--transition);
  -moz-transition: background-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.form-busqueda {
  .form-busqueda {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
  }
}

.form-field input[type="search"],
.form-field input[type="text"],
.form-field select {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--text);
  background-color: #f8fafc;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-transition: border-color var(--transition), box-shadow var(--transition);
  -moz-transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
}

.form-field input[type="search"]:hover,
.form-field input[type="text"]:hover,
.form-field select:hover {
  border-color: #cbd5e1;
}

.form-field input[type="search"]:focus,
.form-field input[type="text"]:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(107, 33, 168, 0.2);
}

.form-busqueda input,
.form-busqueda select {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.form-busqueda button {
  padding: 0.5rem 1rem;
  border: none;
  background-color: #5f27cd;
  color: #fff;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
}

.form-busqueda select {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  max-width: 200px; /* Ancho máximo para que el truncado funcione */
}

.page { 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
}

.content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.btn.applied-grey {
  background: #e5e7eb; /* gris claro */
  color: #374151;
  cursor: not-allowed;
  border: 1px solid #d1d5db;
}

.btn.checking {
  opacity: 0.9;
  cursor: wait;
}

/* ====== TARJETAS DE EMPLEOS ====== */
/* Contenedor de dos columnas para la página de búsqueda de ofertas */
.resultados-busqueda .job-list-container {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 3rem;
    margin-top: 2rem;
    margin: 2rem auto;
}

/* Contenedor de una sola columna para "Mis Postulaciones" y "Favoritos" */
.postulaciones-wrapper {
    display: block; /* Asegura que ocupe todo el ancho */
}


.job-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.job-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: #fff;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.job-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.job-card:active{
    background-color: #afafaf;
}

.job-info {
  max-width: 70%;
}

.job-title {
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: bold;
}

.job-salary {
  font-weight: 500;
}

.job-company {
  font-weight: 500;
  margin-top: 0.25rem;
}

.job-location {
  color: var(--muted);
  font-size: 0.9rem;
}

.job-logo img {
  width: 140px;
  height: 140px;
  border-radius: 0.5rem;
  object-fit: cover;
}

.job-logo-placeholder {
  width: 140px;
  height: 140px;
  border-radius: 0.5rem;
  background-color: #f3f4f6; /* Un gris claro de fondo */
  color: var(--primary, #6b21a8); /* Color del texto igual al primario */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px; /* Tamaño grande para la inicial */
  font-weight: 700; /* Letra en negrita */
}

.job-card.selected {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(93, 36, 251, 0.4);
}


.job-details {
    background: #fff;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid #e6e6f0;
    box-shadow: 0 1px 2px rgba(15,23,42,0.03);
    min-height: 400px;
}

.job-details h2 {
  font-size: 1.5rem;
  color: var(--primary);
  margin: 0.25rem 0 0.5rem;
}

.job-details .job-salary {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.job-details hr {
  margin: 1.5rem 0;
  border: 0;
  border-top: 1px solid #ddd;
}

.job-details-header {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 18px;
  align-items: start;
}

/* --- Responsividad de la lista de trabajos --- */
@media (max-width: 900px) {
    .resultados-busqueda .job-list-container {
        display: block; /* Cambiamos de grid a block para controlar la visibilidad */
    }

    /* Por defecto en móvil, solo se ve la lista */
    .job-details {
        display: none;
    }

    /* Cuando se selecciona una oferta, se oculta la lista y se muestran los detalles */
    .job-list-container.details-visible .job-list {
        display: none;
    }
    .job-list-container.details-visible .job-details {
        display: block;
        position: relative; /* Necesario para el botón de atrás */
        padding-top: 3.5rem; /* Añade espacio superior para el botón de atrás */
    }

    .job-details-header {
        grid-template-columns: 1fr; /* Apilamos el header en móvil */
    }
}

/* --- Contenido de los Detalles de la Vacante --- */
.job-details-left .job-title {
  margin: 0 0 6px 0;
  font-size: 1.35rem;
}

.company-wrap {
  display:flex;
  gap:8px;
  align-items:center;
  margin-bottom:8px;
}

.detail-badge.premium { background:#f59e0b; }    /* amarillo */
.detail-badge.verified { background:#06b6d4; }   /* turquesa */
.detail-badge.destacada { background:#8b5cf6; }  /* púrpura */

.detail-badge {
  display:inline-block;
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  margin-left: 8px;
}

.details-meta-row {
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:8px;
  align-items:center;
}

.details-meta-row p { margin:0; font-size:0.95rem; color:#374151; }

.job-description p {
  margin: 0.5rem 0;
}

.job-description ul {
  margin-left: 1.2rem;
  list-style: disc;
}

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f2f5;
    color: var(--primary);
    transition: background-color 0.3s, color 0.3s;
}

.social-links a:hover {
    background-color: var(--primary);
    color: #fff;
}

.social-links a ion-icon {
    font-size: 20px;
}

.job-details-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.job-details-left {
  flex: 1 1 auto;
  min-width: 0;
}

.job-details-right {
  width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-logo {
  max-width: 100%;
  max-height: 160px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.detail-logo-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 8px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: #f3f4f6;
  color: #6b21a8;
  font-weight:700;
  font-size:28px;
}

.detail-actions { display:flex; gap:8px; margin-top:12px; }
.btn { padding:8px 12px; border-radius:8px; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; gap:8px; }
.btn-primary { background:#6b21a8; color:#fff; border: none; }
.btn-outline { background:transparent; border:1px solid #d1d5db; color:#111827; }

.job-extras { margin-top:14px; color:#6b7280; font-size:0.9rem; }

/* Botón favorito */
.fav-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  cursor: pointer;
  transition: transform .12s ease, color .12s ease;
  -webkit-transition: transform .12s ease, color .12s ease;
  -moz-transition: transform .12s ease, color .12s ease;
  color: #6b6b6b;
  font-size: 18px;
}

#favorites-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem;
}

@media (max-width: 768px) {
  #favorites-list {
    grid-template-columns: 1fr;
    padding: 1rem;
    justify-items: center;
  }

  #favorites-list .job-card {
    max-width: 600px;
    width: 100%;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  #favorites-list .job-card .job-card-logo {
    max-width: 150px;
    margin-bottom: 1rem;
    margin-left: auto;
    margin-right: auto;
  }
}

.fav-btn[aria-pressed="true"], .fav-btn.active {
  color: #e11d48;
  transform: translateY(-2px);
}

.job-actions {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 5;
}

.fav-btn-detail {
  width: 42px;
  height: 42px;
  font-size: 20px;
}

.container-flex {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.login-box {
  margin-top: auto;
}

.main-content {
    flex-grow: 1;
    padding: 20px;
    padding-top: 20px;
    padding-bottom: 20px;
    margin: 0 auto;
    max-width: 1200px;
    width: 90%;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.verified-icon {
  font-size: 1.05em;
  vertical-align: middle;
  margin-left: 6px;
  color: var(--primary, #2b7a78);
}

.job-company ion-icon.verified-icon {
  font-size: 1rem;
  vertical-align: middle;
  margin-left: 6px;
  color: var(--accent, #2b7a78);
}

.job-card .badge-destacada {
  background-color: #ff9800; /* naranja vibrante */
  color: white;
  font-weight: bold;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.job-socials {
  margin-top: 8px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-right: 6px;
  border-radius: 50%;
  background-color: #f0f0f0;
  color: #555;
  text-decoration: none;
  font-size: 18px;
  transition: all 0.3s ease;
}

.social-btn:hover {
  background-color: var(--primary);
  color: white;
  transform: scale(1.1);
}

/* Contenedor de etiquetas */
.job-tags-container {
  margin-top: 6px;
  margin-bottom: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.job-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem; /* Espaciado entre elementos de texto */
}

/* Badge individual */
.job-tag-badge {
  background-color: #6b21a8;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 12px;
  text-transform: capitalize;
  transition: background-color 0.3s ease;
}

.job-tag-badge:hover {
  background-color: #581c87; 
  cursor: default;
}

/* Estilo para la etiqueta "..." */
.job-tag-badge.more-tags-badge {
  background-color: #e5e7eb; /* Un gris claro */
  color: #4b5563;
  font-weight: bold;
  cursor: help; /* Cambia el cursor para indicar que hay más info */
}

.btn-apply[disabled] {
  opacity: 0.9;
}

.company-logo {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.tagss {
  background-color: var(--surface);
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.tagss:hover {
  background-color: #f3f4f6;
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.tagss:active {
  transform: translateY(1px);
  box-shadow: none;
}

/* Estilos para el contenido principal */
.container.content {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 2rem 1rem;
}

.content header {
  margin-bottom: 2rem;
  text-align: center;
}

.content h1 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.content .muted {
  color: var(--muted);
  font-size: 1rem;
}

.content h2 {
  font-size: 1.75rem;
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.5rem;
}

.content p {
  margin-bottom: 1rem;
  line-height: 1.8;
  color: #333;
}

.content a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.content a:hover {
  text-decoration: underline;
}

.callout {
  border-left: 4px solid var(--accent);
  background-color: #fffbeb;
  padding: 1rem;
  margin-top: 2rem;
  border-radius: var(--radius);
}

.callout strong {
  color: var(--primary);
}

/* ========================================= */
/* === Componentes del Chat === */
/* ========================================= */

#chat-container {
  display: flex;
  border: 1px solid #ccc;
  flex-grow: 1; 
  overflow: hidden; /* Evita que el contenido interno desborde la página */
  border-radius: var(--radius); /* Añadido para consistencia */
  box-shadow: var(--shadow-sm); /* Añadido para consistencia */
  min-height: 75vh; /* Asegura una altura mínima del 75% de la ventana */
}

#chat-list {
  width: 30%;
  border-right: 1px solid #ddd;
  overflow-y: auto;
}

.conversation-item {
  padding: 10px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}
.conversation-item:hover {
  background: #f5f5f5;
}

#chat-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative; /* Necesario para el posicionamiento de elementos internos */
  overflow: hidden; /* Asegura que el contenido de la ventana no desborde */
}

#chat-messages {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  display: flex; /* Añadido para que los mensajes se apilen correctamente */
  flex-direction: column; /* Añadido para que los mensajes se apilen correctamente */
}

.message {
  max-width: 70%;
  margin: 5px;
  padding: 8px 12px;
  border-radius: 15px;
}

#chat-input {
  display: flex;
  padding: 10px;
  border-top: 1px solid #ddd;
}

#message-input {
  flex: 1;
  padding: 8px;
}

#send-btn {
  background: #8800ff;
  color: #fff;
  border: none;
  padding: 8px 12px;
  margin-left: 5px;
  cursor: pointer;
  border-radius: 5px;
}

#search-bar {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
}

#search-bar input {
  flex-grow: 1;
  padding: 0.4rem;
  border-radius: 5px;
  border: 1px solid #ccc;
}

#search-bar button {
  padding: 0.4rem 0.6rem;
  border: none;
  background-color: #6200ea;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

#search-bar button ion-icon {
  font-size: 1.2rem;
}

.from-user {
  background-color: #fffbeb; /* Amarillo pastel */
  color: var(--text);
}

.from-empresa {
  background-color: #f5f3ff; /* Morado pastel */
  color: var(--text);
}

#selected-chat-header {
  position: sticky;
  top: 0;
  background-color: var(--surface);
  padding: 12px 20px;
  border-bottom: 1px solid #ddd;
  font-weight: bold;
  font-size: 1.1em;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: space-between; /* Alinea info a la izq y botón a la der */
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  /* Ocultamos por defecto con una clase, no con el ID */
  display: none;
}

/* --- Animación para eliminar mensajes --- */
@keyframes fade-out-message {
  from {
    opacity: 1;
    transform: scaleY(1);
    max-height: 150px; /* Altura aproximada de un mensaje */
  }
  to {
    opacity: 0;
    transform: scaleY(0.8);
    max-height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
}
.message-wrapper.deleting {
  animation: fade-out-message 0.3s ease-out forwards;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#chat-search-toggle-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 1.5rem;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background-color 0.2s ease;
}

#chat-search-toggle-btn:hover {
  background-color: #e5e7eb;
}

#chat-search-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--surface);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 10px;
}

#chat-search-bar.hidden {
  display: none;
}

#chat-search-input {
  flex-grow: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 1rem;
  color: var(--text);
}

#chat-search-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

#chat-search-bar button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--muted);
}

/* Contenedor para la info del partner (avatar y nombre) */
#chat-partner-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-grow: 1; /* Ocupa el espacio disponible */
  min-width: 0; /* Previene que el texto largo empuje el botón */
}

#chat-partner-info img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Botón para notificaciones de sonido */
#sound-notification-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 1.5rem; /* Tamaño del icono */
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background-color 0.2s ease;
  flex-shrink: 0; /* Evita que el botón se encoja */
}

#sound-notification-toggle:hover { background-color: #e5e7eb; }

.message-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.my-message-wrapper {
  justify-content: flex-end;
  flex-direction: row-reverse;
}

.message-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.message-wrapper:hover .message-actions {
  opacity: 1;
}

.conversation-item.active {
  background-color: #f0e6ff;
}

#app-container {
max-width: var(--container-max);
margin: var(--gap) auto;
width: 100%;
padding: 0 var(--gap);
}

header {
text-align: center;
margin-bottom: var(--gap);
}

.search-container {
display: flex;
justify-content: center;
align-items: center;
margin: var(--gap) 0;
}

#search-input {
flex: 1;
border: none;
padding: 10px;
outline: none;
}

#search-bar button {
background-color: var(--primary);
border: none;
padding: 10px 15px;
color: white;
border-radius: 5px;
cursor: pointer;
}

#search-bar button ion-icon {
font-size: 1.2rem;
}

/* Nuevas reglas para alinear los mensajes */
.message-container {
display: flex;
width: 100%;
}

.message-right {
justify-content: flex-end;
}

.message-left {
justify-content: flex-start;
}

.message-user {
background-color: var(--primary);
color: white;
}

.message-other {
background-color: var(--surface);
color: var(--text);
}

#chat-list {
width: 30%;
border-right: 1px solid #ddd;
overflow-y: auto;
}

.conversation-item {
padding: 10px;
border-bottom: 1px solid #eee;
cursor: pointer;
}
.conversation-item:hover {
background: #f5f5f5;
}

#chat-window {
flex: 1;
display: flex;
flex-direction: column;
position: relative;
}

#chat-messages {
flex: 1;
padding: 10px;
overflow-y: auto;
display: flex;
flex-direction: column;
}

#message-input-area {
padding: 10px;
border-top: 1px solid #ddd;
display: flex;
}

#message-input {
flex: 1;
border: none;
padding: 8px;
outline: none;
}

#send-btn {
background-color: var(--primary);
color: white;
border: none;
padding: 8px 12px;
border-radius: 5px;
cursor: pointer;
}

.message-date {
  font-size: 0.7rem;
  color: #888;
  text-align: right;
  margin-top: 4px;
}

.date-separator {
  text-align: center;
  margin: 10px 0;
  font-size: 0.9rem;
  color: #888;
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-separator::before,
.date-separator::after {
  content: '';
  flex-grow: 1;
  height: 1px;
  background: #ccc;
}

.conversation-avatar, .message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 8px;
}

.conversation-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #f3f4f6;
  color: var(--primary, #6b21a8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  margin-right: 8px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-edit {
  margin-top: 8px;
  padding: 8px;
  background-color: rgba(0, 0, 0, 0.03);
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.inline-edit-textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  background-color: #fff;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.inline-edit-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(107, 33, 168, 0.2);
}

.inline-edit-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.inline-save-btn,
.inline-cancel-btn {
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.inline-save-btn {
  background-color: var(--primary);
  color: white;
}

.inline-save-btn:hover {
  background-color: #581c87; /* Un poco más oscuro */
}

.inline-save-btn:disabled {
  background-color: #a78bfa;
  cursor: not-allowed;
}

.inline-cancel-btn {
  background-color: #e5e7eb;
  color: #374151;
}

.inline-cancel-btn:hover {
  background-color: #d1d5db;
}

.inline-cancel-btn:disabled {
  background-color: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

.verified-check-inline, .verified-check {
  color: var(--primary);
  font-size: 1.1em;
  margin-left: 4px;
  vertical-align: middle;
}

@media (max-width: 768px) {
  #chat-container {
      flex-direction: column; /* Apila la lista y la ventana de chat */
      height: 100%; /* Asegura que ocupe toda la altura disponible */
  }

  #chat-list {
      width: 100%;
      height: 100%; /* Ocupa toda la altura inicialmente */
      border-right: none;
      border-bottom: 1px solid #ddd;
      display: flex; /* Para que el contenido interno se comporte bien */
      flex-direction: column;
  }

  #chat-window {
      display: none; /* Oculta la ventana de chat por defecto */
      width: 100%;
      height: 100%;
  }

  /* Clase que se añadirá con JS para mostrar la ventana de chat */
  body.chat-active #chat-list {
      display: none;
  }

  body.chat-active #chat-window {
      display: flex;
  }

  .company-logo-img {
      margin-left: 20px; /* Margen a la izquierda para separarlo del texto */
  }

  #favorites-list {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra los items horizontalmente */

  }

  #favorites-list .job-card {
    max-width: 600px; /* Un ancho máximo para que no se estire demasiado */
  }

  .job-card {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra horizontalmente todo el contenido de la tarjeta */
  }

  .job-card-logo-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 1rem;
  }
}

.message-edit-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  font-size: 16px;
}

.message-edit-btn ion-icon { font-size: 18px; vertical-align: middle; }

.message-header { display: flex; align-items: center; gap: 8px; }

.applied-card {
    border: 2px solid #4dabf7 !important;
    background: #e7f5ff;
}
