@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Outfit:wght@300;400;600;700&display=swap');

:root {
  --primary: #354881;
  --primary-light: #4A60A0;
  --primary-dark: #24325C;
  --accent: #1da851;
  --bg-color: #f9fafc;
  --text-main: #334155;
  --text-light: #64748b;
  --white: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.3);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-color);
  line-height: 1.6;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%; /* Previne ajuste automático de fonte no iOS */
  -webkit-tap-highlight-color: transparent; /* Remove outline cinza ao tocar no iOS */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--primary-dark);
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-light);
}

/* Premium Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  transition: var(--transition);
  padding: 15px 0;
}

.header.scrolled {
  padding: 10px 0;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.logo img {
  height: 90px;
  transition: var(--transition);
}

.header.scrolled .logo img {
  height: 75px;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  color: var(--text-main);
  font-weight: 600;
  font-size: 15px;
  position: relative;
  padding: 5px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}

.nav-links a:hover::after, .nav-links a.active::after {
  width: 100%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 15px; /* Touch target maior (44x44px mínimo) */
  z-index: 1001;
  touch-action: manipulation; /* Remove delay de duplo clique */
}

.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--primary-dark);
  margin: 5px 0;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding-top: 80px;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

.hero-content {
  max-width: 800px;
  padding: 0 20px;
  animation: fadeInUp 1s ease-out;
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--white);
  font-size: 3.5rem;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.hero p {
  font-size: 1.2rem;
  font-weight: 300;
  margin-bottom: 30px;
  opacity: 0.9;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 30px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(53, 72, 129, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(53, 72, 129, 0.4);
  color: var(--white);
}

/* Sections Common */
.section {
  padding: 100px 20px;
  padding-left: calc(20px + env(safe-area-inset-left));
  padding-right: calc(20px + env(safe-area-inset-right));
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 60px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--primary);
  margin: 20px auto 0;
  border-radius: 2px;
}

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

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 50px;
  align-items: center;
}

.about-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.about-img img {
  width: 100%;
  display: block;
  transition: transform 0.5s ease;
}

.about-img:hover img {
  transform: scale(1.05);
}

.about-content h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--primary);
}

.about-content p {
  margin-bottom: 15px;
  color: var(--text-light);
  font-size: 1.05rem;
}

.clinic-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}

.clinic-card {
  background: var(--white);
  padding: 25px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--primary);
  transition: var(--transition);
}

.clinic-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.service-img {
  height: 200px;
  overflow: hidden;
}

.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-card:hover .service-img img {
  transform: scale(1.1);
}

.service-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.service-content h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
}

.service-content p {
  color: var(--text-light);
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Specific Grid for Blog (3 per row) */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1000px; /* Centering 3 columns beautifully */
  margin: 0 auto;
}

/* Blog/Health Section */
.blog-section {
  background-color: var(--white);
}

/* Contact Form Premium */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.contact-info {
  background: var(--primary);
  color: var(--white);
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-info h3 {
  color: var(--white);
  font-size: 2rem;
  margin-bottom: 30px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 25px;
}

.info-item i {
  font-size: 1.5rem;
  margin-right: 15px;
  color: var(--accent);
  margin-top: 5px;
}

.info-item p {
  font-weight: 300;
  font-size: 1.05rem;
}

.info-item a {
  color: var(--white);
}

.contact-form-wrapper {
  padding: 50px;
}

.form-group {
  margin-bottom: 25px;
  position: relative;
}

.form-input {
  width: 100%;
  padding: 15px 20px;
  background: var(--bg-color);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--text-main);
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(53, 72, 129, 0.1);
}

textarea.form-input {
  min-height: 150px;
  resize: vertical;
}

.form-label {
  position: absolute;
  top: 15px;
  left: 20px;
  color: var(--text-light);
  transition: var(--transition);
  pointer-events: none;
}

.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
  top: -10px;
  left: 15px;
  font-size: 0.8rem;
  background: var(--white);
  padding: 0 5px;
  color: var(--primary);
  font-weight: 600;
}

/* Footer */
.footer {
  background: var(--primary-dark);
  color: var(--white);
  text-align: center;
  padding: 40px 20px;
}

.footer a {
  color: #9bace0;
}

.footer-legal {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.footer-legal span {
  color: rgba(255, 255, 255, 0.3);
}

.footer-legal a {
  color: var(--white);
  opacity: 0.8;
}

.footer-legal a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Cookie Card */
.cookie-card {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 450px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 15px;
  border-left: 4px solid var(--accent);
  transform: translateY(150%);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-card.show {
  transform: translateY(0);
  opacity: 1;
}

.cookie-content h4 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.cookie-content p {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.4;
}

.cookie-card .btn {
  width: 100%;
  padding: 10px;
  font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* WhatsApp Float - Refined */
@keyframes wa-ring {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); }
  70% { box-shadow: 0 0 0 15px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 30px;
  right: 30px;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  animation: wa-ring 2s infinite;
  transition: var(--transition);
}

.whatsapp-float:hover {
  transform: scale(1.1) rotate(5deg);
  background-color: #1da851;
  color: white;
}

/* Modals / Spells */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

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

.modal-content {
  background: var(--white);
  width: 90%;
  max-width: 600px;
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Momentum scrolling no iOS */
  padding-bottom: calc(40px + env(safe-area-inset-bottom)); /* Respeito ao home indicator */
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--primary);
  transform: rotate(90deg);
}

.modal-content img {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 992px) {
  .about-grid, .contact-container {
    grid-template-columns: 1fr;
  }
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: calc(100px + env(safe-area-inset-top)) 40px env(safe-area-inset-bottom);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .cookie-card {
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-width: none;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
  
  .footer-legal span {
    display: none;
  }
  
  .footer-legal {
    flex-direction: column;
    gap: 10px;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links a {
    font-size: 1.2rem;
    color: var(--primary-dark);
    padding: 15px 0; /* Touch target otimizado para HIG (iOS) */
    display: inline-block;
    width: 100%;
  }
  
  .mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }
  .mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  
  .clinic-info {
    grid-template-columns: 1fr;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .rqe-separator {
    display: none;
  }
  
  .rqe-badge {
    display: block;
  }
  
  .about-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .about-buttons .btn {
    margin-right: 0 !important;
    text-align: center;
  }
  
  .contact-info {
    padding: 30px 20px;
  }
  
  .contact-form-wrapper {
    padding: 30px 20px;
  }
}
