*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  margin: 0;
  padding: 0;
  color: #222;
  line-height: 1.7;
  background: #fff;
}

#wrapper {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a { color: #0066cc; }

/* Header image */
.site-header-image {
  line-height: 0;
}

.site-header-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Header */
.site-header {
  border-bottom: 1px solid #ddd;
  padding-bottom: 0;
  margin-bottom: 2rem;
}

.site-header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 1rem 0;
}

.header-title {
  margin-right: 2rem;
}

.home-link {
  text-decoration: none;
  color: inherit;
}

.site-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Navigation */
.main-navigation {
  position: relative;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid #ddd;
  padding: 0.4rem 0.8rem;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
}

.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 0;
}

.nav-menu > li {
  position: relative;
}

.nav-menu > li > a {
  display: block;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  color: #333;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s;
}

.nav-menu > li > a:hover,
.nav-menu > li.current > a {
  color: #0066cc;
}

/* Dropdown submenu */
.has-children > a::after {
  content: ' \25BE';
  font-size: 0.7em;
}

.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #ddd;
  list-style: none;
  padding: 0.25rem 0;
  margin: 0;
  min-width: 220px;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.has-children:hover > .sub-menu {
  display: block;
}

.sub-menu li a {
  display: block;
  padding: 0.4rem 1rem;
  text-decoration: none;
  color: #333;
  font-size: 0.85rem;
  white-space: nowrap;
}

.sub-menu li a:hover {
  background: #f5f5f5;
  color: #0066cc;
}

/* Main content */
.site-main {
  min-height: 50vh;
}

h1 { font-family: 'Montserrat', sans-serif; font-size: 2rem; margin-top: 0; }
h2 { font-family: 'Montserrat', sans-serif; }
time { color: #666; font-size: .9rem; }

.post-list { list-style: none; padding: 0; }
.post-list li { display: flex; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid #eee; }
.post-list .date { color: #888; font-size: .85rem; white-space: nowrap; padding-top: .15rem; }

.featured-image { max-width: 100%; height: auto; margin: 1rem 0; border-radius: 4px; }
.content img { max-width: 100%; height: auto; }

.tags, .categories { margin-top: 1rem; font-size: .9rem; }
.tags a, .categories a { background: #f0f0f0; padding: .2em .6em; border-radius: 3px; text-decoration: none; margin-right: .3rem; }

/* Footer */
.site-footer {
  margin-top: 3rem;
  border-top: 1px solid #ddd;
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.colophon-credits {
  color: #888;
  font-size: 0.85rem;
}

.colophon-credits p {
  margin: 0;
}

.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.footer-menu li a {
  text-decoration: none;
  color: #666;
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
}

.footer-menu li a:hover {
  color: #0066cc;
}

/* Responsive */
@media (max-width: 700px) {
  .site-header-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-title {
    margin-right: 0;
    margin-bottom: 0.5rem;
  }

  .menu-toggle {
    display: block;
    margin-bottom: 0.5rem;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
  }

  .nav-menu.active {
    display: flex;
  }

  .sub-menu {
    position: static;
    border: none;
    box-shadow: none;
    padding-left: 1rem;
  }

  .has-children:hover > .sub-menu {
    display: none;
  }

  .has-children.open > .sub-menu {
    display: block;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-menu {
    flex-direction: column;
  }
}
