* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    "Open Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Helvetica,
    Arial,
    sans-serif;
  line-height: 1.6;
  color: #444;
  background: #000;
  font-size: 14px;
  padding: 50px 0;
}

.page-wrapper {
  background: #fff;
  max-width: 1200px;
  margin: 0 auto;
}

.container {
  max-width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
}

a {
  color: #0073aa;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
header {
  background: #fff;
  padding: 20px 40px 0 40px;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.header-left h1 {
  margin-bottom: 5px;
}

.header-left h1 img {
  max-width: 400px;
  height: auto;
}

.header-left h1 a:hover {
  text-decoration: none;
}

.subtitle {
  color: #666;
  font-size: 0.9em;
  margin-left: 0;
}

.social-icons {
  display: flex;
  gap: 6px;
  padding-top: 5px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #b3b3b3;
  color: #fff;
  text-decoration: none;
  border-radius: 3px;
  transition: background 0.2s ease;
}

.social-icons a i {
  font-size: 12px;
}

.social-icons a:hover {
  background: #999;
  text-decoration: none;
}

nav {
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 0;
}

nav a {
  margin-right: 30px;
  color: #666;
  text-transform: uppercase;
  font-size: 0.85em;
  letter-spacing: 0.5px;
  font-weight: 500;
}

nav a.active {
  font-weight: 700;
  color: #333;
}

nav a:hover {
  color: #333;
  text-decoration: none;
}

/* Main content */
main {
  min-height: 60vh;
  background: #fff;
  padding: 30px 40px 40px 40px;
}

/* Two column layout for posts */
.post-layout {
  display: flex;
  gap: 40px;
}

.post-content {
  flex: 1;
  max-width: 750px;
}

/* Sidebar */
.sidebar {
  width: 300px;
  flex-shrink: 0;
}

.sidebar-section {
  margin-bottom: 30px;
}

.sidebar-section h3 {
  font-size: 1em;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  font-weight: 600;
}

.search-widget {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
}

.search-widget input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  font-size: 14px;
}

.search-widget button {
  padding: 8px 15px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  cursor: pointer;
  font-size: 14px;
}

.search-widget button:hover {
  background: #e0e0e0;
}

.recent-posts {
  list-style: none;
  padding: 0;
}

.recent-posts li {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.recent-posts li:last-child {
  border-bottom: none;
}

.recent-posts a {
  color: #444;
  font-size: 0.9em;
}

.recent-posts a:hover {
  color: #0073aa;
}

/* Home content */
.home-content {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 2px solid #e0e0e0;
  line-height: 1.8;
}

.home-content p {
  margin-bottom: 1.5em;
}

.home-content p:last-child {
  margin-bottom: 0;
}

.home-content .swiper-container {
  width: 100%;
  margin-bottom: 30px;
}

.home-content .swiper-wrapper {
  height: 100%;
}

.home-content .swiper-slide {
  height: 100%;
}

/* Posts grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

.post-card {
  background: #fff;
  overflow: hidden;
}

.post-card .featured-image {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f0f0f0;
  margin-bottom: 15px;
  border-radius: 4px;
}

.post-card .featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* border-radius: 4px; */
  transition: transform 0.3s ease;
}

.post-card .featured-image:hover img {
  transform: scale(1.05);
}

.post-card h3 {
  font-size: 1.1em;
  margin-bottom: 10px;
  line-height: 1.3;
}

.post-card h3 a {
  color: #444;
}

.post-card h3 a:hover {
  color: #0073aa;
  text-decoration: none;
}

.post-card .excerpt {
  font-size: 0.9em;
  line-height: 1.6;
  color: #666;
}

/* Posts list (for blog page) */
.posts {
  margin-bottom: 40px;
}

.post-summary {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e0e0e0;
}

.post-summary:last-child {
  border-bottom: none;
}

.post-summary .featured-image {
  display: block;
  margin-bottom: 20px;
}

.post-summary .featured-image img {
  max-width: 300px;
  width: 100%;
  height: auto;
}

/* Ensure all images stay within container */
img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.post-summary h3 {
  margin-bottom: 10px;
  font-size: 1.5em;
}

.post-summary h3 a {
  color: #444;
}

.post-summary h3 a:hover {
  color: #0073aa;
}

.meta {
  font-size: 0.85em;
  color: #999;
  margin-bottom: 10px;
}

.meta time {
  margin-right: 15px;
}

.meta .tags a {
  margin-right: 8px;
  color: #999;
}

.meta .tags a:hover {
  color: #0073aa;
}

/* Single post */
.post h1 {
  margin-bottom: 12px;
  font-size: 1.8em;
  line-height: 1.3;
  font-weight: 400;
}

.post h2 {
  margin-top: 1.8em;
  margin-bottom: 0.8em;
  font-size: 1.4em;
  font-weight: 500;
  line-height: 1.35;
}

.post h3 {
  margin-top: 1.4em;
  margin-bottom: 0.6em;
  font-size: 1.1em;
  font-weight: 500;
  line-height: 1.4;
}

.post h4 {
  margin-top: 1.3em;
  margin-bottom: 0.6em;
  font-size: 1.05em;
  font-weight: 600;
  line-height: 1.4;
}

.post .featured-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 20px 0 30px 0;
}

.post .square-image {
  max-width: 100%;
  height: auto;
  margin: 20px 0 30px 0;
  display: block;
}

.post .meta {
  margin-bottom: 20px;
}

.post .content {
  margin-top: 0;
  line-height: 1.8;
}

.post .content p {
  margin-bottom: 1.5em;
}

.post .content img {
  max-width: 100% !important;
  width: auto;
  height: auto;
  margin: 20px 0;
}

.post .content h2 {
  margin-top: 1.8em;
  margin-bottom: 0.8em;
  font-size: 1.4em;
  font-weight: 500;
  line-height: 1.35;
}

.post .content h3 {
  margin-top: 1.4em;
  margin-bottom: 0.6em;
  font-size: 1.1em;
  font-weight: 500;
  line-height: 1.4;
}

.post .content pre {
  background: #f5f5f5;
  padding: 15px;
  overflow-x: auto;
  margin: 20px 0;
  border-left: 3px solid #0073aa;
}

.post .content code {
  background: #f5f5f5;
  padding: 2px 6px;
  font-size: 0.9em;
  font-family: "Courier New", monospace;
}

.post .content pre code {
  background: none;
  padding: 0;
}

.post .content blockquote {
  border-left: 4px solid #e0e0e0;
  padding-left: 20px;
  margin: 20px 0;
  color: #666;
  font-style: italic;
}

.post .content ul,
.post .content ol {
  margin: 1em 0;
  padding-left: 2.5em;
  list-style-position: outside;
}

.post .content li {
  margin-bottom: 0.5em;
  padding-left: 0;
}

/* Tag cloud */
.tag-cloud {
  line-height: 1;
}

.tag-cloud a {
  display: inline-block;
  margin: 0 8px 2px 0;
  color: #666;
  font-size: 0.9em;
}

.tag-cloud a:hover {
  color: #0073aa;
}

/* Image utility classes */
.post .content img.img-float-right,
img.img-float-right {
  float: right !important;
  margin: 0 0 20px 20px !important;
  max-width: 300px !important;
}

.post .content img.img-float-left,
img.img-float-left {
  float: left !important;
  margin: 0 20px 20px 0 !important;
  max-width: 300px !important;
}

.post .content img.img-center,
img.img-center {
  display: block !important;
  margin: 20px auto !important;
  float: none !important;
}

.post .content img.img-small,
img.img-small {
  max-width: 200px !important;
}

.post .content img.img-medium,
img.img-medium {
  max-width: 400px !important;
}

.post .content img.img-large,
img.img-large {
  max-width: 600px !important;
}

.post .content img.img-full,
img.img-full {
  max-width: 100% !important;
  width: 100% !important;
}

/* Bottom sections for non-post pages */
.bottom-sections {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid #e0e0e0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.bottom-section-left {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.bottom-section h3 {
  font-size: 1em;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  font-weight: 600;
}

/* Pagefind search styling */
.pagefind-ui__search-input {
  height: 36px !important;
  border-radius: 4px !important;
  font-weight: normal !important;
  font-size: 14px !important;
  padding-left: 40px !important;
}

.pagefind-ui__search-clear {
  top: 5px !important;
  font-size: 0 !important;
  width: 24px !important;
  height: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.pagefind-ui__search-clear::after {
  content: "×" !important;
  font-size: 16px !important;
  line-height: 1 !important;
}

.pagefind-ui__drawer {
  top: 8px !important;
}

.pagefind-ui form::before {
  top: 12px !important;
}

.pagefind-ui__result-image img {
  border-radius: 4px !important;
}

.pagefind-ui__result-title,
.pagefind-ui__result-link {
  color: #444 !important;
}

.pagefind-ui__result-title:hover,
.pagefind-ui__result-link:hover {
  color: #0073aa !important;
}

.pagefind-ui__result-excerpt {
  color: #666 !important;
}

.pagefind-ui__message,
.pagefind-ui__button {
  color: #999 !important;
}

.pagefind-ui__button:hover {
  color: #666 !important;
}

/* Footer */
footer {
  background: #fff;
  padding: 30px 40px;
  text-align: center;
  border-top: 1px solid #e0e0e0;
}

footer .container {
  padding: 0;
  color: #999;
  font-size: 0.85em;
  background: transparent;
}

footer a {
  color: #999;
}

footer a:hover {
  color: #333;
}

/* Swiper Slider */
.swiper-container {
  width: 100%;
  margin: 0 0 30px 0;
  position: relative;
  overflow: hidden;
  height: 600px;
  border-radius: 4px;
}

.swiper-wrapper {
  height: 100%;
}

.swiper-slide {
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

.slider-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 15px 20px;
  font-size: 1.1em;
  text-align: center;
}

/* Swiper navigation buttons */
.swiper-button-next,
.swiper-button-prev {
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.swiper-button-next {
  right: 10px;
}

.swiper-button-prev {
  left: 10px;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: rgba(0, 0, 0, 0.8);
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 18px;
}

/* Swiper pagination */
.swiper-pagination-bullet {
  background: #fff;
  opacity: 0.5;
  width: 10px;
  height: 10px;
}

.swiper-pagination-bullet-active {
  opacity: 1;
  background: #0073aa;
}

/* Full-width slider variant */
.swiper-full-width {
  margin-left: -40px;
  margin-right: -40px;
  width: calc(100% + 80px);
}

/* Responsive */
@media (max-width: 968px) {
  .container {
    padding: 0 20px;
  }

  .post-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }

  .bottom-sections {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .header-top {
    flex-direction: column;
    gap: 20px;
  }

  .social-icons {
    align-self: flex-start;
  }

  nav a {
    margin-right: 20px;
    font-size: 0.8em;
  }

  .swiper-slide img {
    max-height: 400px;
  }

  .swiper-button-next {
    right: 5px;
  }

  .swiper-button-prev {
    left: 5px;
  }

  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .header-left h1 img {
    max-width: 280px;
  }

  nav a {
    margin-right: 15px;
    display: inline-block;
    margin-bottom: 5px;
  }

  .posts-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}
