@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-page: #fbfbfd;
  --bg-card: #ffffff;
  --bg-card-hover: #fafafa;
  --bg-input: #f5f5f7;
  --bg-input-focus: #ffffff;

  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --border-focus: rgba(249, 115, 22, 0.5);

  --text: #1a1a2e;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;

  --accent: #f97316;
  --accent-hover: #ea580c;
  --accent-light: rgba(249, 115, 22, 0.08);
  --accent-glow: rgba(249, 115, 22, 0.15);
  --accent-2: #fb923c;
  --accent-gradient: linear-gradient(135deg, #f97316, #ef4444);

  --indigo: #4f46e5;
  --indigo-light: rgba(79, 70, 229, 0.08);

  --success: #059669;
  --success-bg: rgba(5, 150, 105, 0.08);
  --success-border: rgba(5, 150, 105, 0.3);

  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.06);
  --danger-border: rgba(220, 38, 38, 0.25);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.1);

  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --max-width: 1200px;
}

/* ================================================================
   BASE
   ================================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-page);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ================================================================
   GLASS PANEL — now white cards
   ================================================================ */
.glass-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/* ================================================================
   HEADER
   ================================================================ */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s;
}
.brand:hover { transform: scale(1.02); }

.logo-img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: contain;
  box-shadow: var(--shadow-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.brand-text h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}
.brand-text p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 400;
}

/* Nav */
.main-nav {
  display: flex;
  gap: 6px;
  background: var(--bg-card);
  padding: 6px 8px;
  border-radius: 99px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.main-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 99px;
  transition: all 0.2s;
}
.main-nav a:hover {
  color: var(--text);
  background: var(--bg-input);
}
.main-nav a.active {
  color: var(--accent);
  background: var(--accent-light);
  font-weight: 600;
}

.main-nav .nav-item {
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s;
}
.main-nav .nav-item:hover {
  color: var(--text);
  background: var(--bg-input);
}
.main-nav .nav-item.active {
  color: var(--accent);
  background: var(--accent-light);
}
.main-nav .nav-link-highlight {
  background: var(--accent-gradient);
  border: none;
  border-radius: 99px;
  padding: 8px 18px !important;
  color: #fff !important;
  font-weight: 600 !important;
  transition: all 0.25s ease;
  box-shadow: 0 2px 12px rgba(249, 115, 22, 0.3);
}
.main-nav .nav-link-highlight:hover,
.main-nav .nav-link-highlight.active {
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.4);
  transform: translateY(-1px);
  filter: brightness(1.05);
  color: #fff !important;
  background: var(--accent-gradient);
}

/* ================================================================
   MAIN LAYOUT
   ================================================================ */
.content-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.calculator-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 10px;
}

/* ================================================================
   FORMS
   ================================================================ */
.form-section, .result-section, .map-section {
  padding: 28px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.form-section::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 120px; height: 120px;
  background: var(--accent-glow);
  filter: blur(60px);
  z-index: 0;
  border-radius: 50%;
}

.section-title {
  margin: 0 0 20px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.form-group { margin-bottom: 16px; }

label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
}

input, select {
  width: 100%;
  font-family: inherit;
  padding: 12px 14px;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 0.95rem;
  transition: all 0.2s ease;
  outline: none;
}
input:focus, select:focus {
  border-color: var(--accent);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 4px var(--accent-light);
}
select option {
  background: var(--bg-card);
  color: var(--text);
}

button.primary-btn {
  width: 100%;
  padding: 14px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: white;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.3);
  margin-top: 10px;
}
button.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.4);
  filter: brightness(1.05);
}
button.primary-btn:active { transform: translateY(0); }

/* ================================================================
   MAP
   ================================================================ */
.right-col {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

.map-container {
  width: 100%;
  height: 400px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
  background: #f0f0f4;
}

/* Leaflet light overrides */
.leaflet-container { background: #eef0f4; font-family: inherit; }
.leaflet-bar a { background: var(--bg-card) !important; color: var(--text) !important; border-color: var(--border) !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: var(--shadow-md);
}

/* ================================================================
   RESULTS (Calculator)
   ================================================================ */
.scenario-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.scenario-card {
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all 0.2s;
}
.scenario-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.scenario-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.scenario-card h3 { margin: 0; font-size: 1rem; color: var(--text); }

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge.best { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.badge.worst { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.badge.neutral { background: var(--bg-input); color: var(--text-muted); border: 1px solid var(--border); }

.result-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
}
.result-list li {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.result-list li strong {
  color: var(--text);
  font-weight: 600;
}

.total-cost {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.total-cost span { color: var(--text-secondary); font-size: 0.9rem; }
.total-cost strong { color: var(--accent); font-size: 1.3rem; font-weight: 800; }

.notes {
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

/* ================================================================
   AD SLOTS
   ================================================================ */
.ad-slot { margin: 24px auto; text-align: center; width: 100%; }
.ad-top { max-width: 970px; min-height: 90px; }
.ad-sidebar { width: 100%; min-height: 250px; }
.ad-in-article { margin: 32px 0; min-height: 250px; }
.ad-placeholder {
  background: var(--bg-input);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-xs);
  display: grid; place-items: center;
  width: 100%; height: 100%; min-height: inherit;
  color: var(--text-muted); font-size: 0.82rem;
}

/* ================================================================
   FOOTER
   ================================================================ */
footer {
  background: var(--text);
  border-top: none;
  padding: 60px 20px 20px;
  margin-top: 80px;
}
.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}
.footer-section h4 { color: #fff; margin: 0 0 20px; font-weight: 700; font-size: 0.95rem; }
.footer-section p { color: rgba(255,255,255,0.6); font-size: 0.9rem; line-height: 1.6; }
.footer-section ul { list-style: none; padding: 0; margin: 0; }
.footer-section ul li { margin-bottom: 10px; }
.footer-section ul a { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.footer-section ul a:hover { color: var(--accent-2); }

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.4);
  font-size: 0.82rem;
}

/* ================================================================
   TYPOGRAPHY PAGES (legal, privacy, etc.)
   ================================================================ */
.page-content { margin: 40px 0; }
.text-content { padding: 40px; line-height: 1.7; font-size: 1rem; color: var(--text-secondary); }
.text-content h1 { color: var(--text); font-size: 2rem; margin: 0 0 24px; font-weight: 800; letter-spacing: -0.02em; }
.text-content h2 { color: var(--text); font-size: 1.4rem; margin: 32px 0 16px; font-weight: 700; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.text-content a { color: var(--accent); text-decoration: none; font-weight: 500; }
.text-content a:hover { text-decoration: underline; }

/* ================================================================
   COOKIE BANNER
   ================================================================ */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 18px 24px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}
.cookie-banner p { margin: 0; flex: 1 1 300px; font-size: 0.88rem; color: var(--text-secondary); }
.cookie-banner a { color: var(--accent); font-weight: 500; }
.cookie-buttons { display: flex; gap: 10px; }
.btn-cookie { padding: 10px 22px; border-radius: var(--radius-xs); font-weight: 600; cursor: pointer; border: none; font-family: inherit; transition: all 0.2s; font-size: 0.88rem; }
.btn-cookie:hover { opacity: 0.85; }
.btn-accept { background: var(--accent-gradient); color: white; box-shadow: 0 2px 8px rgba(249,115,22,0.25); }
.btn-reject { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }

/* ================================================================
   SEO TEXT SECTION
   ================================================================ */
.seo-text-section {
  padding: 28px;
  margin-top: 16px;
}
.seo-text-section h2 { color: var(--text); font-size: 1.3rem; margin-top: 0; font-weight: 700; }
.seo-text-section p { color: var(--text-secondary); }

/* ================================================================
   UTILITIES
   ================================================================ */
.hidden { display: none !important; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 900px) {
  .calculator-container { grid-template-columns: 1fr; }
  .text-content { padding: 24px 16px; }
  .brand-text h1 { font-size: 1.3rem; }
  .main-nav { gap: 2px; padding: 4px 6px; }
  .main-nav a { font-size: 0.8rem; padding: 6px 10px; }
}

/* ================================================================
   ENLACE PAGE
   ================================================================ */
.link-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Hero */
.link-hero {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 40px 44px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(249,115,22,0.04) 0%, rgba(239,68,68,0.03) 100%);
  border: 1px solid rgba(249,115,22,0.15);
}
.link-hero-bg-glow {
  position: absolute;
  top: -80px; right: -80px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(249,115,22,0.08) 0%, transparent 70%);
  pointer-events: none;
  animation: glow-pulse 4s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}
.link-hero-icon { flex-shrink: 0; }
.link-hero-icon-ring {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, rgba(249,115,22,0.15), rgba(239,68,68,0.1));
  border: 1.5px solid rgba(249,115,22,0.3);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(249,115,22,0.15);
  animation: icon-float 3s ease-in-out infinite;
  color: var(--accent);
}
@keyframes icon-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.link-hero-text { flex: 1; }
.link-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(249,115,22,0.08);
  border: 1px solid rgba(249,115,22,0.2);
  border-radius: 99px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  margin-bottom: 12px;
}
.link-hero-text h2 {
  margin: 0 0 10px;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.link-hero-accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.link-hero-text p {
  margin: 0 0 20px;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
  max-width: 480px;
}
.link-hero-stats {
  display: flex;
  align-items: center;
  gap: 20px;
}
.link-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.link-stat-num {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.link-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}
.link-stat-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
}

/* Input section */
.link-input-section { padding: 28px 32px 22px; }
.link-url-label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--text);
}
.label-icon { margin-right: 6px; }
.link-url-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.link-url-input {
  flex: 1;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-family: 'Inter', monospace;
  font-size: 0.92rem;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.link-url-input::placeholder { color: var(--text-muted); }
.link-url-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
  background: var(--bg-input-focus);
}
.btn-fetch-link {
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-xs);
  color: #fff;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 12px 22px;
  white-space: nowrap;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(249,115,22,0.3);
}
.btn-fetch-link:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(249,115,22,0.4);
}
.btn-fetch-link:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-fetch-inner { display: flex; align-items: center; gap: 8px; }
.btn-fetch-loading {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 20px;
}
.spinner-dot {
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: bounce-dot 1s ease-in-out infinite;
}
.spinner-dot:nth-child(2) { animation-delay: 0.18s; }
.spinner-dot:nth-child(3) { animation-delay: 0.36s; }
@keyframes bounce-dot {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-6px); opacity: 1; }
}
.link-hint {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.link-hint code {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Status messages */
.link-status {
  border-radius: var(--radius-xs);
  padding: 14px 18px;
  font-size: 0.9rem;
  font-weight: 500;
}
.link-status--info    { background: rgba(59,130,246,0.06); border: 1px solid rgba(59,130,246,0.2); color: #2563eb; }
.link-status--warn    { background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.2); color: #d97706; }
.link-status--error   { background: var(--danger-bg); border: 1px solid var(--danger-border); color: var(--danger); }
.link-status--success { background: var(--success-bg); border: 1px solid var(--success-border); color: var(--success); }

/* Vehicle card */
.vehicle-card {
  padding: 36px 40px;
  animation: slide-up 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.vc-header { margin-bottom: 28px; }
.vc-badge {
  display: inline-block;
  background: var(--accent-light);
  border: 1px solid rgba(249,115,22,0.2);
  border-radius: 99px;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.vc-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.vc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  opacity: 0.8;
  transition: all 0.2s;
}
.vc-link:hover { opacity: 1; color: var(--accent-hover); text-decoration: underline; }

.vc-specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.vc-spec-item {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  transition: all 0.2s;
}
.vc-spec-item:hover {
  background: var(--bg-card);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.vc-spec-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.vc-spec-value {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

/* Adjustments */
.vc-adjustments {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 28px;
  position: relative;
}
.vc-adjustments::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 4px; height: 100%;
  background: var(--accent-gradient);
  border-radius: 16px 0 0 16px;
}
.vc-adjustments h4 {
  margin: 0 0 18px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.vc-adj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.vc-adj-grid label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.vc-adj-grid input,
.vc-adj-grid select {
  margin-top: 6px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 14px;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.vc-adj-grid input:focus,
.vc-adj-grid select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}

.btn-calculate-link {
  width: 100%;
  background: var(--accent-gradient);
  border: none;
  border-radius: 14px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 16px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 20px rgba(249,115,22,0.3);
}
.btn-calculate-link:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 12px 30px rgba(249,115,22,0.4);
  filter: brightness(1.05);
}
.btn-calculate-link:active { transform: translateY(-1px); }

/* ================================================================
   LINK RESULTS
   ================================================================ */
.link-results { animation: slide-up 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.link-result-block {
  padding: 36px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  border-radius: 20px;
}

.result-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.result-heading {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.result-header-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.result-header-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.result-header-amount {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

/* Section labels */
.result-section-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 24px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.result-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.comp-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
  line-height: 1;
}

/* Hacienda breakdown */
.result-hacienda-block { margin-bottom: 28px; }
.result-hacienda-block h4 {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hacienda-breakdown {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.hb-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: background 0.2s;
}
.hb-row:hover { background: rgba(0,0,0,0.02); }
.hb-row:last-child { border-bottom: none; }
.hb-row strong { color: var(--text); font-weight: 600; font-size: 1rem; }
.hb-minus { color: #dc2626; }
.hb-minus strong { color: #dc2626; }
.hb-total {
  background: var(--success-bg);
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  border-top: 1px solid var(--success-border);
}
.hb-total strong {
  color: var(--success);
  font-size: 1.1rem;
}
.no-hacienda { color: var(--text-muted); font-style: italic; font-size: 0.9rem; padding: 8px 0; }

/* Comparison cards */
.result-comparison {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.comp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.comp-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.comp-card.comp-best {
  border-color: var(--success-border);
  background: linear-gradient(145deg, rgba(5,150,105,0.04), rgba(5,150,105,0.01));
  box-shadow: 0 6px 20px rgba(5,150,105,0.1);
}
.comp-card.comp-best::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--success), transparent);
}
.comp-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.comp-tax {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 6px;
}
.comp-best .comp-tax {
  color: var(--success);
}
.comp-base { font-size: 0.82rem; color: var(--text-muted); }
.comp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: 99px;
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 14px;
  padding: 5px 12px;
  animation: pulse-glow 2s infinite;
}
@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(5,150,105,0.3); }
  70% { box-shadow: 0 0 0 8px rgba(5,150,105,0); }
  100% { box-shadow: 0 0 0 0 rgba(5,150,105,0); }
}

/* Total block */
.result-total-block h4 {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.total-rows {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
}
.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: background 0.2s;
}
.total-row:hover { background: rgba(0,0,0,0.015); }
.total-row:last-child { border-bottom: none; }
.total-row strong { color: var(--text); font-weight: 600; font-size: 1rem; }
.total-final {
  background: linear-gradient(90deg, rgba(249,115,22,0.06), rgba(249,115,22,0.12));
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
  border-top: 1px solid rgba(249,115,22,0.2);
  padding: 18px 20px;
}
.total-num {
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: 800;
}

.result-disclaimer {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  text-align: right;
  font-style: italic;
}
.result-notes {
  margin-top: 20px;
  padding: 16px 20px;
  background: rgba(245,158,11,0.05);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 14px;
}
.result-notes p {
  margin: 4px 0;
  font-size: 0.85rem;
  color: #b45309;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .link-hero { flex-direction: column; text-align: center; padding: 24px 20px; }
  .link-input-section, .vehicle-card, .link-result-block { padding: 20px 16px; }
  .link-url-row { flex-direction: column; }
  .btn-fetch-link { width: 100%; justify-content: center; }
  .vc-specs-grid { grid-template-columns: 1fr 1fr; }
}

/* ================================================================
   MANUAL FORM (fallback 403)
   ================================================================ */
.link-status--manual {
  background: var(--accent-light);
  border: 1px solid rgba(249,115,22,0.2);
  color: var(--text);
  padding: 22px 24px;
  border-radius: var(--radius);
}
.manual-form-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.manual-icon { font-size: 1.8rem; flex-shrink: 0; }
.manual-form-header strong { font-size: 0.95rem; color: var(--text); }
.manual-form-header p { margin: 4px 0 8px; font-size: 0.82rem; color: var(--text-secondary); }
.manual-open-link {
  display: inline-block;
  color: var(--accent);
  font-size: 0.82rem;
  text-decoration: none;
  border: 1px solid rgba(249,115,22,0.25);
  border-radius: 6px;
  padding: 3px 10px;
  transition: all 0.2s;
  font-weight: 500;
}
.manual-open-link:hover { background: var(--accent-light); }
.manual-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.manual-form-grid label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.manual-form-grid input,
.manual-form-grid select {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  padding: 8px 11px;
  outline: none;
  transition: border-color 0.2s;
}
.manual-form-grid input:focus,
.manual-form-grid select:focus { border-color: var(--accent); }
.manual-form-grid select option { background: var(--bg-card); }
.btn-manual-ok {
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-xs);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 20px;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(249,115,22,0.25);
}
.btn-manual-ok:hover { opacity: 0.9; transform: translateY(-1px); }

/* ================================================================
   BLOG CARDS
   ================================================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.blog-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.blog-card-content {
  padding: 20px 24px 24px;
}
.blog-category {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 99px;
  margin-bottom: 10px;
}
.blog-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin: 0 0 8px;
}
.blog-excerpt {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 14px;
}
.blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-weight: 600;
}
/* Tax inputs and comparison shared by both calculators. */
.tax-fields { border:1px solid var(--border,#cbd5e1); border-radius:12px; padding:16px; margin:20px 0; min-width:0; }
.tax-fields[hidden] { display:none; }
.tax-fields legend { font-weight:700; padding:0 6px; }
.tax-fields label { display:block; margin:12px 0; }
.tax-fields input:not([type=checkbox]), .tax-fields select { display:block; width:100%; box-sizing:border-box; padding:10px; margin-top:6px; border:1px solid #94a3b8; border-radius:6px; background:var(--bg-input,#fff); color:var(--text,#1e293b); }
.tax-fields .tax-check { display:flex; align-items:center; gap:10px; }
.tax-check input[type=checkbox] { width:20px; height:20px; flex-shrink:0; margin:0; }
.tax-fields p,.tax-fields small { font-size:.85rem; line-height:1.5; }
.tax-result { padding:18px; border:1px solid var(--border,#cbd5e1); border-radius:12px; margin-top:20px; }
.tax-table-scroll { overflow-x:auto; }
.tax-result table { border-collapse:collapse; width:100%; font-size:.85rem; }
.tax-result th,.tax-result td { border-bottom:1px solid #cbd5e1; text-align:left; padding:12px; }
.tax-result caption { text-align:left; margin:12px 0; }
