* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Merriweather", serif;
}

body {
  background-color: #f9fafb;
  color: #333;
  font-size: 16px;
  line-height: 1.6;
  padding-top: 60px;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.body-container{
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 20px; 
}

/* ========== Navbar Styles ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #f9fafb;
  color: #000;
  padding: 15px 0;
  z-index: 1000;
}

.navbar .container {
  width: 80%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar .navbar-brand{
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand .fa-mug-hot{
  margin-top: -0.4rem;
} 

.navbar .navbar-brand:hover{
  color: #f4511e;
}

.navbar a {
  color: #000;
  font-size: 1.5rem;
  font-weight: 500;
}

.navbar .menu-button {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
}

.navbar ul {
  display: flex;
}

.navbar ul li {
  margin-left: 1.5rem;
}

.navbar ul li a {
  color: #000;
  font-size: 1rem; 
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.navbar ul li a:hover {
  color: #ff7043;
}

/* ========== Index Page Styles ========== */

.index-title{
  font-size: 16vw;
  text-align: center;
  line-height: 0.8;
}

.border-box {
  width: 80%;
  margin: 1.8rem auto;
  border-top: 4px solid #000;
  border-bottom: 2px solid #000;
  padding: 7px;
}

.border-box .top-text{
  text-align: center;
}

.content-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  width: 80%;
  margin: 0 auto;
}

.main-card .card {
  border: none;
  border-radius: 8px;
  overflow: hidden;
}

.main-title{
  font-size: 2rem;
  font-weight: 700;
  margin-top: 1rem;
  line-height: 1.3;
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.card {
  border: 1px solid #ddd;
  overflow: hidden;
  border: none;
  transition: transform 0.3s ease; 
}

.card:hover .main-title{
  color: #f4511e;
}

.card:hover .grid-title{
  color: #f4511e;
}

.card-body img{
  width:100%;
  height: 500px;
  object-fit: cover;
  border-radius: 6px;
}

.cards-grid img{
  height: 150px;
}

.text-muted {
  color: gray;
  font-size: 0.9em;
  margin-top: 1rem;
}

.text-content{
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
  color: #333;
  margin-top: 1rem;
  font-style: italic;
}

.grid-title {
  font-size: 1.1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  margin-top: 0.3rem;
}

.grid-text-muted {
  font-size: 0.7em;
  margin-top: 0.5rem;
  color: gray;
}

/* ========== Post Detail Page Styles ========== */
.detail-container{
  width: 80%;
  margin: 5rem auto;
}

.detail-header{
  border: 1px solid rgba(0,0,0,1);
  padding: 10rem 2rem 2rem;
  width: 80%;
  margin: 1rem auto;
  border-radius: 15px;
}

.detail-header .post-info{
  width: 70%;
}

.detail-header{
  position: relative;
}

.circle-shape {
  width: 240px;
  height: 240px;
  position: absolute;
  top: 1.8rem;
  right: 1.8rem;
  background-color: #f4511e;
  border-radius: 50%;
  z-index: -100;
}

.post-meta{
  margin-top: 2rem;
}

.detail-header h1{
  font-size: 3rem;
  line-height: 1.3;
  margin: 0 auto;
}

.detail-container header p{
  font-size: 1rem;
}

.detail-body{
  width: 60%;
  margin: 0 auto;
}

.detail-body p{
  font-family: "Open Sans", sans-serif;
  font-size: 1.2rem;
  line-height: 1.8em;
  color: #222;
}

.comment-card{
  width: 63%;
  margin: 2rem auto;
  background-color: #f3f4f6;
  padding: 1.2rem;
}

.comment-body {
  line-height: 1.6;
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
}

.comment-body h2{
  color: #f4511e;
  font-size: 1.2rem;
}

.comment-detail .comment-muted{
  color:gray;
  font-size: 0.8rem;
}

.comment-text p{
  font-size: 1rem;
  font-style: italic;
  color: #333;
  margin-top: 0.6rem;
}

.leave-comment{
  width: 63%;
  margin: 0 auto;
  background-color: #f3f4f6;
  padding: 1.2rem;
}

.comment-form h3 {
  color: #f4511e;
  font-size: 1.2rem;
  margin-bottom: 0.7rem;
}

.comment-form textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid #ddd;
  font-size: 1rem;
  margin: 0.7rem auto;
  resize: vertical;
  border-radius: 15px;
}

.comment-form textarea:focus {
  border: 1.5px solid #ff7043;
  outline: none;
}

/* Comment Name & Email Input */
.contact-info{
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.contact-info .form-name,
.contact-info .form-email {
  flex: 1;
  min-height: 2.5rem;
  font-size: 1rem;
}

.contact-info label {
  margin-right: 0.4rem;
}

.contact-info input[type="text"],
.contact-info input[type="email"] {
  width: 100%; 
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
}

.contact-info input[type="text"]:focus,
.contact-info input[type="email"]:focus {
  border-color: #ff7043;
  outline: none;
}

/* Comment Sumbit Button */
.comment-form button {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  background-color: #f4511e;
  color: #fff;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.comment-form button:hover {
  background-color: #ff7043;
}

/* ========== More Articles Page Styles ========== */
.articles-container{
  width: 70%;
  margin: 0 auto;
}

.articles-container h1{
  margin: 4rem auto 1rem;
  font-size: 3rem;
}

.articles-list{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.article-item{
  display: flex;
  justify-content: space-between;
  padding: 2.2rem 1rem 0;
  border-top: 1px solid #999;
  transition: transform 0.3s ease;
}

.article-item:hover .article-left h2{
  color: #f4511e;
}

hr{
  border: none; 
  height: 1px;
  background-color: #999;
  margin-top: 2rem;
}

.article-content{
  color:#333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.article-left{
  width: 70%;
}

.article-left h2{
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.article-right{
  width: 25%;
  height: 150px;
  overflow: hidden;
}

.article-right img{
  width: 100%;            
  height: 100%; 
  object-fit: cover;
}

.article-info{
  color: gray;
  font-size: 0.9em;
  margin-top: 1rem;
}

/* Pagination Functions */
.pagination-container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 2rem;
  margin: 2rem auto;
}

.pagination-button .pagination-link {
  padding: 5px 10px;
  color: black;
  text-decoration: none;
  font-size: 16px;
  display: inline-block;
  transition: all 0.3s;
}

.pagination-button .pagination-link:hover {
  color: #f4511e;
}

.pagination-button .pagination-link.disabled {
  color: #bbb;
  pointer-events: none;
}

.pagination-info {
  text-align: center;
}

.page-input {
  display: flex;
  align-items: center;
  font-size: 16px;
}

.page-input input {
  width: 40px;
  text-align: center;
  font-size: 16px;
  margin-right: 5px;
  border: 1px solid black;
  padding: 4px;
}

.page-input input:focus {
  border: 1.5px solid #ff7043;
  outline: none;
}

/* About Me Area */
.info{
  margin-top: 6rem;
  border-bottom: 4px solid #000;
  border-top: 2px solid #000; 
  padding: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.info-text h3{
  font-size: 1.4rem;
  margin-bottom: 0.9rem;
}

.info-text p{
  font-weight: 400;
  font-size: 0.9rem;
}

.social-links {
  margin-top: 2.6rem;
}

.social-icon {
  display: inline-block;
  margin: 0 5px;
  font-size: 1.5rem;
  color: #333;
  transition: color 0.3s;
}

.social-icon i {
  transition: transform 0.3s ease-in-out;
}

.social-icon:hover i {
  transform: scale(1.1);
  color: #f4511e;
}

footer {
  color: #333;
  text-align: center;
  margin: 5rem auto;
}

footer p {
  font-size: 1rem;
}

/* Media queries for screens smaller than 960px */
@media (max-width: 960px) {
  .navbar ul {
    flex-direction: column;
    display: none;
    gap: 1.5rem;
    background-color: #111;
    width: 100%;
    margin: 0 auto;
    position: absolute;
    top: 70px;
    left: 0;
    padding: 2rem;
    text-align: center;
    text-transform: uppercase;
  }

  .navbar .menu-button {
    display: block;
    margin-top: -0.6rem;
  }

  .navbar .menu-button:hover {
    color: #f4511e;
  }

  .navbar.active ul {
    display: flex;
  }

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

  .navbar ul li {
    margin: 0 1.5rem;
  }
  
  .navbar ul li a {
    color: #fff;
    font-size: 1rem;
    padding: 0.5rem;
    transition: color 0.3s ease;
  }

  .articles-container {
    width: 85%;
  }

  .articles-container h1 {
    font-size: 2.2rem;
    margin-top: 3rem;
    text-align: center;
  }

  .article-item {
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
  }

  .article-left,
  .article-right {
    width: 100%;
  }

  .article-content p{
    font-size: 0.9rem;
  }

  .article-right {
    height: 200px;
    margin-top: 1rem;
  }

  .border-box {
    margin: 0.5rem auto;
  }

  .detail-container, .detail-header, .detail-body, .comment-card, .leave-comment {
    width: 90%;
  }
  
  .circle-shape {
    width: 180px;
    height: 180px;
    top: 1.5rem;
    right: 1.5rem;
  }

  .detail-header h1 {
    font-size: 2.4rem;
  }

  .detail-body p {
    font-size: 1.1rem;
    line-height: 1.6em;
  }

  .post-meta{
    font-size: 0.8rem;
  }

  .comment-body h2, .comment-form h3 {
    font-size: 1.1rem;
  }

  .comment-text p {
    font-size: 0.9rem;
  }

  .contact-info {
    flex-direction: column;
    gap: 0.5rem; 
  }

  .contact-info .form-name,
  .contact-info .form-email {
    min-width: 100%;
    font-size: 0.95rem;
  }

  .contact-info input[type="text"],
  .contact-info input[type="email"] {
    width: 100%;
  }

  .comment-form button {
    font-size: 0.95rem;
    padding: 0.6rem 1.2rem;
  }

  .info{
    flex-direction: column;
    align-items:flex-start;
    margin-top: 4rem;
  }

  .info-text h3{
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
  }

  .social-links {
    margin-top: 0.7rem;
  }

  .social-icon {
    font-size: 1.3rem;
  }
}

/* Media queries for screens smaller than 600px */
@media (max-width: 600px) {
  .border-box .top-text{
    font-size: 0.8rem;
    text-align: center;
  }

  .article-info{
    font-size: 0.7rem;
  }

  .detail-container, .detail-header, .detail-body, .comment-card, .leave-comment {
    width: 95%;
    margin: 1.5rem auto;
  }

  .circle-shape {
    width: 150px;
    height: 150px;
    top: 0.5rem;
    right: 0.5rem;
  }

  .detail-header h1 {
    font-size: 1.8rem;
  }

  .detail-body p {
    font-size: 1rem;
    line-height: 1.5em;
  }

  .post-meta{
    font-size: 0.6rem;
  }

  .comment-body h2, .comment-form h3 {
    font-size: 1rem;
  }

  .comment-text p {
    font-size: 0.85rem;
  }

  .comment-form textarea {
    padding: 0.8rem;
  }

  .info{
    margin-top: 3rem;
    font-size: 1rem;
  }

  .info-text h3{
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
  }

  .info-text p{
    font-size: 0.8rem;
  }

  footer p {
    font-size: 0.875rem;
  }
}
