/* WordPress layout: menus, generic pages, posts, comments, search. */

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
.skip-link:focus {
  clip: auto;
  width: auto;
  height: auto;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 12px 18px;
  background: #fff;
}
.admin-bar .header {
  top: 32px;
}
.custom-logo,
.brand img {
  object-fit: contain;
}

/* Header menu */
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav .menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 25px;
}
.site-nav li {
  position: relative;
}
.site-nav a {
  display: block;
}
.site-nav .menu > .current-menu-item > a,
.site-nav .menu > .current-menu-ancestor > a,
.site-nav .menu > .current_page_parent > a {
  border-bottom: 2px solid var(--amber);
  padding-bottom: 5px;
}
.site-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: -18px;
  margin-top: 18px;
  min-width: 240px;
  padding: 10px 0;
  background: #fff;
  border: 1px solid #ececec;
  box-shadow: 0 16px 34px #24242422;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.22s, transform 0.22s, visibility 0.22s;
  z-index: 30;
}
/* Keeps the dropdown open while the pointer crosses the gap. */
.site-nav .sub-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 20px;
}
.site-nav li:hover > .sub-menu,
.site-nav li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.site-nav .sub-menu a {
  padding: 9px 18px;
  font-weight: 500;
}
.site-nav .sub-menu a:hover,
.site-nav .sub-menu .current-menu-item > a {
  background: #f5f5f5;
}
.site-nav .sub-menu .sub-menu {
  top: -11px;
  left: 100%;
  margin-top: 0;
}
.site-nav .sub-menu .sub-menu::before {
  display: none;
}

/* Footer extras */
footer .social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Generic pages and posts */
.page-header {
  background: var(--navy);
  color: #fff;
  padding: 70px 0;
}
.page-header h1 {
  font-size: clamp(42px, 6vw, 72px);
  margin-bottom: 0;
  overflow-wrap: break-word;
}
.page-header-meta {
  color: #cccccc;
  margin: 18px 0 0;
}
.page-header-meta a {
  color: #fff;
  text-decoration: underline;
}
.wrap.entry-wrap {
  max-width: 880px;
  padding-top: 60px;
  padding-bottom: 80px;
}
.entry-content {
  font-size: 17px;
  line-height: 1.75;
  overflow-wrap: break-word;
}
.entry-content::after {
  content: "";
  display: block;
  clear: both;
}
.entry-content a,
.comments-area a {
  text-decoration: underline;
}
.entry-content .wp-block-button__link,
.entry-content .btn {
  text-decoration: none;
}
.entry-content img,
.entry-thumbnail img {
  max-width: 100%;
  width: auto;
  height: auto;
}
.entry-content figure {
  margin: 0 0 24px;
  max-width: 100%;
}
.entry-content iframe {
  max-width: 100%;
}
.entry-content table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
}
.entry-content td,
.entry-content th {
  border: 1px solid #ddd;
  padding: 8px 12px;
}
.entry-content blockquote {
  margin: 24px 0;
  padding-left: 22px;
  border-left: 3px solid var(--amber);
}
.entry-thumbnail {
  margin: 0 0 36px;
}
.alignleft {
  float: left;
  margin: 0 24px 16px 0;
}
.alignright {
  float: right;
  margin: 0 0 16px 24px;
}
.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.wp-caption {
  max-width: 100%;
}
.wp-caption-text {
  font-size: 13px;
  color: var(--gray);
}
.entry-tags {
  font-size: 14px;
}
.post-navigation .nav-links {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e7e7e7;
  font-weight: 700;
}

/* Blog details page headings */
.single-post .page-header h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 600;
  line-height: 1.1;
}
.single-post .entry-content :is(h1, h2, h3, h4, h5, h6),
.single-post .comments-area :is(h2, h3) {
  margin: 32px 0 14px;
  font-weight: 600;
  line-height: 1.2;
}
.single-post .entry-content :is(h1, h2, h3, h4, h5, h6) :is(strong, b) {
  font-weight: inherit;
}
.single-post .entry-content > :first-child {
  margin-top: 0;
}
.single-post .entry-content h1 {
  font-size: clamp(30px, 3.4vw, 40px);
}
.single-post .entry-content h2,
.single-post .comments-area h2 {
  font-size: clamp(26px, 3vw, 34px);
}
.single-post .entry-content h3,
.single-post .comments-area h3 {
  font-size: clamp(22px, 2.4vw, 26px);
}
.single-post .entry-content h4 {
  font-size: 20px;
}
.single-post .entry-content :is(h5, h6) {
  font-size: 18px;
}

/* Blog pagination from the_posts_pagination() */
.blogs-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.blogs-pagination .current {
  background: var(--navy);
  color: #fff;
}

/* Search and comments (override the estimate form styling) */
form.search-form,
.comments-area form {
  background: none;
  padding: 0;
  border: 0;
}
form.search-form {
  display: flex;
  gap: 10px;
  margin-bottom: 36px;
}
form.search-form label {
  flex: 1;
}
form.search-form input {
  margin: 0;
  height: 100%;
}
form.search-form .btn {
  width: auto;
  margin: 0;
}
.comments-area {
  margin-top: 60px;
}
.comment-list,
.comment-list ol {
  list-style: none;
  padding: 0;
}
.comment-list .children {
  padding-left: 24px;
}
.comment-body {
  padding: 20px 0;
  border-bottom: 1px solid #e7e7e7;
}
.comment-author img {
  width: 48px;
  height: 48px;
  margin-right: 10px;
  vertical-align: middle;
  border-radius: 50%;
}
.comment-form input[type="checkbox"] {
  width: auto;
}
.comment-form input[type="submit"] {
  width: auto;
  padding: 14px 24px;
  background: var(--navy);
  color: #fff;
  border: 0;
  font-weight: 700;
  cursor: pointer;
}

/* Header collapses to the toggle before the menu gets crowded. */
@media (max-width: 900px) {
  .mobile-toggle {
    display: block;
    background: none;
    border: 1px solid #d9d9d9;
    padding: 9px 12px;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding: 25px;
    background: #fff;
    box-shadow: 0 8px 10px #0001;
  }
  .site-nav.open {
    display: block;
  }
  .site-nav .menu {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }
  .site-nav .sub-menu,
  .site-nav .sub-menu .sub-menu {
    position: static;
    min-width: 0;
    margin: 6px 0 0;
    padding: 0 0 0 16px;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .site-nav .sub-menu::before {
    display: none;
  }
  .site-nav .sub-menu a {
    padding: 8px 0;
  }
  .site-nav .menu > .current-menu-item > a,
  .site-nav .menu > .current-menu-ancestor > a,
  .site-nav .menu > .current_page_parent > a {
    align-self: start;
    display: inline-block;
  }
}
@media (max-width: 782px) {
  .admin-bar .header {
    top: 46px;
  }
}
@media (max-width: 680px) {
  .wrap.entry-wrap {
    padding-top: 40px;
    padding-bottom: 55px;
  }
  .alignleft,
  .alignright {
    float: none;
    margin: 0 0 16px;
  }
}
@media (max-width: 600px) {
  .admin-bar .header {
    top: 0;
  }
}
