@charset "UTF-8";
/* Modern CSS Architecture for Atlas of Pelvic Surgery */

/* CSS Custom Properties for Design System */
:root {
  --primary-color: #990099;
  --primary-dark: #660066;
  --primary-light: #cc00cc;
  --text-white: #ffffff;
  --text-dark: #000000;
  --text-gray: #999999;
  --text-body: #333333;
  --background-white: #ffffff;
  --border-color: var(--primary-color);
  
  /* Typography */
  --font-primary: Verdana, Arial, Helvetica, sans-serif;
  --font-secondary: Arial, Helvetica, sans-serif;
  
  /* Spacing */
  --spacing-xs: 5px;
  --spacing-sm: 10px;
  --spacing-md: 15px;
  --spacing-lg: 20px;
  --spacing-xl: 30px;
  
  /* Layout */
  --max-width: 1000px;
  --sidebar-width: 150px;
  --content-width: 710px;
}

/* Modern CSS Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Base Styles */
html {
  font-size: 16px;
  line-height: 1.5;
}

body {
  font-family: var(--font-secondary);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-body);
  background-color: var(--background-white);
  margin: 0;
  padding: 0;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Typography Scale */
h1 {
  font-family: var(--font-primary);
  font-size: 2.25rem; /* 36px */
  font-weight: bold;
  margin: 0 0 var(--spacing-lg) 0;
  line-height: 1.2;
}

h2 {
  font-family: var(--font-primary);
  font-size: 2rem; /* 32px */
  font-weight: bold;
  margin: var(--spacing-lg) 0 var(--spacing-md) 0;
  line-height: 1.3;
}

h3 {
  font-family: var(--font-primary);
  font-size: 1.5rem; /* 24px */
  font-weight: bold;
  margin: var(--spacing-md) 0 var(--spacing-sm) 0;
  line-height: 1.4;
}

h4 {
  font-family: var(--font-primary);
  font-size: 1.25rem; /* 20px */
  font-weight: bold;
  margin: var(--spacing-md) 0 var(--spacing-sm) 0;
  line-height: 1.4;
}

h5 {
  font-family: var(--font-primary);
  font-size: 1.125rem; /* 18px */
  font-weight: bold;
  margin: var(--spacing-sm) 0;
  line-height: 1.5;
}

h6 {
  font-family: var(--font-secondary);
  font-size: 0.875rem; /* 14px */
  font-style: italic;
  font-weight: bold;
  margin: var(--spacing-sm) 0;
  line-height: 1.5;
}

p {
  margin: 0 0 var(--spacing-md) 0;
}

/* Link Styles */
a {
  color: var(--text-white);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:visited {
  color: var(--text-white);
}

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

a:active {
  color: var(--text-white);
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Layout Components */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.main-layout {
  width: 910px;
  border: 5px solid var(--primary-color);
  padding: var(--spacing-xs);
  margin: 0 auto;
  position: relative;
}

.sidebar {
  width: var(--sidebar-width);
  background-color: var(--primary-color);
  float: left;
  margin: var(--spacing-xs) 0;
  padding: 11px 10px 11px 11px;
  text-align: left;
  font-family: var(--font-primary);
  color: var(--text-white);
  font-size: 10px;
  font-weight: bold;
}

.content-area {
  width: var(--content-width);
  background-color: var(--background-white);
  float: left;
  border: 1px solid var(--primary-color);
  padding: 11px;
  margin: var(--spacing-xs) 0 var(--spacing-xs) var(--spacing-xs);
  text-align: left;
  font-family: var(--font-secondary);
  font-size: 14px;
}

.two-column {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.column-left {
  flex: 1;
  min-width: 300px;
  padding: 0 13px 20px 7px;
}

.column-right {
  flex: 1;
  min-width: 300px;
  padding: 0 5px 20px 12px;
}

.full-width {
  width: 100%;
  padding: var(--spacing-xs) 7px var(--spacing-sm) var(--spacing-xs);
}

/* Header Styles */
.site-header {
  background-color: var(--primary-color);
  min-height: 241px;
  padding: var(--spacing-lg) 0 var(--spacing-sm) 0;
  text-align: center;
}

.site-header img {
  max-width: 100%;
  height: auto;
}

/* Navigation Styles */
.main-navigation {
  font-family: var(--font-primary);
  font-weight: bold;
  font-size: 12px;
  background-color: var(--primary-color);
  padding: var(--spacing-sm);
}

.main-navigation .nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.main-navigation .nav-list li {
  display: inline-block;
}

.main-navigation .nav-list li:not(:last-child)::after {
  content: " /";
  color: var(--text-white);
  margin-left: 8px;
}

.main-navigation a {
  color: var(--text-white);
  margin: 0 2px;
  padding: 2px 4px;
  border-radius: 2px;
  transition: background-color 0.2s ease;
}

.main-navigation a:hover,
.main-navigation a:focus {
  background-color: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.main-navigation a.current-page {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  font-weight: bold;
}

.breadcrumb-nav {
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: bold;
  margin: var(--spacing-sm) 0;
}

/* Chapter Navigation */
.chapter-navigation {
  text-align: center;
  font-family: var(--font-primary);
  font-weight: bold;
  font-size: 12px;
  color: var(--text-white);
}

.chapter-title {
  font-family: var(--font-primary);
  font-weight: bold;
  font-size: 2rem;
  color: var(--text-white);
  text-align: center;
  margin: var(--spacing-lg) 0;
}

.chapter-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.chapter-list li {
  margin: var(--spacing-sm) 0;
}

.chapter-list a {
  display: block;
  padding: var(--spacing-xs);
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.chapter-list a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Procedure Navigation */
.procedure-nav {
  margin: var(--spacing-lg) 0;
}

.procedure-nav .chapter-list {
  max-width: 100%;
}

.procedure-nav .chapter-list li {
  margin: var(--spacing-md) 0;
  padding: var(--spacing-sm);
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.05);
  transition: background-color 0.2s ease;
}

.procedure-nav .chapter-list li:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.procedure-nav .chapter-list a {
  display: block;
  padding: var(--spacing-xs);
  line-height: 1.4;
  font-size: 12px;
}

/* Chapter Content Layout */
.chapter-content {
  background-color: var(--background-white);
  padding: var(--spacing-lg);
  margin: var(--spacing-sm) 0;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chapter-content-wrapper {
  width: 100%;
  background-color: var(--primary-color);
  padding: var(--spacing-lg);
  color: var(--text-white);
}

/* Procedure Page Styles */
.procedure-content {
  font-family: var(--font-secondary);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-body);
}

.procedure-content h1 {
  font-family: var(--font-primary);
  font-size: 2.25rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: var(--spacing-lg);
  color: var(--text-body);
}

.procedure-content h2 {
  font-family: var(--font-primary);
  font-size: 1.125rem;
  font-weight: bold;
  color: var(--text-body);
  margin: var(--spacing-lg) 0 var(--spacing-md) 0;
  font-style: italic;
}

.procedure-description p {
  margin-bottom: var(--spacing-md);
}

.surgical-technique {
  margin-top: var(--spacing-xl);
}

.technique-step {
  margin: var(--spacing-lg) 0;
}

.step-content {
  display: flex;
  gap: var(--spacing-lg);
  align-items: flex-start;
  flex-wrap: wrap;
}

.surgical-image {
  flex: 0 0 auto;
  margin: 0;
}

.surgical-image img {
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.step-instructions {
  flex: 1;
  min-width: 300px;
}

.step-instructions p {
  margin-bottom: var(--spacing-md);
}

/* Current procedure highlighting */
.current-procedure a {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  font-weight: bold;
}

.menu-divider {
  display: block;
  margin: 0 auto var(--spacing-sm) auto;
}

/* Responsive adjustments for procedure pages */
@media (max-width: 768px) {
  .step-content {
    flex-direction: column;
  }
  
  .surgical-image {
    flex: none;
    align-self: center;
  }
  
  .step-instructions {
    min-width: auto;
  }
}

/* Footer Styles */
.site-footer {
  font-family: var(--font-primary);
  font-size: 10px;
  text-align: center;
  margin: var(--spacing-md) 0;
  padding: var(--spacing-md);
  border-top: 1px solid #eee;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-bold { font-weight: bold; }
.font-italic { font-style: italic; }

.color-white { color: var(--text-white); }
.color-primary { color: var(--primary-color); }

.margin-0 { margin: 0; }
.padding-0 { padding: 0; }

/* Clearfix */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* Accessibility Features */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: var(--text-white);
  padding: 8px;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  font-weight: bold;
  z-index: 1000;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Image Optimization and Responsive Design */
img {
  max-width: 100%;
  height: auto;
  border: 0;
}

.header-image,
.welcome-image {
  display: block;
  margin: 0 auto;
}

.surgical-image {
  max-width: 100%;
  height: auto;
  margin: var(--spacing-sm) 0;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Image delivery optimization */
@supports (object-fit: cover) {
  .responsive-image {
    object-fit: cover;
    object-position: center;
  }
}
@media (max-width: 1024px) {
  body {
    width: 95%;
    max-width: var(--max-width);
  }
  
  .main-layout {
    width: 100%;
    box-sizing: border-box;
  }
  
  .sidebar,
  .content-area {
    width: 100%;
    float: none;
    margin: var(--spacing-xs) 0;
  }
  
  .column-left,
  .column-right {
    width: 100%;
    float: none;
    padding: var(--spacing-sm) 0;
  }
  
  .two-column {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  :root {
    --spacing-xs: 3px;
    --spacing-sm: 6px;
    --spacing-md: 10px;
    --spacing-lg: 15px;
    --spacing-xl: 20px;
  }
  
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  .main-navigation {
    font-size: 11px;
  }
  
  .chapter-title {
    font-size: 1.5rem;
  }
}

/* Chapter Index Page Styles */
.chapter-header h1 {
  font-family: var(--font-primary);
  font-size: 2rem;
  font-weight: bold;
  color: var(--text-body);
  text-align: center;
  margin: var(--spacing-lg) 0;
}

.procedure-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.procedure-list li {
  margin: var(--spacing-sm) 0;
  padding: var(--spacing-sm);
  background-color: rgba(153, 0, 153, 0.05);
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.procedure-list li:hover {
  background-color: rgba(153, 0, 153, 0.1);
}

.procedure-list a {
  display: block;
  font-family: var(--font-primary);
  font-weight: bold;
  font-size: 12px;
  color: var(--primary-color);
  text-decoration: none;
  line-height: 1.4;
}

.procedure-list a:hover {
  color: var(--primary-dark);
}

/* Header Styles */
.site-header {
  background-color: var(--primary-color);
  color: var(--text-white);
  padding: var(--spacing-lg) var(--spacing-xl);
  text-align: left;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
}

.atlas-title {
  font-family: var(--font-primary);
  font-size: 3.5rem;
  font-weight: bold;
  margin: 0 0 var(--spacing-sm) 0;
  line-height: 1.1;
  color: var(--text-white);
}

.title-link {
  color: var(--text-white);
  text-decoration: none;
  transition: color 0.2s ease;
}

.title-link:hover,
.title-link:focus {
  color: #e0e0e0;
}

.authors-header {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--spacing-sm);
}

.author-name {
  font-size: 1.1rem;
  font-weight: normal;
  line-height: 1.3;
  color: var(--text-white);
  text-decoration: none;
  transition: color 0.2s ease;
}

.author-name:hover,
.author-name:focus {
  color: #e0e0e0;
  text-decoration: underline;
}

.edition-label {
  font-style: italic;
  font-size: 1.5rem;
  float: right;
  margin-top: -2rem;
  color: var(--text-white);
}

/* New Index Page Styles */
.index-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #990099 0%, #7a007a 100%);
  font-family: var(--font-secondary);
}

.index-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
  min-height: calc(100vh - 200px);
}

.index-container {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  padding: 0 var(--spacing-lg);
}

.welcome-hero {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  padding: 0 var(--spacing-lg);
}

.welcome-title {
  font-family: var(--font-primary);
  font-size: 3rem;
  font-weight: bold;
  color: var(--text-white);
  margin-bottom: var(--spacing-lg);
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.welcome-subtitle {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
  margin-bottom: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.disclaimer-card {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--spacing-xl);
}

.disclaimer-title {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: var(--spacing-lg);
  text-align: center;
}

.disclaimer-text p {
  font-size: 1.1rem;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
  text-align: justify;
}

.disclaimer-text p:last-child {
  margin-bottom: 0;
}

.enter-section {
  text-align: center;
}

.enter-button {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  background-color: rgba(255, 255, 255, 0.95);
  color: var(--primary-color);
  padding: var(--spacing-lg) var(--spacing-xl);
  border-radius: 50px;
  text-decoration: none;
  font-family: var(--font-primary);
  font-weight: bold;
  font-size: 1.3rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  border: 2px solid transparent;
  min-height: 60px;
  justify-content: center;
}

.enter-button:hover,
.enter-button:focus {
  background-color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  border-color: var(--text-white);
}

.button-arrow {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.enter-button:hover .button-arrow {
  transform: translateX(4px);
}

/* Welcome Page Styles - Legacy (unused now) */
.welcome-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-secondary);
}

.welcome-main {
  flex: 1;
  padding: var(--spacing-xl);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.welcome-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.welcome-text {
  padding: var(--spacing-lg);
}

.welcome-text h2 {
  font-family: var(--font-primary);
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: var(--spacing-lg);
  line-height: 1.2;
}

.welcome-text p {
  font-family: var(--font-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-body);
  margin-bottom: var(--spacing-md);
}

.disclaimer-section {
  background-color: rgba(153, 0, 153, 0.05);
  border-left: 4px solid var(--primary-color);
  padding: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
  border-radius: 4px;
}

.disclaimer-section h3 {
  font-family: var(--font-primary);
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: var(--spacing-md);
}

.welcome-actions {
  margin-top: var(--spacing-xl);
}

.welcome-image {
  text-align: center;
}

.atlas-illustration {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Home Page Styles */
.home-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-secondary);
}

.home-main {
  flex: 1;
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: calc(100vh - 120px);
}

.home-navigation {
  background-color: var(--primary-color);
  padding: 0;
}

.home-content {
  background-color: var(--background-white);
  padding: var(--spacing-xl);
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas: 
    "author-section"
    "main-text";
  gap: var(--spacing-lg);
  border: 4px solid var(--primary-color);
  margin: 0;
}

.author-section {
  grid-area: author-section;
}

.doctors-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.doctor-profile {
  text-align: center;
}

.doctor-photo {
  width: 120px;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  border: 3px solid var(--primary-color);
  margin-bottom: var(--spacing-sm);
}

.doctor-name {
  font-family: var(--font-primary);
  font-size: 1rem;
  margin: 0;
}

.doctor-name .doctor-link {
  color: var(--primary-color) !important;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  display: inline-block;
}

.doctor-name .doctor-link:hover,
.doctor-name .doctor-link:focus {
  color: var(--primary-dark) !important;
  text-decoration: underline;
}

.main-text {
  grid-area: main-text;
}

/* Footer styles update */
.illustrator-credit {
  font-size: 0.9rem;
  color: var(--text-gray);
  margin-top: var(--spacing-sm);
  text-align: center;
}

/* Index Page Specific Styles */
.index-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-secondary);
}

.index-header {
  background-color: var(--primary-color);
  color: var(--text-white);
  padding: var(--spacing-lg) var(--spacing-xl);
  text-align: left;
}

.atlas-title {
  font-family: var(--font-primary);
  font-size: 3.5rem;
  font-weight: bold;
  margin: 0 0 var(--spacing-sm) 0;
  line-height: 1.1;
}

.authors-header {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--spacing-sm);
}

.author-name {
  font-size: 1.1rem;
  font-weight: normal;
  line-height: 1.3;
}

.edition-label {
  font-style: italic;
  font-size: 1.5rem;
  float: right;
  margin-top: -2rem;
}

.index-main {
  flex: 1;
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: calc(100vh - 120px);
}

.index-navigation {
  background-color: var(--primary-color);
  padding: 0;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-link {
  display: block;
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--text-white);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: bold;
  line-height: 1.3;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link:focus {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: var(--text-white);
}

.home-link {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: var(--text-white);
}

.index-content {
  background-color: var(--background-white);
  padding: var(--spacing-xl);
  display: grid;
  grid-template-columns: 1fr 300px;
  grid-template-rows: auto 1fr auto;
  grid-template-areas: 
    "author-section medical-illustration"
    "main-text medical-illustration"
    "footer-area medical-illustration";
  gap: var(--spacing-lg);
  border: 4px solid var(--primary-color);
  margin: 0;
}

.author-section {
  grid-area: author-section;
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.author-photo .photo-placeholder {
  width: 120px;
  height: 90px;
  background-color: #e0e0e0;
  border: 2px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #666;
  border-radius: 4px;
}

.author-info {
  flex: 1;
}

.author-names {
  font-family: var(--font-primary);
  font-size: 1.3rem;
  color: var(--primary-color);
  margin: 0 0 var(--spacing-sm) 0;
  line-height: 1.4;
}

.author-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

.author-link:hover,
.author-link:focus {
  color: var(--primary-dark);
  text-decoration: underline;
}

.click-notice {
  font-size: 0.9rem;
  color: var(--text-gray);
  margin: var(--spacing-xs) 0;
  font-style: italic;
}

.illustrator-credit {
  font-size: 0.95rem;
  color: var(--text-body);
  margin: var(--spacing-sm) 0 0 0;
}

.main-text {
  grid-area: main-text;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-body);
}

.main-text p {
  margin-bottom: var(--spacing-md);
  text-align: justify;
}

.closing-message {
  margin-top: var(--spacing-lg);
  padding: var(--spacing-md);
  background-color: rgba(153, 0, 153, 0.05);
  border-left: 4px solid var(--primary-color);
  border-radius: 4px;
}

.closing-message p {
  margin: 0;
  color: var(--primary-color);
}

.medical-illustration {
  grid-area: medical-illustration;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-left: var(--spacing-lg);
}

.anatomy-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.index-footer {
  grid-area: footer-area;
  margin-top: var(--spacing-xl);
  text-align: center;
}

.enter-site {
  margin-bottom: var(--spacing-lg);
}

.enter-link {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--text-white);
  padding: var(--spacing-md) var(--spacing-xl);
  text-decoration: none;
  font-family: var(--font-primary);
  font-weight: bold;
  font-size: 1.25rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 2px solid var(--primary-color);
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 150px;
  margin: 0 auto;
}

.enter-link:hover,
.enter-link:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(153, 0, 153, 0.3);
}

.footer-text {
  font-size: 0.9rem;
  color: var(--text-gray);
  line-height: 1.5;
}

.footer-text p {
  margin: var(--spacing-sm) 0;
}

/* Responsive design for index page */
@media (max-width: 1024px) {
  .index-content {
    grid-template-columns: 1fr;
    grid-template-areas: 
      "author-section"
      "medical-illustration"
      "main-text"
      "footer-area";
  }
  
  .medical-illustration {
    padding-left: 0;
    text-align: center;
  }
  
  .anatomy-image {
    max-width: 400px;
  }
}

@media (max-width: 768px) {
  .index-main {
    grid-template-columns: 1fr;
  }
  
  .index-navigation {
    order: 2;
  }
  
  .index-content {
    order: 1;
    margin: var(--spacing-md);
    padding: var(--spacing-lg);
  }
  
  .atlas-title {
    font-size: 2.5rem;
  }
  
  .edition-label {
    float: none;
    margin-top: var(--spacing-sm);
    display: block;
    font-size: 1.2rem;
  }
  
  .author-section {
    flex-direction: column;
    text-align: center;
  }
  
  .nav-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1px;
  }
  
  .nav-menu li {
    border-bottom: none;
    flex: 1;
    min-width: 120px;
  }
  
  .nav-link {
    font-size: 0.85rem;
    padding: var(--spacing-sm);
    text-align: center;
  }
}

/* Welcome Page Styles */
.welcome-section {
  padding: var(--spacing-xl) var(--spacing-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.welcome-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
  margin-top: var(--spacing-lg);
}

.welcome-text {
  padding: var(--spacing-lg);
}

.welcome-text h2 {
  font-family: var(--font-primary);
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: var(--spacing-lg);
  line-height: 1.2;
}

.welcome-text p {
  font-family: var(--font-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-body);
  margin-bottom: var(--spacing-md);
}

.welcome-actions {
  margin-top: var(--spacing-xl);
}

.btn-primary {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--text-white);
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: 8px;
  text-decoration: none;
  font-family: var(--font-primary);
  font-weight: bold;
  font-size: 1.25rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 8px rgba(153, 0, 153, 0.2);
  border: 2px solid var(--primary-color);
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(153, 0, 153, 0.3);
}

.welcome-image {
  text-align: center;
}

.atlas-illustration {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-image {
  max-width: 100%;
  height: auto;
  margin-bottom: var(--spacing-lg);
}

@media (max-width: 768px) {
  .welcome-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    text-align: center;
  }
  
  .welcome-text h2 {
    font-size: 2rem;
  }
  
  .welcome-text p {
    font-size: 1rem;
  }
  
  .btn-primary {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
}

/* Home Page Chapter Navigation */
.visual-nav {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.chapter-list-fallback {
  margin-top: var(--spacing-xl);
  padding: var(--spacing-xl);
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(153, 0, 153, 0.1);
}

.nav-intro {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.nav-intro h2 {
  font-family: var(--font-primary);
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: var(--spacing-md);
}

.nav-intro p {
  font-size: 1.1rem;
  color: var(--text-body);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.chapter-card {
  background-color: var(--background-white);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.chapter-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(153, 0, 153, 0.2);
  transform: translateY(-2px);
}

.chapter-link {
  display: block;
  padding: var(--spacing-lg);
  text-decoration: none;
  color: var(--text-body);
  min-height: 120px;
}

.chapter-card.site-map {
  background-color: rgba(153, 0, 153, 0.05);
}

.chapter-card.site-map .chapter-link {
  color: var(--primary-color);
}

.chapter-link h3 {
  font-family: var(--font-primary);
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
  line-height: 1.3;
}

.chapter-link p {
  font-size: 0.95rem;
  color: var(--text-gray);
  line-height: 1.4;
  margin: 0;
}

.chapter-link:hover h3 {
  color: var(--primary-dark);
}

.doctor-bios {
  text-align: center;
  padding-top: var(--spacing-lg);
  border-top: 2px solid rgba(153, 0, 153, 0.1);
}

.doctor-bios h3 {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: var(--spacing-lg);
}

.authors-grid {
  display: flex;
  justify-content: center;
  gap: var(--spacing-xl);
  flex-wrap: wrap;
}

.author-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--spacing-md);
  background-color: var(--primary-color);
  color: var(--text-white);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  min-width: 200px;
  min-height: 44px;
  justify-content: center;
}

.author-link:hover,
.author-link:focus {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(153, 0, 153, 0.3);
}

.author-link strong {
  font-size: 1rem;
  margin-bottom: 4px;
}

.author-link span {
  font-size: 0.875rem;
  opacity: 0.9;
}

/* Legacy chapter navigation styles - deprecated but maintained for compatibility */
.chapter-text-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-sm);
}

.chapter-text-nav li {
  margin: 0;
}

.chapter-text-nav a {
  display: block;
  padding: var(--spacing-sm);
  background-color: var(--primary-color);
  color: var(--text-white);
  text-decoration: none;
  border-radius: 4px;
  font-family: var(--font-primary);
  font-weight: bold;
  font-size: 14px;
  transition: background-color 0.2s ease, transform 0.1s ease;
  text-align: center;
}

.chapter-text-nav a:hover,
.chapter-text-nav a:focus {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(153, 0, 153, 0.3);
}

.doctor-bios {
  margin-top: var(--spacing-lg);
  text-align: center;
}

.doctor-bios h3 {
  font-family: var(--font-primary);
  font-size: 1.25rem;
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
}

.doctor-bios ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

.doctor-bios a {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-md);
  background-color: var(--primary-light);
  color: var(--text-white);
  text-decoration: none;
  border-radius: 4px;
  font-family: var(--font-primary);
  font-weight: bold;
  font-size: 12px;
  transition: background-color 0.2s ease;
}

.doctor-bios a:hover,
.doctor-bios a:focus {
  background-color: var(--primary-dark);
}

/* Screen Reader Only Class */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive Design for Touch Devices */
@media (max-width: 1024px) {
  .home-content {
    grid-template-columns: 1fr;
    grid-template-areas: 
      "author-section"
      "main-text";
  }
  
  .welcome-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    text-align: center;
  }
}

@media (max-width: 768px) {
  .home-main {
    grid-template-columns: 1fr;
  }
  
  .home-navigation {
    order: 2;
  }
  
  .home-content {
    order: 1;
    margin: var(--spacing-md);
    padding: var(--spacing-lg);
  }
  
  .atlas-title {
    font-size: 2.5rem;
  }
  
  .edition-label {
    float: none;
    margin-top: var(--spacing-sm);
    display: block;
    font-size: 1.2rem;
  }
  
  .doctors-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .doctor-photo {
    width: 100px;
    height: 130px;
  }
  
  .nav-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1px;
  }
  
  .nav-menu li {
    border-bottom: none;
    flex: 1;
    min-width: 120px;
  }
  
  .nav-link {
    font-size: 0.85rem;
    padding: var(--spacing-sm);
    text-align: center;
  }
  
  /* Index page responsive */
  .index-main {
    padding: var(--spacing-md);
    min-height: calc(100vh - 150px);
  }
  
  .index-container {
    padding: 0 var(--spacing-sm);
  }
  
  .welcome-title {
    font-size: 2.5rem;
  }
  
  .welcome-subtitle {
    font-size: 1.1rem;
  }
  
  .disclaimer-card {
    padding: var(--spacing-lg);
  }
  
  .enter-button {
    font-size: 1.1rem;
    padding: var(--spacing-md) var(--spacing-lg);
    min-height: 50px;
  }
  
  .btn-primary {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  
  /* Legacy responsive styles */
  .chapter-text-nav {
    grid-template-columns: 1fr;
  }
  
  .chapter-text-nav a {
    font-size: 16px;
    padding: var(--spacing-md);
    min-height: 44px; /* iOS touch target minimum */
  }
  
  .doctor-bios ul {
    flex-direction: column;
    align-items: center;
  }
  
  .doctor-bios a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* High contrast mode improvements for touch navigation */
@media (prefers-contrast: high) {
  .chapter-text-nav a {
    border: 2px solid var(--text-white);
  }
  
  .doctor-bios a {
    border: 2px solid var(--text-white);
  }
}

/* Print Styles */
@media print {
  .skip-link,
  .main-navigation,
  .breadcrumb-nav {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
    color: black;
  }
  
  .main-layout {
    border: none;
    box-shadow: none;
  }
  
  .sidebar {
    background: white;
    color: black;
    border: 1px solid #ccc;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
  
  /* Avoid page breaks inside important content */
  .chapter-list li,
  .content-area p,
  .content-area div {
    page-break-inside: avoid;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  a:focus {
    outline-width: 3px;
  }
  
  .main-layout {
    border-width: 3px;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .skip-link,
  a {
    transition: none;
  }
}

@media (max-width: 480px) {
  .index-main {
    padding: var(--spacing-sm);
  }
  
  .welcome-title {
    font-size: 2rem;
    line-height: 1.1;
  }
  
  .welcome-subtitle {
    font-size: 1rem;
  }
  
  .disclaimer-card {
    padding: var(--spacing-md);
  }
  
  .disclaimer-text p {
    font-size: 1rem;
  }
}

/* Legacy Style Classes for Compatibility */
.style1 {
  font-family: var(--font-primary);
  font-weight: bold;
  font-size: 12px;
  color: var(--text-white);
}

.style3 {
  font-family: var(--font-secondary);
  font-size: 14px;
}

.style4 {
  font-family: var(--font-primary);
  font-size: 36px;
  font-weight: bold;
}

.style7 {
  font-size: 18px;
  font-weight: bold;
  font-family: var(--font-primary);
}

.style14 {
  font-family: var(--font-primary);
  font-size: 10px;
}

.style37 {
  font-weight: bold;
  font-family: var(--font-primary);
  font-size: 12px;
}

.style39 {
  font-family: var(--font-primary);
  font-weight: bold;
  font-size: 12px;
  color: var(--text-white);
}

.style42 {
  font-family: var(--font-primary);
  font-weight: bold;
  font-size: 32px;
  color: var(--text-white);
}

.style91 {
  font-family: var(--font-primary);
  font-weight: bold;
  font-size: 12px;
  color: var(--text-white);
  text-align: center;
}