/* =========================================================
   Miller & Miller, P.C. — Main Stylesheet
   Design: Genesis-faithful rebuild
   ========================================================= */

/* # Variables
---------------------------------------------------------- */
:root {
  --color-bg:        #f5f5f5;
  --color-white:     #ffffff;
  --color-dark:      #333333;
  --color-red:       #c3251d;
  --color-border:    #dddddd;
  --color-light-bg:  #f5f5f5;
  --color-muted:     #999999;

  --font-main:       'Lato', sans-serif;
  --font-weight-light:  300;
  --font-weight-normal: 400;
  --font-weight-bold:   700;

  --max-width:       1048px;
  --content-pad:     5%;
  --transition:      all 0.1s ease-in-out;
}

/* # Reset & Base
---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 62.5%; }

body {
  background-color: var(--color-bg);
  color: var(--color-dark);
  font-family: var(--font-main);
  font-size: 1.8rem;
  font-weight: var(--font-weight-light);
  line-height: 1.625;
  margin: 0;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--color-red); text-decoration: underline; transition: var(--transition); }
a:hover, a:focus { color: var(--color-dark); text-decoration: none; }

p  { margin: 0 0 2.4rem; }
ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4, h5, h6 {
  color: var(--color-dark);
  font-family: var(--font-main);
  font-weight: var(--font-weight-normal);
  line-height: 1.2;
  margin: 0 0 1rem;
}
h1 { font-size: 3.6rem; }
h2 { font-size: 3.0rem; }
h3 { font-size: 2.4rem; }
h4 { font-size: 2.0rem; }
h5 { font-size: 1.8rem; }
h6 { font-size: 1.6rem; }

hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 2.4rem 0;
  clear: both;
}

/* # Skip Link
---------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-dark);
  color: var(--color-white);
  padding: 1rem 2rem;
  z-index: 1000;
  text-decoration: none;
  font-size: 1.4rem;
}
.skip-link:focus { top: 0; }

/* # Layout
---------------------------------------------------------- */
.wrap {
  margin: 0 auto;
  max-width: var(--max-width);
  padding-left: 2.4rem;
  padding-right: 2.4rem;
}

.site-inner {
  padding-top: 4rem;
  padding-bottom: 4rem;
  clear: both;
}

.content-area {
  /* single-column, full width */
}

/* # Site Header
---------------------------------------------------------- */
.site-header {
  background-color: var(--color-white);
  min-height: 14rem;
}

.site-header .wrap {
  padding-top: 3rem;
  padding-bottom: 3rem;
  display: flex;
  align-items: center;
}

.logo-link { display: inline-block; }
.logo-link img { width: 300px; max-width: 100%; height: auto; }

/* # Primary Navigation
---------------------------------------------------------- */
.nav-primary {
  background-color: var(--color-dark);
  position: relative;
}

.nav-primary .wrap {
  display: flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}

.genesis-nav-menu {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 1.6rem;
  line-height: 1;
}

.genesis-nav-menu li a {
  display: block;
  padding: 2.4rem 2.4rem;
  color: #cccccc;
  text-decoration: none;
  transition: var(--transition);
}
.genesis-nav-menu li a:hover,
.genesis-nav-menu li a:focus,
.genesis-nav-menu li.active a {
  color: var(--color-white);
  text-decoration: underline;
}
.genesis-nav-menu li:first-child a { padding-left: 0; }

/* Mobile hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 1.6rem 0;
  margin-left: auto;
}
.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 2.4rem;
  height: 2px;
  background: var(--color-white);
  position: relative;
  transition: var(--transition);
}
.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}
.hamburger::before { top: -7px; }
.hamburger::after  { top:  7px; }

/* # Content Card
---------------------------------------------------------- */
.entry {
  background-color: var(--color-white);
  margin-bottom: 4rem;
  padding: 5rem 6rem;
}

.entry-title {
  font-size: 3.6rem;
  margin-bottom: 2rem;
}

/* # About Page — Bio layout
---------------------------------------------------------- */
.bio-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 3.2rem;
  align-items: start;
}

.bio-grid img {
  width: 100%;
  border-radius: 2px;
}

.bio-details h3 {
  margin-bottom: 0.4rem;
}

.bio-details p {
  margin-bottom: 1.2rem;
}

.bio-section-label {
  font-weight: var(--font-weight-bold);
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  margin-bottom: 0.4rem;
}

/* # Affiliations Page
---------------------------------------------------------- */
.affiliation-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.affiliation-list li {
  border-top: 1px solid var(--color-border);
  padding: 1.6rem 0;
  line-height: 1.7;
}
.affiliation-list li:first-child { border-top: none; padding-top: 0; }

.affiliation-links {
  margin-top: 3.2rem;
}
.affiliation-links h3 {
  font-size: 2rem;
  margin-bottom: 1.2rem;
}
.affiliation-links ul {
  list-style: disc;
  margin-left: 2.4rem;
}
.affiliation-links ul li {
  list-style: disc;
  margin-bottom: 0.6rem;
}

/* # Community Page
---------------------------------------------------------- */
.community-grid {
  display: grid;
  gap: 3.2rem;
}

.community-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2.4rem;
  align-items: center;
  border-top: 1px solid var(--color-border);
  padding-top: 2.4rem;
}
.community-item:first-child { border-top: none; padding-top: 0; }

.community-item img {
  width: 100%;
  max-width: 140px;
  height: auto;
  object-fit: contain;
}

.community-item p { margin-bottom: 0; }

/* # Contact Page
---------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4.8rem;
  align-items: start;
}

.contact-info h3 {
  font-size: 2rem;
  margin-bottom: 1.2rem;
}

.contact-info p { margin-bottom: 0.8rem; }

.contact-info a {
  color: var(--color-red);
}

/* # Contact Form
---------------------------------------------------------- */
.contact-form { }

.contact-form .form-field {
  margin-bottom: 1.6rem;
}

.contact-form label {
  display: block;
  font-size: 1.4rem;
  font-weight: var(--font-weight-bold);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact-form label .required {
  color: var(--color-red);
  margin-left: 2px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  color: var(--color-dark);
  font-family: var(--font-main);
  font-size: 1.8rem;
  font-weight: var(--font-weight-light);
  padding: 1.2rem 1.6rem;
  width: 100%;
  transition: border-color 0.1s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--color-muted);
  outline: none;
}

.contact-form textarea { min-height: 16rem; resize: vertical; }

.contact-form button[type="submit"] {
  background-color: var(--color-dark);
  border: none;
  color: var(--color-white);
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 1.6rem;
  font-weight: var(--font-weight-light);
  letter-spacing: 0.05em;
  padding: 1.4rem 2.8rem;
  text-transform: uppercase;
  transition: background-color 0.1s ease;
}
.contact-form button[type="submit"]:hover,
.contact-form button[type="submit"]:focus {
  background-color: var(--color-red);
}

/* Honeypot */
.contact-form .field-trap { display: none; }

/* Form messages */
.form-success,
.form-error {
  padding: 1.6rem 2rem;
  margin-bottom: 2rem;
  font-weight: var(--font-weight-normal);
  border-radius: 2px;
}
.form-success { background: #e6f4ea; color: #1e6b35; border: 1px solid #b7dfc3; }
.form-error   { background: #fde8e7; color: #9b1b14; border: 1px solid #f5bbb8; }

/* # Services list (home page)
---------------------------------------------------------- */
.services-image {
  float: right;
  margin: 0 0 2.4rem 3.2rem;
  max-width: 320px;
}

.services-list {
  list-style: disc;
  margin-left: 2.4rem;
  margin-bottom: 2.4rem;
}
.services-list li {
  list-style: disc;
  margin-bottom: 0.4rem;
}

/* # Site Footer
---------------------------------------------------------- */
.site-footer {
  background-color: var(--color-white);
  font-size: 1.4rem;
  line-height: 1.5;
  padding: 3.2rem 0;
  text-align: center;
  color: var(--color-dark);
}

.site-footer p { margin-bottom: 0; }
.site-footer a { color: var(--color-dark); }
.site-footer a:hover { color: var(--color-red); }


/* # Responsive
---------------------------------------------------------- */

/* Tablet */
@media (max-width: 960px) {
  .wrap {
    padding-left: var(--content-pad);
    padding-right: var(--content-pad);
  }

  .entry { padding: 4rem; }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3.2rem;
  }
}

/* Mobile */
@media (max-width: 768px) {
  body { font-size: 1.6rem; }

  .logo-link img { width: 220px; }

  /* Show hamburger, hide desktop menu */
  .nav-toggle { display: flex; align-items: center; }

  .nav-primary .wrap {
    flex-wrap: wrap;
    padding-top: 0;
    padding-bottom: 0;
  }

  .genesis-nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-bottom: 1.2rem;
  }
  .genesis-nav-menu.open { display: flex; }

  .genesis-nav-menu li a {
    padding: 1.2rem 0;
    font-size: 1.6rem;
  }
  .genesis-nav-menu li:first-child a { padding-left: 0; }

  .entry { padding: 2.4rem var(--content-pad); }

  .bio-grid {
    grid-template-columns: 1fr;
  }
  .bio-grid img { max-width: 180px; }

  .community-item {
    grid-template-columns: 100px 1fr;
    gap: 1.6rem;
  }

  .services-image {
    float: none;
    margin: 0 0 2.4rem 0;
    max-width: 100%;
  }

  h1 { font-size: 2.8rem; }
  h2 { font-size: 2.4rem; }
}

/* Small mobile */
@media (max-width: 480px) {
  .entry { padding: 2rem 1.6rem; }

  .community-item {
    grid-template-columns: 1fr;
  }
  .community-item img { max-width: 100px; }
}

/* # Print
---------------------------------------------------------- */
@media print {
  .nav-primary, .nav-toggle, .contact-form button { display: none; }
  .entry { padding: 0; box-shadow: none; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
  body { font-size: 12pt; }
}
