/* ========================================
   HauntLegal CSS Stylesheet
   A professional, modern law-themed website
   for haunted attraction legal issues
   ======================================== */

/* ========================================
   1. ROOT & RESET
   ======================================== */

:root {
  --accent-color: #c85f2a;
  --accent-color-light: #d97a42;
  --accent-color-dark: #ad4c1e;

  --text-primary: #333333;
  --text-muted: #666666;
  --text-light: #999999;

  --bg-white: #ffffff;
  --bg-cream: #faf8f6;
  --bg-light: #f0ebe6;

  --border-color: #dddddd;
  --border-color-dark: #cccccc;

  --accent-blue: #2a6bc8;

  --max-width: 1200px;
  --transition-default: 0.2s ease-in-out;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-white);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
}

/* ========================================
   2. LAYOUT & STRUCTURE
   ======================================== */

.site-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 40px;
}

.page-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px;
}

.page-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 24px;
}

.contact-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.contact-image {
  flex: 0 0 300px;
}

.contact-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.contact-text {
  flex: 1;
}

@media (max-width: 768px) {
  .contact-layout {
    flex-direction: column;
  }

  .contact-image {
    flex: none;
    width: 100%;
    max-width: 300px;
  }
}

/* ========================================
   3. HEADER & NAVIGATION
   ======================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.site-nav {
  display: flex;
  align-items: center;
}

.site-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.site-title:hover {
  color: var(--accent-color);
  transition: color var(--transition-default);
}

.site-nav .nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  list-style: none;
}

.site-nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: color var(--transition-default);
  position: relative;
}

.site-nav a:hover {
  color: var(--accent-color);
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width var(--transition-default);
}

.site-nav a:hover::after {
  width: 100%;
}

/* Mobile Navigation Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  transition: all var(--transition-default);
  display: block;
}

/* Mobile nav dropdown state */
.site-nav.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  padding: 20px;
  gap: 12px;
  width: 100%;
}

.site-nav.open a {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.site-nav.open a:last-child {
  border-bottom: none;
}

/* ========================================
   4. FOOTER
   ======================================== */

.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 60px;
}

.site-footer p {
  margin-bottom: 8px;
}

.site-footer a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color var(--transition-default);
}

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

/* ========================================
   5. HERO SECTION
   ======================================== */

.hero {
  background-color: var(--bg-cream);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  padding: 130px 20px;
  text-align: center;
  margin-bottom: 60px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
}

.hero-container {
  position: relative;
  z-index: 1;
}

.hero h1,
.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero h1 .accent {
  color: var(--accent-color-light);
}

.hero .tagline,
.hero-tagline {
  font-size: 1.25rem;
  color: #f0ebe6;
  line-height: 1.5;
  max-width: 600px;
  margin: 0 auto;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ========================================
   6. FEATURE CARDS (3-COLUMN GRID)
   ======================================== */

.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.feature-card {
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--accent-color);
  padding: 32px;
  background-color: var(--bg-white);
  border-radius: 4px;
  transition: transform var(--transition-default), box-shadow var(--transition-default);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.feature-card h3 {
  font-size: 1.25rem;
  color: var(--accent-color);
  margin-bottom: 12px;
  font-weight: 600;
}

.feature-card p {
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

.feature-card .card-link {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition-default);
}

.feature-card .card-link:hover {
  gap: 10px;
}

.feature-card .card-link::after {
  content: '→';
  display: inline-block;
}

/* ========================================
   7. FILTER PILLS
   ======================================== */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  align-items: center;
}

.filter-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  margin-right: 8px;
}

.filter-pill {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  background-color: var(--bg-light);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-default);
  white-space: nowrap;
}

.filter-pill:hover {
  background-color: #e8dfd5;
  border-color: #c9c0b8;
}

.filter-pill.active {
  background-color: var(--accent-color);
  color: var(--bg-white);
  border-color: var(--accent-color);
}

.filter-pill.active:hover {
  background-color: var(--accent-color-dark);
  border-color: var(--accent-color-dark);
}

/* ========================================
   8. CASE GRID & CASE CARDS
   ======================================== */

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.case-card {
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent-color);
  padding: 24px;
  background-color: var(--bg-cream);
  border-radius: 4px;
  margin-bottom: 0;
  transition: box-shadow var(--transition-default), transform var(--transition-default);
}

.case-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateX(4px);
}

.case-card h3 {
  margin-bottom: 12px;
  font-size: 1.125rem;
  font-weight: 600;
}

.case-card h3 a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-default), border-bottom-color var(--transition-default);
  display: inline-block;
  border-bottom: 2px solid transparent;
}

.case-card h3 a:hover {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

.case-card .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.case-card .badge {
  display: inline-block;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.case-card .badge.category {
  background-color: var(--accent-color);
  color: var(--bg-white);
}

.case-card .badge.jurisdiction {
  background-color: var(--accent-blue);
  color: var(--bg-white);
}

.case-card .summary {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ========================================
   9. BLOG & BLOG LIST
   ======================================== */

.blog-list {
  margin-bottom: 40px;
}

.blog-item {
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
}

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

.blog-item h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.blog-item h3 a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-default);
}

.blog-item h3 a:hover {
  color: var(--accent-color);
}

.blog-item .meta {
  font-size: 13px;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 12px;
}

.blog-item .excerpt {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.blog-item .read-more {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition-default);
}

.blog-item .read-more:hover {
  gap: 8px;
}

.blog-item .read-more::after {
  content: '→';
}

/* ========================================
   10. ESSENTIAL READING
   ======================================== */

.er-topic-group {
  margin-bottom: 40px;
}

.topic-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-color);
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 8px;
  margin-bottom: 24px;
}

.er-card {
  padding: 16px 20px;
  border-left: 3px solid var(--accent-color);
  background-color: var(--bg-cream);
  margin-bottom: 24px;
  border-radius: 4px;
  transition: box-shadow var(--transition-default);
}

.er-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.er-card h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.er-card h3 a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--accent-color);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: color var(--transition-default);
}

.er-card h3 a:hover {
  color: var(--accent-color);
}

.er-card .er-meta {
  font-size: 12px;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 12px;
}

.er-card p {
  color: var(--text-muted);
  line-height: 1.6;
}

.er-card p:last-child {
  margin-bottom: 0;
}

/* ========================================
   11. REFERENCE MATERIALS
   ======================================== */

.rm-category-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-color);
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 8px;
  margin-bottom: 24px;
  margin-top: 40px;
}

.rm-card {
  padding: 16px 20px;
  border-left: 3px solid var(--accent-color);
  background-color: var(--bg-cream);
  margin-bottom: 24px;
  border-radius: 4px;
  transition: box-shadow var(--transition-default);
}

.rm-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.rm-card h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.rm-card h3 a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--accent-color);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: color var(--transition-default);
}

.rm-card h3 a:hover {
  color: var(--accent-color);
}

.rm-card .rm-meta {
  font-size: 12px;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 12px;
}

.rm-card p {
  color: var(--text-muted);
  line-height: 1.6;
}

.rm-card p:last-child {
  margin-bottom: 0;
}

/* ========================================
   12. SINGLE PAGE (CASE/BLOG POST)
   ======================================== */

.single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-light);
}

.single-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.back-link {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 32px;
  transition: gap var(--transition-default);
}

.back-link:hover {
  gap: 10px;
}

.back-link::before {
  content: '←';
  display: inline-block;
}

/* Article Content Typography */
article {
  line-height: 1.7;
}

article h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 40px;
  margin-bottom: 16px;
  line-height: 1.3;
}

article h3 {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 32px;
  margin-bottom: 12px;
  line-height: 1.3;
}

article h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 24px;
  margin-bottom: 8px;
}

article p {
  margin-bottom: 20px;
  color: var(--text-muted);
}

article ul,
article ol {
  margin-bottom: 20px;
  margin-left: 20px;
  color: var(--text-muted);
}

article li {
  margin-bottom: 8px;
  line-height: 1.7;
}

article blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 20px;
  margin: 24px 0;
  font-style: italic;
  color: var(--text-muted);
  background-color: var(--bg-cream);
  padding: 16px 20px;
  border-radius: 4px;
}

article a {
  color: var(--accent-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-bottom-color var(--transition-default);
}

article a:hover {
  border-bottom-color: var(--accent-color);
}

article code {
  background-color: var(--bg-light);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  color: var(--text-primary);
}

article pre {
  background-color: #f5f5f5;
  padding: 16px;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

article pre code {
  background-color: transparent;
  padding: 0;
  color: var(--text-primary);
}

article img {
  max-width: 100%;
  height: auto;
  margin: 24px 0;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

/* ========================================
   13. UTILITY CLASSES
   ======================================== */

.hidden {
  display: none !important;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ========================================
   14. FOCUS & ACCESSIBILITY
   ======================================== */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
  border-radius: 2px;
}

button {
  font-family: inherit;
  font-size: inherit;
}

/* ========================================
   15. RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .site-header {
    height: 60px;
  }

  .header-container {
    height: 60px;
    padding: 0 16px;
  }

  .site-title {
    font-size: 20px;
  }

  .site-nav {
    display: none;
    gap: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding: 60px 16px;
    margin-bottom: 40px;
  }

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

  .hero .tagline {
    font-size: 1rem;
  }

  .feature-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-card {
    padding: 24px;
  }

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

  .filter-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-label {
    width: 100%;
    margin-right: 0;
    margin-bottom: 8px;
  }

  .filter-pill {
    flex: 0 1 auto;
  }

  .single-meta {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .page-content {
    padding: 16px;
  }

  article h2 {
    font-size: 1.5rem;
    margin-top: 32px;
  }

  article h3 {
    font-size: 1.25rem;
    margin-top: 24px;
  }

  .site-footer {
    padding: 30px 16px;
    margin-top: 40px;
  }
}

@media (max-width: 480px) {
  .site-title {
    font-size: 18px;
  }

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

  .hero {
    padding: 40px 16px;
  }

  .feature-card {
    padding: 20px 16px;
  }

  .feature-card h3 {
    font-size: 1.125rem;
  }

  .topic-heading {
    font-size: 18px;
  }

  .er-card,
  .rm-card {
    padding: 12px 16px;
  }

  article h2 {
    font-size: 1.375rem;
  }

  article h3 {
    font-size: 1.125rem;
  }

  .case-card {
    padding: 16px;
  }

  .blog-item {
    padding-bottom: 20px;
    margin-bottom: 20px;
  }
}

/* ========================================
   16. PRINT STYLES
   ======================================== */

@media print {
  .site-header,
  .site-footer,
  .menu-toggle {
    display: none;
  }

  body {
    background-color: var(--bg-white);
  }

  a {
    text-decoration: underline;
  }

  article {
    line-height: 1.5;
  }

  .page-content {
    max-width: 100%;
  }
}

/* ========================================
   17. TRANSITIONS & ANIMATIONS
   ======================================== */

/* Smooth transitions on all interactive elements */
a,
button,
input,
textarea,
select,
.filter-pill,
.feature-card,
.case-card,
.blog-item h3 a,
.er-card,
.rm-card,
.site-nav a {
  transition: all var(--transition-default);
}

/* Hamburger menu animation */
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}
