/* --- Blog page layout --- */
.blog-container {
  margin: 120px auto 40px;
  padding: 0 24px;
  max-width: 1000px;
}

.featured-post .post-image {
  position: relative;
  height: 400px;
  max-width: 700px;
  margin: 20px auto 10px auto;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  overflow: hidden;
}

.post-overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  box-sizing: border-box;
  transition: transform 0.3s ease-in-out;
  overflow: hidden;
}

.post-overlay h2 {
  margin: 0;
  transition: transform 0.3s ease-in-out;
}

.post-overlay p {
  opacity: 0;
  max-height: 0;
  transition: opacity 0.3s ease-in-out, max-height 0.3s ease-in-out;
  overflow: hidden;
}

.post-image:hover .post-overlay h2 {
  transform: translateY(-20px);
}

.post-image:hover .post-overlay p {
  opacity: 1;
  max-height: 100px;
}

.grid-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  max-width: 700px;
  margin: 0 auto;
  gap: 24px;
}

.grid-item {
  position: relative;
  height: 250px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}

.grid-overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  box-sizing: border-box;
  transition: transform 0.3s ease-in-out;
  overflow: hidden;
}

.grid-overlay h3 {
  margin: 0;
  transition: transform 0.3s ease-in-out;
}

.grid-overlay p {
  opacity: 0;
  max-height: 0;
  transition: opacity 0.3s ease-in-out, max-height 0.3s ease-in-out;
  overflow: hidden;
}

.grid-item:hover .grid-overlay h3 {
  transform: translateY(-20px);
}

.grid-item:hover .grid-overlay p {
  opacity: 1;
  max-height: 100px;
}
body {
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    font-family: Roboto, sans-serif;
}

.corner-name {
    position: fixed;
    top: 0;
    left: 15px;
    height: 50px;
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 16px;
    color: #333;
    background-color: transparent;
    z-index: 1001;
}

.corner-name a {
    text-decoration: none;
    color: inherit;
}

.message {
    text-align: left;
    font-size: 48px;
    color: #444;
    font-family: 'Roboto', sans-serif;
    font-weight: bold;
    margin: 0;
    position: relative;
    left: 0px;
}
.submessage {
    text-align: left;
    font-size: 24px;
    color: #007acc;
    font-family: 'Roboto', sans-serif;
    margin: 10px 0 0 0;
    position: relative;
    left: 0px;
}

.top-right-nav {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 50px;
    background-color: #ffffff;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
}

.top-right-nav a {
    margin-left: 20px;
    text-decoration: none;
    color: #444;
    font-weight: bold;
}

.top-right-nav a:hover {
    color: #007acc;
}

section {
    scroll-margin-top: 80px;
    min-height: 10vh;
    padding: 20px 24px 40px 24px;
}

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
}

.section-divider {
    border: none;
    height: 1px;
    background-color: #ccc;
    margin: 40px 0;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.hero {
    height: calc(100vh - 0px);
    padding: 0 10%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    width: 100%;
    justify-content: space-between;
}

.hero-text {
    flex: none;
}

.hero-image {
    width: 320px;
    height: auto;
    justify-self: end;
}

.responsive-image {
  max-width: 100%;
  height: auto;
}

.spacer {
    height: 100px;
}

@media (max-width: 768px) {
    .hero {
        text-align: center;
        padding: 40px 20px;
    }

    .hero-columns {
        grid-template-columns: 1fr;
        display: grid;
        gap: 40px;
        justify-items: center;
        align-items: center;
    }

    .hero-image {
        display: block;
        width: 60%;
        margin: 0 auto;
    }

    .hero-text {
        flex: none;
    }

    .message,
    .submessage {
        text-align: center;
    }
}

.corner-name a:hover {
    color: #007acc;
}

.blog-layout {
  display: flex;
  flex-direction: row;
  max-width: 1000px;
  margin: 120px auto 40px;
  gap: 40px;
  padding: 0 24px;
}

.blog-main {
  flex: 3;
}

.blog-sidebar {
  flex: 1;
  background-color: #ffffff;
  margin-top: 0px;
  padding: 20px;
  border-radius: 8px;
  height: fit-content;
  align-self: flex-start;
  position: relative;
  left: 50px;
}

.blog-sidebar h3 {
  margin-top: 0;
  color: #444;
}

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

.blog-sidebar li {
  margin-bottom: 10px;
}

.category {
  font-style: italic;
  color: #888;
  font-size: 14px;
}
.section-title {
    max-width: 700px;
    margin: 0px auto 20px auto;
    text-align: left;
    font-size: 36px;
    color: #444;
}
.category-filter {
  background: none;
  border: none;
  padding: 5px 0;
  cursor: pointer;
  font: inherit;
  color: #333;
  text-align: left;
  width: 100%;
}
.category-filter.active {
  font-weight: bold;
  color: #007acc;
}
.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .blog-layout {
    display: flex;
    flex-direction: column-reverse;
    margin: 80px 16px 40px;
    padding: 0;
    /* gap property removed */
    overflow-x: hidden; /* safety: prevent horizontal scroll */
  }

  .blog-main {
    width: 100%;
    padding: 0;
    margin: 0;
  }

  .blog-sidebar {
    width: 100%;
    padding: 20px;
    margin: 0;
    position: static; /* reset from relative */
    left: 0;          /* ensure no horizontal offset */
  }

  .grid-posts {
    grid-template-columns: 1fr !important;
  }
}
/* --- Blog post page layout (independent of About Me) --- */
.post-header {
  max-width: 700px;
  margin: 120px auto 0;
  padding: 0 24px;
  display: flex;
  justify-content: center;
}
.post-header img {
  width: 100%;
  max-width: 700px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  max-width: 1000px;
  margin: 40px auto 40px;
  padding: 0 24px;
  gap: 60px;
}
.post-text {
  flex: 1;
  font-size: 18px;
  line-height: 1.6;
  color: #333;
  max-width: 700px;
  margin: 0 auto;
}
.post-container h1 {
  color: #444;
  margin-top: 0;
}

@media (max-width: 768px) {
  .post-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
body {
  margin: 0;
  padding: 0;
  font-family: Roboto, sans-serif;
  background-color: #ffffff;
}
.top-right-nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 50px;
  background-color: #ffffff;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 20px;
  z-index: 1000;
  border-radius: 8px;
}
.corner-name {
  position: fixed;
  top: 0;
  left: 15px;
  height: 50px;
  display: flex;
  align-items: center;
  font-weight: bold;
  font-size: 16px;
  color: #333;
  background-color: transparent;
  z-index: 1001;
}
.about-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  max-width: 1000px;
  margin: 120px auto 40px;
  padding: 0 24px;
  gap: 60px;
}
.about-text {
  flex: 2;
  font-size: 18px;
  line-height: 1.6;
  color: #333;
}
.about-photo {
  flex: 1;
  margin-top: 65px;
}
.about-photo img {
  width: 100%;
  max-width: 300px;
  border-radius: 8px;
}
.about-container h1 {
  color: #444;
  margin-top: 52px; /* 60px arriba */
}
@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .about-photo {
    margin-top: 20px;
  }
}
