/* ================================================
   CLEAN & GARDEN — Sistema de Solicitudes
   Mobile First CSS
   ================================================ */

/* ── Variables ── */
:root {
  --azul:        #1A5E8A;
  --azul-dark:   #144a6e;
  --azul-light:  #e8f2f9;
  --verde:       #2E8B57;
  --verde-light: #e6f4ed;
  --blanco:      #ffffff;
  --gris-bg:     #f4f7fa;
  --gris-border: #dde3ea;
  --gris-texto:  #5a6472;
  --negro:       #1c2331;
  --rojo:        #e53e3e;
  --rojo-light:  #fff5f5;
  --amarillo:    #b7791f;
  --amarillo-bg: #fefcbf;

  --sombra:       0 2px 12px rgba(0, 0, 0, .07);
  --sombra-hover: 0 6px 22px rgba(26, 94, 138, .18);
  --radio:        12px;
  --radio-sm:     8px;
  --trans:        .2s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--negro);
  background: var(--gris-bg);
  line-height: 1.6;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Container ── */
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ================================================
   HEADER
   ================================================ */
.header {
  background: var(--azul);
  padding: .75rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
  position: sticky;
  top: 0;
  z-index: 200;
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.header__logo-link { display: flex; align-items: center; }
.header__logo {
  height: 46px;
  width: auto;
  object-fit: contain;
  background: white;
  border-radius: 6px;
  padding: 3px 8px;
}
.header__logo-text {
  color: var(--blanco);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.3px;
  align-items: center;
}
.header__back {
  color: rgba(255,255,255,.82);
  font-size: .85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--trans);
}
.header__back:hover { color: var(--blanco); }

/* ================================================
   HERO
   ================================================ */
.hero {
  background: linear-gradient(160deg, var(--azul) 0%, #1d6fa0 100%);
  color: var(--blanco);
  padding: 2rem 0 2.75rem;
  text-align: center;
}
.hero__title {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: .5rem;
  letter-spacing: -.3px;
}
.hero__subtitle {
  font-size: .95rem;
  opacity: .82;
  margin-bottom: 2rem;
}

/* ── Steps ── */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 480px;
  margin: 0 auto;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  min-width: 72px;
}
.step__circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 2px solid rgba(255,255,255,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  transition: background .35s, border-color .35s, color .35s;
}
.step__label {
  font-size: .68rem;
  opacity: .75;
  text-align: center;
  line-height: 1.2;
  max-width: 72px;
}
.step__line {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,.22);
  margin-bottom: 20px;
  min-width: 20px;
}
.step--active .step__circle {
  background: var(--blanco);
  color: var(--azul);
  border-color: var(--blanco);
}
.step--active .step__label { opacity: 1; font-weight: 600; }
.step--done .step__circle {
  background: var(--verde);
  border-color: var(--verde);
  color: var(--blanco);
}
.step--done .step__label { opacity: 1; }

/* ================================================
   MAIN / PANELS
   ================================================ */
.main { padding: 1.75rem 0 3.5rem; }

.panel {
  background: var(--blanco);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  padding: 1.5rem 1.25rem;
}
.panel--hidden { display: none; }

.panel__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--azul);
  margin-bottom: 1.25rem;
  line-height: 1.25;
}

/* ================================================
   TARJETAS DE SERVICIO
   ================================================ */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

.service-card {
  background: var(--blanco);
  border: 2px solid var(--gris-border);
  border-radius: var(--radio);
  padding: 1.1rem .75rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  transition: border-color var(--trans), box-shadow var(--trans), background var(--trans), transform var(--trans);
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.service-card:hover {
  border-color: var(--azul);
  box-shadow: var(--sombra-hover);
  transform: translateY(-2px);
}
.service-card:active { transform: translateY(0); }
.service-card--selected {
  border-color: var(--azul);
  background: var(--azul-light);
  box-shadow: var(--sombra-hover);
}
.service-card__icon {
  width: 46px;
  height: 46px;
  color: var(--azul);
  flex-shrink: 0;
}
.service-card__icon svg { width: 100%; height: 100%; }
.service-card__name {
  font-size: .8rem;
  font-weight: 600;
  color: var(--negro);
  line-height: 1.3;
}

/* ================================================
   FORMULARIO
   ================================================ */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: none;
  border: none;
  color: var(--azul);
  font-size: .88rem;
  font-weight: 600;
  padding: 0;
  margin-bottom: 1rem;
  transition: opacity var(--trans);
}
.btn-back:hover { opacity: .75; }

.form-section { margin-bottom: 1.75rem; }

.form-section__title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--azul);
  padding-bottom: .5rem;
  margin-bottom: .9rem;
  border-bottom: 2px solid var(--azul-light);
}
.form-section__hint {
  font-size: .83rem;
  color: var(--gris-texto);
  margin-top: -.5rem;
  margin-bottom: .85rem;
}

.form-row--2 { display: grid; grid-template-columns: 1fr; gap: 0; }

.form-group { margin-bottom: 1rem; }
.form-group:last-child { margin-bottom: 0; }

.form-label {
  display: block;
  font-size: .86rem;
  font-weight: 600;
  color: var(--negro);
  margin-bottom: .35rem;
}
.req { color: var(--rojo); margin-left: 1px; }

.form-input {
  width: 100%;
  padding: .65rem .85rem;
  border: 1.5px solid var(--gris-border);
  border-radius: var(--radio-sm);
  font-size: .95rem;
  color: var(--negro);
  background: var(--blanco);
  transition: border-color var(--trans), box-shadow var(--trans);
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus {
  outline: none;
  border-color: var(--azul);
  box-shadow: 0 0 0 3px rgba(26,94,138,.12);
}
.form-input--error {
  border-color: var(--rojo) !important;
  box-shadow: 0 0 0 3px rgba(229,62,62,.1) !important;
}
.form-textarea {
  resize: vertical;
  min-height: 86px;
  line-height: 1.5;
}

/* Select flecha custom */
select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a6472' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
  padding-right: 2.25rem;
}

/* Horario pills */
.horario-options {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.radio-pill {
  display: flex;
  align-items: center;
  cursor: pointer;
}
.radio-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.radio-pill span {
  display: inline-block;
  padding: .38rem .85rem;
  border: 1.5px solid var(--gris-border);
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--gris-texto);
  transition: border-color var(--trans), background var(--trans), color var(--trans);
}
.radio-pill input:checked + span {
  border-color: var(--azul);
  background: var(--azul-light);
  color: var(--azul);
  font-weight: 600;
}
.radio-pill:hover span { border-color: var(--azul); color: var(--azul); }

/* ================================================
   UPLOAD AREA
   ================================================ */
.upload-area {
  position: relative;
  border: 2px dashed var(--gris-border);
  border-radius: var(--radio);
  padding: 1.75rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--trans), background var(--trans);
  background: var(--gris-bg);
}
.upload-area:hover, .upload-area--drag {
  border-color: var(--azul);
  background: var(--azul-light);
}
.upload-area__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.upload-area__icon {
  width: 40px;
  height: 40px;
  color: var(--azul);
  margin: 0 auto .6rem;
  opacity: .7;
}
.upload-area__content p {
  font-size: .88rem;
  color: var(--gris-texto);
  line-height: 1.5;
}
.upload-area__cta {
  color: var(--azul);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.upload-area__note { font-size: .76rem; margin-top: .2rem; opacity: .75; }

.foto-previews {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
}
.foto-item {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: var(--radio-sm);
  overflow: hidden;
  border: 1.5px solid var(--gris-border);
  flex-shrink: 0;
}
.foto-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-item__remove {
  position: absolute;
  top: 3px;
  right: 3px;
  background: rgba(0,0,0,.62);
  color: var(--blanco);
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  transition: background var(--trans);
}
.foto-item__remove:hover { background: rgba(200,0,0,.8); }

/* ================================================
   MENSAJES
   ================================================ */
.msg-warning {
  margin-top: .6rem;
  padding: .55rem .85rem;
  border-radius: var(--radio-sm);
  font-size: .84rem;
  background: var(--amarillo-bg);
  border: 1px solid #f6e05e;
  color: var(--amarillo);
}
.msg-error {
  padding: .65rem .9rem;
  border-radius: var(--radio-sm);
  font-size: .86rem;
  background: var(--rojo-light);
  border: 1px solid #feb2b2;
  color: var(--rojo);
  margin-bottom: 1rem;
}

/* ================================================
   BOTONES
   ================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .7rem 1.5rem;
  border-radius: var(--radio-sm);
  font-size: .95rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: background var(--trans), border-color var(--trans), box-shadow var(--trans), transform var(--trans);
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn--primary {
  background: var(--azul);
  color: var(--blanco);
  border-color: var(--azul);
}
.btn--primary:hover {
  background: var(--azul-dark);
  border-color: var(--azul-dark);
  box-shadow: var(--sombra-hover);
}
.btn--primary:active { transform: scale(.98); }
.btn--primary:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}
.btn--outline {
  background: transparent;
  color: var(--azul);
  border-color: var(--azul);
}
.btn--outline:hover { background: var(--azul-light); }
.btn--ghost {
  background: transparent;
  color: var(--gris-texto);
  border-color: transparent;
  font-weight: 500;
}
.btn--ghost:hover { color: var(--azul); }
.btn--lg { padding: .9rem 2rem; font-size: 1rem; }
.btn--full { width: 100%; }

/* ================================================
   PANTALLA DE ÉXITO
   ================================================ */
.success-panel { text-align: center; padding: 2.5rem 1.5rem 2rem; }

.success-icon {
  width: 72px;
  height: 72px;
  color: var(--verde);
  margin: 0 auto 1.25rem;
}
.success-icon svg { width: 100%; height: 100%; }

.success-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--azul);
  margin-bottom: .65rem;
  line-height: 1.2;
}
.success-text {
  color: var(--gris-texto);
  font-size: .95rem;
  max-width: 420px;
  margin: 0 auto 1.75rem;
  line-height: 1.6;
}
.success-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
  background: var(--azul);
  color: rgba(255,255,255,.82);
  padding: 1.75rem 0 1rem;
  margin-top: 2.5rem;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.footer__logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  background: white;
  border-radius: 6px;
  padding: 2px 7px;
  margin-bottom: .35rem;
}
.footer__logo-fallback {
  color: var(--blanco);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: .35rem;
}
.footer__tagline { font-size: .8rem; opacity: .65; }
.footer__links { display: flex; flex-direction: column; gap: .45rem; }
.footer__link {
  font-size: .86rem;
  transition: color var(--trans);
}
.footer__link:hover { color: var(--blanco); }
.footer__copy {
  text-align: center;
  font-size: .76rem;
  opacity: .45;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1rem;
}

/* ================================================
   UTILIDADES
   ================================================ */
.hidden { display: none !important; }

/* ================================================
   TABLET 640px+
   ================================================ */
@media (min-width: 640px) {
  .hero { padding: 2.25rem 0 3rem; }
  .hero__title { font-size: 2rem; }
  .hero__subtitle { font-size: 1rem; }

  .services-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .service-card { padding: 1.35rem 1rem; }
  .service-card__icon { width: 52px; height: 52px; }
  .service-card__name { font-size: .85rem; }

  .panel { padding: 2rem; }
  .main { padding: 2rem 0 4rem; }

  .form-row--2 { grid-template-columns: 1fr 1fr; gap: 1rem; }

  .footer__inner { flex-direction: row; justify-content: space-between; align-items: flex-start; }

  .success-actions { flex-direction: row; justify-content: center; }
}

/* ================================================
   DESKTOP 1024px+
   ================================================ */
@media (min-width: 1024px) {
  .hero { padding: 2.5rem 0 3.25rem; }
  .hero__title { font-size: 2.4rem; }

  .services-grid { gap: 1.1rem; }
  .service-card { padding: 1.5rem 1.1rem; }
  .service-card__icon { width: 58px; height: 58px; }
  .service-card__name { font-size: .9rem; }

  .panel { padding: 2.25rem 2.5rem; }
  .panel__title { font-size: 1.35rem; }

  .main { padding: 2.5rem 0 5rem; }
}
