:root {
  --navy: #080080;
  --navy-dark: #050053;
  --orange: #fe5001;
  --orange-light: #fe7b40;
  --ink: #1a1a2e;
  --gray: #64748b;
  --gray-light: #f1f5f9;
  --border: #e2e8f0;
  --white: #ffffff;
  --success: #16a34a;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(8, 0, 128, 0.08);
  --shadow-lg: 0 20px 60px rgba(8, 0, 128, 0.15);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 2px solid transparent; cursor: pointer; transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: var(--orange-light); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(254, 80, 1, 0.3); }
.btn-primary-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-primary-outline:hover { background: var(--navy); color: var(--white); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-outline:hover { border-color: var(--navy); color: var(--navy); }
.btn-outline-block { width: 100%; background: var(--white); color: var(--navy); border-color: var(--border); justify-content: flex-start; text-align: left; padding: 14px 18px; }
.btn-outline-block:hover { border-color: var(--navy); }
.btn-cta { background: var(--white); color: var(--navy); font-size: 17px; padding: 16px 36px; }
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,0.2); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: all 0.25s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: 0 2px 16px rgba(0,0,0,0.05); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 40px; width: 40px; object-fit: contain; }
.brand-text { font-size: 19px; font-weight: 700; color: var(--navy); }
.brand-text strong { color: var(--orange); }
.main-nav { display: flex; align-items: center; gap: 28px; font-weight: 600; font-size: 15px; }
.main-nav a { color: var(--gray); transition: color 0.2s ease; padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a.active { color: var(--navy); border-bottom-color: var(--orange); }

/* Hero */
.hero {
  position: relative; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white); padding: 90px 0 130px; overflow: hidden; text-align: center;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(254,80,1,0.25), transparent 45%),
              radial-gradient(circle at 80% 80%, rgba(254,123,64,0.2), transparent 45%);
}
.hero-inner { position: relative; max-width: 760px; }
.hero .eyebrow { display: inline-block; background: rgba(255,255,255,0.15); padding: 8px 18px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 20px; }
.hero h1 { font-size: clamp(32px, 6vw, 56px); font-weight: 800; line-height: 1.1; margin: 0 0 20px; }
.hero h1 span { color: var(--orange-light); }
.hero-subtitle { font-size: 18px; color: rgba(255,255,255,0.85); line-height: 1.6; margin: 0 auto 32px; max-width: 600px; }
.hero-wave { position: absolute; bottom: -1px; left: 0; right: 0; line-height: 0; }
.hero-wave svg { width: 100%; height: 70px; }
.hero-wave path { fill: var(--white); }

/* Sections */
.section { padding: 64px 0; }
.section-heading { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-heading.center { margin-left: auto; margin-right: auto; }
.section-heading .eyebrow { color: var(--orange); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 13px; }
.section-heading h2 { font-size: clamp(24px, 4vw, 34px); color: var(--navy); margin: 8px 0 0; font-weight: 800; }
.section-heading p { color: var(--gray); margin-top: 12px; }

/* Categories */
.categories-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px;
}
.category-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px;
  cursor: pointer; transition: all 0.22s ease; font-family: var(--font);
}
.category-card:hover { border-color: var(--orange); transform: translateY(-4px); box-shadow: var(--shadow); }
.category-card i { font-size: 28px; color: var(--navy); }
.category-card:hover i { color: var(--orange); }
.category-card span { font-size: 14px; font-weight: 600; text-align: center; color: var(--ink); }

/* Form card */
.form-section { background: var(--gray-light); }
.form-card { background: var(--white); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 40px; max-width: 760px; margin: 0 auto; }
.form-progress { display: flex; align-items: center; margin-bottom: 32px; }
.progress-step { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--gray); font-size: 14px; }
.progress-step span { width: 30px; height: 30px; border-radius: 50%; background: var(--gray-light); color: var(--gray); display: flex; align-items: center; justify-content: center; font-size: 14px; transition: all 0.2s ease; }
.progress-step.active { color: var(--navy); }
.progress-step.active span { background: var(--orange); color: var(--white); }
.progress-line { flex: 1; height: 2px; background: var(--border); margin: 0 16px; }

.form-step { display: none; animation: fadeIn 0.3s ease; }
.form-step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.form-row-wide { grid-column: 1 / -1; }
.form-row label { font-weight: 600; font-size: 14px; color: var(--ink); }
.form-row input[type="text"], .form-row input[type="email"], .form-row input[type="tel"],
.form-row input[type="password"], .form-row input[type="number"], .form-row select, .form-row textarea {
  padding: 13px 16px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 15px;
  font-family: var(--font); transition: border-color 0.2s ease; width: 100%;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; border-color: var(--orange); }
.form-actions { margin-top: 8px; display: flex; justify-content: flex-end; }
.form-actions-split { justify-content: space-between; }

.photos-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.photo-upload { position: relative; }
.photo-upload label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.photo-upload input[type="file"] { position: absolute; inset: 0; top: 26px; opacity: 0; cursor: pointer; height: 140px; }
.photo-preview {
  height: 140px; border: 2px dashed var(--border); border-radius: 12px; display: flex;
  align-items: center; justify-content: center; color: var(--gray); font-size: 26px; overflow: hidden;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }

.verify-phone-box { background: var(--gray-light); border-radius: 12px; padding: 20px; margin: 24px 0; }
.verify-phone-box p { margin: 0 0 14px; font-weight: 600; font-size: 14px; color: var(--navy); }
.verified-badge { color: var(--success); font-weight: 700; display: flex; align-items: center; gap: 8px; }
#recaptchaContainer { margin-top: 8px; }

.turnstile-row { margin: 20px 0; display: flex; justify-content: center; }
.confirm-note { font-size: 13px; color: var(--gray); text-align: center; }

.form-success { text-align: center; padding: 20px 0; }
.form-success i { font-size: 56px; color: var(--success); margin-bottom: 16px; }
.form-success h3 { font-size: 26px; color: var(--navy); margin: 0 0 8px; }
.tracking-code { font-size: 32px; font-weight: 800; color: var(--orange); letter-spacing: 0.05em; margin: 16px 0; }
.form-success .btn { margin: 8px 6px 0; }

/* Map modal */
.map-modal { position: fixed; inset: 0; background: rgba(8,0,128,0.5); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.map-modal-inner { background: var(--white); border-radius: 16px; width: 100%; max-width: 640px; overflow: hidden; box-shadow: var(--shadow-lg); }
.map-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.map-modal-header h3 { margin: 0; color: var(--navy); }
.map-modal-header button { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--gray); }
.map-search-input { width: calc(100% - 40px); margin: 14px 20px 0; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 15px; font-family: var(--font); }
.map-canvas { height: 340px; width: 100%; margin-top: 14px; }
.map-modal-footer { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.map-address-label { flex: 1; font-size: 13px; color: var(--gray); min-width: 140px; }

/* Tracking */
.tracking-container { max-width: 560px; }
.tracking-form { display: flex; gap: 10px; margin-bottom: 32px; }
.tracking-form input { flex: 1; padding: 14px 18px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 15px; text-transform: uppercase; }
.tracking-result { background: var(--gray-light); border-radius: var(--radius); padding: 28px; }
.tracking-result-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.tracking-code-badge { font-weight: 800; color: var(--navy); font-size: 18px; letter-spacing: 0.03em; }
.tracking-code-badge.small { font-size: 13px; }
.status-badge { padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.status-nuevo { background: #dbeafe; color: #1d4ed8; }
.status-en_progreso { background: #fef3c7; color: #b45309; }
.status-resuelto { background: #dcfce7; color: #15803d; }
.status-no_procede { background: #fee2e2; color: #b91c1c; }
.tracking-date { color: var(--gray); font-size: 13px; }
.tracking-description { background: var(--white); padding: 14px; border-radius: 10px; margin-top: 12px; }
.tracking-empty { text-align: center; color: var(--gray); padding: 30px 0; }
.tracking-empty i { font-size: 36px; margin-bottom: 12px; color: var(--orange); display: block; }

/* Legal */
.legal-container { max-width: 760px; }
.legal-section h1 { color: var(--navy); font-size: 32px; }
.legal-updated { color: var(--gray); font-size: 13px; margin-bottom: 28px; }
.legal-section h2 { color: var(--navy); font-size: 19px; margin-top: 32px; }
.legal-section p { line-height: 1.7; color: var(--ink); }

/* 404 */
.not-found-inner { text-align: center; padding: 80px 0; }
.not-found-inner i { font-size: 56px; color: var(--orange); margin-bottom: 16px; }
.not-found-inner h1 { font-size: 64px; color: var(--navy); margin: 0; }

/* Flash */
.flash { padding: 14px 20px; border-radius: 10px; margin: 16px auto; max-width: 1100px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.flash-success { background: #dcfce7; color: #15803d; }
.flash-error { background: #fee2e2; color: #b91c1c; }

/* Footer */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,0.7); padding: 28px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a:hover { color: var(--white); }

@media (max-width: 720px) {
  .main-nav { gap: 16px; font-size: 13px; }
  .main-nav a[target="_blank"] { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-card { padding: 24px 18px; }
  .photos-row { grid-template-columns: 1fr; }
  .form-progress { font-size: 12px; }
  .hero { padding: 60px 0 100px; }
}
