/*
 * inlavanderia.css
 * IN Lavandería — Modern, premium, mobile-first stylesheet
 * Approach: design tokens → reset → components (mobile-first, then min-width overrides)
 */

/* ─── Design Tokens ──────────────────────────────────────── */
:root {
  /* Brand */
  --c-primary:         #0B1F3A;
  --c-accent:          #009f9c;
  --c-accent-dark:     #007f7c;
  --c-accent-light:    #e0f5f5;

  /* Machine status */
  --c-available:       #16A34A;
  --c-available-bg:    #F0FDF4;
  --c-available-ring:  #86EFAC;
  --c-in-use:          #DC2626;
  --c-in-use-bg:       #FEF2F2;
  --c-in-use-ring:     #FCA5A5;

  /* Neutrals */
  --c-bg:              #F1F5F9;
  --c-surface:         #FFFFFF;
  --c-border:          #E2E8F0;
  --c-border-hover:    #CBD5E1;
  --c-text:            #1E293B;
  --c-text-secondary:  #475569;
  --c-text-muted:      #94A3B8;

  /* Typography */
  --font: 'Poppins', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --py-section:   clamp(3.5rem, 8vw, 6rem);
  --px-container: clamp(1rem, 4vw, 2rem);

  /* Shadow stack */
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .07), 0 1px 2px -1px rgb(0 0 0 / .07);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .08), 0 2px 4px -2px rgb(0 0 0 / .08);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .09), 0 4px 6px -4px rgb(0 0 0 / .09);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .10), 0 8px 10px -6px rgb(0 0 0 / .08);

  /* Radii */
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   18px;
  --r-xl:   24px;
  --r-pill: 9999px;

  /* Transitions */
  --t-fast: 120ms cubic-bezier(.4, 0, .2, 1);
  --t-base: 220ms cubic-bezier(.4, 0, .2, 1);
  --t-slow: 380ms cubic-bezier(.4, 0, .2, 1);
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 24px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--c-text);
  background-color: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--c-primary);
  text-wrap: balance;
}

img, picture, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast);
}

ul { list-style: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ─── Container ──────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--px-container);
}

/* ─── Loader ─────────────────────────────────────────────── */
.loader-mask {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--c-surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader {
  display: flex;
  gap: .55rem;
  align-items: flex-end;
}

.loader div {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--c-accent);
  animation: loader-bounce 1s ease-in-out infinite alternate;
}

.loader div:nth-child(2) {
  background: var(--c-primary);
  animation-delay: .18s;
}

@keyframes loader-bounce {
  from { transform: translateY(0); opacity: 1; }
  to   { transform: translateY(-14px); opacity: .5; }
}

/* ─── Top Bar ─────────────────────────────────────────────── */
.topbar {
  background: var(--c-primary);
  padding-block: .55rem;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.topbar__text {
  font-size: .78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .7);
  line-height: 1.4;
}

.topbar__cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem 1.1rem;
  border-radius: var(--r-pill);
  background: var(--c-accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    background var(--t-base),
    transform var(--t-base),
    box-shadow var(--t-base);
}

.topbar__cta:hover {
  background: var(--c-accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgb(0 180 216 / .45);
  color: #fff;
}

/* ─── Header ──────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-surface);
  border-bottom: 1px solid transparent;
  transition:
    border-color var(--t-base),
    box-shadow var(--t-base);
}

.site-header.scrolled {
  border-bottom-color: var(--c-border);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: .9rem;
}

.site-header__logo img {
  height: 78px;
  width: auto;
}

/* ─── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1920 / 800;
  min-height: 220px;
  max-height: 800px;
  overflow: hidden;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero__overlay {
  display: none;
}

/* ─── Section Title ───────────────────────────────────────── */
.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title__label {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: .55rem;
}

.section-title__heading {
  font-size: clamp(.9rem, 4vw, 1.4rem);
  color: var(--c-primary);
  font-weight: 700;
}

/* ─── Button ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--font);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  border-radius: var(--r-pill);
  padding: .85rem 1.85rem;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--t-base),
    color var(--t-base),
    border-color var(--t-base),
    transform var(--t-base),
    box-shadow var(--t-base);
}

.btn--primary {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
}
.btn--primary:hover {
  background: var(--c-accent-dark);
  border-color: var(--c-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgb(0 180 216 / .38);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--c-primary);
  border-color: var(--c-primary);
}
.btn--ghost:hover {
  background: var(--c-primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn--cta {
  background: #fff;
  color: var(--c-accent);
  border-color: #fff;
}
.btn--cta:hover {
  background: rgba(255, 255, 255, .92);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgb(0 0 0 / .15);
  color: var(--c-accent-dark);
}

/* ─── Machines Section ────────────────────────────────────── */
.machines {
  padding-block: var(--py-section);
  background: var(--c-bg);
}

.machines--alt {
  background: var(--c-surface);
}

.machines__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 480px) {
  .machines__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .machines__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

/* Machine Card */
.machine-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1.4rem 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
  text-align: center;
  transition:
    box-shadow var(--t-base),
    transform var(--t-base),
    border-color var(--t-base);
}

.machine-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--c-border-hover);
}

.machine-card--available { border-top: 3px solid var(--c-available); }
.machine-card--in-use    { border-top: 3px solid var(--c-in-use); }

.machines--alt .machine-card { background: var(--c-bg); }

.machine-card__icon {
  width: 58px;
  height: 58px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-accent-light);
  transition: transform var(--t-base);
}

.machine-card:hover .machine-card__icon {
  transform: scale(1.06);
}

.machines--alt .machine-card__icon { background: var(--c-surface); }

.machine-card__icon img {
  width: 34px;
  height: 34px;
}

.machine-card__name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.3;
}

.machine-card__status {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .03em;
  padding: .3rem .9rem;
  border-radius: var(--r-pill);
}

.machine-card__status::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.machine-card__status--available {
  background: var(--c-available-bg);
  color: var(--c-available);
  border: 1px solid var(--c-available-ring);
}

.machine-card__status--available::before {
  animation: status-pulse 2.2s ease-in-out infinite;
}

.machine-card__status--in-use {
  background: var(--c-in-use-bg);
  color: var(--c-in-use);
  border: 1px solid var(--c-in-use-ring);
}

.machine-card__time {
  font-size: .72rem;
  color: var(--c-text-muted);
  line-height: 1.3;
  margin-top: -.1rem;
}

@keyframes status-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .35; transform: scale(.7); }
}

/* ─── Payment Section ─────────────────────────────────────── */
.payment {
  padding-block: var(--py-section);
  background: var(--c-primary);
}

.payment .section-title__heading {
  color: #fff;
  font-size: clamp(.85rem, 3.5vw, 1.2rem);
  font-weight: 700;
}

.payment__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.payment__item {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: var(--r-lg);
  padding: 1.35rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background var(--t-base),
    transform var(--t-base),
    border-color var(--t-base);
}

.payment__item:hover {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .24);
  transform: translateY(-3px);
}

.payment__item img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

/* ─── Location Section ────────────────────────────────────── */
.location {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .location {
    grid-template-columns: 1fr 1fr;
    min-height: 420px;
  }
}

.location__media {
  background: url('../images/home2-about-img.jpg') center / cover no-repeat;
  min-height: 260px;
  position: relative;
}

.location__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgb(11 31 58 / .55),
    rgb(0 180 216 / .18)
  );
}

.location__content {
  background: var(--c-surface);
  padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1.5rem, 6vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .9rem;
}

.location__label {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--c-accent);
}

.location__content h2 {
  font-size: clamp(.85rem, 3vw, 1.2rem);
  color: var(--c-primary);
  margin-top: -.3rem;
}

.location__content p {
  font-size: .9rem;
  color: var(--c-text-secondary);
  line-height: 1.65;
  margin-bottom: .1rem;
}

.location__content .btn {
  align-self: flex-start;
  margin-top: .6rem;
}

/* ─── Steps Section ───────────────────────────────────────── */
.steps {
  padding-block: var(--py-section);
  background: var(--c-bg);
}

.steps__header {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: 3rem;
}

.steps__label {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: .6rem;
}

.steps__header h2 {
  font-size: clamp(.9rem, 4vw, 1.4rem);
  color: var(--c-primary);
  margin-bottom: .75rem;
}

.steps__header p {
  font-size: .9rem;
  color: var(--c-text-secondary);
  line-height: 1.7;
}

.steps__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .875rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 480px) {
  .steps__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .steps__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }
}

.step {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1.75rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .85rem;
  transition:
    box-shadow var(--t-base),
    transform var(--t-base);
}

.step:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.step__number {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-dark));
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgb(0 180 216 / .32);
  flex-shrink: 0;
}

.step__text {
  font-size: .82rem;
  color: var(--c-text-secondary);
  line-height: 1.55;
}

.steps__cta { text-align: center; }

/* ─── Laundry Info ────────────────────────────────────────── */
.laundry-info {
  padding-block: var(--py-section);
  background: var(--c-surface);
}

.laundry-info__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .laundry-info__grid {
    grid-template-columns: 5fr 6fr;
    gap: 3.5rem;
  }
}

.laundry-info__image img {
  width: 100%;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
}

.laundry-info__content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.laundry-info__tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--c-accent);
}

.laundry-info__content h2 {
  font-size: clamp(.85rem, 3vw, 1.2rem);
  color: var(--c-primary);
  line-height: 1.3;
}

.laundry-info__section {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.laundry-info__section h3 {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--c-text-secondary);
}

.laundry-info__list {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.laundry-info__list li {
  font-size: .9rem;
  color: var(--c-text);
  line-height: 1.5;
}

/* ─── CTA Banner ──────────────────────────────────────────── */
.cta-banner {
  padding-block: clamp(3rem, 7vw, 5rem);
  background: linear-gradient(135deg, var(--c-primary) 0%, #1a3a6e 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 110%, rgb(0 180 216 / .22) 0%, transparent 65%);
  pointer-events: none;
}

.cta-banner > .container {
  position: relative;
  z-index: 1;
}

.cta-banner h2 {
  font-size: clamp(1rem, 4.5vw, 1.5rem);
  color: #fff;
  margin-bottom: .6rem;
}

.cta-banner p {
  font-size: .95rem;
  color: rgba(255, 255, 255, .7);
  margin-bottom: 2rem;
}

/* ─── FAQ ─────────────────────────────────────────────────── */
.faq {
  padding-block: var(--py-section);
  background: var(--c-bg);
}

.faq__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
  max-width: 880px;
  margin-inline: auto;
}

@media (min-width: 768px) {
  .faq__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.faq-item {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition:
    border-color var(--t-base),
    box-shadow var(--t-base);
}

.faq-item[open] {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgb(0 180 216 / .08);
}

.faq-item summary {
  padding: 1.1rem 1.35rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--c-text);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  user-select: none;
  transition: color var(--t-fast);
}

.faq-item summary::-webkit-details-marker,
.faq-item summary::marker { display: none; content: ''; }

.faq-item summary::after {
  content: '\f107';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: .75rem;
  color: var(--c-text-muted);
  transition: transform var(--t-base), color var(--t-base);
  flex-shrink: 0;
  line-height: 1;
}

.faq-item[open] summary {
  color: var(--c-accent);
}

.faq-item[open] summary::after {
  transform: rotate(-180deg);
  color: var(--c-accent);
}

.faq-item summary:hover { color: var(--c-accent); }

.faq-item__body {
  padding: 0 1.35rem 1.1rem;
  font-size: .875rem;
  color: var(--c-text-secondary);
  line-height: 1.65;
}

/* ─── Site Footer ─────────────────────────────────────────── */
.site-footer {
  background: var(--c-primary);
  padding-block: 1.5rem;
  text-align: center;
}

.site-footer span {
  font-size: .78rem;
  color: rgba(255, 255, 255, .45);
  letter-spacing: .03em;
}

/* ─── Back to Top ─────────────────────────────────────────── */
#back-to-top-btn {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 90;
  transition:
    opacity var(--t-base),
    transform var(--t-base),
    background var(--t-base),
    box-shadow var(--t-base);
}

#back-to-top-btn::after {
  content: '\f077';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: .78rem;
  line-height: 1;
}

#back-to-top-btn:hover {
  background: var(--c-accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgb(0 180 216 / .42);
}

/* ─── Utility ─────────────────────────────────────────────── */
.text-center { text-align: center; }

/* ─── Mobile fixes (< 480px) ─────────────────────────────── */
@media (max-width: 479px) {
  /* Topbar: texto más chico, sin forzar salto de línea */
  .topbar__inner {
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: .5rem;
  }
  .topbar__text {
    font-size: .6rem;
    line-height: 1.3;
    flex: 1 1 0;
    min-width: 0;
  }
  .topbar__cta {
    font-size: .6rem;
    padding: .35rem .75rem;
    flex-shrink: 0;
  }

  /* Buttons: permite wrapping y reduce padding en pantallas chicas */
  .btn {
    white-space: normal;
    padding: .75rem 1.1rem;
    font-size: .7rem;
  }

  /* CTA section: botón centrado y contenido */
  .cta-banner .btn {
    width: 100%;
    max-width: 320px;
  }
  .steps__cta .btn {
    width: 100%;
    max-width: 320px;
  }
}
