/* ============================================
   SECSYSTEM — DESIGN SYSTEM
   Security System Soluções para Segurança
   ============================================ */

/* --- CSS RESET & BASE --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- CUSTOM PROPERTIES --- */
:root {
  /* Colors */
  --primary: #0A2540;
  --primary-light: #1A3A5C;
  --primary-rgb: 10, 37, 64;
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --accent-light: #3B82F6;
  --accent-rgb: 37, 99, 235;
  --success: #25D366;
  --success-hover: #1EBF5A;
  --success-dark: #128C7E;
  --danger: #EF4444;
  --warning: #F59E0B;

  /* Text */
  --text: #1E293B;
  --text-light: #64748B;
  --text-muted: #94A3B8;
  --text-inverse: #FFFFFF;

  /* Backgrounds */
  --bg: #FFFFFF;
  --bg-alt: #F8FAFC;
  --bg-dark: #0F172A;
  --bg-darker: #020617;
  --bg-card: #FFFFFF;

  /* Borders */
  --border: #E2E8F0;
  --border-light: #F1F5F9;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);

  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Typography */
  --font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  --font-size-6xl: 3.75rem;

  /* Line Heights */
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 900px;
  --header-height: 72px;
}

/* --- FONTS --- */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--leading-normal);
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--primary);
}

h1 {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--font-size-3xl);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--font-size-xl);
}

h4 {
  font-size: var(--font-size-lg);
}

p {
  margin-bottom: var(--space-md);
  color: var(--text-light);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

strong {
  font-weight: 600;
  color: var(--text);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  list-style: none;
}

/* --- LAYOUT --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding: var(--space-4xl) 0;
}

.section--alt {
  background-color: var(--bg-alt);
}

.section--dark {
  background-color: var(--bg-dark);
  color: var(--text-inverse);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--text-inverse);
}

.section--dark p {
  color: rgba(255, 255, 255, 0.75);
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section__header h2 {
  margin-bottom: var(--space-md);
}

.section__header p {
  max-width: 640px;
  margin: 0 auto;
  font-size: var(--font-size-lg);
}

/* --- GRID --- */
.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid--6 {
  grid-template-columns: repeat(6, 1fr);
}

/* --- HEADER --- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition-base);
  min-height: 110px; /* Reduces layout shift when loaded */
}

.header--scrolled {
  box-shadow: var(--shadow-md);
}

.header__trust-bar {
  background: var(--primary);
  color: var(--text-inverse);
  padding: var(--space-sm) 0;
  font-size: var(--font-size-sm);
  text-align: center;
}

.header__trust-bar .container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.header__trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  white-space: nowrap;
}

.header__trust-item svg {
  width: 14px;
  height: 14px;
  fill: var(--success);
  flex-shrink: 0;
}

.header__main {
  padding: var(--space-md) 0;
}

.header__main .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  flex-shrink: 0;
}

.header__logo-img {
  height: 36px;
  max-width: 220px;
  width: auto;
  object-fit: contain;
}

.header__logo-text {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.header__logo-text span {
  color: var(--accent);
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.header__nav-link {
  padding: var(--space-sm) var(--space-md);
  color: var(--text);
  font-size: var(--font-size-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.header__nav-link:hover {
  color: var(--accent);
  background: var(--bg-alt);
}

.header__nav-link--active {
  color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
}

/* Dropdown */
.header__dropdown {
  position: relative;
}

.header__dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.header__dropdown-trigger svg {
  width: 12px;
  height: 12px;
  transition: transform var(--transition-fast);
}

.header__dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition-fast);
  z-index: 100;
  pointer-events: none;
}

.header__dropdown:hover .header__dropdown-menu,
.header__dropdown--open .header__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.header__dropdown:hover .header__dropdown-trigger svg {
  transform: rotate(180deg);
}

.header__dropdown-link {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--text);
  font-size: var(--font-size-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.header__dropdown-link:hover {
  color: var(--accent);
  background: var(--bg-alt);
}

.header__dropdown-link--highlight {
  color: var(--accent);
  font-weight: 600;
}

/* Header Actions */
.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.header__phone {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-decoration: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.header__phone:hover {
  color: var(--accent);
  background: var(--bg-alt);
}

.header__phone svg {
  width: 16px;
  height: 16px;
}

/* Mobile Menu Button */
.header__mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  color: var(--text);
}

.header__mobile-toggle svg {
  width: 24px;
  height: 24px;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: 600;
  line-height: 1;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn--primary {
  background: var(--accent);
  color: var(--text-inverse);
  border-color: var(--accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--text-inverse);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.btn--whatsapp {
  background: var(--success);
  color: var(--text-inverse);
  border-color: var(--success);
}

.btn--whatsapp:hover {
  background: var(--success-hover);
  border-color: var(--success-hover);
  color: var(--text-inverse);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

.btn--outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn--outline:hover {
  background: var(--accent);
  color: var(--text-inverse);
  transform: translateY(-1px);
}

.btn--outline-white {
  background: transparent;
  color: var(--text-inverse);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn--outline-white:hover {
  background: var(--text-inverse);
  color: var(--primary);
  border-color: var(--text-inverse);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: transparent;
}

.btn--ghost:hover {
  background: var(--bg-alt);
  color: var(--accent);
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: var(--font-size-sm);
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn--lg {
  padding: 1rem 2rem;
  font-size: var(--font-size-lg);
}

.btn--header {
  padding: 0.5rem 1.25rem;
  font-size: var(--font-size-sm);
}

/* --- CARDS --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
}

.card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card--featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-md);
}

.card--dark {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.card--dark:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
}

.card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent);
  margin-bottom: var(--space-lg);
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

.card__title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--primary);
}

.card__text {
  font-size: var(--font-size-sm);
  color: var(--text-light);
  line-height: var(--leading-normal);
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--accent);
  transition: gap var(--transition-fast);
}

.card__link:hover {
  gap: 10px;
}

/* --- BREADCRUMBS --- */
.breadcrumb {
  padding: var(--space-md) 0;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-light);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb__separator {
  margin: 0 var(--space-sm);
  color: var(--text-muted);
}

/* --- FAQ ACCORDION --- */
.faq__list {
  max-width: 800px;
  margin: 0 auto;
}

.faq__item {
  border-bottom: 1px solid var(--border);
}

.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-lg) 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--text);
  text-align: left;
  line-height: var(--leading-snug);
  transition: color var(--transition-fast);
}

.faq__question:hover {
  color: var(--accent);
}

.faq__question svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-left: var(--space-md);
  transition: transform var(--transition-base);
  color: var(--text-muted);
}

.faq__item--open .faq__question svg {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), padding var(--transition-slow);
}

.faq__item--open .faq__answer {
  max-height: 500px;
  padding-bottom: var(--space-lg);
}

.faq__answer p {
  font-size: var(--font-size-base);
  line-height: var(--leading-relaxed);
  color: var(--text-light);
}

/* --- FOOTER --- */
.footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-4xl) 0 var(--space-xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: var(--space-2xl);
  margin-bottom: var(--space-3xl);
}

.footer__brand {
  max-width: 280px;
}

.footer__logo {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--text-inverse);
  margin-bottom: var(--space-md);
}

.footer__logo span {
  color: var(--accent);
}

.footer__brand p {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.6);
  line-height: var(--leading-relaxed);
}

.footer__column h4 {
  color: var(--text-inverse);
  font-size: var(--font-size-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-lg);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__link {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--font-size-sm);
  transition: color var(--transition-fast);
  text-decoration: none;
}

.footer__link:hover {
  color: var(--text-inverse);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.4);
}

/* --- MOBILE BAR (bottom fixed) --- */
.mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--bg);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
  padding: var(--space-sm) var(--space-md);
}

.mobile-bar__inner {
  display: flex;
  gap: var(--space-sm);
}

.mobile-bar__inner .btn {
  flex: 1;
  justify-content: center;
  font-size: var(--font-size-sm);
  padding: 0.75rem;
}

#whatsapp-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  color: #fff;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  text-decoration: none;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

#whatsapp-widget:hover {
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

#whatsapp-widget svg {
  width: 32px;
  height: 32px;
}

/* --- UTILITIES --- */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-accent {
  color: var(--accent);
}

.text-success {
  color: var(--success);
}

.text-muted {
  color: var(--text-muted);
}

.text-inverse {
  color: var(--text-inverse);
}

.mt-sm {
  margin-top: var(--space-sm);
}

.mt-md {
  margin-top: var(--space-md);
}

.mt-lg {
  margin-top: var(--space-lg);
}

.mt-xl {
  margin-top: var(--space-xl);
}

.mt-2xl {
  margin-top: var(--space-2xl);
}

.mb-md {
  margin-bottom: var(--space-md);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

.mb-xl {
  margin-bottom: var(--space-xl);
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

.gap-lg {
  gap: var(--space-lg);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid--6 {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  html {
    font-size: 15px;
  }

  h1 {
    font-size: var(--font-size-3xl);
  }

  h2 {
    font-size: var(--font-size-2xl);
  }

  .section {
    padding: var(--space-3xl) 0;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .grid--6 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Header Mobile */
  .header__main .container {
    gap: var(--space-sm);
    max-width: 100%;
    min-width: 0;
    justify-content: space-between;
  }

  .header__logo {
    flex: 0 1 auto;
    min-width: 0;
    max-width: calc(100% - 3.75rem);
  }

  .header__logo-img {
    width: clamp(170px, 56vw, 200px);
    max-width: 100%;
  }

  .header__nav {
    display: none;
    position: fixed;
    top: var(--mobile-menu-top, var(--header-height));
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    flex-direction: column;
    padding: var(--space-lg) var(--space-lg) calc(var(--space-lg) + env(safe-area-inset-bottom));
    overflow-y: auto;
    z-index: 1001;
    border-top: 1px solid var(--border);
    overscroll-behavior: contain;
  }

  .header__nav--open {
    display: flex;
  }

  .header__nav-link {
    padding: var(--space-md);
    font-size: var(--font-size-base);
    width: 100%;
  }

  .header__dropdown-menu {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding-left: var(--space-lg);
  }

  .header__dropdown--open .header__dropdown-menu {
    display: block;
  }

  .header__phone {
    display: none;
  }

  .header__mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
    width: 44px;
    height: 44px;
    padding: 0;
  }

  .header__actions {
    display: none;
  }

  /* Footer Mobile */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer__brand {
    max-width: none;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  /* Mobile Bar */
  .mobile-bar {
    display: block;
    width: 100%;
    max-width: 100%;
  }

  #whatsapp-widget {
    right: 16px;
    bottom: 80px;
    width: 56px;
    height: 56px;
  }

  #whatsapp-widget svg {
    width: 28px;
    height: 28px;
  }

  /* Add bottom padding to body for mobile bar */
  body {
    padding-bottom: 70px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: var(--font-size-2xl);
  }

  h2 {
    font-size: var(--font-size-xl);
  }

  .btn--lg {
    padding: 0.875rem 1.5rem;
    font-size: var(--font-size-base);
  }

  .header__logo-img {
    width: clamp(160px, 55vw, 200px);
  }

  .btn {
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
  }

  .btn--lg,
  .text-center > .btn,
  .cta-section__actions .btn {
    width: 100%;
  }
}
.footer__logo-img { height: 32px; max-width: 220px; width: auto; object-fit: contain; margin-bottom: 12px; }

