:root {
  --primary-color: #234518;
  --secondary-color: #dfdfdf;
  --accent2-color: #c5a059;
  --accent-color: #4b6b41;
  --text-on-primary: #ffffff;
  --text-on-secondary: #000000;
  --text-on-accent: #ffffff;

  --heading-font: "Palatino Linotype", "Palatino", serif;
  --body-font: "Georgia", "Times New Roman", serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--heading-font);
}

body {
  margin: 0;
  font-family: var(--body-font);
  background-color: var(--secondary-color);
  color: var(--text-on-secondary);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Only show focus outlines when navigating with keyboard*/
*:focus-visible {
  outline: 1px solid var(--accent2-color);
  outline-offset: 2px;
  border-radius: 4px;
}

header {
  background-color: var(--primary-color);
  color: var(--text-on-primary);
  padding: 1rem;
  text-align: center;
  border-bottom: 2px solid var(--accent2-color);
}

header h1 {
  font-family: var(--heading-font);
  font-variant: small-caps;
  font-weight: normal;
  margin-top: 0;
  font-size: 3rem;
}

nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;

  /* Animation properties */
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  overflow: hidden;
  pointer-events: none;
  transition: all 0.4s ease-in-out;
}

/*  Expanded */
nav.open {
  max-height: 600px;
  opacity: 1;
  margin-top: 1rem;
  pointer-events: auto;
}

nav a {
  color: var(--text-on-primary);
  text-decoration: none;
  font-size: 1.2rem;
  border-bottom: 1px solid #5e8152;
  width: 100%;
  font-family: var(--heading-font);
  padding: 12px;
  display: inline-block;
}

.menu-toggle {
  background: none;
  border: none;
  color: var(--text-on-primary);
  font-size: 2rem;
  cursor: pointer;
}

.hidden {
  display: none;
}

main {
  background-color: var(--secondary-color);
  flex: 1;
}

.contact-info {
  padding: 20px;
  background-color: white;
  color: var(--primary-color);
  text-align: center;
}
.contact-info h3 {
  font-family: var(--body-font);
  font-weight: 100;
  font-size: 13pt;
}
.contact-info p,
.contact-info a {
  font-size: 13pt;
  line-height: 1.25;
  text-decoration: none;
  color: var(--primary-color);
}

.contact-info a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent2-color);
}

footer {
  background-color: var(--primary-color);
  color: var(--text-on-primary);
  border-top: 2px solid var(--accent2-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

footer p {
  font-family: var(--body-font);
  font-size: 0.9rem;
}

#legal-disclaimer {
  color: var(--secondary-color);
  text-align: center;
  max-width: 90%;
}

/* Main Page Styles */
.hero {
  padding: 10px 20px 30px 20px;
  text-align: center;
  background-color: var(--accent-color);
  color: var(--text-on-accent);
}
.hero h2 {
  font-family: var(--heading-font);
  font-size: 2.5rem;
  margin-bottom: 10px;
  font-weight: normal;
}
.hero p {
  font-size: 15pt;
  line-height: 1.5;
  max-width: 640px;
  margin: 0 auto;
}

#practice-areas {
  background-color: var(--primary-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 90%;
  padding: 20px;
  margin: 20px;
  color: var(--text-on-primary);
  border-radius: 20px;
}

#practice-areas h2 {
  margin-bottom: 0;
  font-size: 1.3rem;
  text-align: center;
}

#practice-areas li {
  font-size: 1rem;
  margin: 10px 0;
  list-style-type: none;
}

#about-section {
  margin: 0 auto;
  padding: 20px;
  max-width: 800px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#about-section h2 {
  font-size: 2rem;
}

#bio img {
  width: 150px;
  height: auto;
  border-radius: 2px;
  border: 2px solid var(--primary-color);
}

#bio {
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  align-items: center;
  text-align: left;
}

.credentials {
  color: var(--text-on-accent);
  padding: 10px;
  border-radius: 10px;
  border: 2px solid var(--primary-color);
  background-color: var(--accent-color);
  line-height: 1.25;
  width: 90%;
}

.credentials h3 {
  text-align: center;
}

.credentials ul {
  list-style-type: none;
  font-style: italic;
}

#credentials-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.page-heading {
  font-family: var(--heading-font);
  font-size: 2rem;
  text-align: center;
}

.textual-content {
  display: flex;
  flex-direction: column;
  margin: 20px auto;
  max-width: 85%;
  line-height: 1.6;
  gap: 20px;
}

.textual-content h3 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 10px;
}
.textual-content h4 {
  font-size: 1.1rem;
}

.textual-content p,
.textual-content li {
  font-size: 1.1rem;
}

.image-column {
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-column img {
  max-width: 200px;
  height: auto;
  border-radius: 5px;
}

#hero-suedinutah h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

#estate-planning-terminology {
  background-color: #5e8152;
  color: var(--text-on-accent);
  padding: 20px;
  border-radius: 10px;
  border: 2px solid var(--primary-color);
}

/* CONTACT FORM STYLES */

.contact-container {
  display: flex;
  justify-content: center;
  padding: 20px;
  padding-top: 0;
  padding-bottom: 40px;
}

.form-card {
  margin-top: 20px;
  background-color: var(--primary-color);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 700px;
  border: 1px solid var(--accent-color);
}

.form-header {
  text-align: center;
  margin-bottom: 25px;
}

.form-header h2 {
  font-size: 1.8rem;
  color: var(--text-on-primary);
  margin-bottom: 10px;
}

.form-header p {
  color: var(--text-on-primary);
  font-family: var(--body-font);
}

/* Layout for rows (side-by-side inputs) */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 0px;
  margin-bottom: 15px;
}

.form-group {
  flex: 1; /* Makes items in a row equal width */
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

/* Label styling */
label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-on-primary);
  font-family: var(--heading-font);
  font-size: 1rem;
  text-align: center;
}

/* Input styling */
.form-input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--accent-color);
  border-radius: 4px;
  font-family: var(--body-font);
  font-size: 1rem;
  box-sizing: border-box; /* Ensures padding doesn't break layout */
  transition: border-color 0.3s;
}

.form-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(94, 129, 82, 0.2);
}

/* Button Styling - Using your site's Green/Gold theme */
.btn-submit {
  width: 50%;
  margin: 0 auto;
  padding: 15px;
  background-color: var(--accent-color);
  color: var(--text-on-primary);
  border: none;
  border-radius: 4px;
  font-family: var(--heading-font);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-submit:hover {
  background-color: var(--accent2-color); /* Slightly darker on hover */
}

/* Error Messages */
.invalid-feedback,
.empty-feedback {
  color: var(--accent2-color);
  font-size: 0.85rem;
  margin-top: 5px;
  display: none; /* Hidden by default, shown when validation fails */
}

.result-message {
  text-align: center;
  margin-top: 15px;
  color: white;
  font-family: var(--heading-font);
  font-size: 1.1rem;
}

/* Show the error message when the form has been checked */
.was-validated .form-input:invalid ~ .invalid-feedback {
  display: block;
}

/*Turn the border red to make it "pop" more*/
.was-validated .form-input:invalid {
  border-color: #670101; /* Using site's error red color */
  border-width: 2px;
}

/* success and error message */
.success-text {
  color: white;
}

.error-text {
  color: #670101; /* Red */
}

/* --- DEBT COLLECTION SPECIFIC STYLES --- */

.agency-list {
  list-style-type: none;
  padding-left: 0;
  margin-top: 15px;
  line-height: 1.6;
}

.agency-list li {
  display: block;
  margin-bottom: 8px;
  text-align: center;
}

details.legal-dropdown {
  background-color: var(--accent-color);
  border: 1px solid var(--primary-color);
  border-radius: 5px;
  padding: 12px 15px;
  margin-top: 20px;
  cursor: pointer;
}

details.legal-dropdown summary {
  font-family: var(--heading-font);
  font-weight: normal;
  font-size: 1.1rem;
  color: var(--text-on-accent);
  outline: none;
  list-style-position: inside;
}

.dropdown-content {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--accent2-color);
  font-size: 0.95rem;
  cursor: default; /* Reverts cursor back to normal text pointer when reading */
  color: var(--text-on-accent);
  opacity: 0;
}

details[open] .dropdown-content {
  animation: fadeIn 0.15s ease-in-out forwards;
}

/* Define the fade-in animation for dropdown content */
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.dropdown-content ul {
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.2;
}

.exceptions-box {
  background-color: #f4f5f7; /* Light neutral gray/blue */
  border-left: 4px solid var(--accent2-color, #1a365d);
  padding: 15px;
  border-radius: 3px;
  font-size: 0.9rem;
  margin-top: 20px;
  line-height: normal;
}

.exemptions-list {
  list-style-type: none;
  font-style: italic;
}

.exemptions-list li {
  margin-bottom: 8px;
  font-size: 1rem;
}

/* Bankruptcy Disclaimer Text */
#bankruptcy-disclaimer {
  margin-top: 20px;
  color: var(--primary-color);
  font-size: 0.9rem;
  font-style: italic;
  text-align: center;
}

@media screen and (min-width: 679px) {
  header h1 {
    margin-bottom: 10px;
  }

  nav.hidden {
    display: flex;
  }

  nav {
    max-height: none;
    opacity: 1;
    pointer-events: auto;
    overflow: visible;
    flex-direction: row;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0;
    max-width: 60%;
    margin: 0 auto;
  }

  nav a {
    border-bottom: 2px solid transparent;
    padding-bottom: 4px;
    margin: 0;
    font-size: clamp(0.9rem, calc(1vw + 0.5rem), 1rem);
    white-space: nowrap;
    transition: border-color 0.1s ease-in-out;
  }

  nav a:hover {
    border-bottom-color: var(--accent2-color);
  }

  .menu-toggle {
    display: none;
  }

  .hero p {
    font-size: 13.5pt;
  }

  #practice-areas {
    max-width: 640px;
    margin: 40px auto;
  }

  #practice-areas p {
    font-size: 1.1rem;
  }

  #practice-areas h2 {
    font-size: 1.8rem;
  }

  .contact-info p,
  .contact-info a,
  .contact-info h3 {
    font-size: 12pt;
  }

  footer {
    flex-direction: row;
    justify-content: space-around;
    padding: 0 20px;
  }

  #legal-disclaimer {
    font-size: smaller;
    text-align: left;
    max-width: 60%;
  }

  #credentials-section {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }

  .credentials {
    width: calc(100% / 2 - 40px);
  }

  .textual-content {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    max-width: 80%;
    margin: 40px auto 40px auto;
    text-align: left;
    display: flex;
  }

  .text-column {
    flex: 1;
    padding-right: 40px;
  }

  .image-column {
    flex: 0 0 250px;
  }

  .image-column img {
    max-width: 100%;
  }

  .textual-content h3 {
    text-align: left;
    margin-top: 0;
  }

  .form-row {
    flex-direction: row;
    gap: 20px;
  }

  label {
    text-align: left;
  }

  .agency-list {
    column-count: 2;
    column-gap: 30px;
    margin-left: 10px;
    margin-right: 10px;
  }

  .agency-list li {
    display: block;
    margin-bottom: 6px;
    padding-left: 10px;
    break-inside: avoid;
    text-align: left;
  }

  #bankruptcy-disclaimer {
    text-align: left;
  }
}
