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

:root {
  --bg: #f0f2f5;
  --card-bg: #fff;
  --primary: #1a1a2e;
  --gold: #d4af37;
  --text: #343a40;
  --text-light: #6c757d;
  --shadow: 0 4px 24px rgba(0,0,0,0.1);
  --radius: 20px;
}

html {
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===== HERO SECTION ===== */
.hero-section {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 20px;
  padding: 28px 20px 16px;
  margin: -36px -24px 20px;
}

.hero-section .header { margin-bottom: 20px; }

.hero-section .header h1 { color: #fff; }

.hero-section .header .title { color: #d4af37; }

.hero-section .icon-btn::after { color: rgba(255,255,255,0.7); }

.hero-section .icon-btn i {
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

/* ===== CARD ===== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 400px;
  padding: 40px 24px 24px;
  text-align: center;
}

/* ===== HEADER ===== */
.header { margin-bottom: 32px; }

.avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 16px;
  border: 3px solid var(--gold);
  box-shadow: 0 0 20px rgba(212,175,55,0.25);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.3px;
}

.header .title {
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 600;
  margin-top: 4px;
}

/* ===== ICON ROW ===== */
.icon-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border-radius: 16px;
  transition: 0.2s ease;
}

.icon-btn i {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #fff;
  transition: 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.icon-btn::after {
  content: attr(data-label);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-light);
}

.icon-btn:active { transform: scale(0.92); }
.icon-btn:active i { transform: scale(0.9); }

/* Icon colors */
.instagram i { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.facebook i { background: #1877f2; }
.whatsapp i { background: #25d366; }

/* ===== ALERTA ===== */
.alerta {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 26px 28px;
  background: #fff;
  color: #dc3545;
  border: 3px solid #dc3545;
  border-radius: 18px;
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.4;
  cursor: pointer;
}

.alerta-texto {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.alerta-saiba {
  font-size: 0.9rem;
  font-weight: 700;
  opacity: 0.85;
}

.destaque-bpc {
  background: #dc3545;
  color: #fff;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 900;
}

.alerta-voltar {
  font-size: 1.35rem;
  font-weight: 800;
  opacity: 0.9;
}

.siren-gif {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.siren-base {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 6px;
  background: #8a1a2a;
  border-radius: 2px;
}

.siren-light {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background: #ff6b6b;
  border-radius: 50%;
  box-shadow: 0 0 10px #ff6b6b, 0 0 20px #ff6b6b;
  animation: sirene 0.6s infinite alternate;
}

@keyframes sirene {
  0% { background: #ff6b6b; box-shadow: 0 0 10px #ff6b6b, 0 0 20px #ff6b6b; }
  50% { background: #fff; box-shadow: 0 0 15px #fff, 0 0 30px #fff; }
  100% { background: #ff6b6b; box-shadow: 0 0 10px #ff6b6b, 0 0 20px #ff6b6b; }
}

.siren-ray {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 2px;
  background: rgba(255,255,255,0.4);
  border-radius: 1px;
  transform-origin: 0 50%;
  animation: ray 0.6s infinite alternate;
}

.r1 { transform: translate(-50%, -50%) rotate(0deg) translateX(-10px); }
.r2 { transform: translate(-50%, -50%) rotate(90deg) translateX(-10px); }
.r3 { transform: translate(-50%, -50%) rotate(45deg) translateX(-10px); }
.r4 { transform: translate(-50%, -50%) rotate(-45deg) translateX(-10px); }

@keyframes ray {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}


/* ===== ACTION BARS ===== */
.action-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
  margin-bottom: 12px;
  text-align: left;
}

.action-bar i:first-child {
  font-size: 1.2rem;
  color: var(--gold);
}

.action-bar .fa-chevron-right {
  margin-left: auto;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

.action-bar:active { transform: scale(0.97); opacity: 0.9; }

/* ===== QR CODE ===== */
.qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: 14px;
}

.qr-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.qr-code {
  width: 60px;
  height: 60px;
  border-radius: 8px;
}

.share-label {
  font-size: 0.75rem;
  color: #17203B;
  font-weight: 800;
  align-self: flex-start;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  transition: 0.2s ease;
}

.share-btn i {
  font-size: 1.6rem;
  color: var(--text-light);
  transition: 0.2s ease;
}

.share-btn:active { transform: scale(0.85); }
.share-btn:active i { color: var(--primary); }

.share-btn[data-label="WhatsApp"]:hover i { color: #25d366; }
.share-btn[data-label="Telegram"]:hover i { color: #0088cc; }

/* ===== FOOTER ===== */
.footer {
  font-size: 0.72rem;
  color: var(--text-light);
  padding-top: 16px;
  border-top: 1px solid #eee;
}



/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: flex-end;
  justify-content: center;
}

.modal.active { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fade 0.2s ease;
}

.modal-content {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 460px;
  max-height: 80vh;
  border-radius: 20px 20px 0 0;
  overflow-y: auto;
  animation: slide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.15);
}

.modal-content-mapa {
  max-height: 90vh;
}

.modal-close {
  position: sticky;
  top: 8px;
  float: right;
  margin: 8px 8px 0 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  font-size: 1.4rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: 0.2s;
}

.modal-close:active { background: #ddd; transform: scale(0.9); }

.modal-body {
  padding: 8px 24px 24px;
  clear: both;
}

.modal-body h2 {
  text-align: center;
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.modal-body p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 12px;
}

/* BPC Modal */
.bpc-text {
  text-align: center;
  font-size: 0.95rem;
}

.bpc-bold {
  text-align: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 16px;
}

.bpc-valor {
  background: #dc3545;
  color: #fff;
  font-size: 1.8rem;
  font-weight: 900;
  text-align: center;
  padding: 16px;
  border-radius: 14px;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.bpc-lista {
  list-style: none;
  padding: 0;
}

.bpc-lista li {
  padding: 10px 0 10px 28px;
  position: relative;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 1px solid #eee;
}

.bpc-lista li:last-child { border-bottom: none; }

.bpc-lista li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  color: #198754;
  font-size: 0.85rem;
}

.modal-body ul {
  list-style: none;
  padding: 0;
}

.modal-body ul li {
  padding: 10px 0 10px 28px;
  position: relative;
  color: var(--text-light);
  font-size: 0.88rem;
  border-bottom: 1px solid #eee;
}

.modal-body ul li:last-child { border-bottom: none; }

.modal-body ul li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.75rem;
}

/* Gallery grid inside modal */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.gallery-item {
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
  background: var(--bg);
}

.gallery-item:active { opacity: 0.7; }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Map */
.map-container {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 12px;
}

.map-container iframe { display: block; }

.map-address {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-light);
}

.map-address i { color: var(--gold); }

/* Lightbox */
.modal-lightbox {
  align-items: center;
  padding: 20px;
}

.modal-content-lightbox {
  background: transparent;
  box-shadow: none;
  border-radius: 14px;
  max-width: 500px;
  max-height: unset;
  animation: fade 0.2s ease;
}

.modal-content-lightbox .modal-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: rgba(0,0,0,0.4);
  color: #fff;
}

#lightbox-img {
  width: 100%;
  border-radius: 14px;
}

/* Scrollbar */
.modal-content::-webkit-scrollbar { width: 4px; }
.modal-content::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

/* Animations */
@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide {
  from { transform: translateY(60px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== TABLET+ ===== */
@media (min-width: 500px) {
  .modal {
    align-items: center;
    padding: 20px;
  }

  .modal-content {
    border-radius: 20px;
    max-height: 80vh;
    animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .modal-content-mapa { max-height: 85vh; }

  @keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
  }

  .modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    float: none;
    margin: 0;
  }
}
