/*==========================================================
  URGENCIAS 24HS CON IA — González Surtidores
==========================================================*/
.section-urg {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 6%, rgba(255,255,255,.10) 0 90px, transparent 91px),
    radial-gradient(circle at 0% 100%, rgba(0,0,0,.12) 0 160px, transparent 161px),
    linear-gradient(160deg, #F5640A 0%, #E55A06 60%, #C44E06 100%);
  color: #fff;
  padding: 44px 16px 48px;
  scroll-margin-top: 60px;
}
.urg-inner { display: grid; gap: 26px; }
.urg-intro { padding: 0 8px; }

.urg-live {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
  background: rgba(17,17,17,.88); color: #fff;
  padding: 7px 14px; border-radius: 30px; margin-bottom: 16px;
}
.urg-live .live { width: 8px; height: 8px; border-radius: 50%; background: #3CE07A; box-shadow: 0 0 0 0 rgba(60,224,122,.7); animation: urgPing 1.8s infinite; }
@keyframes urgPing { 70% { box-shadow: 0 0 0 9px rgba(60,224,122,0); } 100% { box-shadow: 0 0 0 0 rgba(60,224,122,0); } }

.urg-intro h2 { font-family: var(--font-display); font-weight: 400; font-size: 46px; line-height: 1; margin-bottom: 12px; }
.urg-intro > p { font-size: 14px; line-height: 1.6; color: rgba(255,255,255,.9); margin-bottom: 22px; }

.urg-steps { list-style: none; counter-reset: s; display: grid; gap: 12px; }
.urg-steps li {
  counter-increment: s; position: relative;
  padding: 12px 14px 12px 54px; border-radius: 14px;
  background: rgba(17,17,17,.14); border: 1px solid rgba(255,255,255,.18);
}
.urg-steps li::before {
  content: counter(s); position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; background: #111; color: #fff;
  font-family: var(--font-display); font-size: 18px; display: flex; align-items: center; justify-content: center;
}
.urg-steps b { display: block; font-size: 14px; }
.urg-steps span { display: block; font-size: 12.5px; color: rgba(255,255,255,.85); line-height: 1.45; margin-top: 2px; }

/* Tarjeta */
.urg-card {
  scroll-margin-top: 80px;
  background: #111; color: #fff; border-radius: 22px; padding: 22px 18px;
  box-shadow: 0 30px 60px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.06);
}
.urg-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.urg-card-head h3 { font-family: var(--font-display); font-weight: 400; font-size: 28px; letter-spacing: .5px; }
.urg-card-head span { font-size: 12px; color: #9a9a9a; background: #1E1E1E; padding: 5px 10px; border-radius: 20px; }

.urg-grid { display: grid; gap: 12px; margin-bottom: 12px; }
.urg-field { display: block; margin-bottom: 14px; }
.urg-grid .urg-field { margin-bottom: 0; }
.urg-field > span, .urg-desc-label {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12.5px; font-weight: 600; color: #cfcfcf; margin-bottom: 7px;
}
.urg-field em { font-style: normal; color: #777; font-weight: 500; }

.urg-card input[type=text], .urg-card input[type=tel], .urg-card textarea {
  width: 100%; font: inherit; font-size: 16px; color: #fff;
  background: #1A1A1A; border: 1px solid #2E2E2E; border-radius: 12px;
  padding: 12px 14px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.urg-card textarea { resize: vertical; min-height: 104px; line-height: 1.5; }
.urg-card input::placeholder, .urg-card textarea::placeholder { color: #666; }
.urg-card input:focus, .urg-card textarea:focus { border-color: #F5640A; box-shadow: 0 0 0 3px rgba(245,100,10,.22); }
.urg-card .is-invalid { border-color: #ff5a5a !important; }

/* Dirección + autocompletado */
.urg-addr-row { display: flex; gap: 8px; }
.urg-ac { position: relative; flex: 1; min-width: 0; }
.urg-gps {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  background: #1E1E1E; color: #fff; border: 1px solid #2E2E2E; border-radius: 12px;
  padding: 0 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .2s, background .2s;
}
.urg-gps:hover { border-color: #F5640A; background: rgba(245,100,10,.12); }
.urg-gps.loading { opacity: .6; pointer-events: none; }
.urg-gps span { display: inline; }
.urg-sug {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px);
  list-style: none; background: #1C1C1C; border: 1px solid #333; border-radius: 12px; overflow: hidden;
  box-shadow: 0 16px 30px rgba(0,0,0,.45); max-height: 260px; overflow-y: auto;
}
.urg-sug li { padding: 10px 14px; font-size: 13.5px; cursor: pointer; border-bottom: 1px solid #262626; line-height: 1.35; }
.urg-sug li small { display: block; color: #888; font-size: 12px; }
.urg-sug li:last-child { border-bottom: 0; }
.urg-sug li:hover, .urg-sug li.active { background: rgba(245,100,10,.15); }

.urg-map-wrap { margin-top: 10px; animation: urgIn .35s ease; }
.urg-map { height: 190px; border-radius: 14px; overflow: hidden; border: 1px solid #2E2E2E; background: #1A1A1A; z-index: 0; }
.urg-map-wrap small { display: block; font-size: 11.5px; color: #8a8a8a; margin-top: 6px; }
@keyframes urgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.urg-pin {
  width: 30px; height: 30px; border-radius: 50% 50% 50% 0; background: #F5640A; transform: rotate(-45deg);
  border: 3px solid #fff; box-shadow: 0 6px 14px rgba(0,0,0,.45);
}
.urg-pin::after { content: ''; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #111; left: 7px; top: 7px; }

/* Chips */
.urg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.urg-chips button {
  font: inherit; font-size: 13px; color: #ddd; background: #1A1A1A; border: 1px solid #2E2E2E;
  padding: 8px 12px; border-radius: 30px; cursor: pointer; transition: all .15s;
}
.urg-chips button:hover { border-color: #F5640A; }
.urg-chips button.on { background: #F5640A; border-color: #F5640A; color: #fff; }

/* Dictado */
.urg-mic {
  font: inherit; font-size: 12px; font-weight: 600; color: #fff; background: #1E1E1E;
  border: 1px solid #333; border-radius: 20px; padding: 5px 11px; cursor: pointer;
}
.urg-mic.rec { background: #D62828; border-color: #D62828; animation: urgRec 1.2s infinite; }
@keyframes urgRec { 50% { box-shadow: 0 0 0 6px rgba(214,40,40,.25); } }

/* Archivos */
.urg-drop {
  position: relative; display: flex; align-items: center; gap: 14px;
  border: 1.5px dashed #3A3A3A; border-radius: 14px; padding: 16px; cursor: pointer;
  color: #bbb; font-size: 13.5px; line-height: 1.4; transition: border-color .2s, background .2s;
}
.urg-drop:hover, .urg-drop.drag { border-color: #F5640A; background: rgba(245,100,10,.08); }
.urg-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.urg-drop b { color: #fff; }
.urg-drop small { color: #777; }
.urg-drop-ico { font-size: 26px; width: 46px; height: 46px; border-radius: 12px; background: #1E1E1E; display: flex; align-items: center; justify-content: center; flex: none; }

.urg-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.urg-thumbs:empty { display: none; }
.urg-thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #1A1A1A; }
.urg-thumb img, .urg-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.urg-thumb .tag-v { position: absolute; left: 6px; bottom: 6px; font-size: 10px; font-weight: 700; background: rgba(0,0,0,.7); padding: 2px 6px; border-radius: 6px; }
.urg-thumb button {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.75); color: #fff; cursor: pointer; font-size: 13px; line-height: 1;
}

.urg-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.urg-error { background: rgba(214,40,40,.14); border: 1px solid rgba(214,40,40,.5); color: #ffb3b3; font-size: 13px; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; line-height: 1.45; }
.urg-error a { color: #fff; font-weight: 700; }

.urg-submit {
  position: relative; overflow: hidden; width: 100%; border: 0; cursor: pointer;
  background: #F5640A; color: #fff; font: inherit; font-size: 16px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 16px; border-radius: 14px; transition: background .2s, transform .15s;
}
.urg-submit:hover { background: #C44E06; }
.urg-submit:disabled { cursor: wait; background: #7a3a12; }
.urg-submit-txt { position: relative; z-index: 1; }
.urg-progress { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #F5640A; transition: width .2s; }
.urg-privacy { text-align: center; font-size: 11.5px; color: #777; margin-top: 10px; }

/* Resultado */
.urg-result { animation: urgIn .4s ease; }
.urg-result-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.urg-check { width: 52px; height: 52px; border-radius: 50%; background: #2A9D57; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; flex: none; box-shadow: 0 0 0 6px rgba(42,157,87,.2); }
.urg-result h3 { font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1; }
.urg-result-top p { font-size: 14px; color: #aaa; margin-top: 4px; }
.urg-result-top b { color: #fff; letter-spacing: .5px; }
.urg-prio { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 30px; margin-bottom: 12px; }
.urg-prio.critica { background: rgba(214,40,40,.18); color: #ff8a8a; }
.urg-prio.alta { background: rgba(245,100,10,.18); color: #ffa366; }
.urg-prio.media { background: rgba(224,168,0,.18); color: #ffd166; }
.urg-prio.baja { background: rgba(42,157,87,.18); color: #7be0a4; }
.urg-resumen { font-size: 14.5px; line-height: 1.6; color: #ddd; margin-bottom: 14px; }
.urg-safety { background: #1A1A1A; border-left: 3px solid #F5640A; border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
.urg-safety h4 { font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: #F5640A; margin-bottom: 8px; }
.urg-safety ul { list-style: none; display: grid; gap: 8px; }
.urg-safety li { font-size: 13.5px; line-height: 1.45; color: #e6e6e6; padding-left: 22px; position: relative; }
.urg-safety li::before { content: '⚠'; position: absolute; left: 0; color: #F5640A; }
.urg-result-actions { display: grid; gap: 10px; }
.urg-result-actions .btn-primary, .urg-result-actions .btn-ghost { text-align: center; justify-content: center; text-decoration: none; }
.urg-wa-btn { border-color: #25D366 !important; color: #fff; }
.urg-wa-btn:hover { background: rgba(37,211,102,.12) !important; }
.urg-again { display: block; margin: 14px auto 0; background: none; border: 0; color: #888; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }

/* Leaflet en tema oscuro */
.urg-map .leaflet-control-attribution { font-size: 9px; background: rgba(255,255,255,.75); }

/* Nav: link de urgencias destacado */
.nav-links a.nav-urg { color: var(--orange); font-weight: 700; }


@media screen and (min-width: 768px) {
  .section-urg { padding: 90px 60px; }
  .urg-inner { max-width: 1200px; margin: 0 auto; grid-template-columns: 0.85fr 1.15fr; gap: 60px; align-items: start; }
  .urg-intro { padding: 20px 0 0; position: sticky; top: 110px; }
  .urg-intro h2 { font-size: 72px; }
  .urg-intro > p { font-size: 16px; }
  .urg-steps b { font-size: 15px; }
  .urg-steps span { font-size: 13.5px; }
  .urg-card { padding: 32px 30px; }
  .urg-grid { grid-template-columns: 1fr 1fr; }
  .urg-grid .urg-field:first-child { grid-column: span 2; }
  .urg-map { height: 220px; }
  .urg-result-actions { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .urg-live .live, .urg-mic.rec { animation: none; }
}

/* Indicación de "Mi ubicación" junto a la dirección */
.urg-addr-label { flex-wrap: wrap; justify-content: flex-start !important; row-gap: 3px; }
.urg-hint {
  font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  color: #F5640A !important; background: rgba(245,100,10,.12); padding: 3px 8px; border-radius: 20px;
}
