:root {
  --bg: #f3f6f8;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #172033;
  --muted: #657489;
  --line: #dbe3ec;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --nav: #111827;
  --accent: #f59e0b;
  --danger: #dc2626;
  --success: #159447;
  --info: #2563eb;
  --shadow-sm: 0 8px 22px rgba(18, 32, 54, 0.08);
  --shadow-md: 0 18px 45px rgba(18, 32, 54, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

html {
  background: var(--bg);
}

body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(245, 158, 11, 0.04) 42%, rgba(243, 246, 248, 0) 74%),
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.08), transparent 34rem),
    var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.page {
  min-height: 100vh;
}

.landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 28px;
  background:
    linear-gradient(120deg, rgba(17, 24, 39, 0.92), rgba(15, 118, 110, 0.82)),
    url("../images/logo_turbo.png") center 42% / min(760px, 86vw) no-repeat,
    #111827;
}

.landing::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 28vh;
  background: linear-gradient(180deg, transparent, rgba(17, 24, 39, 0.72));
}

.overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.46), rgba(17, 24, 39, 0.1)),
    rgba(0, 0, 0, 0.16);
}

.landing-content {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
  color: #fff;
  text-align: center;
  padding: 32px 18px;
}

.landing-logo {
  display: block;
  width: min(520px, 88vw);
  margin: 0 auto 2px;
  filter: drop-shadow(0 20px 32px rgba(0, 0, 0, 0.34));
}

.landing-content h1 {
  margin-bottom: 12px;
  font-size: clamp(2.15rem, 5vw, 4.25rem);
  font-weight: 800;
}

.landing-content p {
  max-width: 620px;
  margin: 0 auto 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.18rem, 2.5vw, 1.8rem);
  font-weight: 650;
}

.landing-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn,
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 750;
  line-height: 1;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.btn {
  padding: 15px 28px;
  font-size: 1rem;
}

.btn-primary {
  background: var(--accent);
  color: #111827;
  box-shadow: 0 16px 30px rgba(245, 158, 11, 0.28);
}

.btn-primary:hover {
  background: #fbbf24;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #fff;
  color: var(--brand-dark);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.btn-secondary:hover {
  background: #ecfeff;
  transform: translateY(-1px);
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 38px);
  background: rgba(17, 24, 39, 0.96);
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.18);
  backdrop-filter: blur(14px);
}

.navbar h2 {
  font-size: 1.12rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.86);
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 700;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(245, 158, 11, 0.16);
  color: #fff;
  border-color: rgba(245, 158, 11, 0.34);
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 42px;
}

.card {
  margin-bottom: 20px;
  padding: clamp(20px, 3vw, 30px);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(219, 227, 236, 0.94);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card h1,
.card h2,
.card h3 {
  color: #111827;
  line-height: 1.15;
}

.card h1 {
  margin-bottom: 8px;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.card h2 {
  margin-bottom: 14px;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
}

.card h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.card p {
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.grid > a {
  display: flex;
  min-width: 0;
  height: 100%;
}

.info-box {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  min-height: 132px;
  padding: 22px 22px 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92)),
    var(--surface);
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(18, 32, 54, 0.1);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.info-box::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(15, 118, 110, 0.22), rgba(245, 158, 11, 0.18));
}

.info-box::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.12), rgba(15, 118, 110, 0));
  pointer-events: none;
}

.grid > a:hover .info-box {
  transform: translateY(-3px);
  border-color: rgba(15, 118, 110, 0.36);
  box-shadow: 0 22px 48px rgba(18, 32, 54, 0.16);
}

.grid > a:nth-child(2) .info-box {
  border-left-color: var(--info);
}

.grid > a:nth-child(3) .info-box {
  border-left-color: var(--accent);
}

.grid > a:nth-child(4) .info-box {
  border-left-color: var(--success);
}

.info-box:nth-child(2) {
  border-left-color: var(--accent);
}

.info-box:nth-child(3) {
  border-left-color: var(--success);
}

.info-box h3 {
  max-width: calc(100% - 28px);
  color: #526176;
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.info-box p {
  max-width: 92%;
  margin-top: 6px;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.48;
}

.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  margin-bottom: 7px;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 13px;
  background: #fff;
  border: 1px solid #cfd9e5;
  border-radius: var(--radius);
  color: var(--ink);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #94a3b8;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14);
}

input:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
  outline-color: #ef4444;
}

input:invalid:not(:placeholder-shown) + .error-msg {
  display: block;
}

.error-msg {
  display: none;
  margin-top: 5px;
  color: #ef4444;
  font-size: 0.82rem;
}

button {
  border: none;
  cursor: pointer;
}

.btn-submit {
  padding: 11px 18px;
  background: var(--brand);
  color: white;
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.2);
}

.btn-submit:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.btn-submit:active,
.btn:active {
  transform: translateY(0);
}

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
}

table th,
table td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf1f6;
  text-align: left;
  vertical-align: middle;
}

table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

table tbody tr {
  transition: background 0.14s ease;
}

table tbody tr:hover {
  background: #f8fbfb;
}

table tr:last-child td {
  border-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: capitalize;
}

.badge-pendiente {
  background: #fff7ed;
  color: #9a3412;
}

.badge-confirmada {
  background: #e0f2fe;
  color: #075985;
}

.badge-completada {
  background: #dcfce7;
  color: #166534;
}

.alert {
  display: none;
  margin-top: 15px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 650;
}

.alert-success {
  background: #ecfdf5;
  color: #166534;
  border-color: #bbf7d0;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.app-footer {
  margin-top: 36px;
  padding: 34px clamp(18px, 4vw, 42px);
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(15, 118, 110, 0.9)),
    #111827;
  color: rgba(255, 255, 255, 0.82);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.6fr) repeat(3, minmax(180px, 1fr));
  gap: 24px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.footer-brand-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 4px;
}

.footer-logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  padding: 10px;
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(236, 253, 245, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.footer-brand strong {
  display: block;
  color: #fff;
  font-size: 1.65rem;
  font-weight: 850;
}

.footer-brand span {
  display: block;
  max-width: 280px;
  margin-top: 3px;
}

.footer-brand span,
.app-footer p {
  color: rgba(255, 255, 255, 0.74);
}

.app-footer h3 {
  margin-bottom: 10px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-footer p {
  margin: 4px 0;
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}

.app-footer strong {
  color: #fbbf24;
  font-size: 1.1rem;
}

.app-footer a {
  color: #d1fae5;
  font-weight: 750;
}

.app-footer a:hover {
  color: #fff;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: stretch;
}

.map-panel {
  overflow: hidden;
  min-height: 560px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-md);
}

#mapaTalleres {
  width: 100%;
  height: 100%;
  min-height: 560px;
}

.map-list-card {
  margin-bottom: 0;
}

.map-list {
  display: grid;
  gap: 10px;
  max-height: 490px;
  overflow: auto;
  padding-right: 2px;
}

.map-list-item {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.map-list-item:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.38);
  box-shadow: var(--shadow-sm);
}

.map-list-item strong,
.map-list-item span {
  display: block;
}

.map-list-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.9rem;
}

.map-marker-shell {
  background: transparent;
  border: 0;
}

.map-marker {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50% 50% 50% 0;
  background: var(--brand);
  box-shadow: 0 14px 24px rgba(15, 118, 110, 0.32);
  transform: rotate(-45deg);
}

.map-marker span {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
}

.map-popup strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
}

.map-popup p {
  margin: 5px 0;
  color: var(--muted);
}

.map-popup span {
  color: var(--brand-dark);
  font-weight: 750;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 3px;
}

@media (max-width: 768px) {
  body {
    background:
      linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(243, 246, 248, 0) 55%),
      var(--bg);
  }

  .landing {
    align-items: flex-end;
    padding: 24px 18px 56px;
    background:
      linear-gradient(180deg, rgba(17, 24, 39, 0.28), rgba(17, 24, 39, 0.9)),
      url("../images/logo_turbo.png") center 30% / min(420px, 94vw) no-repeat,
      #111827;
  }

  .landing-logo {
    width: min(360px, 92vw);
  }

  .landing-content {
    padding: 24px 0;
  }

  .landing-buttons .btn {
    width: min(320px, 100%);
  }

  .navbar {
    position: sticky;
    padding: 12px 16px;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 16px;
    background: rgba(17, 24, 39, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    justify-content: center;
  }

  .container {
    width: min(100% - 22px, 1180px);
    margin-top: 18px;
  }

  .card {
    padding: 18px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .map-layout {
    grid-template-columns: 1fr;
  }

  .map-panel,
  #mapaTalleres {
    min-height: 440px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  table th,
  table td {
    padding: 11px 12px;
  }
}
