/* index.css - System Design for PROJETO FAROL RS */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --bg-primary: #080c14;
  --bg-secondary: #0d1321;
  --bg-card: rgba(255, 255, 255, 0.03);
  --border-card: rgba(255, 255, 255, 0.06);
  --border-active: rgba(0, 242, 254, 0.4);
  
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --color-primary: #00f2fe;    /* Neon Teal */
  --color-secondary: #4facfe;  /* Bright Blue */
  --color-success: #10b981;    /* Emerald */
  --color-warning: #f59e0b;    /* Amber */
  --color-error: #ef4444;      /* Red */
  
  --gradient-text: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --gradient-accent: linear-gradient(135deg, #0575e6 0%, #00f2fe 100%);
  --gradient-emerald: linear-gradient(135deg, #34d399 0%, #059669 100%);
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --shadow-glow: 0 0 20px rgba(0, 242, 254, 0.15);
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-secondary);
}

/* Layout Containers */
.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Radial Glow Backgrounds representing Lighthouse Rays */
.bg-glow-1 {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.08) 0%, rgba(8, 12, 20, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

.bg-glow-2 {
  position: absolute;
  top: 50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(79, 172, 254, 0.05) 0%, rgba(8, 12, 20, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

/* Typography & Headers */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.gradient-title {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  padding: 2rem 0;
}

.hero-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.3);
  box-shadow: var(--shadow-glow);
  color: var(--color-primary);
  font-size: 2rem;
  margin-bottom: 1rem;
  animation: beaconPulse 3s infinite ease-in-out;
}

@keyframes beaconPulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
    border-color: rgba(0, 242, 254, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 242, 254, 0.5);
    border-color: rgba(0, 242, 254, 0.7);
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero p.subtitle {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto 1.5rem;
  font-weight: 400;
  line-height: 1.4;
}

.ethics-approval {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-card);
  border-radius: 50px;
}

/* Interactive Control Bar */
.control-bar {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  box-shadow: var(--shadow-card);
}

@media (min-width: 768px) {
  .control-bar {
    flex-direction: row;
    justify-content: space-between;
    padding: 1.5rem 2rem;
  }
}

.control-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.control-label h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.control-label p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.cutoff-selector {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-card);
  padding: 0.3rem;
  border-radius: 50px;
  gap: 0.2rem;
}

.cutoff-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.cutoff-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.cutoff-btn.active {
  background: var(--gradient-accent);
  color: #000;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

/* Metrics Dashboard Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.metric-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--border-card);
  transition: var(--transition-smooth);
}

.metric-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-active);
  box-shadow: var(--shadow-glow);
}

.metric-card:hover::before {
  background: var(--color-primary);
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-icon {
  font-size: 1.2rem;
  opacity: 0.7;
}

.metric-value {
  font-size: 2.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  display: flex;
  align-items: baseline;
}

.metric-unit {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 0.1rem;
}

.metric-description {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Specific Border Colors for Metric Cards */
.metric-ptsd::before { background-color: var(--color-primary); }
.metric-dep::before { background-color: var(--color-success); }
.metric-anx::before { background-color: var(--color-secondary); }
.metric-burnout::before { background-color: var(--color-warning); }

/* Dashboard Sections & Card Layouts */
.sections-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 1024px) {
  .sections-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .span-full {
    grid-column: span 2;
  }
}

.section-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.section-header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1rem;
}

.section-header h2 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.section-header p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.chart-container {
  position: relative;
  width: 100%;
  min-height: 320px;
  height: 350px;
  margin: auto;
}

/* Insight Panels styling */
.insight-panel {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
}

.insight-panel h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.insight-panel p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Avoidance Specific Layout */
.avoidance-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .avoidance-layout {
    grid-template-columns: 3fr 2fr;
  }
}

.avoidance-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.avoidance-text p strong {
  color: var(--color-primary);
}

.avoidance-badge {
  display: inline-block;
  background: rgba(0, 242, 254, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(0, 242, 254, 0.2);
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  align-self: flex-start;
}

/* Lighthouse & Resilience Message Section */
.lighthouse-section {
  background: linear-gradient(135deg, rgba(13, 19, 33, 0.8) 0%, rgba(8, 12, 20, 0.9) 100%);
  border: 1px solid rgba(0, 242, 254, 0.15);
  box-shadow: 0 0 40px rgba(0, 242, 254, 0.05);
  border-radius: 24px;
  padding: 2.5rem;
  margin-top: 2rem;
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.lighthouse-section::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.03) 0%, rgba(8, 12, 20, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

.lighthouse-icon {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  filter: drop-shadow(var(--shadow-glow));
}

.lighthouse-quote {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--text-primary);
  max-width: 900px;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.lighthouse-author {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-secondary);
}

.lighthouse-role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Footer Section */
footer {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

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

/* Interactive Elements & Focus */
button:focus,
.cutoff-btn:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
