/* ==========================================================================
   Australis Neurocirurgia - Global Styles
   ========================================================================== */

/* --- CSS Variables / Design System --- */
:root {
  /* Colors - Base Pallete (Neutral & Serious) */
  --primary-cyan: #64748B; /* Substituto mais neutro e maduro para o cyan */
  --primary-blue: #1E293B; /* Slate 800 - Azul muito escuro/neutro */
  --primary-purple: #0F172A; /* Slate 900 - Quase preto */
  --gradient-brand: var(--primary-blue); /* Remover gradiente, usar cor sólida */
  
  /* Backgrounds & Surfaces */
  --dark-bg: #111827; /* Gray 900 */
  --dark-surface: #1F2937; /* Gray 800 */
  --light-bg: #FFFFFF;
  --light-surface: #F3F4F6; /* Gray 100 */
  
  /* Text */
  --text-primary: #1A1F36;
  --text-secondary: #4A5568;
  --text-light: #E2E8F0;
  
  /* UI Elements */
  --border-light: #E2E8F0;
  --success: #10B981;
  --whatsapp: #25D366;
  
  /* Typography */
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  /* Transitions */
  --transition-normal: all 0.3s ease;
  
  /* Container Constraints */
  --container-max-width: 1200px;
  --section-padding: 5rem 1rem;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  color: var(--text-primary);
  background-color: var(--light-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul {
  list-style: none;
}

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

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.dark-bg h1, .dark-bg h2, .dark-bg h3, .dark-bg h4, .dark-bg h5, .dark-bg h6,
.dark-surface h1, .dark-surface h2, .dark-surface h3, .dark-surface h4, .dark-surface h5, .dark-surface h6 {
  color: var(--light-bg);
}

p {
  margin-bottom: 1rem;
}

.text-gradient {
  color: var(--primary-blue);
  display: inline-block;
}

.section-title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 3rem;
  position: relative;
  padding-bottom: 1rem;
}

.section-title.left {
  text-align: left;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient-brand);
  border-radius: 2px;
}

.section-title.left::after {
  left: 0;
  transform: none;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Texture Pattern */
.bg-textured {
  position: relative;
  overflow: hidden;
}

.bg-textured::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url('../images/bg-texture.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.4;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 0;
}

.bg-textured > * {
  position: relative;
  z-index: 1;
}

.section {
  padding: var(--section-padding);
}

.dark-section {
  background-color: var(--dark-bg);
  color: var(--text-light);
}

.light-surface {
  background-color: var(--light-surface);
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ==========================================================================
   Components
   ========================================================================== */

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  transition: var(--transition-normal);
  text-align: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--gradient-brand);
  color: white;
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 41, 59, 0.4);
  color: white;
}

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

.dark-bg .btn-secondary {
  color: white;
  border-color: white;
}

.btn-secondary:hover {
  background: rgba(30, 41, 59, 0.05);
}

.dark-bg .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-whatsapp {
  background-color: var(--whatsapp);
  color: white;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  background-color: #20BA5C;
  transform: translateY(-2px);
  color: white;
}

/* --- Cards --- */
.card {
  background: var(--light-bg);
  color: var(--text-primary);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
  height: 100%;
  border: 1px solid transparent;
}

.card h1, .card h2, .card h3, .card h4, .card h5, .card h6 {
  color: var(--text-primary);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(30, 41, 59, 0.08);
  border-color: rgba(30, 41, 59, 0.05);
}

.card-top-accent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-brand);
}

.dark-card {
  background: var(--dark-surface);
  color: var(--text-light);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.dark-card h1, .dark-card h2, .dark-card h3, .dark-card h4, .dark-card h5, .dark-card h6 {
  color: var(--light-bg);
}

.icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary-blue);
  font-size: 1.5rem;
  transition: var(--transition-normal);
}

.card:hover .icon-wrapper {
  transform: scale(1.1);
  background: rgba(30, 41, 59, 0.08);
  color: var(--primary-purple);
}

.dark-card .icon-wrapper {
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary-cyan);
}

/* --- Header & Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition-normal);
  padding: 1.5rem 0;
  background: transparent;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container img {
  height: 40px;
  width: auto;
  transition: var(--transition-normal);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

.site-header:not(.scrolled) .nav-link {
  color: rgba(255, 255, 255, 0.9);
}

.site-header.scrolled .nav-link {
  color: var(--text-secondary);
}

.nav-link:hover {
  color: var(--primary-blue);
}

.site-header:not(.scrolled) .nav-link:hover {
  color: var(--primary-cyan);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-brand);
  transition: var(--transition-normal);
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: inherit;
}

.site-header:not(.scrolled) .mobile-menu-btn {
  color: white;
}

/* --- Footer --- */
.site-footer {
  background-color: var(--light-bg);
  color: var(--text-primary);
  padding: 4rem 0 2rem;
  position: relative;
  border-top: 1px solid var(--border-light);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  height: 40px;
  margin-bottom: 1.5rem;
}

.footer-desc {
  color: var(--text-secondary);
  max-width: 300px;
  margin-bottom: 1.5rem;
}

.footer-title {
  color: var(--primary-blue);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--primary-blue);
  padding-left: 5px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.footer-contact-item i {
  color: var(--primary-cyan);
  margin-top: 4px;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition-normal);
  background: var(--light-bg);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 991px) {
  .nav-links {
    display: none; /* Mobile menu handled by JS */
  }
  
  .header-actions {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 3rem 1rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
}

/* Mobile Menu Styles (Active State) */
.mobile-nav-active .nav-links {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--light-bg);
  padding: 2rem;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  border-top: 1px solid var(--border-light);
  gap: 1.5rem;
}

.mobile-nav-active .site-header {
  background: var(--light-bg);
}

.mobile-nav-active .nav-link {
  color: var(--text-primary) !important;
  font-size: 1.1rem;
}

.mobile-nav-active .mobile-menu-btn {
  color: var(--text-primary) !important;
}

.mobile-nav-active .header-actions {
  display: block;
  margin-top: 1rem;
  width: 100%;
}

.mobile-nav-active .header-actions .btn {
  width: 100%;
}
