/* ==========================================================================
   CarPowerSites - Design System (NEW - Mockup Replica)
   Versión: 7.0 - Diseño desde cero basado en mockup exacto
   ========================================================================== */

/* --- Google Fonts: Inter --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* --- CSS Variables (Colores EXACTOS del mockup) --- */
:root {
  /* Primarios */
  --green-primary: #22C55E;
  /* Verde brillante botones */
  --green-dark: #166534;
  /* Verde oscuro header */
  --green-accent: #16A34A;
  /* Verde hover */

  /* Neutros */
  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-700: #374151;
  --gray-900: #111827;

  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  /* Radios */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--gray-900);
  background-color: var(--gray-50);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   HEADER - Verde oscuro sólido como en mockup
   ========================================================================== */
.header {
  background-color: var(--green-dark);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 600;
  font-size: 1.125rem;
}

.header__logo-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header__logo-icon svg {
  width: 28px;
  height: 28px;
}

/* Navegación Desktop */
.header__nav {
  display: none;
  align-items: center;
  gap: 28px;
}

@media (min-width: 768px) {
  .header__nav {
    display: flex;
  }
}

.header__nav a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.header__nav a:hover,
.header__nav a.active {
  color: var(--white);
  border-bottom-color: var(--green-primary);
}

/* Acciones (Login + Avatar) */
.header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header__login {
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 500;
}

.header__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  object-fit: cover;
}

/* ==========================================================================
   HERO - Imagen de fondo con gradiente y search
   ========================================================================== */
.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px 20px 80px;
  color: var(--white);

  /* Imagen de fondo del mockup */
  background:
    linear-gradient(180deg, rgba(22, 101, 52, 0.3) 0%, rgba(22, 101, 52, 0.15) 100%),
    url('img/mockup_hero.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero__title {
  font-size: 1.75rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1.3;
  max-width: 600px;
  margin-bottom: 32px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
  .hero__title {
    font-size: 2.5rem;
  }
}

/* --- Search Box (Pill en Desktop, Stack en Mobile) --- */
.search-box {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

/* Desktop: Pill horizontal */
@media (min-width: 768px) {
  .search-box {
    background: var(--white);
    border-radius: var(--radius-full);
    padding: 6px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-xl);
  }
}

/* Mobile: Stack vertical */
@media (max-width: 767px) {
  .search-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
}

.search-box__group {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  flex: 1;
}

@media (min-width: 768px) {
  .search-box__group {
    border-right: 1px solid var(--gray-200);
    height: 52px;
  }

  .search-box__group:last-of-type {
    border-right: none;
  }
}

@media (max-width: 767px) {
  .search-box__group {
    background: var(--white);
    border-radius: var(--radius-lg);
    height: 56px;
    box-shadow: var(--shadow-md);
  }
}

.search-box__icon {
  color: var(--gray-400);
  flex-shrink: 0;
}

.search-box__icon svg {
  width: 20px;
  height: 20px;
}

.search-box__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.9375rem;
  color: var(--gray-700);
  background: transparent;
}

.search-box__input::placeholder {
  color: var(--gray-400);
}

/* Botón Buscar */
.search-box__btn {
  background: var(--green-primary);
  color: var(--white);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0 24px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.search-box__btn:hover {
  background: var(--green-accent);
}

.search-box__btn svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 767px) {
  .search-box__btn {
    width: 100%;
    height: 56px;
    border-radius: var(--radius-lg);
  }
}

/* ==========================================================================
   SECTION: Estaciones Destacadas
   ========================================================================== */
.section {
  padding: 60px 0;
}

.section__title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 40px;
}

/* Grid de Cards */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

/* ==========================================================================
   CARD: Estación de Carga
   ========================================================================== */
.station-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
}

.station-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Imagen con icono superpuesto */
.station-card__image-wrapper {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.station-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Icono de cargador verde superpuesto */
.station-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  background: var(--green-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.station-card__badge svg {
  width: 20px;
  height: 20px;
  color: var(--white);
}

/* Body */
.station-card__body {
  padding: 20px;
}

.station-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px;
  line-height: 1.4;
}

.station-card__location {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-bottom: 12px;
}

.station-card__location svg {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  flex-shrink: 0;
}

/* Rating */
.station-card__rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-bottom: 16px;
}

.station-card__rating-star {
  color: #FBBF24;
  /* Amarillo */
}

/* Footer: Precio + CTA */
.station-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
}

.station-card__price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-primary);
}

.station-card__cta {
  background: var(--green-primary);
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: background 0.2s;
}

.station-card__cta:hover {
  background: var(--green-accent);
}

/* ==========================================================================
   FOOTER (Placeholder simple)
   ========================================================================== */
.footer {
  background: var(--green-dark);
  color: var(--white);
  padding: 40px 0;
  text-align: center;
  font-size: 0.875rem;
}

/* ==========================================================================
   DECORATIVE: Hojas flotantes (opcional, CSS puro)
   ========================================================================== */
.leaf-decoration {
  position: absolute;
  opacity: 0.1;
  pointer-events: none;
  color: var(--green-primary);
}