/* ==========================================================================
   Telas do Brasil — Portal de Entrada / Gateway
   Desenvolvido para substituição completa do Elementor / WordPress
   Leve, ultra-rápido, responsivo e sem dependências externas.
   ========================================================================== */

:root {
  color-scheme: light;
  --navy: #10366e;
  --navy-dark: #092650;
  --navy-darkest: #071933;
  --yellow: #f5d54b;
  --yellow-hover: #ffea79;
  --green: #099b49;
  --whatsapp-green: #25d366;
  --ink: #17263b;
  --muted: #5e7188;
  --soft-bg: #f4f7fb;
  --white: #ffffff;
  --border-light: rgba(16, 54, 110, 0.08);
  --border-card: rgba(255, 255, 255, 0.15);
  --shadow-sm: 0 4px 12px rgba(9, 38, 80, 0.06);
  --shadow-md: 0 12px 32px rgba(9, 38, 80, 0.12);
  --shadow-hover: 0 20px 48px rgba(9, 38, 80, 0.22);
  --font-main: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background-color: var(--soft-bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Padrão de Malha Industrial sutil no fundo */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  background-image: 
    repeating-linear-gradient(0deg, transparent 0, transparent 38px, var(--navy) 39px, transparent 40px),
    repeating-linear-gradient(90deg, transparent 0, transparent 38px, var(--navy) 39px, transparent 40px);
}

/* Acessibilidade de foco */
:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

/* ==========================================================================
   Header & Logotipo
   ========================================================================== */
.header {
  position: relative;
  z-index: 10;
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 24px 20px;
  text-align: center;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.brand-link {
  display: inline-block;
  transition: transform 0.25s ease;
  border-radius: 8px;
}

.brand-link:hover {
  transform: scale(1.02);
}

.brand-logo {
  max-width: 320px;
  width: 100%;
  height: auto;
  display: block;
}

.brand-tagline {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ==========================================================================
   Main Portal Grid
   ========================================================================== */
.main-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.portal-section {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* ==========================================================================
   Portal Card Styles
   ========================================================================== */
.portal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 290px;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--white);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-card);
  transition: transform 0.35s var(--transition-smooth), 
              box-shadow 0.35s var(--transition-smooth),
              border-color 0.35s ease;
  cursor: pointer;
  background-color: var(--navy-darkest);
}

.portal-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(245, 213, 75, 0.4);
}

/* Fundo da imagem com zoom suave */
.card-bg-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.card-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s var(--transition-smooth);
}

.portal-card:hover .card-bg-img {
  transform: scale(1.08);
}

/* Gradientes de contraste personalizados para cada card */
.card-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  transition: opacity 0.35s ease;
}

/* Card 1: Loja Online (Ouro / Âmbar escuro industrial) */
.card-loja .card-overlay {
  background: linear-gradient(
    180deg,
    rgba(66, 52, 12, 0.65) 0%,
    rgba(40, 31, 7, 0.88) 60%,
    rgba(22, 17, 4, 0.96) 100%
  );
}
.portal-card.card-loja:hover .card-overlay {
  background: linear-gradient(
    180deg,
    rgba(84, 66, 15, 0.55) 0%,
    rgba(46, 36, 8, 0.84) 60%,
    rgba(22, 17, 4, 0.97) 100%
  );
}

/* Card 2: Institucional (Azul Marinho Oficial Telas do Brasil) */
.card-institucional .card-overlay {
  background: linear-gradient(
    180deg,
    rgba(16, 54, 110, 0.70) 0%,
    rgba(9, 38, 80, 0.90) 60%,
    rgba(5, 22, 48, 0.98) 100%
  );
}
.portal-card.card-institucional:hover .card-overlay {
  background: linear-gradient(
    180deg,
    rgba(20, 68, 138, 0.60) 0%,
    rgba(9, 38, 80, 0.88) 60%,
    rgba(5, 22, 48, 0.98) 100%
  );
}

/* Card 3: WhatsApp Fale Conosco (Verde Esmeralda WhatsApp) */
.card-whatsapp .card-overlay {
  background: linear-gradient(
    180deg,
    rgba(9, 100, 48, 0.72) 0%,
    rgba(6, 68, 33, 0.90) 60%,
    rgba(3, 38, 18, 0.98) 100%
  );
}
.portal-card.card-whatsapp:hover .card-overlay {
  background: linear-gradient(
    180deg,
    rgba(12, 128, 61, 0.62) 0%,
    rgba(6, 68, 33, 0.88) 60%,
    rgba(3, 38, 18, 0.98) 100%
  );
}

/* Card 4: Representante (Grafite e Aço Industrial) */
.card-representante .card-overlay {
  background: linear-gradient(
    180deg,
    rgba(35, 47, 62, 0.75) 0%,
    rgba(21, 30, 41, 0.92) 60%,
    rgba(11, 16, 23, 0.98) 100%
  );
}
.portal-card.card-representante:hover .card-overlay {
  background: linear-gradient(
    180deg,
    rgba(44, 58, 77, 0.65) 0%,
    rgba(21, 30, 41, 0.88) 60%,
    rgba(11, 16, 23, 0.98) 100%
  );
}

/* Conteúdo interno do card */
.card-content {
  position: relative;
  z-index: 3;
  padding: 32px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 20px;
}

.card-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.card-svg-icon {
  width: 40px;
  height: 40px;
  color: var(--yellow);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.card-texts {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.card-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 12px;
}

.card-kicker {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #e2eaf4;
  margin-bottom: 4px;
}

.card-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.card-description {
  font-size: 0.9375rem;
  color: #c9d8ea;
  line-height: 1.45;
  max-width: 440px;
  margin-bottom: 18px;
}

/* Botão seta / call to action interno */
.card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--yellow);
  transition: gap 0.25s ease, color 0.25s ease;
}

.card-arrow svg {
  transition: transform 0.25s ease;
}

.portal-card:hover .card-arrow {
  color: #ffffff;
  gap: 12px;
}

.portal-card:hover .card-arrow svg {
  transform: translate(2px, -2px);
}

/* ==========================================================================
   Footer Institucional
   ========================================================================== */
.footer {
  position: relative;
  z-index: 10;
  background: var(--navy-darkest);
  color: #c8d7ea;
  border-top: 3px solid var(--navy);
  padding: 44px 20px 30px;
}

.footer-container {
  max-width: 1160px;
  margin: 0 auto;
}

.footer-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-company {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--white);
}

.footer-meta {
  font-size: 0.875rem;
  color: #a3bad6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
}

.footer-contacts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 18px;
  font-size: 0.9375rem;
  margin-top: 4px;
}

.footer-link {
  color: var(--yellow);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.footer-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.separator {
  color: rgba(255, 255, 255, 0.25);
  font-weight: 300;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding-top: 24px;
  font-size: 0.8125rem;
  color: #7994b6;
}

.footer-security {
  font-size: 0.75rem;
  color: #5e7a9e;
}

/* ==========================================================================
   Responsividade (Mobile & Tablet)
   ========================================================================== */
@media (max-width: 900px) {
  .portal-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .portal-card {
    min-height: 250px;
  }

  .card-content {
    padding: 24px;
  }

  .card-title {
    font-size: 1.6rem;
  }

  .brand-logo {
    max-width: 280px;
  }
}

@media (max-width: 600px) {
  .header {
    padding: 18px 16px;
  }

  .brand-logo {
    max-width: 240px;
  }

  .brand-tagline {
    font-size: 0.75rem;
  }

  .main-content {
    padding: 24px 16px;
  }

  .portal-card {
    min-height: 220px;
    border-radius: 14px;
  }

  .card-content {
    padding: 20px;
  }

  .card-title {
    font-size: 1.4rem;
  }

  .card-description {
    font-size: 0.875rem;
    margin-bottom: 14px;
  }

  .footer {
    padding: 32px 16px 24px;
  }

  .footer-company {
    font-size: 0.9375rem;
  }

  .footer-meta, .footer-contacts {
    font-size: 0.8125rem;
    flex-direction: column;
    gap: 6px;
  }

  .footer-meta .separator, .footer-contacts .separator {
    display: none;
  }
}

/* ==========================================================================
   Modo Redução de Movimento (Acessibilidade)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
