/* Probate Timelines - Calm, neutral, documentary design */

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

html {
  font-size: 18px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #fefefe;
  color: #333;
  line-height: 1.8;
}

/* Layout wrapper */
.page-wrapper {
  display: flex;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Sidebar */
.sidebar {
  width: 180px;
  flex-shrink: 0;
  padding-right: 2rem;
  position: sticky;
  top: 2rem;
  align-self: flex-start;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}

/* Sidebar home link */
.sidebar-home {
  margin-bottom: 0.75rem;
}

.sidebar-home a {
  font-size: 0.9rem;
  color: #1a5276;
  text-decoration: none;
  display: block;
  padding: 0.2rem 0;
}

.sidebar-home a:hover {
  text-decoration: underline;
}

.sidebar-home a.active {
  font-weight: bold;
  color: #222;
}

/* Collapsible states section */
.sidebar-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  padding: 0;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #ddd;
}

.sidebar-section-toggle span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.9rem;
  font-weight: normal;
  color: #444;
}

.sidebar-section-toggle .arrow {
  font-size: 0.7rem;
  color: #666;
  transition: transform 0.2s ease;
}

.sidebar-section-toggle.collapsed .arrow {
  transform: rotate(-90deg);
}

.sidebar-states-list {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.sidebar-states-list.collapsed {
  max-height: 0;
}

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

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

.sidebar-nav a {
  font-size: 0.85rem;
  color: #1a5276;
  text-decoration: none;
  display: block;
  padding: 0.2rem 0;
}

.sidebar-nav a:hover {
  text-decoration: underline;
}

.sidebar-nav a.active {
  font-weight: bold;
  color: #222;
}

/* Mobile sidebar rail and drawer */
.mobile-sidebar-rail {
  display: none;
}

.mobile-sidebar-drawer {
  display: none;
}

.mobile-sidebar-backdrop {
  display: none;
}

/* Main content area */
.content {
  flex: 1;
  max-width: 680px;
}

/* Header */
header {
  margin-bottom: 2rem;
}

header a {
  text-decoration: none;
  color: inherit;
}

.site-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  font-weight: normal;
  color: #444;
}

/* Main content */
main {
  margin-bottom: 3rem;
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  font-weight: normal;
  color: #222;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

/* State name highlight in h1 (replaces <u> tag) */
.state-highlight {
  text-decoration: underline;
  text-decoration-color: #1a5276;
  text-underline-offset: 3px;
}

.subtitle {
  font-size: 1rem;
  color: #555;
  margin-top: 1rem;
  margin-bottom: 0.75rem;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: normal;
  color: #222;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.3rem;
}

p {
  margin-bottom: 1rem;
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Inline state links on homepage */
.state-links {
  line-height: 1.9;
}

.state-links a {
  color: #1a5276;
  text-decoration: none;
}

.state-links a:hover {
  text-decoration: underline;
}

/* Back link */
.back-link {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ddd;
}

.back-link a {
  color: #1a5276;
  text-decoration: none;
}

.back-link a:hover {
  text-decoration: underline;
}

/* Disclaimer styling */
.disclaimer {
  font-size: 0.9rem;
  color: #666;
}

/* Centered elements */
.centered {
  text-align: center;
}

/* Two-column comparison table */
.comparison-table {
  display: flex;
  gap: 2rem;
  margin-top: 1.75rem;
  margin-bottom: 1.5rem;
}

.comparison-table.centered {
  justify-content: center;
}

.comparison-column {
  flex: 1;
  max-width: 300px;
}

.comparison-column h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: normal;
  color: #222;
  margin-bottom: 0.75rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid #ddd;
  text-align: center;
}

.comparison-column ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.comparison-column ul.bulleted {
  list-style: disc;
  padding-left: 1.25rem;
}

.comparison-column li {
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  color: #444;
}

/* Responsive */
@media (max-width: 768px) {
  .page-wrapper {
    flex-direction: column;
    padding: 3.5rem 1rem 1.5rem 1rem;
  }

  .sidebar {
    display: none;
  }

  .content {
    max-width: 100%;
  }

  html {
    font-size: 16px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .comparison-table {
    flex-direction: column;
    gap: 1.5rem;
  }

  /* Mobile top bar with hamburger */
  .mobile-sidebar-rail {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 48px;
    background: #f9f9f9;
    border-bottom: 1px solid #ddd;
    z-index: 30;
    padding: 0 1rem;
  }

  .mobile-sidebar-rail-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    color: #444;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }

  .mobile-sidebar-rail-btn span {
    font-size: 0.9rem;
    font-family: Georgia, "Times New Roman", serif;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    letter-spacing: normal;
  }

  /* Mobile sidebar drawer - shown when open */
  .mobile-sidebar-drawer {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: #fefefe;
    border-right: 1px solid #ddd;
    z-index: 50;
    overflow-y: auto;
    padding: 1rem 1.25rem;
  }

  .mobile-sidebar-drawer.open {
    display: block;
  }

  .mobile-sidebar-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #ddd;
  }

  .mobile-sidebar-drawer-title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    font-weight: normal;
    color: #444;
  }

  .mobile-sidebar-drawer-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #666;
    padding: 0.25rem;
    line-height: 1;
  }

  .mobile-sidebar-drawer-close:hover {
    color: #333;
  }

  /* Mobile drawer home link */
  .mobile-drawer-home {
    margin-bottom: 0.75rem;
  }

  .mobile-drawer-home a {
    display: block;
    padding: 0.5rem 0;
    font-size: 0.95rem;
    color: #1a5276;
    text-decoration: none;
  }

  .mobile-drawer-home a:hover {
    text-decoration: underline;
  }

  .mobile-drawer-home a.active {
    font-weight: bold;
    color: #222;
  }

  /* Mobile drawer collapsible states */
  .mobile-drawer-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
  }

  .mobile-drawer-section-toggle span {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.95rem;
    font-weight: normal;
    color: #444;
  }

  .mobile-drawer-section-toggle .arrow {
    font-size: 0.7rem;
    color: #666;
    transition: transform 0.2s ease;
  }

  .mobile-drawer-section-toggle.collapsed .arrow {
    transform: rotate(-90deg);
  }

  .mobile-drawer-states-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .mobile-drawer-states-list.collapsed {
    max-height: 0;
  }

  .mobile-drawer-states-list li {
    margin-bottom: 0.5rem;
  }

  .mobile-drawer-states-list a {
    display: block;
    padding: 0.5rem 0;
    font-size: 0.95rem;
    color: #1a5276;
    text-decoration: none;
  }

  .mobile-drawer-states-list a:hover {
    text-decoration: underline;
  }

  .mobile-drawer-states-list a.active {
    font-weight: bold;
    color: #222;
  }

  /* Mobile sidebar backdrop */
  .mobile-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 40;
  }

  .mobile-sidebar-backdrop.open {
    display: block;
  }
}


/* Site footer */
.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ddd;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer-links a {
  font-size: 0.8rem;
  color: #777;
  text-decoration: none;
}

.site-footer-links a:hover {
  text-decoration: underline;
  color: #555;
}

@media (max-width: 768px) {
  .site-footer-links {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
}

/* Contact form */
.contact-form {
  margin: 2rem 0;
}

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

.form-group label {
  display: block;
  font-size: 0.9rem;
  color: #444;
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fefefe;
  color: #333;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #1a5276;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-submit {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-family: inherit;
  color: #fff;
  background: #1a5276;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.contact-submit:hover {
  background: #154360;
}

/* Estimator styles */
.estimator-form {
  margin: 2rem 0;
}

.estimator-form .form-group {
  margin-bottom: 1.5rem;
}

.estimator-form select {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: #333;
  cursor: pointer;
}

.estimator-form select:focus {
  outline: none;
  border-color: #1a5276;
}

.estimator-submit {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-size: 1rem;
  font-family: inherit;
  color: #fff;
  background: #1a5276;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.estimator-submit:hover {
  background: #154360;
}

.estimator-results {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
}

.estimator-results h2 {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.estimate-range {
  font-size: 1.4rem;
  color: #1a5276;
  margin: 1rem 0;
}

.estimator-results h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: normal;
  color: #333;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.estimator-results ul {
  margin-bottom: 1.5rem;
}

.estimator-results li {
  margin-bottom: 0.5rem;
  color: #555;
}

.estimate-disclaimer {
  font-size: 0.85rem;
  color: #777;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
}
