/* ── Variables ─────────────────────────────────────────── */
:root {
  --primary:      #1B4332;
  --primary-light:#2D6A4F;
  --primary-pale: #d1fae5;
  --secondary:    #D4A017;
  --bg:           #F8F6F1;
  --surface:      #ffffff;
  --text:         #1A1A1A;
  --text-muted:   #888888;
  --divider:      #E8E3D8;
  --shadow:       0 2px 12px rgba(0,0,0,.07);
  --radius:       16px;
  --topnav-h:     64px;
}

/* ── Base ──────────────────────────────────────────────── */
*, body { font-family: 'Poppins', sans-serif; }
body    { background: var(--bg); color: var(--text); padding-top: var(--topnav-h); padding-bottom: 72px; }
@media(min-width:768px){ body { padding-bottom: 0; } }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; }

/* ── Top Nav ───────────────────────────────────────────── */
.topnav {
  position: fixed; top:0; left:0; right:0; z-index:900;
  background: var(--primary);
  height: var(--topnav-h);
  display: flex; flex-direction: column;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
  transition: height .2s;
}
.topnav.scrolled { height: 56px; }
.topnav .container-xl { display:flex; align-items:center; gap:12px; }

.topnav-brand  { display:flex; align-items:center; gap:10px; text-decoration:none; flex-shrink:0; }
.brand-logo    { width:38px; height:38px; background:white; border-radius:10px;
                 display:flex; align-items:center; justify-content:center;
                 font-size:22px; font-weight:800; color:var(--primary); }
.brand-logo-sm { width:30px; height:30px; font-size:16px; border-radius:8px; }
.brand-name    { font-size:18px; font-weight:800; color:white; letter-spacing:2px; }

.topnav-links  { display:flex; gap:4px; }
.nav-link-item {
  color: rgba(255,255,255,.75); font-size:13px; font-weight:500;
  padding: 6px 12px; border-radius:8px; text-decoration:none;
  transition: background .2s, color .2s;
  display:flex; align-items:center; gap:6px;
}
.nav-link-item:hover  { background: rgba(255,255,255,.12); color:white; }
.nav-link-item.active { background: rgba(255,255,255,.18); color:white; font-weight:600; }

.btn-icon {
  width:38px; height:38px; border-radius:10px; border:none;
  background: rgba(255,255,255,.12); color:white; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition: background .2s;
}
.btn-icon:hover { background: rgba(255,255,255,.2); }

.btn-green {
  background: white; color: var(--primary);
  border:none; border-radius:8px; padding:7px 16px;
  font-size:13px; font-weight:700; cursor:pointer;
  text-decoration:none; display:inline-flex; align-items:center; gap:6px;
  transition: opacity .2s;
}
.btn-green:hover { opacity:.9; color:var(--primary); }

.btn-outline-green {
  background: transparent; color:white;
  border:1.5px solid rgba(255,255,255,.4); border-radius:8px;
  padding:6px 14px; font-size:13px; font-weight:600; cursor:pointer;
  text-decoration:none; transition: border-color .2s;
}
.btn-outline-green:hover { border-color:white; color:white; }

.user-btn {
  background:none; border:none; cursor:pointer;
  display:flex; align-items:center; gap:8px; color:white;
}
.user-avatar {
  width:34px; height:34px; border-radius:50%;
  background:rgba(255,255,255,.2);
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:14px; color:white; flex-shrink:0;
}

/* Global search bar */
.search-bar-global {
  display:none; padding:10px 0;
  background: var(--primary-light);
  border-top:1px solid rgba(255,255,255,.1);
}
.search-bar-global.open { display:block; }
.search-bar-global .form-control {
  border-radius:10px; border:none; font-size:14px;
  padding:10px 16px;
}

/* ── Mobile Nav ─────────────────────────────────────────── */
.mobile-nav { padding:8px 0; }
.mobile-nav-item {
  display:flex; align-items:center; gap:12px;
  padding:12px 20px; color:var(--text); font-size:14px; font-weight:500;
  text-decoration:none; transition: background .15s;
}
.mobile-nav-item:hover  { background:#f3f0e8; }
.mobile-nav-item.active { color:var(--primary); font-weight:700; background:var(--primary-pale); }
.mobile-nav-item i      { font-size:18px; width:22px; }

/* ── Bottom Nav (mobile) ────────────────────────────────── */
.bottom-nav {
  position:fixed; bottom:0; left:0; right:0; z-index:900;
  background:white; border-top:1px solid var(--divider);
  display:flex; box-shadow:0 -2px 12px rgba(0,0,0,.08);
  height:64px; align-items:stretch;
}
.bottom-nav-item {
  flex:1; display:flex; flex-direction:column; align-items:center;
  justify-content:center; gap:3px; text-decoration:none;
  color:var(--text-muted); font-size:10px; font-weight:500;
  transition: color .2s;
}
.bottom-nav-item i      { font-size:20px; }
.bottom-nav-item.active { color:var(--primary); }
.bottom-nav-item.text-danger { color:#dc2626; }

/* ── Main content ───────────────────────────────────────── */
.main-content { min-height: calc(100vh - var(--topnav-h)); }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #40916C 60%, #74C69D 100%);
  padding: 60px 0 50px;
  position: relative; overflow:hidden;
}
.hero::before {
  content:''; position:absolute; top:-80px; right:-80px;
  width:300px; height:300px; border-radius:50%;
  background:rgba(255,255,255,.05);
}
.hero-title { font-size:clamp(24px,4vw,42px); font-weight:800; color:white; line-height:1.2; }
.hero-sub   { font-size:15px; color:rgba(255,255,255,.75); margin-top:10px; }
.hero-search {
  background:white; border-radius:14px;
  padding:8px 8px 8px 20px;
  display:flex; align-items:center; gap:8px;
  box-shadow:0 8px 30px rgba(0,0,0,.2);
  max-width:560px;
}
.hero-search input { border:none; outline:none; font-family:'Poppins',sans-serif;
  font-size:14px; flex:1; background:none; }
.hero-search .btn-search {
  background:var(--primary); color:white; border:none; border-radius:10px;
  padding:10px 20px; font-size:14px; font-weight:600; cursor:pointer;
  white-space:nowrap;
}

/* ── Cards ──────────────────────────────────────────────── */
.card-ontoi {
  background:white; border-radius:var(--radius); overflow:hidden;
  box-shadow:var(--shadow); border:1px solid #ede8df;
  transition: transform .2s, box-shadow .2s;
  text-decoration:none; color:var(--text); display:block;
}
.card-ontoi:hover { transform:translateY(-3px); box-shadow:0 12px 32px rgba(0,0,0,.1); color:var(--text); }

.card-img-wrap { position:relative; overflow:hidden; }
.card-img-wrap img, .card-img-wrap .card-img-placeholder {
  width:100%; height:200px; object-fit:cover;
}
.card-img-placeholder {
  display:flex; align-items:center; justify-content:center;
  background:var(--primary-pale); height:200px;
}
.card-img-placeholder i { font-size:48px; color:var(--primary); opacity:.4; }

.card-body-ontoi { padding:16px; }
.card-cat-badge {
  font-size:11px; font-weight:700; padding:3px 10px; border-radius:20px;
  display:inline-block; margin-bottom:8px;
}
.card-title-ontoi { font-size:15px; font-weight:700; margin-bottom:6px; line-height:1.3; }
.card-meta        { font-size:12px; color:var(--text-muted); display:flex; align-items:center; gap:6px; }

/* Negocio card horizontal */
.card-horiz {
  background:white; border-radius:var(--radius);
  box-shadow:var(--shadow); border:1px solid #ede8df;
  display:flex; overflow:hidden;
  transition: transform .2s, box-shadow .2s;
  text-decoration:none; color:var(--text);
}
.card-horiz:hover { transform:translateY(-2px); box-shadow:0 10px 28px rgba(0,0,0,.1); color:var(--text); }
.card-horiz-img {
  width:110px; flex-shrink:0; object-fit:cover;
  background:var(--primary-pale);
  display:flex; align-items:center; justify-content:center;
}
.card-horiz-img img { width:110px; height:100%; object-fit:cover; }
.card-horiz-img i   { font-size:36px; color:var(--primary); opacity:.35; }
.card-horiz-body    { padding:14px; flex:1; min-width:0; }

/* ── Stars ──────────────────────────────────────────────── */
.stars { color:var(--secondary); font-size:13px; }

/* ── Category grid ──────────────────────────────────────── */
.cat-grid      { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
@media(min-width:576px){ .cat-grid { grid-template-columns:repeat(6,1fr); } }
@media(min-width:768px){ .cat-grid { grid-template-columns:repeat(8,1fr); } }

.cat-item      { text-align:center; text-decoration:none; color:var(--text); }
.cat-icon-wrap {
  width:60px; height:60px; border-radius:16px; margin:0 auto 8px;
  display:flex; align-items:center; justify-content:center;
  font-size:26px; transition: transform .2s;
}
.cat-item:hover .cat-icon-wrap { transform:scale(1.08); }
.cat-label     { font-size:11px; font-weight:500; line-height:1.3; }

/* ── Section ────────────────────────────────────────────── */
.section       { padding:40px 0; }
.section-sm    { padding:24px 0; }
.section-title {
  font-size:20px; font-weight:700; margin-bottom:20px;
  display:flex; justify-content:space-between; align-items:center;
}
.section-title a { font-size:13px; font-weight:600; color:var(--primary); }

/* ── SOS Banner ─────────────────────────────────────────── */
.sos-banner {
  background:linear-gradient(135deg,#dc2626,#b91c1c);
  border-radius:var(--radius); padding:20px;
  color:white; display:flex; align-items:center; gap:16px;
  text-decoration:none; transition:opacity .2s;
}
.sos-banner:hover { opacity:.92; color:white; }
.sos-icon {
  width:56px; height:56px; background:rgba(255,255,255,.15);
  border-radius:14px; display:flex; align-items:center; justify-content:center;
  font-size:28px; flex-shrink:0;
}

/* ── Filtros barra ──────────────────────────────────────── */
.filter-bar {
  background:white; border-bottom:1px solid var(--divider);
  padding:12px 0; position:sticky; top:var(--topnav-h); z-index:100;
}
.filter-chips { display:flex; gap:8px; overflow-x:auto; padding-bottom:2px; }
.filter-chips::-webkit-scrollbar { display:none; }
.chip {
  white-space:nowrap; padding:6px 16px; border-radius:20px;
  font-size:12px; font-weight:600; border:1.5px solid var(--divider);
  background:white; color:var(--text-muted); cursor:pointer;
  text-decoration:none; transition: all .2s; flex-shrink:0;
}
.chip.active, .chip:hover { background:var(--primary); color:white; border-color:var(--primary); }

/* ── Detalle page ───────────────────────────────────────── */
.detail-hero { position:relative; height:320px; overflow:hidden; background:var(--primary-pale); }
.detail-hero img { width:100%; height:100%; object-fit:cover; }
.detail-hero .overlay {
  position:absolute; inset:0;
  background:linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 60%);
}
.detail-gallery { display:flex; gap:8px; overflow-x:auto; padding:8px 0; }
.detail-gallery::-webkit-scrollbar { display:none; }
.thumb {
  flex-shrink:0; width:80px; height:60px; border-radius:8px;
  object-fit:cover; cursor:pointer; border:2px solid transparent;
  transition:border-color .2s;
}
.thumb.active { border-color:var(--primary); }

.info-card {
  background:white; border-radius:var(--radius);
  padding:20px; box-shadow:var(--shadow); border:1px solid #ede8df;
}
.info-row { display:flex; gap:12px; padding:10px 0; border-bottom:1px solid #f5f0e8; }
.info-row:last-child { border:none; }
.info-row i { color:var(--primary); font-size:18px; flex-shrink:0; margin-top:2px; }

.action-btns { display:flex; gap:10px; flex-wrap:wrap; }
.action-btn {
  flex:1; min-width:90px; padding:12px 8px;
  border-radius:12px; text-align:center;
  font-size:12px; font-weight:600; text-decoration:none;
  border:1.5px solid; transition: opacity .2s;
  display:flex; flex-direction:column; align-items:center; gap:4px;
}
.action-btn:hover { opacity:.85; }
.action-btn i { font-size:20px; }

/* Schedule table */
.schedule-row { display:flex; align-items:center; gap:12px; padding:7px 0; border-bottom:1px solid #f5f0e8; }
.schedule-row:last-child { border:none; }
.schedule-day { width:82px; font-size:13px; }
.schedule-day.today { color:var(--primary); font-weight:700; }
.schedule-hours { font-size:13px; color:var(--text-muted); flex:1; }
.schedule-hours.today { color:var(--primary); font-weight:600; }
.today-badge {
  font-size:10px; font-weight:700; background:var(--primary-pale);
  color:var(--primary); padding:2px 8px; border-radius:20px;
}

/* Map embed */
.map-embed { border-radius:var(--radius); overflow:hidden; border:1px solid var(--divider); }

/* ── Auth pages ─────────────────────────────────────────── */
.auth-card {
  background:white; border-radius:20px; padding:36px;
  box-shadow:0 8px 40px rgba(0,0,0,.1); max-width:420px; margin:0 auto;
}
.auth-title { font-size:22px; font-weight:700; margin-bottom:4px; }

/* ── Mensajes / Avisos ──────────────────────────────────── */
.aviso-card {
  background:white; border-radius:var(--radius);
  padding:20px; border:1px solid #ede8df; box-shadow:var(--shadow);
}

/* ── Emergency numbers ──────────────────────────────────── */
.emerg-card {
  background:white; border-radius:var(--radius); padding:16px;
  box-shadow:var(--shadow); border:1px solid #ede8df;
  display:flex; align-items:center; gap:14px;
}
.emerg-icon {
  width:50px; height:50px; border-radius:14px;
  display:flex; align-items:center; justify-content:center;
  font-size:22px; flex-shrink:0;
}
.call-btn {
  padding:8px 18px; border-radius:20px; font-size:14px;
  font-weight:700; border:none; cursor:pointer;
  text-decoration:none; flex-shrink:0;
}

/* ── Alerts ─────────────────────────────────────────────── */
.alert { border-radius:12px; border:none; font-size:13px; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background:var(--primary); padding:48px 0 24px;
  margin-top:60px;
}
.footer-title { color:rgba(255,255,255,.5); font-size:11px; font-weight:700;
                text-transform:uppercase; letter-spacing:1px; margin-bottom:14px; }
.footer-link  { display:block; color:rgba(255,255,255,.7); font-size:13px;
                margin-bottom:8px; text-decoration:none; transition:color .2s; }
.footer-link:hover { color:white; }
.emergency-pill {
  display:flex; align-items:center; gap:8px;
  background:rgba(255,255,255,.1); color:white; border-radius:10px;
  padding:8px 14px; font-size:13px; font-weight:600; text-decoration:none;
  transition:background .2s;
}
.emergency-pill:hover { background:rgba(255,255,255,.18); color:white; }
.footer-bottom {
  border-top:1px solid rgba(255,255,255,.1); margin-top:32px; padding-top:20px;
  display:flex; justify-content:space-between; align-items:center;
  font-size:12px; color:rgba(255,255,255,.4);
}

/* ── Utilities ──────────────────────────────────────────── */
.text-primary-custom { color:var(--primary) !important; }
.bg-primary-custom   { background:var(--primary) !important; }
.verified-badge { color:var(--primary); font-size:14px; }
.badge-destacado {
  background:#fef3c7; color:#92400e; font-size:10px;
  font-weight:700; padding:3px 10px; border-radius:20px; display:inline-block;
}
.skeleton { background:linear-gradient(90deg,#f0ebe0 25%,#e8e3d8 50%,#f0ebe0 75%);
            background-size:200% 100%; animation:shimmer 1.5s infinite; border-radius:8px; }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* Form controls */
.form-control, .form-select {
  border-radius:10px; border-color:#ddd; font-size:14px; padding:10px 14px;
  font-family:'Poppins',sans-serif;
}
.form-control:focus, .form-select:focus {
  border-color:var(--primary); box-shadow:0 0 0 3px rgba(27,67,50,.1);
}
.btn-primary-app {
  background:var(--primary); color:white; border:none;
  border-radius:10px; padding:12px 24px; font-size:14px;
  font-weight:700; width:100%; cursor:pointer;
  font-family:'Poppins',sans-serif; transition:background .2s;
}
.btn-primary-app:hover { background:var(--primary-light); }
