/* Solisma Legal Documents - Shared Styles */
/* Mobile-first, responsive design */

:root {
  /* Colors matching app theme - warm charcoal/terracotta palette */
  --deep-charcoal: #2D2A26;
  --terracotta: #C47A5A;
  --warm-beige: #F5F0EB;
  --sand: #E8DFD5;
  --text-primary: #2D2A26;
  --text-secondary: #5C5650;
  --accent: #C47A5A;
  --background: #FDFCFB;
  --card-bg: #FFFFFF;
  --border: #E8DFD5;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background);
  min-height: 100vh;
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--deep-charcoal) 0%, #3D3833 100%);
  color: var(--warm-beige);
  padding: 2rem 1.5rem;
  text-align: center;
}

header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

header .subtitle {
  font-size: 0.95rem;
  opacity: 0.9;
}

header .last-updated {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 0.75rem;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.lang-switcher a {
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.lang-switcher a.active {
  background-color: var(--terracotta);
  color: white;
}

.lang-switcher a:not(.active) {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--warm-beige);
}

.lang-switcher a:not(.active):hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Navigation */
nav {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

nav a:hover,
nav a.active {
  background-color: var(--sand);
  color: var(--text-primary);
}

/* Main Content */
main {
  padding: 2rem 0;
}

/* Sections */
section {
  background-color: var(--card-bg);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border);
}

section h2 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--terracotta);
}

section h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin: 1.25rem 0 0.75rem 0;
}

section p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

section ul, section ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

section li {
  margin-bottom: 0.5rem;
}

/* Highlight Box */
.highlight-box {
  background-color: var(--sand);
  border-left: 4px solid var(--terracotta);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
}

.highlight-box p {
  margin: 0;
  color: var(--text-primary);
}

/* Warning Box */
.warning-box {
  background-color: #FFF4E5;
  border-left: 4px solid #F5A623;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
}

.warning-box p {
  margin: 0;
  color: #8B5A00;
}

/* Contact Card */
.contact-card {
  background: linear-gradient(135deg, var(--deep-charcoal) 0%, #3D3833 100%);
  color: var(--warm-beige);
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  margin: 1.5rem 0;
}

.contact-card h3 {
  color: var(--warm-beige);
  margin-bottom: 1rem;
}

.contact-card a {
  color: var(--terracotta);
  text-decoration: none;
  font-weight: 500;
}

.contact-card a:hover {
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--terracotta);
  color: white;
}

.btn-primary:hover {
  background-color: #B36A4A;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--sand);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: #DDD4CA;
}

/* Footer */
footer {
  background-color: var(--deep-charcoal);
  color: var(--warm-beige);
  padding: 2rem 1.5rem;
  text-align: center;
  margin-top: 2rem;
}

footer a {
  color: var(--terracotta);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

footer .footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

footer .footer-links a {
  font-size: 0.875rem;
}

footer .copyright {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background-color: var(--sand);
  font-weight: 600;
  color: var(--text-primary);
}

tr:hover {
  background-color: var(--background);
}

/* FAQ Accordion */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  color: var(--text-secondary);
  margin-top: 0.75rem;
  padding-left: 0.5rem;
}

/* Landing Page Cards */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.doc-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.doc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--terracotta);
}

.doc-card h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.doc-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Responsive Design */
@media (max-width: 600px) {
  html {
    font-size: 15px;
  }

  .container {
    padding: 1rem;
  }

  header {
    padding: 1.5rem 1rem;
  }

  header h1 {
    font-size: 1.5rem;
  }

  section {
    padding: 1.25rem;
  }

  nav ul {
    flex-direction: column;
    align-items: center;
  }

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

  table {
    font-size: 0.9rem;
  }

  th, td {
    padding: 0.5rem;
  }
}

/* Print Styles */
@media print {
  header, nav, footer, .lang-switcher, .btn {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  section {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
}
