/* css/styles.css - Vitalio Saúde Redesign */

/* =========================================
   CSS Variables & Theming
   ========================================= */
:root {
  /* Color Palette - Light Mode (Default) */
  --bg-color: #ffffff;
  --bg-secondary: #f4f7f6;
  --text-main: #2c3e50;
  --text-muted: #596b7d;
  
  /* Primary Brand (Vitalio Green) */
  --primary: #2e8b57;       /* Sea Green */
  --primary-hover: #246e45;
  --primary-light: #e8f5e9;
  
  /* Accents */
  --accent: #20b2aa;        /* Light Sea Green */
  --border-color: #e0e0e0;
  --nav-bg: rgba(255, 255, 255, 0.9);
  
  /* Shadows and Effects */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --glass-border: 1px solid rgba(255, 255, 255, 0.3);
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --transition-speed: 0.3s;
}

/* Dark Mode Theme */
html[data-theme='dark'] {
  --bg-color: #121212;
  --bg-secondary: #1e1e1e;
  --text-main: #f0f0f0;
  --text-muted: #b0bec5;
  
  --primary: #4ade80;       /* Lighter, high-contrast green for dark mode (WCAG AA) */
  --primary-hover: #22c55e;
  --primary-light: rgba(74, 222, 128, 0.1);
  
  --accent: #2dd4bf;
  --border-color: #333333;
  --nav-bg: rgba(18, 18, 18, 0.9);
  
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.5);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.7);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.9);
  --glass-border: 1px solid rgba(255, 255, 255, 0.05);
}

/* =========================================
   Reset & Base Styles
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

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

a:hover, a:focus {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Focus States for Accessibility (WCAG) */
*:focus-visible {
  outline: 2px dashed var(--primary);
  outline-offset: 4px;
}

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-main);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
p { margin-bottom: 1.5rem; color: var(--text-muted); font-size: 1.125rem; }

.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =========================================
   Layout & Container
   ========================================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

.bg-secondary {
  background-color: var(--bg-secondary);
}

/* =========================================
   Buttons
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px; /* Pill shape */
  border: none;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  text-align: center;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background-color: var(--primary);
  color: #fff !important;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #fff !important;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary) !important;
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary-light);
}

/* =========================================
   Navigation
   ========================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: var(--glass-border);
  transition: background-color var(--transition-speed) ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo span {
  color: var(--primary);
}

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

.nav-links a {
  color: var(--text-main);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 0;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  text-decoration: none;
}

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

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

/* Controls (Theme & Lang) */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

.icon-btn:hover {
  background-color: var(--bg-secondary);
  color: var(--primary);
}

.lang-switch {
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 20px;
  padding: 0.2rem 0.8rem;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
}

.lang-switch:hover {
  border-color: var(--primary);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-main);
  cursor: pointer;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px; /* Offset for header */
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -10%;
  width: 50%;
  height: 70%;
  background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
  z-index: -1;
  border-radius: 50%;
}

.hero-content {
  max-width: 600px;
  margin-bottom: 2rem;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-image img {
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  max-height: 600px;
  width: 100%;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* =========================================
   Features / Split Sections
   ========================================= */
.split-content {
  padding: 6rem 0;
}

.split-content.reverse .grid-2 {
  direction: rtl;
}

.split-content.reverse .grid-2 > * {
  direction: ltr;
}

.feature-img-container {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.feature-img-container img {
  transition: transform 0.5s ease;
}
.feature-img-container:hover img {
  transform: scale(1.05);
}

/* =========================================
   Cards Grid
   ========================================= */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.card {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  transition: all var(--transition-speed) ease;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.card-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

/* =========================================
   Footer
   ========================================= */
.footer {
  background-color: var(--bg-secondary);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

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

.footer-brand p {
  margin-top: 1rem;
  max-width: 300px;
}

.footer-title {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

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

.footer-links a {
  color: var(--text-muted);
}
.footer-links a:hover {
  color: var(--primary);
  text-decoration: none;
}

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

/* =========================================
   Animations
   ========================================= */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   Media Queries (Responsive)
   ========================================= */
@media (max-width: 992px) {
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .split-content.reverse .grid-2 {
    direction: ltr; /* Reset reverse on mobile */
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; /* Hide on mobile by default */
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--bg-color);
    flex-direction: column;
    padding: 2rem 0;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--border-color);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
}
