/* ==========================================================================
   DR. TIAGO COSTA - CSS
   ========================================================================== */

/* Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Variaveis */
:root {
  --primary: #023f5f;
  --secondary: #4381a4;
  --white: #ffffff;
  --gray: #666666;
  --light: #f5f5f5;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --radius: 8px;
}

/* Base */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: var(--gray);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0px 20px;
}

.text-center {
  text-align: center;
  margin-top: 30px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Topbar */
.topbar {
  background: var(--white);
  padding: 8px;
}

.topbar-content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;

  /* remove a borda sólida antiga */
  border-bottom: none;

  /* adiciona o efeito fade-out da linha */
  background:
    linear-gradient(to right,
      transparent,
      rgba(0, 0, 0, 0.12),
      transparent) bottom no-repeat;
  /* altura da linha */
  background-size: 100% 1px;
  /* espaçamento ideal */
  padding-bottom: 4px;
}

.topbar-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray);
  padding: 6px 10px;
  position: relative;
  transition: color 0.2s;
}

.topbar-item::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 10px;
  right: 10px;
  height: 1px;
  background: var(--secondary);
  opacity: 0.6;
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.topbar-item:hover {
  color: var(--secondary);
}

.topbar-item:hover::after {
  transform: scaleX(1);
}

.topbar-item svg {
  width: 14px;
  height: 14px;
}

/* Navbar */
.navbar {
  padding-top: 0px;
  padding-bottom: 8px;
}

.navbar-content {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.nav-links {
  display: flex;
  gap: 5px;
  list-style: none;
}

.nav-links a {
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  position: relative;
  transition: color 0.2s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 14px;
  right: 14px;
  height: 1px;
  background: var(--secondary);
  opacity: 0.6;
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.nav-links a:hover {
  color: var(--secondary);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px 10px;          /* remove o padding-bottom gigante */
  padding-left: 15px;
  padding-bottom: 60px;
  background: none;
  border: none;
  cursor: pointer;
  position: absolute;
  left: 0;
  right: auto;
  -webkit-tap-highlight-color: transparent;
}

.hamburger span {
  width: 30px;
  height: 3px;
  background: #4183a8;
  border-radius: 999px;         /* mais premium que 3px */
  transform-origin: center;
  transition:
    transform 320ms cubic-bezier(.22, 1, .36, 1),
    opacity 200ms ease,
    background 200ms ease;
}

/* gap 5 + height 3 = 8px */
.hamburger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.4);        /* some mais elegante */
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}



/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid transparent;
}

.btn:hover {
  transform:var(--light);
}

.btn-primary {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
}

.btn-accent {
  background: var(--secondary);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */

.section {
  padding: 30px 0;
}

.section-dark {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
}

.section-light {
  background: var(--white);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
}

.section-title-dark {
  color: var(--secondary);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  background: var(--primary);
  color: var(--white);
  padding: 50px 0 40px;
  text-align: center;
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-logo {
  max-width: 180px;
  margin-bottom: 24px;
}

.footer-copyright {
  font-size: 0.85rem;
  opacity: 0.6;
  letter-spacing: 0.5px;
}

.footer-links {
  margin-top: 12px;
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: inherit;
  font-size: 0.85rem;
  opacity: 0.9;
  text-decoration: underline;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  opacity: 1;
}


/* ==========================================================================
   RESPONSIVO
   ========================================================================== */

@media (max-width: 768px), (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
  body.menu-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 90;
    pointer-events: none;
  }

  .topbar-content {
    justify-content: center;
  }

  .topbar-links {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .topbar-content > .topbar-item {
    display: none;
  }

  .topbar-links .topbar-item {
    display: none;
  }

  .topbar-links .topbar-item[href^="https://wa.me"] {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background:#ffffff;
    flex-direction:column;
    padding: 20px;
    margin-top: 5px;
    box-shadow: var(--white);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    z-index: 100;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 15px;
  }

  .section {
    padding: 50px 0;
  }

  .section-title {
    font-size: 1.6rem;
  }

}
@media (max-width: 480px) {
  .btn {
    padding: 12px 22px;
    font-size: 14px;
  }
}

/* Acessibilidade */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
