/* ==========================================================================
   Estación (station detail page)
   ========================================================================== */

/* ---- Spacing between Kadence H1 and content ---- */
.gas-page-container {
  margin-top: 1.5em;
  margin-bottom: 2em;
}

/* ---- Rank Math Breadcrumbs ---- */
.gas-page-container .rank-math-breadcrumb {
  max-width: 1350px;
  margin: 0 auto 10px;
  padding: 6px 16px;
  font-size: 0.8125rem;
  color: #fff;
  background: #038799;
  border-radius: var(--gas-radius-md);
}
.gas-page-container .rank-math-breadcrumb p {
  margin: 0;
}
.gas-page-container .rank-math-breadcrumb a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.gas-page-container .rank-math-breadcrumb a:hover {
  text-decoration: underline;
}

/* ---- Table of Contents (horizontal scroll strip) ---- */
.est-toc {
  max-width: 1350px;
  margin: 0 auto 10px;
  padding: 0 10px;
}
.est-toc__list {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0 0 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--gas-gray-300) transparent;
}
.est-toc__list::-webkit-scrollbar { height: 4px; }
.est-toc__list::-webkit-scrollbar-thumb {
  background: var(--gas-gray-300);
  border-radius: 4px;
}
.est-toc__list::-webkit-scrollbar-track { background: transparent; }
@media (min-width: 768px) {
  .est-toc__list {
    scrollbar-width: none;
    padding-bottom: 0;
  }
  .est-toc__list::-webkit-scrollbar { display: none; }
}
.est-toc__item--label {
  display: flex;
  align-items: center;
  white-space: nowrap;
  padding: 6px 4px 6px 6px;
  font-size: 0.8125rem;
  color: var(--gas-gray-700);
}
.est-toc__link {
  display: block;
  white-space: nowrap;
  padding: 4px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gas-gray-700);
  background: var(--gas-gray-50);
  border: 1px solid var(--gas-gray-200);
  border-radius: var(--gas-radius-lg);
  text-decoration: none;
  transition: var(--gas-transition-fast);
}
.est-toc__link:hover,
.est-toc__link:focus-visible {
  color: #fff;
  background: var(--gas-orange);
  border-color: var(--gas-orange);
}

/* Scroll-offset so anchors don't hide behind sticky headers */
[id="precios"],
[id="servicios"],
[id="historico"],
[id="mapa"],
[id="cercanas"],
[id="calificacion"],
[id="municipios"],
[id="info"] {
  scroll-margin-top: 80px;
}

/* ---- Section 1: Two-column hero layout ---- */
.est-s1 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  max-width: 1350px;
  margin: 0 auto;
  padding: 0;
}
@media (min-width: 768px) {
  .est-s1 {
    grid-template-columns: 35% 1fr;
  }
}

/* -- Left column -- */
.est-s1__left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

/* Station image */
.est-s1__image {
  width: 100%;
  border-radius: var(--gas-radius-md);
  overflow: hidden;
  background: var(--gas-gray-100);
}
.est-s1__image img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}

/* Station info card */
.est-s1__info {
  background: var(--gas-bg-primary);
  border-radius: var(--gas-radius-md);
  padding: 0;
}
.est-s1__info-item {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gas-gray-100);
}
.est-s1__info-item:last-child {
  border-bottom: none;
}
.est-s1__info-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--gas-text-primary);
  margin-bottom: 2px;
}
.est-s1__info-value {
  display: block;
  font-size: 0.8125rem;
  color: var(--gas-text-secondary);
  line-height: 1.4;
}

/* Info action buttons (Facturación / Teléfono) */
.est-s1__info-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.est-s1__info-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--gas-gray-200);
  border-radius: var(--gas-radius-md);
  background: #fff;
  color: var(--gas-text-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.4;
  text-decoration: none;
  box-shadow: none;
}
.est-s1__info-btn:hover:not([disabled]) {
  border-color: var(--gas-orange);
  color: var(--gas-orange);
  background: #fff5f0;
}
.est-s1__info-btn:active {
  transform: scale(0.97);
}
.est-s1__info-btn svg {
  flex-shrink: 0;
}
.est-s1__info-btn--disabled {
  opacity: 0.4;
  cursor: default;
}

/* -- Right column -- */
.est-s1__right {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

/* Commercial name banner */
.est-s1__banner {
  background: var(--gas-orange);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--gas-radius-md);
  text-align: center;
}
.est-s1__banner h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #fff;
}
@media (min-width: 768px) {
  .est-s1__banner h2 {
    font-size: 1.2rem;
  }
}

/* Prices block */
.est-s1__prices {
  border-radius: var(--gas-radius-md);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.est-s1__prices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0;
}
.est-s1__price-cell {
  padding: 16px 12px;
  text-align: center;
  border-right: 1px solid var(--gas-gray-100);
}
.est-s1__price-cell:last-child {
  border-right: none;
}
.est-s1__price-type {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  text-transform: capitalize;
  margin-bottom: 4px;
}
.est-s1__price-type--regular { color: var(--gas-green) }
.est-s1__price-type--premium { color: var(--gas-red) }
.est-s1__price-type--diesel { color: var(--gas-gray-700) }

.est-s1__price-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gas-text-primary);
  line-height: 1.2;
}
.est-s1__price-unit {
  display: block;
  font-size: 0.6875rem;
  color: var(--gas-text-secondary);
  margin-top: 2px;
}
/* Price variation inline */
.est-s1__price-var {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  margin-top: 4px;
  transition: color 0.3s ease;
}
.est-s1__price-var.is-up {
  color: var(--gas-red);
}
.est-s1__price-var.is-down {
  color: #0b8a2e;
}
.est-s1__price-var.is-neutral {
  color: var(--gas-gray-500);
}
.est-s1__price-var.is-na {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--gas-gray-300);
}
/* Variation heading */
.est-s1__variation-heading {
  background: var(--gas-gray-50);
  border-top: 1px solid var(--gas-gray-100);
  padding: 14px 16px 6px;
  text-align: center;
}
.est-s1__variation-heading h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gas-text-primary);
}
/* Variation tabs (pill buttons — radiogroup) */
.est-s1__variation-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px 12px;
  background: var(--gas-gray-50);
}
.est-s1__variation-tab {
  padding: 5px 14px;
  border: 1px solid var(--gas-gray-200);
  border-radius: 20px;
  background: #fff;
  color: var(--gas-text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.4;
}
.est-s1__variation-tab:hover {
  border-color: var(--gas-orange);
  color: var(--gas-orange);
}
.est-s1__variation-tab.is-active {
  background: var(--gas-orange);
  color: #fff;
  border-color: var(--gas-orange);
}
.est-s1__variation-tab:focus-visible {
  outline: 3px solid var(--gas-blue);
  outline-offset: 2px;
}
/* Variation summary text */
.est-s1__variation-summary {
  margin: 0;
  padding: 10px 16px 14px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--gas-text-secondary);
  text-align: center;
  background: var(--gas-gray-50);
}

.est-s1__prices-bar {
  height: 6px;
  background: var(--gas-orange);
}
.est-s1__prices-disclaimer {
  font-size: 0.6875rem;
  color: var(--gas-text-muted);
  text-align: center;
  padding: 6px 10px;
  background: var(--gas-gray-50);
}

/* Action buttons row */
.est-s1__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.est-s1__action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  border: 1px solid var(--gas-gray-200);
  border-radius: var(--gas-radius-md);
  background: var(--gas-bg-primary);
  color: var(--gas-text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.est-s1__action-btn:hover {
  border-color: var(--gas-orange);
  color: var(--gas-orange);
  background: #fff5f0;
}

/* CTA variant — "Crear alerta" */
.est-s1__action-btn--cta {
  background: var(--gas-orange, #f26800);
  color: #fff;
  border-color: var(--gas-orange, #f26800);
  position: relative;
  box-shadow: 0 2px 8px rgba(242, 104, 0, 0.3);
}
.est-s1__action-btn--cta:hover {
  background: #e05e00;
  border-color: #e05e00;
  color: #fff;
  box-shadow: 0 4px 14px rgba(242, 104, 0, 0.45);
}
.est-s1__action-btn--cta:active {
  transform: scale(0.97);
}

/* Pulse ring */
.est-s1__action-btn--cta::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  animation: gpa-pulse 3s ease-out 2s infinite;
}
@keyframes gpa-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(242, 104, 0, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(242, 104, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(242, 104, 0, 0); }
}

/* Bell shake */
.est-s1__bell-icon {
  transform-origin: 50% 4px;
  animation: gpa-bell 4s ease-in-out 1s infinite;
}
@keyframes gpa-bell {
  0%, 100% { transform: rotate(0); }
  4%       { transform: rotate(15deg); }
  8%       { transform: rotate(-13deg); }
  12%      { transform: rotate(10deg); }
  16%      { transform: rotate(-8deg); }
  20%      { transform: rotate(4deg); }
  24%      { transform: rotate(0); }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .est-s1__action-btn--cta::after { animation: none; }
  .est-s1__bell-icon { animation: none; }
}

/* ---- Section 2: Map + navigation ---- */
.est-map {
  max-width: 1350px;
  margin: 2rem auto 0;
  padding: 0 10px;
}
.est-map__heading {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gas-text-primary);
}
.est-map__canvas {
  width: 100%;
  height: 300px;
  border-radius: var(--gas-radius-md);
  overflow: hidden;
  background: var(--gas-gray-100);
}
.est-map__canvas img { box-shadow: none !important; }
.est-map__nav {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.est-map__nav-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--gas-gray-200);
  border-radius: var(--gas-radius-md);
  background: var(--gas-bg-primary);
  color: var(--gas-text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}
.est-map__nav-btn:hover {
  border-color: var(--gas-orange);
  color: var(--gas-orange);
  background: #fff5f0;
}
.est-map__nav-btn img {
  flex-shrink: 0;
}

/* ---- Calculator (integrated in prices card) ---- */
.est-s1__calc {
  padding: 14px 16px;
  background: #fff;
}
.est-s1__calc-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.est-s1__calc-header svg {
  color: var(--gas-orange);
  flex-shrink: 0;
}
.est-s1__calc-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--gas-text-primary);
}
.est-s1__calc-selects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.est-s1__calc-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gas-text-secondary);
  margin-bottom: 4px;
}
.est-s1__calc-select {
  width: 100%;
  padding: 8px 10px;
  font-size: 0.8125rem;
  border-radius: var(--gas-radius-sm);
  border: 1px solid var(--gas-gray-200);
  background: #fff;
  color: var(--gas-text-primary);
  cursor: pointer;
  appearance: auto;
}
.est-s1__calc-select:focus-visible {
  outline: 2px solid var(--gas-blue);
  outline-offset: 1px;
}
.est-s1__calc-input-row {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--gas-gray-200);
  border-radius: var(--gas-radius-sm);
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.est-s1__calc-input-row:focus-within {
  border-color: var(--gas-orange);
}
.est-s1__calc-input {
  flex: 1;
  padding: 10px 12px;
  border: none;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gas-text-primary);
  background: transparent;
  outline: none;
  min-width: 0;
}
.est-s1__calc-input::placeholder {
  color: var(--gas-gray-300);
  font-weight: 400;
}
.est-s1__calc-unit {
  padding: 10px 14px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--gas-text-secondary);
  background: var(--gas-gray-100);
  white-space: nowrap;
}
/* Result display */
.est-s1__calc-result {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 10px;
  padding: 10px 12px;
  background: #fff;
  border-radius: var(--gas-radius-sm);
  border: 1px solid var(--gas-gray-200);
}
.est-s1__calc-result span {
  display: block;
  font-size: 0.8125rem;
  color: var(--gas-text-secondary);
  line-height: 1.5;
}
.est-s1__calc-result b {
  color: var(--gas-green);
  font-weight: 700;
}
.est-s1__calc-result hr {
  border: none;
  height: 1px;
  background: var(--gas-gray-100);
  margin: 6px 0;
}
@media (max-width: 400px) {
  .est-s1__calc-selects {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* General layout */
.child-container { display: flex; width: 100%; flex-wrap: wrap }

/* Card image aspect-ratio (legacy compat) */
.card-start-img img.attachment-large.size-large.wp-post-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
}

