/* Base */
body {
  margin: 0;
  color: #656d6d;
  font-family: "Josefin Sans", sans-serif;
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: 0.03em;
}

p {
  font-weight: 300;
}

a {
  color: #fcd088;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  margin: 0px auto;
}

.header-transparent {
  background: transparent;
  transition: background-color .3s ease;
}

.header-transparent.scrolled {
  background: rgba(32, 37, 41, .95);
}

.header-solid {
  background: #202529;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

.logo {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
}

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

.menu a {
  color: #fff;
  font-size: 1rem;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.2s ease;
}

.menu a:hover {
  color: #fcd088;
}

/* Hero */
.hero {
  display: grid;
  min-height: 520px;
  padding-bottom: 70px;
  color: #fff;
  text-align: center;
  background:
    linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)),
    url("../images/site/cropped-canyon.jpg");
  background-position: center;
  background-size: cover;
  place-items: center;
}

.hero-text {
  max-width: 850px;
}

.hero h1 {
  font-size: 3rem;
}

.hero p {
  font-size: 1.4rem;
  line-height: 1.5;
}

/* Sections */
#konsultatsioon,
#kontakt {
  scroll-margin-top: 90px;
}

.intro {
  max-width: 850px;
  margin: 4rem auto;
  padding: 0 1rem;
  text-align: center;
}

.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1100px;
  margin: 4rem auto;
  padding: 0 1rem;
  text-align: center;
}

.service-box i {
  color: #fcd088;
}

/* Contact */
#kontakt {
  padding: 50px 1rem;
  text-align: center;
  background-color: #202529;
}

#kontakt h2 {
  color: #a3aaaa;
}

#kontakt h3 a {
  color: #a3aaaa;
  text-decoration: none;
}

#kontakt h3 a:hover,
.nupud a:hover {
  color: #fcd088;
}

.nupud {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 0;
  padding: 0;
  font-size: 25px;
  list-style: none;
}

.nupud a {
  display: inline-block;
  padding: 0.8rem 1.2rem;
  color: #fcd088;
  text-decoration: none;
}

/* Page layout */
.page-content {
  max-width: 1100px;
  margin: 0px auto 4rem;
  padding: 0 1rem;
}

/* Blog layout */
.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 320px;
  gap: 3rem;
  max-width: 1100px;
  margin: 120px auto 4rem;
  padding: 0 1rem;
}

.blog-posts,
.blog-post {
  min-width: 0;
}

.post-summary {
  margin-bottom: 4rem;
}

.post-summary-body {
  display: grid;
  grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.post-summary-body.no-image {
  grid-template-columns: 1fr;
}

.post-summary-image-link {
  display: block;
}


.post-summary-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.post-summary-text {
  min-width: 0;
}

.post-title {
  margin-bottom: 0.3rem;
}

.post-title a {
  color: #656d6d;
  text-decoration: none;
}

.post-title a:hover {
  color: #fcd088;
}

.post-date {
  margin-top: 0;
  color: #999;
  font-size: 0.95rem;
}

.post-image {
  width: 100%;
  height: auto;
  margin: 1rem 0;
}

.post-excerpt {
  margin-top: 0;
  font-weight: 300;
}

.read-more {
  display: inline-block;
  margin-top: 0.5rem;
  color: #656d6d;
  font-weight: 600;
  text-decoration: none;
}

.read-more:hover {
  color: #fcd088;
}

/* Sidebar */
.sidebar section {
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid #ddd;
}

.sidebar section:last-child {
    border-bottom: none;
}

.sidebar h3 {
  margin-top: 0;
}

.sidebar ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.sidebar li {
  margin-bottom: 0.8rem;
}

.sidebar a {
  color: #656d6d;
  text-decoration: none;
}

.sidebar a:hover {
  color: #fcd088;
}

.latest-posts small {
  color: #999;
}

/* Full post */
.blog-post article {
  max-width: 760px;
}

.page-content img,
.post-content img,
article img {
  max-width: 100%;
  height: auto;
}

.post-content a {
  color: #656d6d;
  font-weight: 600;
}

.post-content a:hover {
  color: #fcd088;
}

.post-content li {
  font-weight: 300;
}

.post-navigation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #ddd;
}

.post-navigation-link {
  color: #656d6d;
  text-decoration: none;
}

.post-navigation-link:hover {
  color: #fcd088;
}

.post-navigation-label,
.post-navigation-title {
  display: block;
}

.post-navigation-label {
  color: #999;
  font-size: 0.9rem;
}

.post-navigation-title {
  margin-top: 0.2rem;
  font-weight: 600;
}

.next-post {
  text-align: right;
}

.page-image {
  display: block;
  max-width: 420px;
  width: 100%;
  height: auto;
  margin: 2rem auto 0.5rem;
}

.content-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 3rem;
    max-width: 1200px;
    margin: 120px auto;
    padding: 0 2rem;
}

.sidebar {
  display: block;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.app-card {
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.app-card img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 1rem;
}

.app-card h3 {
  margin-top: 0;
}

.post-content table {
  width: 100%;
  max-width: 100%;
  margin: 1.5rem 0 1.8rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.post-content th,
.post-content td {
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid #ddd;
  text-align: left;
}

.post-content th {
  color: #202529;
  font-weight: 600;
}

.image-caption {
  margin-top: -0.3rem;
  color: #999;
  font-size: 0.9rem;
  font-style: italic;
}

.post-sources {
  margin-top: 2rem;
  color: #777;
  font-size: 0.88rem;
  line-height: 1.45;
}

.post-source-title {
  margin-bottom: 0.45rem;
}

.post-source-row {
  margin-bottom: 0.35rem;
}

.post-sources a {
  font-weight: 400;
}

/* Responsive */
@media (max-width: 800px) {
  .navbar {
    flex-direction: column;
    gap: 1rem;
  }

  .menu {
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }

  .services,
  .blog-layout,
  .post-summary-body,
  .post-navigation {
    grid-template-columns: 1fr;
  }

  .next-post {
    text-align: left;
  }

  .page-content,
  .blog-layout {
    margin-top: 0px;
  }

  .content-wrapper {
    grid-template-columns: 1fr;
  }

    .app-grid {
    grid-template-columns: 1fr;
  }

}