/* ==========================================================================
   TelepresenceMedical Protection - Design System & Styles
   Theme: Clean Medical Mint & Teal (#022c22 background, #2dd4bf accent)
   Typography: Plus Jakarta Sans
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --bg-dark: #022c22;
  --bg-dark-alt: #064e3b;
  --bg-card: rgba(6, 78, 59, 0.4);
  --bg-card-hover: rgba(6, 78, 59, 0.65);
  --bg-glass: rgba(2, 44, 34, 0.75);
  --border-color: rgba(45, 212, 191, 0.2);
  --border-glow: rgba(45, 212, 191, 0.45);
  
  --accent: #2dd4bf;
  --accent-hover: #14b8a6;
  --accent-light: #99f6e4;
  --accent-glow: rgba(45, 212, 191, 0.25);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #cbd5e1;
  
  /* Typography Scale via clamp() */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --text-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.85rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.3vw, 0.975rem);
  --text-base: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.15rem + 0.6vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.5rem + 1.8vw, 2.75rem);
  --text-4xl: clamp(2.25rem, 1.8rem + 2.5vw, 3.5rem);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  
  /* Radius & Shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 25px rgba(45, 212, 191, 0.2);
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 0%, #064e3b 0%, #022c22 70%);
}

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

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

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); margin-bottom: var(--space-md); }
h3 { font-size: var(--text-2xl); margin-bottom: var(--space-sm); }
h4 { font-size: var(--text-xl); }

p {
  font-size: var(--text-base);
  color: var(--text-subtle);
  margin-bottom: var(--space-sm);
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  transition: all var(--transition-normal);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  min-width: 48px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-main);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--bg-dark-alt));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-dark);
  box-shadow: var(--shadow-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-subtle);
  padding: 0.5rem 0.75rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  min-width: 48px;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent);
}

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

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  min-width: 48px;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition-normal);
  text-decoration: none;
  touch-action: manipulation;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #14b8a6 100%);
  color: #022c22;
  box-shadow: 0 4px 14px rgba(45, 212, 191, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 212, 191, 0.5);
  color: #022c22;
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(45, 212, 191, 0.1);
  color: var(--accent);
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.5rem;
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

/* Hero Section */
.hero {
  padding: 4rem 0 3rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-title {
  font-size: var(--text-4xl);
  font-weight: 800;
  margin-bottom: 1.25rem;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.hero-description {
  font-size: var(--text-lg);
  color: var(--text-subtle);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
}

.hero-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md), var(--shadow-glow);
  border: 1px solid var(--border-color);
}

.hero-media img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* Feature Metrics Bar */
.metrics-bar {
  background: var(--bg-card);
  border-y: 1px solid var(--border-color);
  padding: 2.5rem 0;
  margin-bottom: 4rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.metric-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: rgba(2, 44, 34, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: transform var(--transition-normal);
}

.metric-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(45, 212, 191, 0.15);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.metric-info h4 {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.metric-info p {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Longread Article Layout */
.article-section {
  padding: 3rem 0 5rem;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3.5rem;
}

.article-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-sm);
}

.article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.article-meta {
  display: flex;
  gap: 1.5rem;
  font-size: var(--text-xs);
  color: var(--accent);
  margin-bottom: 1rem;
}

.article-chapter {
  margin-bottom: 3rem;
}

.article-chapter h3 {
  color: var(--accent-light);
  margin-top: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(45, 212, 191, 0.15);
}

.article-chapter p {
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--text-subtle);
  margin-bottom: 1.25rem;
  text-align: justify;
}

.article-chapter ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-chapter li {
  color: var(--text-subtle);
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.article-callout {
  background: rgba(45, 212, 191, 0.08);
  border-left: 4px solid var(--accent);
  padding: 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 2rem 0;
}

.article-callout p {
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 0;
  font-style: italic;
}

/* Sidebar Widgets */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}

.sidebar-widget h4 {
  font-size: var(--text-lg);
  margin-bottom: 1rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toc-link {
  font-size: var(--text-sm);
  color: var(--text-muted);
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.toc-link:hover {
  background: rgba(45, 212, 191, 0.1);
  color: var(--accent);
}

/* Calculator & Interactive Component */
.interactive-section {
  padding: 4rem 0;
  background: rgba(2, 44, 34, 0.8);
  border-y: 1px solid var(--border-color);
  margin-bottom: 5rem;
}

.calc-box {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-glow);
}

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

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(2, 44, 34, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  transition: border-color var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.2);
}

.calc-result {
  background: rgba(6, 78, 59, 0.6);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
}

.calc-score {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* FAQ Accordion */
.faq-section {
  padding: 3rem 0 5rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-button {
  width: 100%;
  padding: 1.5rem;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-weight: 600;
  font-size: var(--text-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-icon {
  transition: transform var(--transition-normal);
  color: var(--accent);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
  padding: 0 1.5rem;
}

.faq-item.active .faq-content {
  padding: 0 1.5rem 1.5rem;
  max-height: 300px;
}

/* Legal & Contact Page Styles */
.legal-page, .contact-page {
  padding: 4rem 0 6rem;
}

.page-header {
  margin-bottom: 3rem;
  text-align: center;
}

.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: rgba(45, 212, 191, 0.15);
  color: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Footer */
.site-footer {
  background: #011d16;
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 1rem;
}

.footer-heading {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  min-width: 48px;
  padding: 0.25rem 0.5rem;
}

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

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(45, 212, 191, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.footer-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  min-width: 48px;
}

/* Mobile Nav Helper */
.mobile-nav-cta {
  display: none;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .article-layout {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

/* Requirement 1: Header on Mobile (<768px) MUST contain ONLY Logo on left & Hamburger on right */
@media (max-width: 768px) {
  .site-header {
    padding: 0.75rem 0;
  }

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

  .header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  /* Hide header CTA button on mobile so ONLY logo + hamburger remain */
  .header-actions .btn {
    display: none !important;
  }

  .mobile-toggle {
    display: flex !important;
    min-width: 48px;
    min-height: 48px;
    padding: 0.5rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: rgba(45, 212, 191, 0.1);
  }

  .nav-menu {
    position: fixed;
    top: 65px;
    left: 0;
    width: 100%;
    height: calc(100vh - 65px);
    background: var(--bg-dark);
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    box-sizing: border-box;
    overflow-y: auto;
    z-index: 999;
    border-top: 1px solid var(--border-color);
  }

  .nav-menu.open {
    transform: translateX(0);
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.5rem;
  }

  .nav-link {
    font-size: 1.05rem;
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    background: rgba(6, 78, 59, 0.25);
    display: flex;
    align-items: center;
  }

  .mobile-nav-cta {
    display: block !important;
    width: 100%;
    margin-top: 0.5rem;
  }

  .mobile-nav-cta .btn {
    display: inline-flex !important;
    width: 100%;
    min-height: 48px;
  }

  .article-content, .legal-card, .contact-info-card {
    padding: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Requirement 4: Deep Mobile Optimization & Medical Cards Adaptation for 375px+ screens */
@media (max-width: 480px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }

  .hero-title {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
    line-height: 1.2;
  }

  .hero-description {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .hero-cta .btn {
    width: 100%;
    min-height: 48px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding-top: 1.25rem;
  }

  .stat-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    background: rgba(6, 78, 59, 0.35);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
  }

  .stat-number {
    font-size: 1.35rem;
  }

  .stat-label {
    font-size: 0.825rem;
  }

  /* Medical Cards 375px Adaptation */
  .metrics-bar {
    padding: 2rem 0;
    margin-bottom: 2.5rem;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .metric-card {
    padding: 1rem 1.15rem;
    gap: 0.85rem;
    border-radius: var(--radius-md);
    background: rgba(2, 44, 34, 0.85);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  }

  .metric-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .metric-info h4 {
    font-size: 0.975rem;
    margin-bottom: 0.25rem;
    line-height: 1.35;
  }

  .metric-info p {
    font-size: 0.825rem;
    line-height: 1.45;
  }

  .article-content {
    padding: 1.25rem 0.9rem;
    border-radius: var(--radius-md);
  }

  .article-chapter p {
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .calc-box {
    padding: 1.25rem 0.9rem;
    border-radius: var(--radius-md);
  }

  .calc-result {
    padding: 1.25rem 0.9rem;
  }

  .calc-score {
    font-size: 2.5rem;
  }

  .sidebar-widget {
    padding: 1.15rem 0.9rem;
  }

  .faq-button {
    padding: 0.85rem 1rem;
    font-size: 0.975rem;
    min-height: 48px;
  }
}
