/* ================= RESET ================= */
* {
  box-sizing: border-box;
}

:root {
  --brand-navy: #131c35;
  --brand-teal: #2f57d8;
  --brand-orange: #ef9b07;
  --brand-red: #f54848;
  --brand-red-deep: #ef3e3e;
  --bg-main: #f3f5fa;
  --bg-card: #ffffff;
  --text-main: #131c35;
  --text-muted: #4a5568;
  --btn-orange-hover: #dd8e00;
  --btn-teal-hover: #274dc3;
  --whatsapp-green: #22c55e;
  --whatsapp-green-hover: #16a34a;

  --text-primary: var(--text-main);
  --text-secondary: var(--text-muted);
  --accent-brand: var(--brand-navy);
  --accent-cta: var(--brand-orange);
  --accent-hover: var(--btn-orange-hover);
  --accent-support: var(--brand-teal);
  --accent-support-hover: var(--btn-teal-hover);

  --color-primary: var(--text-main);
  --color-primary-deep: var(--text-main);
  --color-primary-soft: rgba(47, 87, 216, 0.1);
  --color-secondary: var(--brand-teal);
  --color-secondary-soft: rgba(47, 87, 216, 0.1);
  --color-secondary-deep: var(--btn-teal-hover);
  --color-accent: var(--brand-orange);
  --color-accent-deep: var(--btn-orange-hover);
  --color-bg: var(--bg-main);
  --color-surface: var(--bg-card);
  --color-surface-alt: var(--bg-main);
  --color-text: var(--text-muted);
  --color-text-muted: rgba(74, 85, 104, 0.92);
  --color-border: #d9dee8;
  --color-highlight: #2f57d8;
  --gradient-page: linear-gradient(180deg, #f3f5fa 0%, #eef2f8 100%);
  --gradient-soft: linear-gradient(180deg, rgba(47, 87, 216, 0.05) 0%, rgba(19, 28, 53, 0.03) 100%);
  --gradient-primary: linear-gradient(135deg, #2747a8 0%, #131c35 100%);
  --gradient-highlight: linear-gradient(135deg, #2d4fae 0%, #1f3874 52%, #131c35 100%);
  --gradient-accent: linear-gradient(135deg, #f6ad1f 0%, #ef9b07 100%);
  --gradient-secondary: linear-gradient(135deg, #3c69ef 0%, #2f57d8 100%);
  --gradient-call: linear-gradient(135deg, #ff5b56 0%, #f54848 100%);
  --gradient-ribbon: linear-gradient(90deg, #223d84 0%, #182850 48%, #101a34 100%);
  --shadow-soft: 0 18px 40px rgba(22, 45, 73, 0.08);
  --shadow-strong: 0 32px 70px rgba(22, 45, 73, 0.16);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-text);
  background: var(--gradient-page);
  padding-bottom: var(--bottom-bar-offset, 88px);
}

img {
  max-width: 100%;
  height: auto;
}
/* Overlay */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 45, 73, 0.58);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 9998;
}

/* Modal */
.popup-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 0px;
  width: calc(100% - 24px);
  max-width: 440px;
  border: 1px solid var(--color-border);
  box-shadow:
    0 40px 80px rgba(22, 45, 73, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s ease;
  z-index: 9999;
}

/* Active state */
.popup-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.popup-modal.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* Close button */
.popup-close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(30, 58, 95, 0.08);
  color: var(--color-primary);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.popup-close:hover {
  background: rgba(212, 175, 55, 0.18);
  color: var(--color-accent-deep);
  transform: rotate(90deg);
}

/* Mobile */
@media (max-width: 480px) {
  .popup-modal {
    border-radius: 18px;
  }
  
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
