/* DermaWare.org - Patient Education Styles */
:root {
  --primary: #1a6b8a;
  --primary-dark: #0f4c63;
  --primary-light: #e8f4f8;
  --secondary: #2d9a6e;
  --accent: #f5a623;
  --text: #2c3e50;
  --text-light: #5a6a7a;
  --bg: #ffffff;
  --bg-alt: #f7fafc;
  --border: #e2e8f0;
  --success: #38a169;
  --warning: #dd6b20;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-width: 1100px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.65;
  background: var(--bg);
  font-size: 16px;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Header */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--primary);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
  color: var(--primary-dark);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-nav a {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.2rem;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1e88a8 50%, var(--secondary) 100%);
  color: white;
  padding: 3.5rem 1.25rem;
  text-align: center;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.95;
  margin-bottom: 1.75rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

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

.btn-primary:hover {
  background: var(--primary-light);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.7);
  margin-left: 0.75rem;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.15);
  text-decoration: none;
}

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

.btn-outline:hover {
  background: var(--primary);
  color: white;
  text-decoration: none;
}

/* Main content */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.6rem;
  color: var(--primary-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--primary-light);
}

/* Cards grid */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card h3 {
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-light);
  font-size: 0.95rem;
  flex-grow: 1;
  margin-bottom: 1rem;
}

.card .card-link {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Page header (inner pages) */
.page-header {
  background: var(--primary-light);
  padding: 2rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.page-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-header h1 {
  font-size: 1.9rem;
  color: var(--primary-dark);
  margin-bottom: 0.4rem;
}

.page-header .breadcrumb {
  font-size: 0.9rem;
  color: var(--text-light);
}

.page-header .breadcrumb a {
  color: var(--primary);
}

/* Content layout */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.main-content h2 {
  font-size: 1.4rem;
  color: var(--primary-dark);
  margin: 1.75rem 0 0.75rem;
}

.main-content h3 {
  font-size: 1.15rem;
  color: var(--text);
  margin: 1.25rem 0 0.5rem;
}

.main-content p,
.main-content ul,
.main-content ol {
  margin-bottom: 1rem;
  color: var(--text);
}

.main-content ul,
.main-content ol {
  padding-left: 1.4rem;
}

.main-content li {
  margin-bottom: 0.35rem;
}

.main-content .highlight-box {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}

.main-content .warning-box {
  background: #fff8e6;
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}

.main-content .warning-box strong {
  color: var(--warning);
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
}

.sidebar-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.sidebar-box h3 {
  font-size: 1rem;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--primary-light);
}

.sidebar-box ul {
  list-style: none;
  padding: 0;
}

.sidebar-box li {
  margin-bottom: 0.4rem;
}

.sidebar-box a {
  font-size: 0.92rem;
  display: block;
  padding: 0.25rem 0;
}

/* References */
.references {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.references h3 {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.references ol {
  font-size: 0.88rem;
  color: var(--text-light);
  padding-left: 1.2rem;
}

.references li {
  margin-bottom: 0.4rem;
}

.references a {
  word-break: break-word;
}

/* Disclaimer */
.disclaimer {
  background: #fef3c7;
  border: 1px solid #f6e05e;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 2rem 0;
  font-size: 0.9rem;
  color: #744210;
}

/* Footer */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  padding: 2.5rem 1.25rem 1.5rem;
  margin-top: 3rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-col h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col li {
  margin-bottom: 0.35rem;
}

.footer-col a {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

/* Search */
.search-box {
  max-width: 500px;
  margin: 0 auto 1.5rem;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  box-shadow: var(--shadow-lg);
}

.search-box input:focus {
  outline: 2px solid var(--accent);
}

/* A-Z list */
.az-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.az-nav a {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
}

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

.condition-list {
  columns: 2;
  column-gap: 2rem;
}

.condition-list a {
  display: block;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 800px) {
  .content-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    order: -1;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    width: 100%;
    padding: 0.75rem;
  }

  .hero h1 {
    font-size: 1.7rem;
  }

  .condition-list {
    columns: 1;
  }

  .btn-secondary {
    margin-left: 0;
    margin-top: 0.75rem;
    display: inline-block;
  }
}

/* Utility */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.flex-center {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}