/* === Base Settings ============================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #2c3e50;
  background: #ffffff;
}

/* === Header & Navigation ===================================================== */
header {
  padding: 1.5rem 0;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #f0f0f0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border: 2px solid transparent;
  border-radius: 12px;
  position: relative;
  background: linear-gradient(#ffffff, #ffffff) padding-box,
              linear-gradient(135deg, #3498db, #2ecc71, #e74c3c, #f39c12) border-box;
  border: 2px solid transparent;
}

.logo:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.header-contact {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.header-contact a {
  color: #2c3e50;
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: #ffffff;
}

.header-contact a:hover {
  border-color: #3498db;
  color: #3498db;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

#top_menus {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
}

#top_menus .nav-link {
  text-decoration: none;
  font-weight: 500;
  color: #2c3e50;
  padding: 0.6rem 1.2rem;
  border: 2px solid transparent;
  border-radius: 10px;
  transition: all 0.3s ease;
  background: #ffffff;
  position: relative;
}

#top_menus .nav-link::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 10px;
  padding: 2px;
  background: linear-gradient(135deg, #3498db 0%, #2ecc71 50%, #e74c3c 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#top_menus .nav-link:hover,
#top_menus .nav-link:focus {
  color: #3498db;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.1);
}

#top_menus .nav-link:hover::before {
  opacity: 1;
}

#top_menus .current-menu-item .nav-link,
#top_menus .current_page_item .nav-link,
#top_menus .current_page_parent .nav-link {
  border: 2px solid #3498db;
  color: #3498db;
  background: rgba(52, 152, 219, 0.03);
}


/* === Post List ================================================ */
.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 1rem;
}

/* === Post Card ============================================== */
.post-item {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  border: 1px solid #e8e8e8;
}

.post-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  border-color: #3498db;
}

/* Featured Image */
.post-featured-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

/* Title */
.post-item h3 {
  font-size: 1.25rem;
  margin: 1.5rem 1.5rem 1rem;
  line-height: 1.4;
}

.post-item h3 a {
  color: #2c3e50;
  text-decoration: none;
  transition: color 0.3s ease;
}

.post-item h3 a:hover {
  color: #3498db;
}

/* Excerpt */
.post-item p {
  margin: 0 1.5rem 1.5rem;
  color: #7f8c8d;
  flex: 1 0 auto;
}

/* Read More Link */
.post-item > a:last-of-type {
  align-self: flex-start;
  margin: 0 1.5rem 1.5rem;
  background: transparent;
  color: #3498db;
  text-decoration: none;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  border-bottom: 2px solid #3498db;
  transition: all 0.3s ease;
}

.post-item > a:last-of-type:hover {
  border-bottom-width: 3px;
  padding-left: 5px;
  color: #2980b9;
}

/* === Pagination ===================================================== */
nav.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  font-weight: 500;
}

.page-numbers {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  text-decoration: none;
  color: #2c3e50;
  background: #ffffff;
  transition: all 0.3s ease;
}

.page-numbers.current,
.page-numbers:hover {
  background: #3498db;
  color: #ffffff;
  border-color: #3498db;
}

.next.page-numbers,
.prev.page-numbers {
  border-color: #3498db;
  color: #3498db;
  background: #ffffff;
}

.next.page-numbers:hover,
.prev.page-numbers:hover {
  background: #3498db;
  color: #ffffff;
  border-color: #3498db;
}

/* === Breadcrumbs ================================== */
.breadcrumbs {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding: 0 1rem;
  font-size: 0.875rem;
  color: #7f8c8d;
}

.breadcrumbs a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumbs a:hover {
  color: #2980b9;
  text-decoration: underline;
}

.breadcrumbs span {
  color: #7f8c8d;
}

/* === Page Content =========================================== */
.page-content {
  max-width: 800px;
  margin: 2rem auto 4rem;
  padding: 0 1rem 2rem;
  background: transparent;
}

/* Featured Image */
.page-content .post-featured-image img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  margin-bottom: 2rem;
  border: 1px solid #e8e8e8;
}

/* Page Title */
.page-content h1 {
  font-size: 2.5rem;
  margin: 1.5rem 0 2rem;
  line-height: 1.3;
  color: #2c3e50;
}

/* Page Content */
.page-content .content {
  color: #2c3e50;
}

.page-content .content p {
  margin-bottom: 1.5rem;
}

.page-content .content h2 {
  margin: 2rem 0 1rem;
  font-size: 1.75rem;
  color: #2c3e50;
}

.page-content .content h3 {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.5rem;
  color: #2c3e50;
}

.page-content .content ul,
.page-content .content ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

.page-content .content li {
  margin-bottom: 0.5rem;
}

.page-content .content img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  margin: 1.5rem 0;
  border: 1px solid #e8e8e8;
}

/* === Footer ================================================ */
footer {
  background: #f8f9fa;
  color: #2c3e50;
  padding: 4rem 0 2rem;
  border-top: 1px solid #e0e0e0;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-column h4 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: #2c3e50;
}

.footer-column p {
  color: #7f8c8d;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.footer-menu {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  list-style: none;
}

.footer-menu a {
  color: #7f8c8d;
  text-decoration: none;
  transition: all 0.3s ease;
  padding-left: 0;
}

.footer-menu a:hover {
  color: #3498db;
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
  color: #7f8c8d;
  font-size: 0.875rem;
}

.footer-bottom a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-bottom a:hover {
  color: #2980b9;
}

/* === Contact Info ============================================= */
.contact-info {
  margin-top: 1rem;
}

.contact-info p {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #7f8c8d;
}

/* === Recommended Articles Section ============================= */
.recommended-articles {
  background: #f8f9fa;
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #2c3e50;
}

.section-header p {
  color: #7f8c8d;
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* === 404 Page ================================================= */
.error-404 {
  text-align: center;
  padding: 4rem 0;
}

.error-404 h1 {
  font-size: 6rem;
  margin-bottom: 1rem;
  color: #3498db;
}

.error-404 h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #2c3e50;
}

.error-404 p {
  margin-bottom: 2rem;
  color: #7f8c8d;
}

/* === Responsive Design ======================================== */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .header-left {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }
  
  .header-contact {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }
  
  .header-contact a {
    width: 100%;
    text-align: center;
  }
  
  #top_menus {
    margin-top: 1rem;
  }
  
  .post-list {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  #top_menus {
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .logo {
    font-size: 1.3rem;
    padding: 0.4rem 0.8rem;
  }
  
  .header-contact a {
    font-size: 0.85rem;
    padding: 0.35rem 0.6rem;
  }
  
  .post-item h3 {
    font-size: 1.1rem;
    margin: 1rem 1rem 0.75rem;
  }
  
  .post-item p {
    margin: 0 1rem 1rem;
  }
  
  .post-item > a:last-of-type {
    margin: 0 1rem 1rem;
  }
  
  .page-content h1 {
    font-size: 1.75rem;
  }
  
  .section-header h2 {
    font-size: 1.75rem;
  }
  
  .section-header p {
    font-size: 1rem;
  }
}
