/* Variáveis de cores baseadas no logo do Portal Clínico */
:root {
  --primary: #5FBDA3;
  --primary-light: #8ED0BE;
  --primary-dark: #3A9D83;
  --gray: #808080;
  --gray-light: #f5f5f5;
  --gray-dark: #333333;
  --white: #FFFFFF;
  --black: #000000;
}

/* Reset e estilos base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--gray-dark);
  background-color: var(--white);
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Botões */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.btn-login {
  background-color: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 8px 20px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-login:hover {
  background-color: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
  background-color: var(--white);
  color: var(--primary-dark);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
  background-color: var(--gray-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* Popup de Demonstração */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup {
  background-color: var(--white);
  width: 90%;
  max-width: 500px;
  border-radius: 10px;
  padding: 30px;
  position: relative;
  transform: translateY(-20px);
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.overlay.active .popup {
  transform: translateY(0);
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.popup-header h3 {
  font-size: 24px;
  color: var(--primary-dark);
}

.popup-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--gray);
  cursor: pointer;
  transition: color 0.3s ease;
}

.popup-close:hover {
  color: var(--primary-dark);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--gray-light);
  border-radius: 5px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(95, 189, 163, 0.2);
}

.form-control.error {
  border-color: #ff3860;
}

.error-message {
  color: #ff3860;
  font-size: 14px;
  margin-top: 5px;
  display: none;
}

.error-message.visible {
  display: block;
}

.form-submit {
  background-color: var(--primary);
  color: var(--white);
  border: none;
  padding: 12px 20px;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
}

.form-submit:hover {
  background-color: var(--primary-dark);
}

.form-submit:disabled {
  background-color: var(--gray-light);
  cursor: not-allowed;
}

.form-success {
  text-align: center;
  display: none;
}

.form-success i {
  font-size: 60px;
  color: var(--primary);
  margin-bottom: 20px;
}

.form-success h4 {
  font-size: 22px;
  margin-bottom: 15px;
}

.form-success p {
  color: var(--gray);
  margin-bottom: 20px;
}

/* Botão WhatsApp */
.whatsapp-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: var(--white);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  z-index: 99;
  transition: all 0.3s ease;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Header e navegação */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--white);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  height: 50px;
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-links a {
  color: var(--gray);
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary-dark);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  color: var(--gray);
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  background-color: var(--white);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.mobile-menu a {
  display: block;
  padding: 10px 0;
  color: var(--gray);
  font-weight: 500;
  transition: color 0.3s ease;
}

.mobile-menu a:hover {
  color: var(--primary-dark);
}

/* Hero Section */
.hero {
  position: relative;
  padding: 100px 0;
  background: linear-gradient(to right, var(--primary-light), var(--primary));
  color: var(--white);
  overflow: hidden;
}

.hero-content {
  max-width: 600px;
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero p {
  font-size: 20px;
  margin-bottom: 30px;
  opacity: 0.9;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
  background-color: var(--white);
  clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

/* Benefícios Section */
.benefits {
  padding: 80px 0;
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 50px;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.benefit-card {
  background-color: var(--white);
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(95, 189, 163, 0.1);
  border-radius: 50%;
}

.benefit-icon i {
  font-size: 30px;
  color: var(--primary);
}

.benefit-card h3 {
  font-size: 22px;
  margin-bottom: 15px;
}

.benefit-card p {
  color: var(--gray);
}

/* Como Funciona Section */
.how-it-works {
  padding: 80px 0;
  background-color: var(--gray-light);
}

.how-it-works-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: rgba(95, 189, 163, 0.3);
  left: 50%;
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 60px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-content {
  width: 45%;
}

.timeline-icon {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.timeline-icon i {
  color: var(--white);
  font-size: 20px;
}

.timeline-text {
  text-align: right;
  padding-right: 30px;
}

.timeline-message {
  text-align: left;
  padding-left: 30px;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-item:nth-child(even) .timeline-text {
  text-align: left;
  padding-left: 30px;
  padding-right: 0;
}

.timeline-item:nth-child(even) .timeline-message {
  text-align: right;
  padding-right: 30px;
  padding-left: 0;
}

.timeline-text h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.timeline-text p {
  color: var(--gray);
}

.message-bubble {
  background-color: var(--white);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.message-bubble p {
  font-style: italic;
  color: var(--gray);
}

/* Simulador de Mensagens */
.message-simulator {
  max-width: 400px;
  margin: 60px auto 0;
  background-color: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.simulator-header {
  background-color: var(--primary);
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.simulator-title {
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 10px;
}

.simulator-title i {
  font-size: 18px;
}

.simulator-controls button {
  background-color: var(--white);
  color: var(--primary);
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
}

.simulator-messages {
  height: 320px;
  background-color: var(--gray-light);
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.simulator-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  text-align: center;
}

.message {
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 10px;
  margin-bottom: 15px;
  position: relative;
}

.message-time {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.5);
  margin-top: 5px;
  display: flex;
  justify-content: space-between;
}

.message-system {
  align-self: flex-start;
  background-color: var(--white);
  border-top-left-radius: 0;
}

.message-patient {
  align-self: flex-end;
  background-color: var(--primary);
  color: var(--white);
  border-top-right-radius: 0;
}

.message-patient .message-time {
  color: rgba(255, 255, 255, 0.7);
}

.typing-indicator {
  align-self: center;
  margin-top: 10px;
}

.typing-indicator span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary);
  margin: 0 2px;
  animation: bounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
  animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
}

.simulator-footer {
  background-color: var(--white);
  padding: 15px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.simulator-input {
  background-color: var(--gray-light);
  padding: 10px 15px;
  border-radius: 20px;
  color: var(--gray);
  font-size: 14px;
}

/* Sobre o App Section */
.about {
  padding: 80px 0;
}

.about-container {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-content {
  flex: 1;
}

.about-content h2 {
  font-size: 36px;
  margin-bottom: 20px;
}

.about-content p {
  color: var(--gray);
  margin-bottom: 20px;
}

.features-list {
  margin-top: 30px;
}

.feature-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.feature-item i {
  color: var(--primary);
  margin-right: 10px;
  font-size: 18px;
}

.about-image {
  flex: 1;
}

.app-mockup {
  background-color: var(--gray-light);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.mockup-content {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.mockup-header {
  background-color: var(--primary);
  padding: 15px;
  text-align: center;
  color: var(--white);
}

.mockup-body {
  padding: 20px;
}

.mockup-placeholder {
  height: 150px;
  background-color: var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border-radius: 8px;
}

.mockup-placeholder i {
  font-size: 50px;
  color: var(--primary);
  opacity: 0.5;
}

.mockup-lines {
  margin-bottom: 20px;
}

.mockup-line {
  height: 15px;
  background-color: var(--gray-light);
  border-radius: 4px;
  margin-bottom: 10px;
}

.mockup-line:nth-child(1) {
  width: 75%;
}

.mockup-line:nth-child(3) {
  width: 85%;
}

.mockup-footer {
  padding: 15px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.mockup-button {
  background-color: var(--primary);
  color: var(--white);
  text-align: center;
  padding: 10px;
  border-radius: 6px;
}

/* Contato Section */
.contact {
  padding: 80px 0;
  background-color: var(--gray-light);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.contact-card {
  background-color: var(--white);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.contact-card h3 {
  font-size: 24px;
  margin-bottom: 20px;
}

.contact-info {
  margin-bottom: 20px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
}

.contact-item i {
  color: var(--primary);
  margin-right: 10px;
  margin-top: 3px;
  font-size: 18px;
  flex-shrink: 0;
}

.map-placeholder {
  height: 150px;
  background-color: var(--gray-light);
  border-radius: 8px;
}

.contact-cta {
  text-align: center;
  margin-top: 40px;
}

/* Footer */
.footer {
  background-color: var(--gray-dark);
  color: var(--white);
  padding: 50px 0 20px;
}

.footer-container {
  display: flex;
  flex-direction: column;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-logo {
  display: flex;
  flex-direction: column;
}

.footer-logo img {
  height: 40px;
  margin-bottom: 15px;
}

.footer-tagline {
  color: var(--gray);
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--gray);
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gray);
}

/* Responsividade */
@media (max-width: 992px) {
  .hero h1 {
    font-size: 40px;
  }
  
  .about-container {
    flex-direction: column;
  }
  
  .timeline::before {
    left: 30px;
  }
  
  .timeline-item {
    flex-direction: column;
  }
  
  .timeline-item:nth-child(even) {
    flex-direction: column;
  }
  
  .timeline-content {
    width: 100%;
    margin-left: 60px;
  }
  
  .timeline-icon {
    left: 30px;
  }
  
  .timeline-text, 
  .timeline-item:nth-child(even) .timeline-text {
    text-align: left;
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 20px;
  }
  
  .timeline-message, 
  .timeline-item:nth-child(even) .timeline-message {
    text-align: left;
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .mobile-menu.active {
    display: block;
  }
  
  .hero {
    padding: 80px 0;
  }
  
  .hero h1 {
    font-size: 32px;
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .benefit-card {
    padding: 20px;
  }
  
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 576px) {
  .hero {
    padding: 60px 0;
  }
  
  .hero h1 {
    font-size: 28px;
  }
  
  .hero p {
    font-size: 16px;
  }
  
  .benefit-card {
    padding: 15px;
  }
  
  .benefit-icon {
    width: 60px;
    height: 60px;
  }
  
  .benefit-card h3 {
    font-size: 18px;
  }
  
  .timeline-text h3 {
    font-size: 20px;
  }
  
  .contact-card {
    padding: 20px;
  }
}
