/* Captive portal - shared responsive stylesheet.
   Mobile-first, self-contained (no external fonts or assets).
   Per-site branding varies only via the --accent custom property. */

:root {
  --accent: #a80204;
  --bg: #e9e9e9;
  --card: #ffffff;
  --text: #1c2733;
  --muted: #6b7785;
  --border: #e2e8f0;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
  -webkit-text-size-adjust: 100%;
}

.wrap {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.brand {
  text-align: center;
  margin: 12px 0 16px;
}
/* Primary site mark (Puerto Madryn coat of arms / Red Uno logo). Kept
   aspect-ratio safe: portrait and landscape logos both scale undistorted. */
.brand-mark {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 150px;
  width: auto;
  height: auto;
}
/* Site name under the logo (used when the logo has no text, e.g. muni escudo). */
.brand-name {
  margin-top: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-align: center;
  color: var(--accent);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px;
  box-shadow: 0 6px 24px rgba(16, 32, 64, 0.08);
}

.title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 4px 0 10px;
  text-align: center;
}

.lead {
  font-size: 1.02rem;
  line-height: 1.5;
  text-align: center;
  margin: 0 0 18px;
}

.muted {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  margin: 8px 0 0;
  word-break: break-all;
}

.banner {
  background: #fff4f4;
  border: 1px solid #f3c2c2;
  color: #a12626;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.92rem;
  margin-bottom: 16px;
  text-align: center;
}

.connect {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 4px;
}

.terms {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.95rem;
  line-height: 1.4;
}
.terms input {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  margin-top: 1px;
  accent-color: var(--accent);
}

.btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 16px 20px;
  min-height: 56px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.btn:active { filter: brightness(0.94); }
a.btn { margin-top: 8px; }

/* Implicit-consent line under the connect button (no blocking checkbox). */
.terms-note {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
  margin: 12px 0 0;
}
.terms-note a { color: var(--accent); }

/* "Info útil" collapsible on the landing page. */
.info {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.info > summary {
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  padding: 4px 0;
}
.info > summary::-webkit-details-marker { display: none; }
.info > summary::after {
  content: "+";
  float: right;
  color: var(--muted);
  font-weight: 700;
}
.info[open] > summary::after { content: "\2013"; }
.info-list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 0.92rem;
  line-height: 1.6;
}
.info-list a { color: var(--accent); }
.info-ph { color: var(--muted); font-style: italic; }

/* Terms & conditions page body. */
.terms-body { text-align: left; margin-top: 4px; }
.terms-h {
  font-size: 1.02rem;
  margin: 16px 0 4px;
}
.terms-body p {
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0 0 6px;
}
.terms-review {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
  font-style: italic;
  border-left: 3px solid var(--border);
  padding-left: 10px;
  margin: 16px 0;
}

/* Co-branding strip: WiFi Puerto Madryn + "inteligente" marks (muni site only). */
.cobrand {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 22px;
}
.cobrand img {
  max-height: 46px;
  max-width: 45%;
  width: auto;
  height: auto;
}

/* Provider credit (muni site): "Provisto por" + Red Uno logo. */
.provider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.8rem;
}
.provider-logo { height: 24px; width: auto; }

/* Social follow (display only). */
.social {
  margin-top: 22px;
  text-align: center;
}
.social-label {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.social-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.social-ico svg { width: 24px; height: 24px; }
.social-ico.ig {
  background: radial-gradient(circle at 30% 107%,
    #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}
.social-ico.fb { background: #1877F2; }
.social-ico:hover,
.social-ico:focus-visible {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
  filter: brightness(1.05);
}
.social-ico:active { transform: scale(0.98); }

/* Language switcher. */
.langsw {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.langsw .lang {
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
}
.langsw .lang:not(.cur) { color: var(--accent); }
.langsw .lang.cur {
  color: var(--text);
  border-color: var(--border);
  background: #f4f6f9;
}

.foot {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 18px;
}
