:root {
  --ocean-950: #020b18;
  --ocean-900: #041326;
  --ocean-800: #071d36;
  --cyan: #32e6ff;
  --cyan-soft: rgba(50, 230, 255, 0.18);
  --green: #35ff9f;
  --white: #ffffff;
  --muted: rgba(255, 255, 255, 0.76);
  --line: rgba(88, 224, 255, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--ocean-950);
  color: var(--white);
}

body {
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--ocean-950);
}

.background-image {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
  opacity: 0.24;
  filter: blur(2px) brightness(0.42);
  transform: scale(1.03);
}

.page-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 62% 18%, rgba(50, 230, 255, 0.10), transparent 30%),
    linear-gradient(
      to right,
      rgba(2, 11, 24, 0.96) 0%,
      rgba(2, 11, 24, 0.82) 34%,
      rgba(2, 11, 24, 0.38) 68%,
      rgba(2, 11, 24, 0.62) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(2, 11, 24, 0.06) 0%,
      rgba(2, 11, 24, 0.46) 64%,
      rgba(2, 11, 24, 0.92) 100%
    );
  pointer-events: none;
}

.site-header,
.hero,
.feature-strip,
.cards-section {
  position: relative;
  z-index: 2;
}

.site-header {
  min-height: 76px;
  padding: 18px clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 18, 38, 0.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 46px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--cyan);
  border: 1px solid var(--line);
  font-size: 28px;
  box-shadow: 0 0 28px rgba(50, 230, 255, 0.18);
}

.brand strong {
  display: block;
  font-size: 28px;
  letter-spacing: 0.08em;
  line-height: 0.9;
}

.brand small {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  letter-spacing: 0.34em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

.main-nav a {
  position: relative;
  padding: 10px 0;
}

.main-nav a.active::after,
.main-nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--cyan);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
}

.login-link {
  padding: 13px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.register-button,
.primary-button,
.forecast-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 13px;
  background: linear-gradient(135deg, #15a7d1, #35e6e6);
  color: white;
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(17, 168, 198, 0.25);
}

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(320px, 540px) minmax(340px, 1fr) 360px;
  align-items: center;
  gap: 8px;
  padding: 54px clamp(20px, 4vw, 64px) 72px;
}

.hero-content {
  max-width: 540px;
  padding-top: 20px;
  z-index: 3;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 900;
}

.hero h1 {
  margin: 0;
  max-width: 540px;
  font-size: clamp(44px, 5vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

.hero-description {
  max-width: 540px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.55;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.48);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 34px;
}

.primary-button,
.secondary-button {
  min-width: 210px;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(3, 18, 38, 0.48);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 900;
}

.globe-stage {
  position: relative;
  min-height: 620px;
  overflow: visible;
}

.globe-visual {
  position: absolute;
  right: -40px;
  top: 48%;
  transform: translateY(-50%);
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background-image: url("../assets/images/budasurfboards-home.png");
  background-repeat: no-repeat;
  background-size: 2450px auto;
  background-position: 66% 20%;
  box-shadow:
    0 0 0 2px rgba(50, 230, 255, 0.10),
    0 0 60px rgba(50, 230, 255, 0.18),
    inset 0 0 80px rgba(255, 255, 255, 0.08);
  opacity: 0.96;
  z-index: 1;
  overflow: hidden;
}

.globe-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.10), transparent 35%),
    radial-gradient(circle at 50% 50%, transparent 58%, rgba(0, 0, 0, 0.34) 100%),
    linear-gradient(to bottom, transparent 0%, transparent 78%, rgba(2, 11, 24, 0.95) 92%);
}

.globe-help {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background: rgba(3, 18, 38, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.mouse-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(50, 230, 255, 0.42);
  color: var(--cyan);
}

.globe-help strong,
.globe-help small {
  display: block;
  white-space: nowrap;
}

.globe-help strong {
  font-size: 14px;
}

.globe-help small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.forecast-card {
  align-self: center;
  justify-self: end;
  width: 100%;
  max-width: 360px;
  padding: 26px;
  border: 1px solid rgba(160, 225, 255, 0.30);
  border-radius: 22px;
  background: rgba(3, 18, 38, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  margin-right: 0;
  z-index: 4;
}

.forecast-card-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.forecast-location {
  display: flex;
  flex-direction: column;
}

.location-title {
  margin: 0 0 4px;
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
}

.location-subtitle {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  font-size: 18px;
}

.favorite-button {
  border: 0;
  background: transparent;
  color: white;
  font-size: 34px;
  cursor: pointer;
  line-height: 1;
}

.favorite-button.is-active {
  color: #ffd23f;
}

.updated {
  margin: 18px 0;
  color: #7fffc0;
  font-size: 14px;
  font-weight: 800;
}

.forecast-list {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.forecast-list > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  align-items: center;
}

.forecast-list > div + div {
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.metric-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.84);
  min-width: 150px;
}

.metric-icon {
  width: 24px;
  display: inline-flex;
  justify-content: center;
  color: #8bdfff;
  font-weight: 900;
  font-size: 18px;
}

.metric-value {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.metric-value strong {
  font-size: 20px;
}

.metric-value small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.quality {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 20px;
}

.quality-text {
  display: flex;
  flex-direction: column;
}

.quality-text span {
  color: rgba(255, 255, 255, 0.76);
  margin-bottom: 4px;
}

.quality-text small {
  color: #7fffc0;
  font-weight: 800;
  font-size: 14px;
}

.quality strong {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border: 3px solid rgba(53, 255, 159, 0.82);
  border-radius: 50%;
  font-size: 26px;
}

.forecast-button {
  width: 100%;
  min-height: 52px;
  font-size: 18px;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 20px clamp(20px, 4vw, 64px) 30px;
  background: rgba(3, 18, 38, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.feature-strip article {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(88, 224, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.feature-strip strong,
.feature-strip span {
  display: block;
}

.feature-strip strong {
  font-size: 17px;
}

.feature-strip span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
}

.cards-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding: 34px clamp(20px, 4vw, 64px) 54px;
  background: #f4f8fb;
  color: #071d36;
}

.info-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 430px;
  border: 1px solid rgba(7, 29, 54, 0.12);
  border-radius: 22px;
  background: white;
  box-shadow: 0 18px 40px rgba(7, 29, 54, 0.08);
}

.card-media {
  position: relative;
  height: 190px;
  overflow: hidden;
  border-bottom: 1px solid rgba(7, 29, 54, 0.08);
  background: linear-gradient(135deg, #eaf6fb, #ffffff);
}

/* TARJETA 1: solo foto de playa y surferos */
.card-media-spots {
  background: linear-gradient(135deg, #eef7fb, #ffffff);
}

.card-media-spots::before {
  content: "";
  position: absolute;
  left: 58px;
  right: 18px;
  top: 16px;
  bottom: 14px;
  border-radius: 18px;
  background-image: url("../assets/images/budasurfboards-home.png");
  background-repeat: no-repeat;
  background-size: 2550px auto;
  background-position: 14% 86%;
  box-shadow: 0 12px 26px rgba(7, 29, 54, 0.18);
}

/* banderas colocadas encima de la foto */
.card-media-spots .flag-badge {
  position: absolute;
  bottom: 16px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: white;
  box-shadow: 0 8px 18px rgba(7, 29, 54, 0.18);
  z-index: 2;
}

.card-media-spots .flag-badge:nth-of-type(1) {
  left: 18px;
}

.card-media-spots .flag-badge:nth-of-type(2) {
  left: 60px;
}

.card-media-alerts {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 10%, rgba(50, 230, 255, 0.22), transparent 36%),
    linear-gradient(135deg, #061a31, #0f3858);
}

.phone-mock {
  position: relative;
  width: 160px;
  height: 198px;
  padding: 22px 14px;
  border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, #0f2038, #152b46);
  border: 8px solid #06101e;
  border-bottom: 0;
  color: white;
  text-align: center;
  box-shadow: 0 20px 45px rgba(0,0,0,0.35);
}

.phone-time {
  font-size: 34px;
  font-weight: 300;
}

.phone-date {
  margin-top: 4px;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
}

.phone-alert {
  position: absolute;
  left: -54px;
  right: -54px;
  bottom: 34px;
  padding: 10px 12px;
  border-radius: 12px;
  background: white;
  color: #071d36;
  text-align: left;
  box-shadow: 0 14px 30px rgba(0,0,0,0.20);
}

.phone-alert strong,
.phone-alert span,
.phone-alert small {
  display: block;
}

.phone-alert strong {
  font-size: 11px;
}

.phone-alert span {
  margin-top: 2px;
  font-size: 10px;
}

.phone-alert small {
  margin-top: 3px;
  color: #4d6278;
  font-size: 10px;
}

.card-media-favorites {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(50, 230, 255, 0.18), transparent 34%),
    linear-gradient(135deg, #eef7fb, #ffffff);
}

.favorites-panel {
  width: min(86%, 360px);
  padding: 12px;
  border-radius: 18px;
  background: white;
  border: 1px solid rgba(7, 29, 54, 0.08);
  box-shadow: 0 18px 38px rgba(7, 29, 54, 0.12);
}

.favorite-row {
  display: grid;
  grid-template-columns: 48px 1fr 24px;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: 12px;
  background: #f7fbfd;
}

.favorite-row + .favorite-row {
  margin-top: 8px;
}

.spot-thumb {
  width: 48px;
  height: 36px;
  border-radius: 9px;
  background-image: url("../assets/images/budasurfboards-home.png");
  background-repeat: no-repeat;
  background-size: 1500px auto;
  background-position: 18% 82%;
}

.favorite-row strong,
.favorite-row small {
  display: block;
}

.favorite-row strong {
  color: #071d36;
  font-size: 12px;
}

.favorite-row small {
  margin-top: 2px;
  color: #63758a;
  font-size: 11px;
}

.favorite-row b {
  color: #ffc83d;
  font-size: 18px;
}

.card-body {
  padding: 24px 28px 28px;
}

.card-label {
  margin: 0 0 10px;
  color: #0b9fc4;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 900;
}

.info-card h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.info-card p:not(.card-label) {
  color: rgba(7, 29, 54, 0.74);
  line-height: 1.6;
}

.info-card a {
  display: inline-flex;
  margin-top: 12px;
  color: #0b7fa2;
  font-weight: 900;
}

@media (max-width: 1400px) {
  .hero {
    grid-template-columns: minmax(320px, 520px) minmax(280px, 1fr) 340px;
  }

  .globe-visual {
    width: 640px;
    height: 640px;
    right: -10px;
  }
}

@media (max-width: 1200px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .main-nav {
    display: none;
  }

  .globe-stage {
    min-height: 460px;
  }

  .globe-visual {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    margin: 0 auto;
    width: 520px;
    height: 520px;
    background-size: 1900px auto;
    background-position: 66% 20%;
  }

  .globe-help {
    bottom: 0;
  }

  .forecast-card {
    justify-self: start;
    max-width: 420px;
  }

  .cards-section {
    grid-template-columns: 1fr;
  }

  .info-card {
    min-height: auto;
  }
}

@media (max-width: 850px) {
  .site-header {
    align-items: flex-start;
  }

  .header-actions {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero-description {
    font-size: 18px;
  }

  .globe-stage,
  .forecast-card {
    display: none;
  }

  .feature-strip,
  .cards-section {
    grid-template-columns: 1fr;
  }

  .card-media {
    height: 180px;
  }

  .card-media-spots::before {
    left: 52px;
    right: 14px;
    top: 14px;
    bottom: 12px;
  }
}

@media (max-width: 520px) {
  .brand strong {
    font-size: 22px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-actions {
    display: grid;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .card-body {
    padding: 22px;
  }
}

/* ===== Ajuste final tarjeta SPOTS: solo playa con surferos ===== */

.card-media-spots {
  background: linear-gradient(135deg, #eef7fb, #ffffff);
  position: relative;
  overflow: hidden;
}

.card-media-spots::before {
  content: "";
  position: absolute;
  left: 74px;
  right: 16px;
  top: 14px;
  bottom: 14px;
  border-radius: 18px;
  background-image: url("../assets/images/budasurfboards-home.png");
  background-repeat: no-repeat;
  background-size: 3550px auto;
  background-position: 16.2% 86.4%;
  box-shadow: 0 12px 26px rgba(7, 29, 54, 0.18);
  z-index: 1;
}

/* tapa cualquier resto de texto/captura en la parte izquierda */
.card-media-spots::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 82px;
  background: linear-gradient(135deg, #eef7fb, #ffffff);
  z-index: 2;
}

.card-media-spots .flag-badge {
  position: absolute;
  bottom: 16px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: white;
  box-shadow: 0 8px 18px rgba(7, 29, 54, 0.18);
  z-index: 3;
}

.card-media-spots .flag-badge:nth-of-type(1) {
  left: 18px;
}

.card-media-spots .flag-badge:nth-of-type(2) {
  left: 60px;
}

@media (max-width: 850px) {
  .card-media-spots::before {
    left: 68px;
    right: 12px;
    top: 12px;
    bottom: 12px;
    background-size: 3050px auto;
    background-position: 16.2% 86.2%;
  }

  .card-media-spots::after {
    width: 74px;
  }
}

/* ===== Imagen real para tarjeta SPOTS ===== */

.card-media-spots {
  background-image:
    linear-gradient(to bottom, rgba(2, 11, 24, 0.02), rgba(2, 11, 24, 0.10)),
    url("../assets/images/card-spots-surfers.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
}

/* Desactivamos los recortes antiguos que venían de la captura completa */
.card-media-spots::before,
.card-media-spots::after {
  content: none;
  display: none;
}

/* Banderas encima de la foto */
.card-media-spots .flag-badge {
  position: absolute;
  bottom: 18px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: white;
  box-shadow: 0 8px 18px rgba(7, 29, 54, 0.18);
  z-index: 3;
}

.card-media-spots .flag-badge:nth-of-type(1) {
  left: 22px;
}

.card-media-spots .flag-badge:nth-of-type(2) {
  left: 64px;
}

/* ===== Top spots dinámicos en Home ===== */

.top-spots-section {
  padding: 72px clamp(20px, 4vw, 64px);
  background:
    radial-gradient(circle at 80% 10%, rgba(50, 230, 255, 0.12), transparent 30%),
    linear-gradient(180deg, #020b18 0%, #041326 100%);
  color: white;
}

.dark-heading {
  max-width: 780px;
  margin-bottom: 34px;
}

.dark-heading h2 {
  margin: 0;
  font-size: clamp(40px, 5vw, 66px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.dark-heading p:not(.eyebrow) {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
  line-height: 1.55;
}

.top-spots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.home-top-spot-card {
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 24px;
  border-radius: 26px;
  border: 1px solid rgba(160, 225, 255, 0.24);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.home-top-position {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 18px;
  background: rgba(50, 230, 255, 0.13);
  color: var(--cyan);
  font-size: 22px;
  font-weight: 900;
}

.home-top-spot-card h3 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.04em;
}

.home-top-spot-card p:not(.spot-country) {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-weight: 800;
}

.home-top-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 24px 0;
}

.home-top-metrics div {
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.home-top-metrics span {
  display: block;
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  font-weight: 900;
}

.home-top-metrics strong {
  display: block;
  margin-top: 5px;
  color: white;
  font-size: 20px;
}

.home-top-metrics small {
  display: block;
  margin-top: 4px;
  color: var(--cyan);
  font-weight: 900;
}

.home-top-link {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #15a7d1, #35e6e6);
  color: white;
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(17, 168, 198, 0.24);
}

.top-spots-actions {
  display: flex;
  justify-content: center;
  margin-top: 34px;
}

.loading-top-spots {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

@media (max-width: 1100px) {
  .top-spots-grid {
    grid-template-columns: 1fr;
  }

  .home-top-spot-card {
    min-height: auto;
  }
}

/* ===== Corrección visual Top Spots Home ===== */

.top-spots-section {
  position: relative;
  z-index: 5;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 14%, rgba(50, 230, 255, 0.16), transparent 30%),
    radial-gradient(circle at 22% 78%, rgba(53, 255, 159, 0.08), transparent 28%),
    linear-gradient(180deg, #020b18 0%, #041326 100%);
}

.top-spots-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(2, 11, 24, 0.58) 0%,
      rgba(2, 11, 24, 0.88) 100%
    );
}

.top-spots-section .section-heading,
.top-spots-grid,
.top-spots-actions {
  position: relative;
  z-index: 2;
}

.top-spots-section .eyebrow,
.top-spots-section h2,
.top-spots-section p,
.home-top-spot-card,
.home-top-spot-card h3,
.home-top-spot-card strong,
.home-top-link {
  opacity: 1;
  visibility: visible;
}

.home-top-spot-card {
  background: rgba(255, 255, 255, 0.095);
  border-color: rgba(160, 225, 255, 0.30);
}

.home-top-link {
  position: relative;
  z-index: 3;
}

/* ===== Footer común ===== */

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding: 42px clamp(20px, 4vw, 64px);
  background: #020b18;
  color: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand {
  display: inline-block;
  margin-bottom: 10px;
  color: white;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.site-footer p {
  max-width: 520px;
  margin: 0 0 8px;
  line-height: 1.5;
}

.site-footer small {
  color: rgba(255, 255, 255, 0.48);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
  font-weight: 800;
}

.footer-links a:hover {
  color: var(--cyan);
}

@media (max-width: 760px) {
  .site-footer {
    flex-direction: column;
  }
}

/* ===== Corrección global de capas en Home ===== */

body {
  background: #020b18;
}

.site-header {
  position: relative;
  z-index: 20;
}

.hero,
.top-spots-section,
.cards-section,
.site-footer {
  position: relative;
  z-index: 2;
}

.site-footer {
  isolation: isolate;
  background: #020b18;
  opacity: 1;
  visibility: visible;
}

.site-footer * {
  opacity: 1;
  visibility: visible;
}

.site-footer::before,
.site-footer::after {
  display: none;
}

/* ===== Globo 3D interactivo en Home ===== */

.globe-stage {
  position: relative;
}

.globe-3d {
  position: absolute;
  inset: 0;
  z-index: 4;
  min-height: 520px;
  border-radius: 50%;
  overflow: visible;
}

.globe-3d canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

.globe-3d canvas:active {
  cursor: grabbing;
}

.globe-loading {
  display: grid;
  place-items: center;
  height: 100%;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 900;
}

.globe-visual {
  opacity: 0.18;
  filter: blur(1px);
}

.globe-help {
  position: relative;
  z-index: 6;
}

@media (max-width: 1100px) {
  .globe-3d {
    min-height: 420px;
  }
}

/* ===== Ajuste fino del tamaño del globo 3D ===== */

.globe-3d {
  inset: -8% -10% -8% -10%;
  min-height: 660px;
}

.globe-3d canvas {
  transform: scale(1.05);
  transform-origin: center;
}

.globe-visual {
  opacity: 0.10;
}

@media (max-width: 1100px) {
  .globe-3d {
    inset: -4%;
    min-height: 480px;
  }

  .globe-3d canvas {
    transform: scale(1);
  }
}

/* ===== Ajuste final globo 3D y tarjeta seleccionada ===== */

.globe-3d {
  inset: 2% 0 2% 0;
  min-height: 560px;
}

.globe-3d canvas {
  transform: scale(0.92);
  transform-origin: center;
}

.globe-visual {
  opacity: 0.08;
}

.home-selected-forecast {
  color: white;
}

.home-selected-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.home-selected-header h3 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.home-selected-header p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 900;
}

.home-selected-favorite {
  border: 0;
  background: transparent;
  color: white;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
}

.home-selected-updated {
  margin: 22px 0 18px;
  color: #75ffb6;
  font-weight: 900;
}

.home-selected-metrics {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.home-selected-metrics div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.home-selected-metrics span {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.home-selected-metrics strong {
  color: white;
  font-size: 20px;
}

.home-selected-quality {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 22px 0;
}

.home-selected-quality span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.home-selected-quality strong {
  display: block;
  margin-top: 4px;
  color: #75ffb6;
}

.home-selected-score {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 4px solid #35ff9f;
  color: white;
  font-size: 28px;
  font-weight: 900;
}

.home-selected-cta {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  padding: 15px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #15a7d1, #35e6e6);
  color: white;
  font-weight: 900;
}

/* ===== Ajuste fino: encaje del globo 3D en Home ===== */

.globe-3d {
  inset: -2% 1% -2% -8%;
  min-height: 610px;
}

.globe-3d canvas {
  transform: scale(0.96);
  transform-origin: center;
}

/* Puntos y textura algo más limpios visualmente */
.globe-help {
  transform: translate(-18px, -8px);
}

@media (max-width: 1100px) {
  .globe-3d {
    inset: 0;
    min-height: 460px;
  }

  .globe-3d canvas {
    transform: scale(0.92);
  }
}

/* ===== Ajuste final home: quitar globo antiguo de fondo ===== */

.globe-visual {
  display: none !important;
}

.hero-visual::before,
.hero-visual::after,
.globe-stage::before,
.globe-stage::after {
  background-image: none !important;
}

.hero {
  background:
    radial-gradient(circle at 52% 42%, rgba(30, 177, 214, 0.10), transparent 34%),
    radial-gradient(circle at 70% 18%, rgba(42, 230, 230, 0.08), transparent 28%),
    linear-gradient(135deg, #020915 0%, #04101d 48%, #020812 100%) !important;
}

.hero::before,
.hero::after {
  background-image: none !important;
}

/* ===== Top 3 home forecast real ===== */

.featured-spot-card.has-live-forecast {
  border-color: rgba(37, 229, 139, 0.26);
}

.featured-rank {
  width: 46px;
  height: 40px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #071d36;
  color: white;
  font-weight: 1000;
}

.featured-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.featured-metrics div {
  padding: 12px;
  border-radius: 14px;
  background: rgba(7, 29, 54, 0.055);
}

.featured-metrics small {
  display: block;
  margin-bottom: 6px;
  color: rgba(7, 29, 54, 0.50);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.featured-metrics strong {
  color: #071d36;
  font-size: 15px;
}

@media (max-width: 760px) {
  .featured-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Restaurar estilo Top 3 home con forecast real ===== */

.top-spots-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 34px;
}

.top-spot-card,
.featured-spot-card {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 26px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(37, 229, 139, 0.20);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  color: #071d36;
}

.top-spot-card.has-live-forecast,
.featured-spot-card.has-live-forecast {
  border-color: rgba(37, 229, 139, 0.35);
}

.featured-rank {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #071d36;
  color: #ffffff;
  font-size: 18px;
  font-weight: 1000;
}

.featured-spot-main p {
  margin: 0 0 8px;
  color: #0099c7;
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.10em;
}

.featured-spot-main h3 {
  margin: 0;
  color: #071d36;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.featured-spot-main span {
  display: block;
  margin-top: 10px;
  color: rgba(7, 29, 54, 0.62);
  font-weight: 850;
}

.featured-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.featured-metrics div {
  min-height: 70px;
  padding: 13px;
  border-radius: 16px;
  background: #f2f5f8;
}

.featured-metrics small {
  display: block;
  margin-bottom: 7px;
  color: rgba(7, 29, 54, 0.48);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.featured-metrics strong {
  display: block;
  color: #071d36;
  font-size: 16px;
  line-height: 1.18;
  font-weight: 950;
}

.top-spot-card > a,
.featured-spot-card > a {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #24aeda, #35e6e6);
  color: #ffffff;
  text-decoration: none;
  font-weight: 950;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px rgba(36, 174, 218, 0.22);
}

.top-spot-card > a:hover,
.featured-spot-card > a:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

@media (max-width: 1100px) {
  .top-spots-grid {
    grid-template-columns: 1fr;
  }

  .featured-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .top-spot-card,
  .featured-spot-card {
    padding: 22px;
  }

  .featured-metrics {
    grid-template-columns: 1fr;
  }
}

/* ===== Loading forecast real home ===== */

.loading-live-forecast-card {
  grid-column: 1 / -1;
  min-height: 170px;
  align-content: center;
}

.loading-live-forecast-card h3 {
  margin: 0 0 10px;
  color: #071d36;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.loading-live-forecast-card span {
  color: rgba(7, 29, 54, 0.62);
  font-weight: 850;
}

/* ===== Contacto sugerencias spots ===== */

.footer-contact {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
  line-height: 1.5;
}

.footer-contact a {
  color: #67f5d6;
  font-weight: 900;
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

/* Auth / private app */
.auth-page,
.app-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(33, 205, 218, 0.14), transparent 42%),
    #020b18;
  color: #ffffff;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.auth-card,
.app-shell {
  width: min(100%, 520px);
  background: rgba(5, 18, 36, 0.9);
  border: 1px solid rgba(121, 199, 255, 0.24);
  border-radius: 28px;
  padding: 34px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.auth-brand {
  display: inline-flex;
  color: #32e6ff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.auth-copy {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  border: 1px solid rgba(121, 199, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
}

.auth-form input:focus {
  outline: none;
  border-color: #32e6ff;
  box-shadow: 0 0 0 4px rgba(50, 230, 255, 0.14);
}

.auth-message {
  min-height: 22px;
  margin: 0;
  font-weight: 700;
}

.auth-message[data-type="error"] {
  color: #ff7b7b;
}

.auth-message[data-type="success"] {
  color: #35ff9f;
}

.auth-message[data-type="info"] {
  color: #9feeff;
}

.auth-switch {
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.7);
}

.auth-switch a {
  color: #32e6ff;
  font-weight: 800;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 16px;
  padding: 12px 20px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  border: 0;
  background: linear-gradient(135deg, #20b6df, #31e6d6);
  color: #ffffff;
}

.secondary-button {
  border: 1px solid rgba(121, 199, 255, 0.34);
  background: transparent;
  color: #ffffff;
}

.app-shell {
  width: min(100%, 1080px);
}

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.app-panel {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(121, 199, 255, 0.18);
  border-radius: 22px;
  padding: 24px;
}

.app-panel p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
}

@media (max-width: 760px) {
  .app-header {
    flex-direction: column;
  }

  .app-grid {
    grid-template-columns: 1fr;
  }

  .auth-card,
  .app-shell {
    padding: 24px;
  }
}

/* Header auth buttons */
[data-header-account],
[data-header-logout] {
  cursor: pointer;
}

button[data-header-logout] {
  font: inherit;
  color: inherit;
}

button[data-header-logout]:not(:disabled) {
  cursor: pointer;
}


/* Private app dashboard */
.app-wide-panel {
  margin-top: 18px;
}

.app-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.app-mini-list {
  display: grid;
  gap: 12px;
}

.app-mini-spot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid rgba(121, 199, 255, 0.16);
}

.app-mini-spot:first-child {
  border-top: 0;
}

.app-mini-spot strong {
  display: block;
  color: #ffffff;
  font-size: 1rem;
}

.app-mini-spot span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.92rem;
}

.app-mini-spot a {
  color: #32e6ff;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 760px) {
  .app-panel-header,
  .app-mini-spot {
    align-items: flex-start;
    flex-direction: column;
  }
}

.account-page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 120px 0 80px;
}

.account-hero {
  max-width: 780px;
  margin-bottom: 34px;
}

.account-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  margin: 0 0 16px;
}

.account-hero p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.account-card {
  background: rgba(5, 18, 36, 0.78);
  border: 1px solid rgba(121, 199, 255, 0.22);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.account-card h2 {
  margin: 0 0 18px;
  font-size: 1.35rem;
}

.account-card p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
}

.account-details {
  display: grid;
  gap: 16px;
  margin: 0;
}

.account-details div {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.account-details div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.account-details dt {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.88rem;
  margin-bottom: 5px;
}

.account-details dd {
  margin: 0;
  font-weight: 800;
  color: #fff;
  word-break: break-word;
}

.danger-zone {
  border-color: rgba(255, 107, 107, 0.38);
}

.danger-button {
  width: 100%;
  border: 0;
  border-radius: 18px;
  padding: 15px 22px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #ff4d4d, #b91c1c);
  cursor: pointer;
}

.danger-button:disabled,
.primary-button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.auth-message[data-type="success"] {
  color: #24d98b;
}

.auth-message[data-type="error"] {
  color: #ff6b6b;
}

@media (max-width: 820px) {
  .account-grid {
    grid-template-columns: 1fr;
  }

  .account-page {
    padding-top: 96px;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-img {
  display: block;
  height: 46px;
  width: auto;
  object-fit: contain;
}

@media (max-width: 720px) {
  .brand-logo-img {
    height: 34px;
  }
}

/* ==================================================
   Buda Surfboards - logo principal
   ================================================== */

.site-header .brand,
.site-header .auth-brand,
.site-header .footer-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  max-width: 220px;
  overflow: hidden;
}

.site-header .brand-logo-img,
.site-header .brand img.brand-logo-img,
.site-header .auth-brand img.brand-logo-img {
  display: block !important;
  width: auto !important;
  height: 44px !important;
  max-width: 190px !important;
  object-fit: contain !important;
}

.footer-brand .brand-logo-img,
.footer-brand img.brand-logo-img {
  display: block !important;
  width: auto !important;
  height: 42px !important;
  max-width: 190px !important;
  object-fit: contain !important;
}

.auth-brand .brand-logo-img,
.auth-brand img.brand-logo-img {
  display: block !important;
  width: auto !important;
  height: 52px !important;
  max-width: 220px !important;
  object-fit: contain !important;
}

@media (max-width: 720px) {
  .site-header .brand-logo-img,
  .site-header .brand img.brand-logo-img,
  .site-header .auth-brand img.brand-logo-img {
    height: 36px !important;
    max-width: 160px !important;
  }
}

/* ==================================================
   FIX FINAL - tamaño global del logo Buda
   ================================================== */

img.brand-logo-img {
  display: block !important;
  width: auto !important;
  height: 42px !important;
  max-height: 42px !important;
  max-width: 180px !important;
  object-fit: contain !important;
}

.site-header a.brand,
.site-header .brand,
a.brand {
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: 190px !important;
  overflow: hidden !important;
}

.footer-brand img.brand-logo-img {
  height: 42px !important;
  max-height: 42px !important;
  max-width: 180px !important;
}

.auth-brand img.brand-logo-img {
  height: 48px !important;
  max-height: 48px !important;
  max-width: 210px !important;
}

@media (max-width: 720px) {
  img.brand-logo-img {
    height: 34px !important;
    max-height: 34px !important;
    max-width: 150px !important;
  }
}

/* ==================================================
   FIX DEFINITIVO - logo de cabecera
   ================================================== */

.brand-logo-img {
  display: block !important;
  width: 180px !important;
  max-width: 180px !important;
  height: auto !important;
  max-height: 56px !important;
  object-fit: contain !important;
}

.site-header .brand,
.site-header a.brand,
.auth-brand,
.footer-brand {
  display: inline-flex !important;
  align-items: center !important;
  width: auto !important;
  max-width: 190px !important;
  overflow: hidden !important;
}

@media (max-width: 720px) {
  .brand-logo-img {
    width: 145px !important;
    max-width: 145px !important;
  }
}

/* ==================================================
   LOGO BUDA - CONTROL FINAL GLOBAL
   ================================================== */

.site-header a.brand,
.site-header .brand {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 230px !important;
  max-width: 230px !important;
  height: 72px !important;
  max-height: 72px !important;
  overflow: hidden !important;
  flex: 0 0 230px !important;
}

.site-header a.brand img.brand-logo-img,
.site-header .brand img.brand-logo-img,
img.brand-logo-img {
  display: block !important;
  width: 220px !important;
  max-width: 220px !important;
  height: auto !important;
  max-height: 66px !important;
  object-fit: contain !important;
}

.footer-brand img.brand-logo-img {
  width: 190px !important;
  max-width: 190px !important;
  height: auto !important;
  max-height: 60px !important;
  object-fit: contain !important;
}

.auth-brand img.brand-logo-img {
  width: 220px !important;
  max-width: 220px !important;
  height: auto !important;
  max-height: 72px !important;
  object-fit: contain !important;
}

@media (max-width: 720px) {
  .site-header a.brand,
  .site-header .brand {
    width: 170px !important;
    max-width: 170px !important;
    flex-basis: 170px !important;
    height: 58px !important;
  }

  .site-header a.brand img.brand-logo-img,
  .site-header .brand img.brand-logo-img,
  img.brand-logo-img {
    width: 160px !important;
    max-width: 160px !important;
    max-height: 52px !important;
  }
}

/* ==================================================
   LOGO BUDA TRANSPARENTE - CONTROL FINAL
   ================================================== */

.site-header a.brand,
.site-header .brand {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 280px !important;
  max-width: 280px !important;
  height: 82px !important;
  max-height: 82px !important;
  overflow: visible !important;
  flex: 0 0 280px !important;
}

.site-header a.brand img.brand-logo-img,
.site-header .brand img.brand-logo-img,
img.brand-logo-img {
  display: block !important;
  width: 260px !important;
  max-width: 260px !important;
  height: auto !important;
  max-height: 78px !important;
  object-fit: contain !important;
  background: transparent !important;
}

.footer-brand img.brand-logo-img {
  width: 220px !important;
  max-width: 220px !important;
  height: auto !important;
  max-height: 68px !important;
  background: transparent !important;
}

.auth-brand img.brand-logo-img {
  width: 260px !important;
  max-width: 260px !important;
  height: auto !important;
  max-height: 82px !important;
  background: transparent !important;
}

@media (max-width: 720px) {
  .site-header a.brand,
  .site-header .brand {
    width: 190px !important;
    max-width: 190px !important;
    flex-basis: 190px !important;
    height: 62px !important;
  }

  .site-header a.brand img.brand-logo-img,
  .site-header .brand img.brand-logo-img,
  img.brand-logo-img {
    width: 180px !important;
    max-width: 180px !important;
    max-height: 56px !important;
  }
}

/* ==================================================
   LOGO BUDA - zonas app/descargar sin recorte
   ================================================== */

.auth-brand {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  margin-bottom: 22px;
}

.auth-brand img.brand-logo-auth-img,
img.brand-logo-auth-img {
  display: block !important;
  width: 280px !important;
  max-width: 280px !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  background: transparent !important;
}

.app-header .auth-brand {
  overflow: visible !important;
  max-width: none !important;
}

.app-header .auth-brand img.brand-logo-auth-img {
  width: 280px !important;
  max-width: 280px !important;
  max-height: none !important;
}

@media (max-width: 720px) {
  .auth-brand img.brand-logo-auth-img,
  img.brand-logo-auth-img {
    width: 220px !important;
    max-width: 220px !important;
  }
}

/* ==================================================
   Favoritos - botón Crear alerta
   ================================================== */

.favorite-alert-button {
  margin-top: 10px;
  width: 100%;
  text-align: center;
  justify-content: center;
}

.favorite-alert-button + button,
.favorite-alert-button + .secondary-button,
.favorite-alert-button + .danger-button {
  margin-top: 10px;
}

/* ==================================================
   Favoritos - botón Crear alerta
   ================================================== */

.favorite-alert-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  width: 100%;
  text-align: center;
}

.favorite-alert-button + button,
.favorite-alert-button + .secondary-button,
.favorite-alert-button + .danger-button {
  margin-top: 10px;
}

/* ==================================================
   Favoritos - botón Crear alerta
   ================================================== */

.favorite-card-actions {
  display: grid;
  gap: 10px;
}

.favorite-alert-button {
  width: 100%;
  text-align: center;
  justify-content: center;
}

/* ==================================================
   Alertas - tarjetas mejoradas
   ================================================== */

.alert-card {
  position: relative;
}

.alert-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.alert-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.alert-status-badge.is-active {
  background: rgba(50, 230, 255, 0.14);
  color: #32e6ff;
  border: 1px solid rgba(50, 230, 255, 0.32);
}

.alert-status-badge.is-paused {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.alert-card-summary {
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 16px;
}

.alert-condition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 18px;
}

.alert-condition-item {
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.alert-condition-item span {
  display: block;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.alert-condition-item strong {
  display: block;
  color: #ffffff;
  font-size: 0.95rem;
}

.alert-card-actions {
  display: grid;
  gap: 10px;
}

.alert-toggle-button,
.alert-delete-button {
  width: 100%;
}

.alert-card.is-paused {
  opacity: 0.82;
}

@media (max-width: 720px) {
  .alert-condition-grid {
    grid-template-columns: 1fr;
  }

  .alert-card-topline {
    align-items: flex-start;
    flex-direction: column;
  }
}

.alert-help-box {
  margin-bottom: 22px;
}

.alert-help-box h3 {
  margin: 0 0 10px;
}

.alert-help-box ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.alert-help-box li {
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.78);
}

/* ==================================================
   App dashboard - resumen personal
   ================================================== */

.app-muted-line {
  color: rgba(255, 255, 255, 0.72);
  margin-top: 10px;
}

.app-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.app-mini-alert small {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.82rem;
  line-height: 1.35;
}

.app-mini-status {
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.app-mini-status.is-active {
  color: #06111f;
  background: #32e6ff;
}

.app-mini-status.is-paused {
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.10);
}

@media (max-width: 720px) {
  .app-panel-actions {
    flex-direction: column;
  }

  .app-panel-actions a {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* ==================================================
   App dashboard - acciones cabecera
   ================================================== */

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.app-header-actions .secondary-button {
  min-width: 170px;
  justify-content: center;
  text-align: center;
}

@media (max-width: 720px) {
  .app-header-actions {
    width: 100%;
    margin-top: 18px;
  }

  .app-header-actions .secondary-button {
    width: 100%;
  }
}

/* === HOME LAPTOP GLOBE / CARD FIX START === */
/*
  Ajuste definitivo portátil:
  - bloque izquierdo más compacto
  - el globo puede invadir la zona izquierda
  - el globo queda por encima del texto si se solapan
  - la tarjeta derecha se mantiene como estaba
*/
@media (min-width: 1201px) and (max-width: 1540px) {
  .hero {
    grid-template-columns: minmax(250px, 395px) minmax(460px, 1fr) 360px !important;
    gap: 8px !important;
  }

  .hero-content {
    max-width: 395px !important;
    position: relative !important;
    z-index: 1 !important;
  }

  .hero h1 {
    max-width: 395px !important;
    font-size: clamp(38px, 3.85vw, 58px) !important;
    line-height: 1.04 !important;
  }

  .hero-description {
    max-width: 385px !important;
    font-size: 18px !important;
    line-height: 1.45 !important;
  }

  .hero-actions {
    gap: 12px !important;
    margin-top: 28px !important;
  }

  .hero-actions .primary-button,
  .hero-actions .secondary-button {
    min-width: 175px !important;
    padding-inline: 18px !important;
  }

  .globe-stage {
    position: relative !important;
    z-index: 20 !important;
    min-height: 610px !important;
    margin-left: -36px !important;
    margin-right: -6px !important;
    transform: none !important;
    overflow: visible !important;
    pointer-events: auto;
  }

  .globe-3d {
    z-index: 21 !important;
    inset: -2% -2% -2% -2% !important;
    min-height: 610px !important;
    overflow: visible !important;
  }

  .globe-3d canvas {
    position: relative !important;
    z-index: 22 !important;
    transform: scale(0.90) translateX(16px) !important;
    transform-origin: center center !important;
  }

  .globe-help {
    z-index: 23 !important;
    transform: translate(-8px, -8px) !important;
  }

  .forecast-card {
    position: relative !important;
    z-index: 30 !important;
    max-width: 360px !important;
  }
}

@media (min-width: 1024px) and (max-width: 1200px) {
  .hero {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .hero-content {
    max-width: 540px !important;
    z-index: 2 !important;
  }

  .hero h1,
  .hero-description {
    max-width: 540px !important;
  }

  .globe-stage {
    min-height: 460px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
  }

  .globe-3d {
    inset: 0 !important;
    min-height: 460px !important;
  }

  .globe-3d canvas {
    transform: scale(0.88) !important;
  }

  .forecast-card {
    justify-self: start !important;
    width: min(100%, 420px) !important;
    max-width: 420px !important;
  }
}
/* === HOME LAPTOP GLOBE / CARD FIX END === */

/* === APP DASHBOARD STABLE FIX START === */

.app-shell {
  width: min(1180px, calc(100% - 32px));
}

.app-header {
  gap: 24px;
}

.app-grid {
  align-items: stretch;
}

.app-panel {
  min-width: 0;
}

.app-panel .primary-button,
.app-panel .secondary-button,
.app-panel-actions .primary-button,
.app-panel-actions .secondary-button {
  width: fit-content;
  min-width: 160px;
}

.app-wide-panel {
  width: 100%;
}

.app-panel-header {
  gap: 18px;
}

.app-panel-header .secondary-button {
  flex-shrink: 0;
}

.app-mini-list {
  margin-top: 18px;
}

.app-mini-spot {
  gap: 14px;
}

.app-mini-spot > div {
  min-width: 0;
}

.app-mini-spot a,
.app-mini-status {
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .app-panel-header,
  .app-mini-spot {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-mini-spot a,
  .app-mini-status,
  .app-panel-header .secondary-button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* === APP DASHBOARD STABLE FIX END === */

/* === RESPONSIVE MOBILE GLOBAL START === */

/*
  Ajustes globales mobile/tablet:
  mantiene identidad visual, evita cajas montadas y mejora lectura en pantallas pequeñas.
*/

img,
video,
canvas {
  max-width: 100%;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

@media (max-width: 1100px) {
  .site-header {
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
  }

  .brand-logo-img {
    width: min(260px, 58vw);
    height: auto;
  }

  .main-nav {
    order: 3;
    display: flex !important;
    width: 100%;
    gap: 20px;
    overflow-x: auto;
    padding: 6px 0 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .main-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .header-actions {
    margin-left: auto;
    gap: 10px;
  }

  .login-link,
  .register-button,
  .primary-button,
  .secondary-button,
  .forecast-button {
    min-height: 46px;
  }
}

@media (max-width: 850px) {
  .site-header {
    align-items: center;
  }

  .header-actions {
    display: flex !important;
    width: 100%;
    order: 4;
    margin-left: 0;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
  }

  .header-actions .login-link,
  .header-actions .register-button,
  .header-actions .secondary-button,
  .header-actions button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero {
    grid-template-columns: 1fr !important;
    min-height: auto;
    gap: 26px;
    padding: 34px 18px 52px;
  }

  .hero-content {
    max-width: 100% !important;
    padding-top: 0;
  }

  .hero h1 {
    max-width: 100% !important;
    font-size: clamp(38px, 12vw, 56px) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.055em;
  }

  .hero-description {
    max-width: 100% !important;
    font-size: 18px !important;
    line-height: 1.5 !important;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-actions .primary-button,
  .hero-actions .secondary-button {
    width: 100%;
    min-width: 0 !important;
  }

  .globe-stage,
  .forecast-card {
    display: none !important;
  }

  .feature-strip,
  .cards-section,
  .top-spots-grid {
    grid-template-columns: 1fr !important;
  }

  .feature-strip,
  .cards-section,
  .top-spots-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .section-heading h2,
  .top-spots-section h2 {
    font-size: clamp(34px, 10vw, 48px);
  }

  .info-card,
  .home-top-spot-card,
  .featured-spot-card,
  .top-spot-card {
    min-width: 0;
  }

  .card-body {
    padding: 22px;
  }

  .site-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 12px 14px;
  }

  .brand-logo-img {
    width: min(220px, 64vw);
  }

  .main-nav {
    gap: 16px;
    font-size: 0.94rem;
  }

  .header-actions {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 28px;
  }

  .hero h1 {
    font-size: clamp(36px, 13vw, 46px) !important;
  }

  .eyebrow {
    font-size: 0.82rem;
    letter-spacing: 0.14em;
  }

  .primary-button,
  .secondary-button,
  .register-button,
  .login-link,
  .forecast-button {
    width: 100%;
    min-width: 0 !important;
    padding-inline: 16px;
    text-align: center;
  }
}

/* Auth / perfil / app */
@media (max-width: 900px) {
  .auth-page,
  .account-page,
  .app-page {
    padding: 24px 16px;
  }

  .auth-card,
  .account-card,
  .app-shell,
  .app-panel {
    width: 100%;
    max-width: 100%;
  }

  .account-hero h1,
  .app-header h1 {
    font-size: clamp(36px, 10vw, 54px);
  }

  .account-grid,
  .app-grid {
    grid-template-columns: 1fr !important;
  }

  .account-card,
  .app-panel {
    padding: 24px;
  }

  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-header-actions {
    width: 100%;
  }

  .app-header-actions .secondary-button,
  .app-header-actions button {
    width: 100%;
  }

  .app-panel-header,
  .app-mini-spot {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-panel-header .secondary-button,
  .app-mini-spot a,
  .app-mini-status {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .auth-form input,
  .auth-form select,
  .auth-form textarea,
  .auth-form button,
  .danger-button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .auth-card,
  .account-card,
  .app-panel {
    padding: 20px;
    border-radius: 22px;
  }

  .account-details div {
    overflow-wrap: anywhere;
  }

  .auth-brand {
    max-width: 100%;
  }
}

/* === RESPONSIVE MOBILE GLOBAL END === */

/* === ADMIN APP BUTTON VISIBILITY FIX START === */
.app-header-actions [data-admin-app-link][hidden] {
  display: none !important;
}
/* === ADMIN APP BUTTON VISIBILITY FIX END === */


/* === I18N LANGUAGE SWITCHER START === */
.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 999px;
  background: rgba(2, 11, 24, 0.48);
}

.language-switcher button {
  border: 0;
  border-radius: 999px;
  padding: 7px 10px;
  background: transparent;
  color: rgba(226, 232, 240, 0.78);
  font-weight: 800;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
}

.language-switcher button.active {
  background: linear-gradient(135deg, #22d3ee, #2dd4bf);
  color: #02111f;
}

.language-switcher button:hover {
  color: #ffffff;
}

.language-switcher button.active:hover {
  color: #02111f;
}

@media (max-width: 760px) {
  .language-switcher {
    align-self: flex-start;
  }
}
/* === I18N LANGUAGE SWITCHER END === */

/* Botón para solicitar nuevos spots en el footer */
.footer-spot-request {
  margin-top: 0.8rem;
}

.footer-spot-request-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(20, 184, 166, 0.55);
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.12);
  color: inherit;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.footer-spot-request-button:hover,
.footer-spot-request-button:focus {
  transform: translateY(-1px);
  background: rgba(20, 184, 166, 0.22);
  border-color: rgba(20, 184, 166, 0.9);
}
