/* ═══════════════════════════════════════════════════
   ASAMBLEA DE DIOS EN LANZAROTE — index.css
   Dark mode premium | Montserrat | Cyan accent glow
   ═══════════════════════════════════════════════════ */

/* ── Custom Properties ── */
:root {
  --clr-bg: #0a0a0a;
  --clr-bg2: #111111;
  --clr-light: #F2F2F2;
  --clr-white: #ffffff;
  --clr-accent: #00c8ff;
  --clr-accent-dim: #0099cc;
  --clr-text-dark: #1a1a1a;
  --clr-text-muted: #888888;
  --clr-border: rgba(255, 255, 255, 0.08);

  --glow-sm: 0 0 18px rgba(0, 200, 255, 0.25);
  --glow-md: 0 0 40px rgba(0, 200, 255, 0.35);
  --glow-lg: 0 0 70px rgba(0, 200, 255, 0.25);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --sp-xs: 0.5rem;
  --sp-sm: 1rem;
  --sp-md: clamp(1.25rem, 4vw, 2rem);
  --sp-lg: clamp(2.5rem, 6vw, 4rem);
  --sp-xl: clamp(3rem, 8vw, 7rem);

  --font: 'Montserrat', sans-serif;
  --nav-h: 70px;

  --transition: 0.3s ease;

  /* Touch device detection */
  --touch-target: 44px;
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

@supports (scroll-padding-top: var(--nav-h)) {
  html {
    scroll-padding-top: var(--nav-h);
  }
}

body {
  font-family: var(--font);
  background: var(--clr-bg);
  color: var(--clr-white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Improve touch scrolling on mobile */
  -webkit-overflow-scrolling: touch;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {

  /* Remove hover effects on touch devices */
  .nav-link:hover,
  .social-icon:hover,
  .btn-update:hover,
  .btn-settings:hover,
  .horario-card:hover,
  .ministerio-card:hover,
  .evento-item:hover,
  .btn-como-llegar:hover,
  .btn-outline:hover,
  .btn-submit:hover,
  .settings-option:hover {
    transform: none;
    box-shadow: none;
    background: transparent;
  }

  /* Ensure touch targets are large enough */
  .nav-link,
  .social-icon,
  .btn-update,
  .btn-settings,
  .btn-como-llegar,
  .btn-outline,
  .btn-submit,
  .settings-option,
  .hamburger {
    min-height: var(--touch-target);
    min-width: var(--touch-target);
  }

  /* Better tap feedback */
  .nav-link:active,
  .social-icon:active,
  .btn-update:active,
  .btn-settings:active,
  .horario-card:active,
  .ministerio-card:active,
  .evento-item:active,
  .btn-como-llegar:active,
  .btn-outline:active,
  .btn-submit:active,
  .settings-option:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

address {
  font-style: normal;
}

/* ── Container ── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

/* ── Section shared ── */
section {
  padding: var(--sp-xl) 0;
}

.section-dark {
  background: var(--clr-bg);
}

.section-light {
  background: var(--clr-light);
  color: var(--clr-text-dark);
}

.section-header {
  text-align: center;
  margin-bottom: var(--sp-lg);
}

.section-title {
  font-size: clamp(1.5rem, 5vw, 2.8rem);
  font-weight: 300;
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-transform: uppercase;
}

.section-title em {
  font-style: italic;
  font-weight: 300;
}

.section-title strong {
  font-weight: 700;
}

.section-title.light {
  color: var(--clr-white);
}

.section-subtitle {
  margin-top: 0.75rem;
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  font-weight: 300;
  color: var(--clr-text-muted);
}

.section-light .section-subtitle {
  color: #555;
}

/* ═══════════════════════════
   NAVBAR
═══════════════════════════ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--clr-border);
  transition: background var(--transition);
}

#navbar.scrolled {
  background: rgba(10, 10, 10, 0.95);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
}

.nav-logo {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 0.8rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.nav-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.92;
  flex-shrink: 0;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
}

.nav-logo .logo-line1 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--clr-white);
}

.nav-logo .logo-line2 {
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  color: var(--clr-accent);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.mobile-only-socials {
  display: none;
}

.nav-link {
  position: relative;
  z-index: 0;
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.75);
  background: transparent;
  transform: translateZ(0);
  transition: transform 0.28s cubic-bezier(0.25, 0.8, 0.25, 1),
              color 0.28s cubic-bezier(0.25, 0.8, 0.25, 1),
              background 0.28s cubic-bezier(0.25, 0.8, 0.25, 1),
              box-shadow 0.36s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform, box-shadow, color;
  overflow: visible;
}

.nav-link::before {
  content: "";
  position: absolute;
  left: -6px;
  right: -6px;
  top: -4px;
  bottom: -4px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(0,200,255,0.10), rgba(0,200,255,0.06) 60%, rgba(0,200,255,0.04));
  opacity: 0;
  pointer-events: none;
  transform: translateZ(0);
  transition: opacity 0.28s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: -1;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--clr-white);
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(0,200,255,0.08);
}

.nav-link:hover::before,
.nav-link:focus::before {
  opacity: 1;
}

@media (hover: none) and (pointer: coarse) {
  .nav-link:active {
    transform: translateX(4px);
    transition: transform 0.18s cubic-bezier(0.25, 0.8, 0.25, 1);
  }
}

/* Active/pulse and bottom highlight */
.nav-link-active {
  color: var(--clr-accent) !important;
  background: rgba(0, 200, 255, 0.07);
  animation: linkPulse 2s infinite cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav-link-active::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: -8px;
  height: 2px;
  background: linear-gradient(90deg, rgba(0,200,255,0.95), rgba(0,200,255,0.6));
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,200,255,0.18);
  transform-origin: center;
}

@keyframes linkPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0,200,255,0.28);
  }
  60% {
    box-shadow: 0 0 0 12px rgba(0,200,255,0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0,200,255,0);
  }
}

/* Staggered mobile menu entry */
@keyframes navItemIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

#nav-menu.open li .nav-link {
  opacity: 0;
  transform: translateY(10px);
  animation: navItemIn 420ms cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

#nav-menu.open li:nth-child(1) .nav-link { animation-delay: 0ms; }
#nav-menu.open li:nth-child(2) .nav-link { animation-delay: 60ms; }
#nav-menu.open li:nth-child(3) .nav-link { animation-delay: 120ms; }
#nav-menu.open li:nth-child(4) .nav-link { animation-delay: 180ms; }
#nav-menu.open li:nth-child(5) .nav-link { animation-delay: 240ms; }
#nav-menu.open li:nth-child(6) .nav-link { animation-delay: 300ms; }

.nav-link-active {
  color: var(--clr-accent) !important;
  background: rgba(0, 200, 255, 0.07);
}

.nav-link-cta {
  border: 1px solid var(--clr-accent);
  color: var(--clr-accent);
  border-radius: var(--radius-sm);
}

.nav-link-cta:hover {
  background: var(--clr-accent);
  color: var(--clr-bg);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-shrink: 0;
}

.nav-socials {
  display: flex;
  gap: 0.6rem;
}

.social-icon {
  width: 28px;
  height: 28px;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-icon svg {
  width: 100%;
  height: 100%;
}

.social-icon:hover {
  color: var(--clr-accent);
}

.btn-update {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid rgba(0, 200, 255, 0.35);
  color: var(--clr-accent);
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
}

.btn-update svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.btn-update:hover {
  background: rgba(0, 200, 255, 0.1);
  box-shadow: var(--glow-sm);
}

/* ── Settings (gear) button ─────────────────────────── */
.btn-settings {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid rgba(0, 200, 255, 0.35);
  color: var(--clr-accent);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}

.btn-settings svg {
  width: 18px;
  height: 18px;
}

.btn-settings:hover {
  background: rgba(0, 200, 255, 0.1);
  box-shadow: var(--glow-sm);
  transform: rotate(30deg);
}

/* ── Settings modal ─────────────────────────────────── */
.settings-modal[hidden] {
  display: none;
}

.settings-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 8, 20, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);

  /* Fallback for browsers without backdrop-filter */
  @supports not (backdrop-filter: blur(4px)) {
    background: rgba(0, 8, 20, 0.85);
  }
}

.settings-dialog {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--clr-bg, #0b1220);
  border: 1px solid rgba(0, 200, 255, 0.25);
  border-radius: var(--radius-md, 10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), var(--glow-sm);
  padding: 1.5rem 1.25rem 1.25rem;
  animation: settingsIn 0.18s ease-out;
}

@keyframes settingsIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.settings-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--clr-text, #e6f1ff);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: background var(--transition);
}

.settings-close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.settings-title {
  margin: 0 0 1rem;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clr-accent);
}

.settings-option {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  text-align: left;
  text-decoration: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: inherit;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm, 8px);
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 0.5rem;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.settings-option:last-child {
  margin-bottom: 0;
}

.settings-option:hover {
  background: rgba(0, 200, 255, 0.08);
  border-color: rgba(0, 200, 255, 0.4);
  transform: translateX(2px);
}

.settings-option svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--clr-accent);
}

.settings-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-option-text strong {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.settings-option-text span {
  font-size: 0.72rem;
  opacity: 0.7;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ═══════════════════════════
   HERO
═══════════════════════════ */
.section-hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  place-items: center;
  padding-top: var(--nav-h);
  background: #08111a;
  overflow: hidden;
}

/* Vídeo de fundo do hero */
.hero-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

@supports not (background-attachment: fixed) {
  .section-hero {
    background-attachment: scroll;
  }
}

.section-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 60%, rgba(0, 180, 255, 0.14), transparent 28%),
    radial-gradient(circle at 85% 25%, rgba(255, 255, 255, 0.08), transparent 20%);
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.82) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 calc(1rem + 2vw);
  max-width: 820px;
  display: grid;
  gap: 1.4rem;
}

.hero-content::after {
  content: '';
  width: 140px;
  height: 4px;
  margin: 0 auto;
  background: linear-gradient(90deg, rgba(0, 200, 255, 0.85), rgba(196, 255, 255, 0.55));
  border-radius: 999px;
  opacity: 0.9;
}

.hero-subtitle {
  margin-top: 75px;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.32em;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.hero-tagline {
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  margin-top: -0.5rem;
}

.hero-title {
  font-size: clamp(2.8rem, 8vw, 6.8rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.02;
  text-transform: uppercase;
  margin-bottom: var(--sp-lg);
  color: transparent;
  background: linear-gradient(120deg, #8effff 0%, #ffffff 45%, #c8f6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 8px 38px rgba(0, 0, 0, 0.38);
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-title {
    color: var(--clr-white);
  }
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  padding: 1rem 2.6rem;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  color: var(--clr-white);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 999px;
  backdrop-filter: blur(14px);
  transition: transform var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
}

.btn-hero:hover {
  background: var(--clr-accent);
  color: #08111a;
  transform: translateY(-1px);
  box-shadow: 0 20px 40px rgba(0, 200, 255, 0.25);
}

.hero-content.hero-visible .hero-subtitle,
.hero-content.hero-visible .hero-title,
.hero-content.hero-visible .btn-hero {
  opacity: 1;
  transform: translateY(0);
}

.hero-content {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

@media (max-width: 860px) {
  .section-hero {
    min-height: calc(90vh - var(--nav-h));
  }

  .hero-title {
    font-size: clamp(2.6rem, 12vw, 5.5rem);
  }

  .btn-hero {
    min-width: 160px;
    padding: 0.95rem 2.2rem;
  }
}

@media (max-width: 600px) {
  .section-hero {
    padding-top: calc(var(--nav-h) + 0.5rem);
  }

  .hero-content {
    gap: 1rem;
  }

  .hero-title {
    font-size: clamp(2.2rem, 14vw, 4.2rem);
  }

  .hero-subtitle {
    font-size: clamp(0.95rem, 3.5vw, 1.15rem);
    letter-spacing: 0.26em;
  }
}

/* ═══════════════════════════
   HORÁRIOS
═══════════════════════════ */
.horarios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-md);
  margin-bottom: var(--sp-lg);
}

.horario-card {
  background: var(--clr-white);
  border-radius: var(--radius-md);
  padding: var(--sp-md) var(--sp-md) var(--sp-md);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  border-left: 4px solid var(--clr-accent);
  transition: transform var(--transition), box-shadow var(--transition);
}

.horario-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.horario-card .hc-address {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clr-accent-dim);
  margin-bottom: 0.5rem;
}

.horario-card .hc-day {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--clr-text-dark);
  margin-bottom: 0.25rem;
}

.horario-card .hc-time {
  font-size: 2rem;
  font-weight: 900;
  color: var(--clr-text-dark);
  letter-spacing: -0.01em;
}

.btn-como-llegar {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-accent-dim);
  border: 1.5px solid var(--clr-accent-dim);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.85rem;
  transition: background var(--transition), color var(--transition);
}

.btn-como-llegar:hover {
  background: var(--clr-accent-dim);
  color: var(--clr-white);
}

.horarios-online {
  text-align: center;
  padding: var(--sp-md);
  border: 1px dashed rgba(0, 150, 200, 0.3);
  border-radius: var(--radius-md);
  background: rgba(0, 200, 255, 0.03);
  color: var(--clr-text-dark);
}

.horarios-online p {
  margin-bottom: 0.75rem;
  font-weight: 300;
}

.btn-outline {
  display: inline-block;
  padding: 0.55rem 1.5rem;
  border: 2px solid var(--clr-accent-dim);
  color: var(--clr-accent-dim);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: background var(--transition), color var(--transition);
}

.btn-outline:hover {
  background: var(--clr-accent-dim);
  color: var(--clr-white);
}

/* ═══════════════════════════
   ÚLTIMO MENSAJE
═══════════════════════════ */
.mensaje-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--sp-md);
  align-items: start;
}

.mensaje-main {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.video-glow {
  display: block;
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--glow-md);
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 200, 255, 0.2);
}

.video-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius-lg);
}

.video-info {
  text-align: left;
}

.video-info h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--clr-white);
  margin-bottom: 0.4rem;
}

.video-meta {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--clr-text-muted);
}

/* ── Playlist panel ── */
.playlist-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0, 200, 255, 0.18);
  border-radius: var(--radius-md);
  box-shadow: var(--glow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(0, 200, 255, 0.12);
  background: rgba(0, 200, 255, 0.05);
  flex-shrink: 0;
}

.playlist-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--clr-accent);
  text-transform: uppercase;
}

.btn-playlist-order {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 1px solid rgba(0, 200, 255, 0.3);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.28rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.btn-playlist-order svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.btn-playlist-order:hover {
  background: rgba(0, 200, 255, 0.1);
  color: var(--clr-accent);
}

.playlist-list {
  list-style: none;
  overflow-y: auto;
  max-height: 460px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 200, 255, 0.3) transparent;
}

.playlist-list::-webkit-scrollbar {
  width: 4px;
}

.playlist-list::-webkit-scrollbar-track {
  background: transparent;
}

.playlist-list::-webkit-scrollbar-thumb {
  background: rgba(0, 200, 255, 0.3);
  border-radius: 2px;
}

.playlist-item {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.65rem 0.85rem;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.playlist-item:hover {
  background: rgba(0, 200, 255, 0.06);
  border-left-color: rgba(0, 200, 255, 0.4);
}

.playlist-item.active {
  background: rgba(0, 200, 255, 0.1);
  border-left-color: var(--clr-accent);
}

.playlist-item+.playlist-item {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.playlist-thumb {
  width: 82px;
  min-width: 82px;
  height: 46px;
  object-fit: cover;
  border-radius: 4px;
  background: #111;
}

.playlist-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.playlist-item-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;

  /* Fallback for Firefox and other browsers without -webkit-line-clamp */
  @supports not (-webkit-line-clamp: 2) {
    max-height: 2.7em;
    /* 2 lines * 1.35 line-height * 1rem font-size */
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.playlist-item.active .playlist-item-title {
  color: var(--clr-accent);
}

.playlist-item-date {
  font-size: 0.62rem;
  font-weight: 300;
  color: var(--clr-text-muted);
}

.playlist-loading,
.playlist-error {
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--clr-text-muted);
}

/* ═══════════════════════════
   MINISTERIOS / CONÉCTATE
═══════════════════════════ */
.ministerios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-md);
}

.ministerio-card {
  background: var(--clr-white);
  border-radius: var(--radius-md);
  padding: var(--sp-md);
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
  border-top: 3px solid var(--clr-accent);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

.ministerio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}

.ministerio-icon {
  font-size: 2.4rem;
  margin-bottom: var(--sp-sm);
  display: block;
}

.ministerio-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-text-dark);
  margin-bottom: 0.5rem;
}

.ministerio-card p {
  font-size: 0.8rem;
  font-weight: 300;
  color: #555;
  line-height: 1.5;
}

/* ═══════════════════════════
   EVENTOS
═══════════════════════════ */
.eventos-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  max-width: 820px;
  margin: 0 auto;
}

.evento-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: var(--sp-md);
  align-items: start;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--sp-md);
  transition: background var(--transition), box-shadow var(--transition);
}

.evento-item:hover {
  background: rgba(0, 200, 255, 0.05);
  box-shadow: var(--glow-sm);
}

.evento-date {
  text-align: center;
  padding: 0.6rem;
  border-right: 1px solid var(--clr-border);
}

.evento-date .ed-day {
  display: block;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--clr-accent);
  line-height: 1;
}

.evento-date .ed-month {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
  margin-top: 0.2rem;
}

.evento-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--clr-white);
  margin-bottom: 0.35rem;
}

.evento-body p {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--clr-text-muted);
  line-height: 1.5;
}

/* ═══════════════════════════
   FORMULÁRIO ORACIÓN
═══════════════════════════ */
.oracion-form {
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #444;
}

.form-group input,
.form-group textarea {
  background: var(--clr-white);
  border: 1.5px solid #ddd;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--clr-text-dark);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 3px rgba(0, 200, 255, 0.1);
}

.form-group input.invalid,
.form-group textarea.invalid {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-group textarea {
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 3px rgba(0, 200, 255, 0.15);
}

.btn-submit {
  align-self: flex-start;
  background: var(--clr-accent);
  color: var(--clr-bg);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.85rem 2.5rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}

.btn-submit:hover {
  background: var(--clr-accent-dim);
  box-shadow: var(--glow-sm);
  transform: translateY(-2px);
}

/* ═══════════════════════════
   FOOTER
═══════════════════════════ */
#footer {
  background: #000;
  color: rgba(255, 255, 255, 0.7);
  padding-top: var(--sp-xl);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--sp-lg);
  padding-bottom: var(--sp-xl);
  border-bottom: 1px solid var(--clr-border);
}

.footer-logo {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--sp-md);
}

.footer-logo .logo-line1 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--clr-white);
}

.footer-logo .logo-line2 {
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  color: var(--clr-accent);
}

.footer-address {
  font-size: 0.85rem;
  line-height: 2;
}

.footer-address a {
  transition: color var(--transition);
}

.footer-address a:hover {
  color: var(--clr-accent);
}

.footer-socials h4,
.footer-links h4 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clr-white);
  margin-bottom: var(--sp-sm);
}

.footer-social-icons {
  display: flex;
  gap: 0.75rem;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.82rem;
  font-weight: 300;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--clr-accent);
}

.footer-bottom {
  text-align: center;
  padding: 1.5rem var(--sp-md);
  font-size: 0.75rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.3);
}

/* ═══════════════════════════
   TOAST & LOADING
═══════════════════════════ */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid rgba(0, 200, 255, 0.3);
  color: var(--clr-white);
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--glow-sm);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.loader {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(0, 200, 255, 0.2);
  border-top-color: var(--clr-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ═══════════════════════════
   ANIMATIONS (Intersection Observer)
═══════════════════════════ */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════
   RESPONSIVE (Mobile-First)
═══════════════════════════ */

/* ── Lock body scroll when mobile menu is open ── */
body.menu-open {
  overflow: hidden;
}

/* ── Mobile menu overlay ── */
.nav-menu-overlay {
  position: fixed;
  top: var(--nav-h);
  left: 280px;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

.nav-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ── Base styles (Mobile) ── */
.nav-socials {
  display: none;
}

.hamburger {
  display: flex;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.nav-menu {
  display: flex;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  width: 280px;
  height: calc(100vh - var(--nav-h));
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: var(--sp-lg) var(--sp-md);
  gap: 0.5rem;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-100%);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out, visibility 0.3s ease-out;
  will-change: transform, opacity;
}

.nav-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.nav-menu .nav-link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 1rem 1.2rem;
  font-size: clamp(0.9rem, 3vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition), transform var(--transition);
  -webkit-touch-callout: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  text-align: left;
}

.nav-menu .nav-link:hover,
.nav-menu .nav-link:active,
.nav-menu .nav-link:focus {
  background: rgba(0, 200, 255, 0.15);
  color: var(--clr-accent);
  transform: translateX(4px);
}

.nav-menu .nav-link.nav-link-active {
  background: rgba(0, 200, 255, 0.2);
  color: var(--clr-accent);
  border-left: 3px solid var(--clr-accent);
}

/* Em telas pequenas (menu vertical), remover o sublinhado neon do item ativo */
@media (max-width: 1023px) {
  .nav-menu .nav-link.nav-link-active::after {
    display: none;
  }
}

  

.nav-menu .nav-link-cta {
  margin-top: var(--sp-md);
  justify-content: center;
  text-align: center;
  border: 2px solid var(--clr-accent);
  color: var(--clr-accent);
  font-weight: 700;
  min-height: 52px;
  margin-bottom: var(--sp-md);
}

.nav-menu .nav-link-cta:hover,
.nav-menu .nav-link-cta:active,
.nav-menu .nav-link-cta:focus {
  background: var(--clr-accent);
  color: var(--clr-bg);
  transform: scale(1.02);
}

.nav-menu li:last-child {
  margin-top: auto;
  padding-top: var(--sp-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-only-socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding-top: 1rem;
}

.mobile-only-socials .social-icon {
  width: 48px;
  height: 48px;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  padding: 10px;
  transition: color var(--transition), background var(--transition), transform var(--transition);
}

.mobile-only-socials .social-icon:hover {
  color: var(--clr-accent);
  background: rgba(0, 200, 255, 0.15);
  transform: scale(1.1);
}

/* Botão de engrenagem no menu lateral mobile */
.mobile-only-settings {
  margin-top: var(--sp-sm);
}

.btn-settings-mobile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1.2rem;
  background: rgba(0, 200, 255, 0.08);
  border: 1px solid rgba(0, 200, 255, 0.2);
  border-radius: var(--radius-sm);
  color: var(--clr-accent);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  text-transform: uppercase;
}

.btn-settings-mobile svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.btn-settings-mobile:hover,
.btn-settings-mobile:active {
  background: rgba(0, 200, 255, 0.18);
  border-color: var(--clr-accent);
  transform: translateX(4px);
}

/* Ocultar no desktop — a engrenagem do navbar já está visível */
@media (min-width: 1024px) {
  .mobile-only-settings {
    display: none;
  }
}

.btn-update span {
  display: none;
}

.btn-update {
  padding: 0.35rem 0.55rem;
  min-height: 40px;
}

.footer-inner {
  grid-template-columns: 1fr;
  gap: var(--sp-md);
}

.horarios-grid {
  grid-template-columns: 1fr;
  gap: 1rem;
}

.horario-card {
  padding: 1.5rem;
  border-left-width: 3px;
}

.horario-card .hc-address {
  font-size: 0.75rem;
}

.horario-card .hc-time {
  font-size: 1.6rem;
}

.ministerios-grid {
  grid-template-columns: 1fr;
  gap: 1rem;
}

.ministerio-card {
  padding: 1.25rem 1rem;
  min-height: 120px;
}

.mensaje-layout {
  grid-template-columns: 1fr;
}

.playlist-panel {
  max-height: none;
}

.playlist-list {
  max-height: 280px;
}

.evento-item {
  grid-template-columns: 1fr;
  gap: 1rem;
}

.evento-date {
  border-right: none;
  border-bottom: 1px solid var(--clr-border);
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
  text-align: left;
  display: flex;
  gap: 1rem;
  align-items: baseline;
}

.evento-date .ed-day {
  font-size: 1.8rem;
}

.ministerio-card {
  padding: 1.5rem 1rem;
}

.ministerio-icon {
  font-size: 2rem;
}

.ministerio-card h3 {
  font-size: 0.85rem;
}

.nav-inner {
  padding: 0 clamp(0.75rem, 2vw, 1rem);
}

.nav-logo .logo-line1 {
  font-size: 0.68rem;
}

.nav-logo .logo-line2 {
  font-size: 0.55rem;
}

.nav-logo-img {
  height: 32px;
}

.hero-title {
  font-size: clamp(1.8rem, 8vw, 2.8rem);
}

.btn-settings {
  width: 40px;
  height: 40px;
}

.btn-settings svg {
  width: 20px;
  height: 20px;
}

/* ── Tablet & Small Desktop (640px+) ── */
@media (min-width: 640px) {
  .btn-update span {
    display: inline;
  }

  .btn-update {
    padding: 0.5rem 0.75rem;
    min-height: auto;
  }

  .footer-inner {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--sp-lg);
  }

  .horarios-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }

  .horario-card {
    padding: var(--sp-md) 1.2rem;
    border-left-width: 4px;
  }

  .horario-card .hc-address {
    font-size: 0.8rem;
  }

  .horario-card .hc-time {
    font-size: 1.8rem;
  }

  .ministerios-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .ministerio-card {
    padding: 1.5rem 1rem;
    min-height: auto;
  }

  .evento-item {
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
  }

  .evento-date {
    border-right: 1px solid var(--clr-border);
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
    text-align: center;
    display: block;
    gap: 0;
  }

  .evento-date .ed-day {
    font-size: 2.2rem;
  }

  .ministerio-icon {
    font-size: 2.2rem;
  }

  .ministerio-card h3 {
    font-size: 0.9rem;
  }

  .nav-inner {
    padding: 0 var(--sp-md);
  }

  .nav-logo .logo-line1 {
    font-size: 0.75rem;
  }

  .nav-logo .logo-line2 {
    font-size: 0.62rem;
  }

  .nav-logo {
    gap: 0.6rem;
  }

  .hero-title {
    font-size: clamp(1.8rem, 8vw, 2.8rem);
  }

  .btn-settings {
    width: 44px;
    height: 44px;
  }

  .btn-settings svg {
    width: 22px;
    height: 22px;
  }
}

/* ── Desktop & Large Tablet (1024px+) ── */
@media (min-width: 1024px) {
  .nav-socials {
    display: flex;
  }

  .hamburger {
    display: none;
  }

  .nav-menu {
    display: flex;
    position: static;
    top: auto;
    left: auto;
    width: auto;
    height: auto;
    flex-direction: row;
    align-items: center;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    gap: var(--sp-sm);
    border: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    overflow: visible;
  }

  .nav-menu .nav-link {
    width: auto;
    min-height: auto;
    padding: 0.35rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--clr-white);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2rem;
    box-sizing: border-box;
  }

  .nav-menu .nav-link:hover {
    background: rgba(0, 200, 255, 0.08);
    color: var(--clr-accent);
  }

  .nav-menu .nav-link.nav-link-active {
    background: rgba(0, 200, 255, 0.1);
    color: var(--clr-accent);
    /* Remover qualquer neon/borda esquerda herdada do modo mobile */
    border-left: 0 !important;
  }



  .nav-menu .nav-link-cta {
    margin: 0;
    border: 1px solid var(--clr-accent);
    color: var(--clr-accent);
    font-weight: 600;
    align-self: center;
    padding: 0.25rem 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 1.8rem;
    box-sizing: border-box;
  }

  .nav-menu li:last-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }

  .mobile-only-socials {
    display: none;
  }

  .horarios-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .ministerios-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .mensaje-layout {
    grid-template-columns: 1fr 280px;
  }

  .playlist-panel {
    max-height: 460px;
  }

  .playlist-list {
    max-height: 460px;
  }

  .nav-link {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
  }

  .nav-menu {
    gap: 0.2rem;
  }
}

/* ── Mobile Landscape (≤ 1024px height) ── */
@media (max-height: 500px) {
  :root {
    --nav-h: 60px;
  }

  section {
    padding: 3rem 0;
  }

  .hero-title {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
  }
}

.ministerio-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.ministerio-card h3 {
  font-size: 0.8rem;
}

.ministerio-card p {
  font-size: 0.75rem;
}

.evento-item {
  padding: 1.2rem;
}

.evento-date .ed-day {
  font-size: 1.4rem;
}

.evento-date .ed-month {
  font-size: 0.65rem;
}

.evento-body h3 {
  font-size: 0.95rem;
}

.evento-body p {
  font-size: 0.8rem;
}

.toast {
  left: clamp(0.5rem, 2vw, 1rem);
  right: clamp(0.5rem, 2vw, 1rem);
  bottom: 1rem;
  text-align: center;
  font-size: 0.85rem;
}

.btn-hero {
  font-size: 0.8rem;
  padding: 0.6rem 1.2rem;
}

/* Settings modal responsive */
.settings-modal .settings-dialog {
  max-width: 95vw;
  max-height: 90vh;
}

.settings-option {
  font-size: 0.9rem;
  padding: 0.65rem 0.75rem;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.stat-row {
  padding: 0.5rem 0.6rem;
  font-size: 0.75rem;
}

.stat-date {
  min-width: 80px;
  font-size: 0.7rem;
}

.stat-ip {
  font-size: 0.7rem;
}

.stat-location {
  font-size: 0.7rem;
}

/* ═══════════════════════ SETTINGS MODAL STATS ═══════════════════════ */

/* Override the original dialog sizing for the stats panel */
.settings-modal .settings-dialog {
  max-width: 680px;
  width: 92%;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1.5rem 1.25rem 1rem;
}

.settings-stats-container {
  flex: 1 1 auto;
  overflow-y: auto;
  margin: 0.75rem 0;
  padding-right: 0.25rem;
  min-height: 120px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 200, 255, 0.3) transparent;
}

.settings-stats-container::-webkit-scrollbar {
  width: 5px;
}

.settings-stats-container::-webkit-scrollbar-track {
  background: transparent;
}

.settings-stats-container::-webkit-scrollbar-thumb {
  background: rgba(0, 200, 255, 0.3);
  border-radius: 3px;
}

.settings-stats-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--clr-text-muted);
  min-height: 120px;
  font-size: 0.85rem;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(0, 200, 255, 0.15);
  border-top-color: var(--clr-accent);
  border-radius: 50%;
  animation: statspin 0.7s linear infinite;
}

@keyframes statspin {
  to {
    transform: rotate(360deg);
  }
}

.settings-stats-subtitle {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(0, 200, 255, 0.12);
}

.mt-15 {
  margin-top: 1.25rem;
}

/* ── Visit list ── */
.settings-stats-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 210px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 200, 255, 0.2) transparent;
}

.settings-stats-list::-webkit-scrollbar {
  width: 4px;
}

.settings-stats-list::-webkit-scrollbar-thumb {
  background: rgba(0, 200, 255, 0.2);
  border-radius: 2px;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.025);
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  font-size: 0.82rem;
  transition: background 0.2s ease, border-color 0.2s ease;
  animation: statFadeIn 0.3s ease backwards;
}

.stat-row:hover {
  background: rgba(0, 200, 255, 0.06);
  border-left-color: var(--clr-accent);
}

@keyframes statFadeIn {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.stat-date {
  color: var(--clr-text-muted);
  font-size: 0.78rem;
  white-space: nowrap;
  min-width: 100px;
}

.stat-ip {
  color: rgba(255, 255, 255, 0.6);
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-location {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

.stat-flag {
  font-size: 1.1rem;
  line-height: 1;
}

/* ── Bar chart (12 months) ── */
.settings-stats-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.25rem;
  height: 100px;
  padding: 1rem 0 0;
}

.chart-bar-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 0.35rem;
}

.chart-value {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--clr-accent);
  margin-bottom: -2px;
  animation: statValueFade 0.5s ease backwards;
}

@keyframes statValueFade {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.chart-bar {
  width: 100%;
  max-width: 28px;
  min-height: 3px;
  background: linear-gradient(to top, var(--clr-accent-dim), var(--clr-accent));
  border-radius: 3px 3px 0 0;
  position: relative;
  cursor: default;
  transition: filter 0.2s ease;
}

.chart-bar:hover {
  filter: brightness(1.3);
}

.chart-bar::after {
  display: none; /* Hidden because we have chart-value now */
}

.chart-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--clr-text-muted);
  text-transform: uppercase;
}

/* ── Action buttons at the bottom ── */
.settings-actions {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.75rem;
}

.settings-actions .settings-option {
  flex: 1;
  margin-bottom: 0;
}

/* ── Responsive tweaks ── */
@media (max-width: 600px) {
  .settings-modal .settings-dialog {
    max-width: 100%;
    width: 100%;
    max-height: 95vh;
  }

  .stat-row {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .stat-ip {
    flex-basis: 100%;
    order: 3;
  }

  .stat-location {
    margin-left: auto;
  }

  .settings-actions {
    flex-direction: column;
    gap: 0.4rem;
  }

  .settings-stats-chart {
    height: 80px;
  }

  .chart-bar::after {
    display: none;
  }
}

[hidden] {
  display: none !important;
}
/* Settings Login Form Modern UI */
.settings-login-container {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeInModal 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(20, 20, 25, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin-top: 5px;
  margin-bottom: 5px;
}

.settings-login-header {
  text-align: center;
  margin-bottom: 0px;
}

.settings-login-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 8px;
  background: linear-gradient(135deg, var(--accent-color), #00ff88);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  box-shadow: 0 4px 12px rgba(0, 200, 255, 0.3);
}

.settings-login-header h3 {
  color: #fff;
  font-size: 1.15rem;
  margin: 0 0 2px;
  font-weight: 600;
}

.settings-login-header p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  margin: 0;
}

.settings-login-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-login-group label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  margin-left: 2px;
}

.settings-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.settings-input-wrapper svg {
  position: absolute;
  left: 14px;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.3s ease;
  z-index: 1;
}

.settings-input-wrapper input[type="password"]::-ms-reveal,
.settings-input-wrapper input[type="password"]::-ms-clear,
.settings-input-wrapper input[type="password"]::-webkit-credentials-auto-fill-button,
.settings-input-wrapper input[type="password"]::-webkit-textfield-decoration-container,
.settings-input-wrapper input::-webkit-caps-lock-indicator,
.settings-input-wrapper input::-webkit-input-password-reveal-button,
.settings-input-wrapper input::-webkit-contacts-auto-fill-button {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  content: none !important;
}

.settings-input-wrapper input[type="password"] {
  -ms-reveal: none;
  -webkit-appearance: none;
  appearance: none;
}

.settings-input-wrapper input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 12px 42px 12px 42px;
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.settings-input-wrapper input:-webkit-autofill,
.settings-input-wrapper input:-webkit-autofill:hover,
.settings-input-wrapper input:-webkit-autofill:focus,
.settings-input-wrapper input:-webkit-autofill:active {
  -webkit-background-clip: text;
  -webkit-text-fill-color: #fff;
  transition: background-color 5000s ease-in-out 0s;
  box-shadow: 0 0 0 30px rgba(20, 20, 25, 0.8) inset !important;
  -webkit-box-shadow: 0 0 0 30px rgba(20, 20, 25, 0.8) inset !important;
}

.settings-input-wrapper input:focus {
  outline: none;
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 4px rgba(0, 200, 255, 0.15);
}

.settings-input-wrapper input:focus + svg,
.settings-input-wrapper input:not(:placeholder-shown) + svg {
  color: var(--accent-color);
}

.settings-login-btn {
  background: linear-gradient(135deg, rgba(0, 20, 40, 0.9), rgba(0, 10, 25, 0.95));
  color: var(--accent-color);
  border: 1.5px solid var(--accent-color);
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  margin-top: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(0, 200, 255, 0.15);
  letter-spacing: 0.05em;
}

.settings-login-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(0, 200, 255, 0.12), rgba(0, 255, 136, 0.08));
  box-shadow: 0 6px 20px rgba(0, 200, 255, 0.35), 0 0 0 1px var(--accent-color);
}

.settings-login-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(0, 200, 255, 0.2);
}

.settings-login-btn:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.settings-login-error {
   color: #ff6b6b;
   font-size: 0.85rem;
   background: rgba(255, 107, 107, 0.1);
   padding: 10px 14px;
   border-radius: 8px;
   border-left: 3px solid #ff6b6b;
   display: none;
   animation: slideIn 0.3s ease;
}

/* Toggle password button */
.settings-input-wrapper .toggle-password {
   position: absolute;
   right: 12px;
   width: 24px;
   height: 24px;
   padding: 0;
   background: transparent;
   border: none;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   color: rgba(255, 255, 255, 0.5);
   transition: all 0.3s ease;
   z-index: 2;
   outline: none;
   box-shadow: none;
}

.settings-input-wrapper .toggle-password:hover {
   color: var(--accent-color);
   background: rgba(0, 200, 255, 0.12);
   border-color: var(--accent-color);
}

.settings-input-wrapper .toggle-password:active {
   transform: scale(0.9);
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.settings-user-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.settings-logout-btn {
  background: transparent;
  color: #ff4d4d;
  border: 1px solid rgba(255, 77, 77, 0.3);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.settings-logout-btn:hover {
  background: rgba(255, 77, 77, 0.1);
  border-color: #ff4d4d;
}

@keyframes fadeInModal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
