/* Hugo-specific overrides for Baskerville 2 theme */

/* Background color matching WordPress custom-background */
body.custom-background {
  background-color: #353432;
}

/* Navigation wrapper */
.navigation {
  background-color: #1d1d1d;
}

/* Ensure content/sidebar layout on homepage */
body.home .content {
  width: 67.5%;
}

/* Single post content width */
body.single .content {
  width: 67.5%;
}

/* Post entry styling for list pages */
.post-entry .post-title a {
  color: #2b3542;
  font-family: "Roboto Slab", sans-serif;
  font-weight: 700;
}

.post-entry .post-title a:hover {
  color: #13c4a5;
}

.more-link {
  color: #13c4a5;
  font-size: 0.9em;
}

/* Sidebar widget spacing */
.sidebar .widget-content ul {
  list-style: none;
}

.sidebar .widget-content ul li {
  line-height: 130%;
  margin-top: 10px;
  padding: 1px 0 1px 0;
}

.sidebar .widget-content ul li:first-child {
  margin-top: 0;
}

.sidebar .widget-content ul li a {
  color: #13c4a5;
}

/* Search form in sidebar */
.sidebar .search-form {
  display: flex;
}

.sidebar .search-field {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  font-family: Roboto, sans-serif;
  font-size: 0.9em;
}

.sidebar .search-submit {
  padding: 8px 16px;
  background: #1d1d1d;
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: Roboto, sans-serif;
}

/* Tag cloud */
.tagcloud a {
  display: inline-block;
  padding: 3px 8px;
  margin: 2px;
  background: #f1f1f1;
  color: #666 !important;
  border-radius: 3px;
  text-decoration: none;
  line-height: 1.6;
}

.tagcloud a:hover {
  background: #13c4a5;
  color: #fff !important;
}

/* Comments area */
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Post content - ensure images display properly */
.post-content img {
  max-width: 100%;
  height: auto;
}

.post-content .wp-block-image {
  text-align: center;
  margin: 1em 0;
}

.post-content figure {
  margin: 1em 0;
}

.post-content figcaption {
  color: #999;
  font-size: 0.85em;
  text-align: center;
  margin-top: 8px;
}

/* Post content paragraphs and lists */
.post-content p,
.post-content ul {
  line-height: 180%;
  margin-bottom: 1.1em;
}

.post-content h1, .post-content h2, .post-content h3 {
  color: #333;
  font-family: "Roboto Slab", sans-serif;
  font-weight: 700;
  margin: 40px 0 20px;
}

.post-content h2 { font-size: 1.75em; }
.post-content h3 { font-size: 1.5em; }

/* Search toggle in navigation */
.nav-search {
  float: right;
}

.search-toggle {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 10px;
}

.search-toggle .svg-icon {
  fill: #fff;
}

.search-toggle:hover .svg-icon {
  fill: #13c4a5;
}

/* Fix: ensure navigation displays properly on desktop */
@media only screen and (min-width: 1001px) {
  .main-navigation {
    display: block !important;
  }
}

/* Fix: mobile navigation stacks vertically */
@media (max-width: 1000px) {
  .sidebar,
  body.single .content,
  body.home .content {
    float: none;
    width: 100%;
  }
  .sidebar {
    margin-top: 4%;
  }
  .main-navigation {
    display: none;
  }
  .main-navigation ul li {
    float: none;
    border-top: 1px solid rgba(255,255,255,.1);
  }
  .main-navigation ul li:first-child {
    border-top: none;
  }
  .main-navigation li > a {
    font-family: Roboto, sans-serif;
    font-size: 1em;
    font-weight: 400;
    padding: 25px 5%;
  }
  .main-navigation ul ul {
    position: static;
    opacity: 1;
    left: auto;
    display: none;
    padding-top: 0;
  }
  .main-navigation ul ul li {
    width: auto;
    border-top: 1px solid rgba(255,255,255,.1);
  }
  .main-navigation ul ul a {
    padding-left: 10%;
    text-align: left;
  }
  .main-navigation ul ul ul a {
    padding-left: 15%;
  }
  .main-navigation ul li,
  .main-navigation ul ul li,
  .main-navigation ul ul ul li {
    background-color: transparent;
  }
  .main-navigation ul li > ul:before {
    display: none;
  }
  .main-navigation .menu-item-has-children > a::after,
  .main-navigation ul ul > .menu-item-has-children::after {
    display: none;
  }
  .nav-toggle {
    display: inline-block;
  }
}

/* Pagination on list pages */
.archive-nav a {
  color: #13c4a5;
  font-family: "Roboto Slab", sans-serif;
  font-weight: 700;
}

/* Taxonomy pages */
.taxonomy-list {
  list-style: none;
  padding: 0;
}

.taxonomy-list li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.taxonomy-list li a {
  color: #2b3542;
  font-family: "Roboto Slab", sans-serif;
}

/* Responsive images in imported WordPress content */
.wp-block-image img,
.post-content .size-large,
.post-content .size-full,
.post-content .size-medium {
  max-width: 100%;
  height: auto;
}

/* Audio/video embeds */
.post-content audio,
.post-content video,
.post-content iframe {
  max-width: 100%;
}

/* Blockquotes */
.post-content blockquote {
  border-left: 4px solid #13c4a5;
  margin: 1.5em 0;
  padding: 0.5em 1.5em;
  color: #666;
  font-style: italic;
}
