/* =========================================
   Empleos Gastronómicos — Global Styles
   ========================================= */

/* --- Custom Properties --- */
:root {
  --primary:       #E85D24;
  --primary-dark:  #C94D18;
  --primary-light: #FFF0EA;
  --dark:          #1A1A2E;
  --text:          #2C3E50;
  --text-muted:    #6C757D;
  --bg:            #F8F9FA;
  --surface:       #FFFFFF;
  --border:        #E2E8F0;
  --green:         #27AE60;
  --green-light:   #EAF7EF;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:     0 4px 12px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
  --radius:        10px;
  --radius-sm:     6px;
  --navbar-h:      64px;
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #CBD5E0; border-radius: 3px; }

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
  background: var(--dark) !important;
  min-height: var(--navbar-h);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff !important;
  letter-spacing: -.3px;
}

.navbar-brand .brand-accent { color: var(--primary); } /* icon only */
.navbar-brand { color: #fff !important; }

.nav-link {
  color: rgba(255,255,255,.72) !important;
  font-size: .875rem;
  font-weight: 500;
  padding: .45rem .8rem !important;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: .3rem;
}

.nav-link:hover { color: #fff !important; background: rgba(255,255,255,.08); }
.nav-link.active { color: var(--primary) !important; }

.navbar-toggler {
  border: none;
  color: #fff;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); }

.btn-navbar-cta {
  background: var(--primary) !important;
  color: #fff !important;
  border: none;
  border-radius: var(--radius-sm);
  padding: .4rem .9rem !important;
  font-weight: 600;
  font-size: .875rem;
  min-height: 38px;
  transition: background .15s, transform .1s;
}
.btn-navbar-cta:hover { background: var(--primary-dark) !important; transform: translateY(-1px); }

/* Dropdown */
.dropdown-menu {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  font-size: .875rem;
  padding: .4rem;
}
.dropdown-item {
  border-radius: var(--radius-sm);
  padding: .5rem .75rem;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.dropdown-item:hover { background: var(--primary-light); color: var(--primary); }

/* =========================================
   HERO
   ========================================= */
.hero {
  background: var(--dark);
  background-image:
    radial-gradient(circle at 15% 60%, rgba(232,93,36,.15) 0%, transparent 50%),
    radial-gradient(circle at 85% 15%, rgba(232,93,36,.08) 0%, transparent 40%);
  padding: 3.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-inner { position: relative; }

.hero-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: .6rem;
}

.hero-title .accent { color: var(--primary); }

.hero-subtitle {
  color: rgba(255,255,255,.6);
  font-size: .9375rem;
  margin-bottom: 1.5rem;
}

/* Quick-search chips */
.hero-chips { display: flex; flex-wrap: wrap; gap: .5rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.8);
  border-radius: 99px;
  padding: .3rem .85rem;
  font-size: .8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
  cursor: pointer;
  min-height: 36px;
}

.chip:hover,
.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* =========================================
   FILTER BAR (desktop sticky)
   ========================================= */
.filter-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: .7rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
}

.filter-bar .form-select,
.filter-bar .form-control {
  border-radius: var(--radius-sm);
  border-color: var(--border);
  font-size: .875rem;
  height: 40px;
  color: var(--text);
  background-color: var(--surface);
}

.filter-bar .form-select:focus,
.filter-bar .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232,93,36,.12);
}

.btn-filter-apply {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  height: 40px;
  padding: 0 1.2rem;
  font-weight: 600;
  font-size: .875rem;
  transition: background .15s;
  white-space: nowrap;
}
.btn-filter-apply:hover { background: var(--primary-dark); color: #fff; }

.btn-filter-clear {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  height: 40px;
  padding: 0 .85rem;
  font-size: .875rem;
  transition: border-color .15s, color .15s;
  white-space: nowrap;
}
.btn-filter-clear:hover { border-color: var(--text); color: var(--text); }

/* Mobile filter trigger button */
.btn-filter-mobile {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  height: 44px;
  padding: 0 1rem;
  font-size: .875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: border-color .15s;
}
.btn-filter-mobile:hover { border-color: var(--primary); color: var(--primary); }

.filter-count-badge {
  background: var(--primary);
  color: #fff;
  border-radius: 99px;
  font-size: .65rem;
  font-weight: 700;
  padding: 1px 6px;
  line-height: 1.5;
}

/* =========================================
   FILTER DRAWER (mobile bottom sheet)
   ========================================= */
.filter-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.filter-backdrop.open { opacity: 1; pointer-events: all; }

.filter-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  z-index: 1050;
  padding: 0 1.25rem 2rem;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  max-height: 92vh;
  overflow-y: auto;
}
.filter-drawer.open { transform: translateY(0); }

.drawer-handle-wrap {
  display: flex;
  justify-content: center;
  padding: .9rem 0 .25rem;
}
.drawer-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-top: .5rem;
}
.drawer-title { font-size: 1rem; font-weight: 700; color: var(--text); margin: 0; }

.drawer-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  padding: .25rem;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}
.drawer-close:hover { background: var(--bg); }

.filter-drawer .form-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .4rem;
}
.filter-drawer .form-select,
.filter-drawer .form-control {
  border-radius: var(--radius-sm);
  border-color: var(--border);
  font-size: .9rem;
  height: 46px;
}
.filter-drawer .form-select:focus,
.filter-drawer .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232,93,36,.12);
}

.btn-drawer-apply {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  height: 50px;
  font-weight: 700;
  font-size: .9375rem;
  width: 100%;
  transition: background .15s;
}
.btn-drawer-apply:hover { background: var(--primary-dark); color: #fff; }

.btn-drawer-clear {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  height: 50px;
  font-size: .9375rem;
  width: 100%;
  margin-top: .5rem;
}

/* =========================================
   OFFER CARDS
   ========================================= */
.offer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  position: relative;
  overflow: hidden;
}

.offer-card:hover {
  border-color: rgba(232,93,36,.45);
  box-shadow: 0 4px 16px rgba(232,93,36,.12), 0 1px 3px rgba(0,0,0,.06);
  transform: translateY(-2px);
  color: inherit;
  text-decoration: none;
}

.offer-card:hover .offer-action {
  opacity: 1;
  transform: translateY(0);
}

/* Logo */
.offer-logo {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.offer-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.offer-logo-icon { color: var(--text-muted); font-size: 1.1rem; }

/* Body */
.offer-body { flex: 1; min-width: 0; }

.offer-title {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 .15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offer-company {
  font-size: .8125rem;
  color: var(--text-muted);
  margin-bottom: .5rem;
  display: flex;
  align-items: center;
  gap: .3rem;
  flex-wrap: wrap;
}

.offer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
}

.offer-tag {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  font-size: .75rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: .12rem .6rem;
  white-space: nowrap;
  line-height: 1.5;
}

.offer-salary {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  font-size: .75rem;
  font-weight: 700;
  color: var(--green);
  background: var(--green-light);
  border-radius: 99px;
  padding: .12rem .65rem;
  white-space: nowrap;
  line-height: 1.5;
}

/* Side column */
.offer-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .5rem;
  flex-shrink: 0;
  padding-top: .1rem;
}

.offer-time {
  font-size: .75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.offer-action {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: .25rem .75rem;
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .2s, transform .2s;
}

.badge-new {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-radius: 99px;
  padding: .1rem .45rem;
}

/* =========================================
   RESULTS HEADER
   ========================================= */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .75rem;
}

.results-count { font-size: .875rem; color: var(--text-muted); }
.results-count strong { color: var(--text); }

.active-filters { display: flex; flex-wrap: wrap; gap: .4rem; }

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid rgba(232,93,36,.25);
  border-radius: 99px;
  padding: .2rem .65rem;
  font-size: .8rem;
  font-weight: 500;
  text-decoration: none;
}
.active-filter-tag:hover { background: rgba(232,93,36,.2); color: var(--primary-dark); }

/* =========================================
   PAGINATION
   ========================================= */
.pagination .page-link {
  color: var(--text);
  border-color: var(--border);
  border-radius: var(--radius-sm) !important;
  margin: 0 2px;
  min-width: 38px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .875rem;
  transition: background .15s, border-color .15s;
}
.pagination .page-link:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}
.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,.6);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-brand {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
}
.footer-brand .accent { color: var(--primary); }
.footer-tagline { font-size: .8rem; color: rgba(255,255,255,.38); margin: .4rem 0 1.5rem; }
.footer-heading {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.32);
  margin-bottom: .75rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .35rem; }
.footer-links a {
  color: rgba(255,255,255,.5);
  text-decoration: none;
  font-size: .84rem;
  transition: color .15s;
}
.footer-links a:hover { color: #fff; }
.footer-hr { border-color: rgba(255,255,255,.07); margin: 1.75rem 0 1rem; }
.footer-bottom {
  font-size: .8rem;
  color: rgba(255,255,255,.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}

/* =========================================
   GENERIC UTILITIES
   ========================================= */
.btn { border-radius: var(--radius-sm); font-weight: 500; transition: background .15s, border-color .15s, transform .1s; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232,93,36,.12);
}

.hover-card { transition: box-shadow .2s, transform .15s; cursor: pointer; }
.hover-card:hover { box-shadow: var(--shadow-md) !important; transform: translateY(-2px); text-decoration: none; color: inherit; }

.alert { border-radius: var(--radius); }

.object-fit-cover   { object-fit: cover; }
.object-fit-contain { object-fit: contain; }
.min-w-0 { min-width: 0; }

/* Empty state */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 2.5rem; opacity: .3; display: block; margin-bottom: 1rem; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 767.98px) {
  .hero { padding: 2.25rem 0 1.75rem; }
  .filter-bar-desktop { display: none !important; }

  /* Offer cards */
  .offer-card { padding: .875rem 1rem; gap: .75rem; }
  .offer-logo { width: 44px; height: 44px; }
  .offer-title { font-size: 18px; }
  .offer-company { font-size: 15px; }
  .offer-tag, .offer-salary { font-size: 13px; }
  .offer-action { display: none; }
  .offer-side { flex-direction: row; align-items: center; gap: .5rem; padding-top: 0; }

  /* Navigation */
  .nav-link { font-size: 15px; }

  /* Forms */
  .form-label { font-size: 15px; }
  .form-control,
  .form-select {
    font-size: 16px;
    min-height: 48px;
  }
  .btn {
    font-size: 15px;
    min-height: 48px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .btn-sm {
    min-height: 36px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .btn-filter-apply,
  .btn-drawer-apply,
  .btn-drawer-clear {
    min-height: 48px;
    font-size: 15px;
  }

  /* Typography */
  .text-muted { font-size: 14px; }
  small, .small { font-size: 14px; }
  .badge { font-size: 13px; }

  /* Stat cards */
  .h2, .h3 { font-size: 28px; font-weight: 700; }
  .stat-label { font-size: 14px; }
}

@media (min-width: 768px) {
  .filter-bar-mobile { display: none !important; }
}
