@font-face {
  font-family: 'TOTVS';
  src: url('assets/fonts/TOTVS-ExtraLight.ttf') format('truetype');
  font-weight: 200;
  font-style: normal;
}
@font-face {
  font-family: 'TOTVS';
  src: url('assets/fonts/TOTVS-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
}
@font-face {
  font-family: 'TOTVS';
  src: url('assets/fonts/TOTVS-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'TOTVS';
  src: url('assets/fonts/TOTVS-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: 'TOTVS';
  src: url('assets/fonts/TOTVS-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: 'TOTVS';
  src: url('assets/fonts/TOTVS-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
}

:root {
  /* Marca TOTVS (Referência) */
  --totvs-azulescuro: #002233;
  --totvs-azul: #00dbff;
  --totvs-roxo: #a44dff;
  --totvs-verde: #00ffd4;
  --totvs-limao: #d9ff65;
  --totvs-laranja: #ff8900;
  --totvs-rosa: #ff009e;

  /* Tema Light (Padrão) */
  --bg-body: #F4F6F8;
  --bg-surface: #FFFFFF;
  --text-main: var(--totvs-azulescuro);
  --text-muted: #556B7A;
  --border-color: #E2E8F0;
  --primary: var(--totvs-azul);
  --primary-hover: #00c4e5;
  --secondary: var(--totvs-roxo);
  --btn-text-primary: var(--totvs-azulescuro);
  --btn-text-secondary: #FFFFFF;
  --header-bg: var(--totvs-azulescuro);
  --header-text: #FFFFFF;
}

/* Tema Escuro (Automático via Sistema) */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-body: #001520;
    --bg-surface: #002A40;
    --text-main: #FFFFFF;
    --text-muted: #A0B2C0;
    --border-color: #003A59;
    --primary: var(--totvs-azul);
    --primary-hover: #00c4e5;
    --secondary: var(--totvs-roxo);
    --btn-text-primary: var(--totvs-azulescuro);
    --btn-text-secondary: #FFFFFF;
    --header-bg: var(--totvs-azulescuro);
    --header-text: #FFFFFF;
  }
}

/* Base Override para tema claro/escuro forçado (se implementarmos switch) */
[data-theme="dark"] {
    --bg-body: #001520;
    --bg-surface: #002A40;
    --text-main: #FFFFFF;
    --text-muted: #A0B2C0;
    --border-color: #003A59;
}
[data-theme="light"] {
    --bg-body: #F4F6F8;
    --bg-surface: #FFFFFF;
    --text-main: var(--totvs-azulescuro);
    --text-muted: #556B7A;
    --border-color: #E2E8F0;
}

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

body {
  font-family: 'TOTVS', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  text-decoration: none;
  color: inherit;
}

/* HEADER */
.header-wrapper {
  background-color: var(--header-bg);
  color: var(--header-text);
  position: relative;
  overflow: hidden;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
}

.logos {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.logos img {
  height: 48px;
  width: auto;
}

.header-container h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.header-container p {
  font-size: 1.125rem;
  font-weight: 300;
  color: var(--totvs-azul);
  margin-bottom: 2.5rem;
}

/* SEARCH BAR */
.search-container {
  width: 100%;
  max-width: 600px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 1.25rem 2rem;
  border-radius: 50px; /* Pill-shaped */
  border: 2px solid transparent;
  font-size: 1.125rem;
  font-family: 'TOTVS', sans-serif;
  outline: none;
  background-color: var(--bg-surface);
  color: var(--text-main);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: var(--totvs-azul);
  box-shadow: 0 10px 25px rgba(0, 219, 255, 0.2);
}

/* ONDAS / WAVE DIVIDER */
.wave-divider {
  width: 100%;
  height: 60px;
  background-color: var(--bg-body);
  clip-path: polygon(100% 0%, 0% 0%, 0% 100%, 100% 100%);
  position: relative;
  margin-top: -30px;
  z-index: 1;
}

.wave-divider svg {
  position: absolute;
  top: -60px;
  left: 0;
  width: 100%;
  height: 100px;
}

/* MAIN CONTENT */
main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
  border-color: var(--primary);
}

.card-icon {
  width: 48px;
  height: 48px;
  background-color: var(--bg-body);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--totvs-roxo);
}

.card-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex: 1;
}

/* BUTTONS (Pill-shaped) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-family: 'TOTVS', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--btn-text-primary);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: scale(1.02);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-main);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* VIDEOS SECTION */
.video-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  background-color: var(--bg-surface);
  padding: 3rem;
  border-radius: 32px;
  margin-bottom: 4rem;
  border: 1px solid var(--border-color);
}

.video-info h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.video-info p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.video-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.video-player {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.video-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* INFO BOARD */
.info-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 4rem;
}

.info-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 2rem;
}

.info-card h3 {
  font-size: 1.25rem;
  color: var(--totvs-roxo);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-card p {
  margin-bottom: 0.5rem;
}

.info-card strong {
  color: var(--text-main);
}

/* FOOTER */
footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 3rem 2rem;
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--bg-body);
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.social-links a:hover {
  background-color: var(--totvs-azul);
  color: var(--totvs-azulescuro);
  transform: translateY(-3px);
}

.social-links svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.footer-links a:hover {
  color: var(--totvs-azul);
  text-decoration: underline;
}

/* FLOATING WHATSAPP */
.floating-whatsapp {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25D366; /* WhatsApp Green */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
  z-index: 100;
  transition: transform 0.3s ease;
  color: white;
}

.floating-whatsapp:hover {
  transform: scale(1.1);
}

.floating-whatsapp svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .video-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .info-board {
    grid-template-columns: 1fr;
  }
  .header-container h1 {
    font-size: 2rem;
  }
  .logos {
    flex-direction: column;
    gap: 1rem;
  }
}
