/* = Global reset and base styles = */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a {
  text-decoration: none;
  color: #99D930;
}

a:hover {
  transform: scale(1.04);
  transition: transform 0.2s ease;
}

html,
body {
  font-family: 'Inter', sans-serif;
  color: whitesmoke;
  background-color: #1D211A;
  font-size: 0.8rem;
}

body {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------------------------------- */
/* HEADER */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #161911;
  border-bottom: 1px solid #2B2B2B;
}

.logo,
.logo a,
.logo a:visited {
  font-size: large;
  font-weight: bold;
  color: whitesmoke;
}

.menu-toggle {
  display: block;
  background: none;
  border: none;
  color: whitesmoke;
  font-size: 1.5rem;
  cursor: pointer;
}

.site-nav {
  display: none;
  flex-direction: column;
  justify-content: flex-end;
  text-align: right;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #161911;
  padding: 0 1.8em 1em;
  gap: 0.5rem;
  width: 100%;
  font-size: 1.8rem;
}

.site-nav a {
  color: whitesmoke;
}

/* ---------------------------------- */

/* MAIN */
main {
  padding: 3em 1.5em;
}

/* ---------------------------------- */

/* ===== POSTS ===== */
.featured-post {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  background-image: url(../images/main/feature-post.jpeg);
  background-size: cover;
  background-position: bottom center;
  min-height: 25vh;
}

.featured-text,
.post-text {
  padding: 1rem;
  font-size: small;
}

.featured-text {
  background-color: rgba(22, 25, 17, 0.75);
}

.featured-date,
.featured-summary,
.post-date,
.post-summary {
  font-size: 0.75rem;
}

.featured-text h1,
.post-title {
  font-size: 1.1rem;
  margin: 0.5rem 0;
}

.blog-grid,
.related-container {
  display: grid;
  grid-auto-flow: row dense;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: stretch;
  gap: 4em;
}

#posts-container {
  display: contents;
}

.post-card {
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 10px black;
  transition: transform 0.2s ease;
  background-color: #1D211A;
}

.post-card:hover {
  transform: scale(1.02);
}

.post-card img {
  width: 100%;
  height: 70%;
  max-height: 150px;
  object-fit: cover;
  display: block;
}

/* ---------------------------------- */
/* === TABLET LAYOUT === */
@media (min-width: 500px) {
  body {
    font-size: 0.9rem
  }
}

/* === DESKTOP LAYOUT === */
@media (min-width: 1024px) {
  body {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 1.2rem;
  }

  .menu-toggle {
    display: none;
  }

  .site-nav {
    display: flex !important;
    position: static;
    flex-direction: row;
    gap: 1.5em;
    border: none;
    padding: 0;
    font-size: 1.2rem;
    width: auto;
  }

  .featured-post {
    min-height: 35vh;
  }

  .featured-text,
  .post-text {
    padding: 1rem;
  }

  .featured-date,
  .featured-summary,
  .post-date,
  .post-summary {
    font-size: 1rem;
  }

  .featured-text h1,
  .post-title {
    font-size: 1.5rem;
    margin: 1rem 0;
  }
}
/* ---------------------------------- */
#load-more-btn {
  margin: auto;
  height: 5.5em;
  width: 10em;
  padding: 2rem;
  background-color: #1D211A;
  border: 1px solid whitesmoke;
  border-radius: 4px;
  color: whitesmoke;
  font-size: 1rem;
  font-weight: bold;
  transition: transform 0.2s ease;
  box-shadow: 0 5px 10px #161911;
}

#load-more-btn:hover {
  cursor: pointer;
  transform: scale(1.04);
}

/* === Footer === */
footer {
  margin-top: auto;
  width: 100%;
  max-width: 1300px;
  background: #161911;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

/* === MODAL STYLES === */
.about-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  width: 100%;
  max-width: 1300px;
  height: 100%;
  backdrop-filter: blur(3px);
}

.about-modal-content {
  position: relative;
  background-color: #161911;
  margin: 2% auto;
  padding: 0;
  border: none;
  width: 90%;
  height: 94%;
  border-radius: 5px;
  overflow: hidden;
}

.about-modal-header {
  background: #161911;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #2B2B2B;
}

.about-modal-header h2 {
  margin: 0;
  color: whitesmoke;
  font-size: 1.2rem;
}

.close-about-modal {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-about-modal:hover,
.close-about-modal:focus {
  color: whitesmoke;
}

.about-modal-iframe {
  width: 100%;
  height: calc(100% - 60px);
  border: none;
  background: whitesmoke;
}

@media (max-width: 768px) {
  .modal-content {
    width: 98%;
    height: 95%;
    margin: 1% auto;
  }
  
  .modal-header {
    padding: 0.75rem;
  }
  
  .modal-header h2 {
    font-size: 1rem;
  }
}

/* ---------------------------------- */