/* Blog main page specific styles
 *
 * Paste your /blog/styles.css contents here.
 */
/* Blog Page Specific Styles */

:root {
  --primary-color: #203557;
  --secondary-color: #719976;
  --black-color: #000000;
  --white-color: #ffffff;
  --gray-color: #808080;
  --dark-gray-color: #424242;
  --light-black-color: #212121;
  --light-white-color: #f5f5f5;
  --darker-white-color: #f9f9f9;
  --text-color: #212121;
  --border-color: #e0e0e0;
}

.mobile {
  display: none !important;
}

.desktop {
  display: flex !important;
}

@media (max-width: 768px) {
  .mobile {
    display: flex !important;
  }

  .desktop {
    display: none !important;
  }
}

/* Hero Section */
.blog-hero {
  width: 100%;
  height: 700px;
  max-height: 100svh !important;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;

  padding: 0 !important;
  margin: 0 !important;
  background-color: #f5f5f5;
}

.blog-hero .hero-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-hero .hero-text {
  text-align: center;
  color: var(--white-color);
  width: 100%;
  padding: 2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.blog-hero .hero-text h1 {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  line-height: 1.1;
}

.blog-hero .hero-text h1 .highlight {
  color: var(--secondary-color);
}

.blog-hero .hero-text p {
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.blog-hero .hero-text .separator {
  margin: 0 auto;
  background-color: var(--secondary-color);
  height: 3px;
  width: 100px;
}

.blog-hero .hero-image {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

.blog-hero .hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  opacity: 0.25;
  z-index: 2;
}

/* Blog Content Section */
.blog-content {
  width: 100%;
  padding: 4rem 0;
  background-color: #f8f8f8;
}

.blog-content .container {
  max-width: 1100px !important;
  margin: 0 auto;
  padding: 0 2rem;
}

.blog-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
  width: 100%;
}

/* Safari-specific fixes for blog layout */
@supports (-webkit-touch-callout: none) {
  .blog-layout {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: flex-start;
    width: 100%;
  }

  .main-content {
    flex: 1;
    min-width: 0;
    width: auto;
    max-width: calc(100% - 370px);
  }

  .sidebar {
    width: 350px;
    flex-shrink: 0;
    max-width: 350px;
    min-width: 350px;
  }

  /* Safari-specific blog card fixes */
  .blog-post {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  .main-content {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  .post-content {
    width: 100% !important;
    max-width: 100% !important;
  }

  .post-meta {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Main Content Area */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 0;
  flex: 1;
}

/* Blog Posts */
.blog-post {
  background-color: var(--white-color);
  border: 1px solid #16161607;
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 0rem;
  width: 100%;
  max-width: 100%;
  flex: 1;
}

/* Post Image */
.post-image {
  position: relative;
  width: 100%;
  height: 350px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

.post-image:hover img {
  transform: scale(1.1);
  transition: all 0.3s ease;
}

.sticky-label {
  position: absolute;
  bottom: 0rem;
  left: 0rem;
  background-color: #ffd700;
  color: var(--black-color);
  padding: 1rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Post Gallery */
.post-gallery {
  width: 100%;
  height: 350px;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  position: relative;
}

.gallery-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  transition: all 0.3s ease;
}

.gallery-grid:hover {
  transform: scale(1.1);
  transition: all 0.3s ease;
}

.left-image {
  width: 33.33%;
  height: 100%;
  object-fit: cover;
}

.left-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.middle-images {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: 66.66%;
  height: 100%;
}

.middle-top-images {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 50%;
}

.middle-top-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.middle-bottom-image {
  width: 100%;
  height: 50%;
  object-fit: cover;
}

.middle-bottom-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Post Meta */
.post-meta {
  display: flex;
  align-items: stretch;
  padding: 1rem 1.5rem 0 1.5rem;
  border-top: none;
  border-bottom: none;
  background-color: #fff;
}

.date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--text-color);
  padding: 0.5rem;
  margin-right: 1rem;
  padding-right: 1rem;
  min-width: auto;
  height: auto;
  gap: 0.25rem;

  border-right: 2px solid var(--secondary-color);
}

.date-block .day {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.date-block .month {
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.meta-info-container {
  display: flex;
  flex-direction: column;
  gap: 0rem;
}

.meta-info-container h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0rem;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-info {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--gray-color);
}

.meta-info-container {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 0rem;
}

.meta-info span {
  display: flex;
  align-items: center;
}

.meta-info .date::after,
.meta-info .author::after,
.meta-info .category::after {
  content: "•";
  margin-left: 1rem;
  color: var(--border-color);
}

.meta-info .comments {
  display: none !important;
}

.meta-info .comments::after {
  display: none;
}

/* Post Content */
.post-content {
  padding: 1rem 1.5rem 1.5rem 1.5rem;
}

.post-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.post-content p {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-color);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 6.4em; /* 4 lines × 1.6 line height */
}

.continue-reading {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.continue-reading:hover {
  color: var(--primary-color);
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 0rem;
  position: sticky;
  top: 2rem;
  align-self: flex-start;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  scroll-behavior: smooth;
  width: 350px;
  flex-shrink: 0;
  max-width: 350px;
}

/* Widgets */
.widget {
  background-color: var(--white-color);
  border: 0.01rem solid #1616160c;
  padding: 1.5rem;
}

.widget h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 0.5rem;
}

/* Text Widget */
.text-widget p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-color);
  margin: 0;
  font-weight: 500;
}

/* Recent Works */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.works-grid img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 2px;
  transition: opacity 0.3s ease;
}

.works-grid img:hover {
  opacity: 0.8;
}

/* Recent Comments */
.recent-comments ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recent-comments li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  line-height: 1.4;
}

.recent-comments li:last-child {
  border-bottom: none;
}

.recent-comments .author {
  color: var(--secondary-color);
  font-weight: 500;
}

.recent-comments .post-title {
  color: var(--text-color);
}

/* Tag Cloud */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background-color: #f8f9fa;
  color: var(--text-color);
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 25px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  font-weight: 500;
}

.tag:hover {
  background-color: var(--secondary-color);
  color: var(--white-color);
  border-color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .blog-hero {
    height: 600px;
  }

  .blog-hero .hero-text h1 {
    font-size: 3.5rem;
  }

  .blog-hero .hero-text p {
    font-size: 1.3rem;
  }
}

@media (max-width: 768px) {
  .blog-hero {
    height: 500px;
  }

  .blog-hero .hero-text h1 {
    font-size: 2.5rem;
  }

  .blog-hero .hero-text p {
    font-size: 1.2rem;
  }

  .blog-hero .hero-text .separator {
    width: 80px;
    height: 2px;
  }

  .blog-content {
    padding: 3rem 0;
  }

  .blog-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .blog-content .container {
    padding: 0rem;
    width: 95% !important;
  }

  /* Disable sticky sidebar on mobile */
  .sidebar {
    position: relative;
    max-height: none;
    overflow-y: visible;

    display: flex;
    flex-direction: column;
    gap: 2rem;
    top: 0 !important;

    width: 100%;
    max-width: 100% !important;
    min-width: 100% !important;

    padding-bottom: 1rem;
  }

  .post-image {
    height: 250px;
  }

  .post-gallery {
    height: 180px;
  }

  .post-meta {
    flex-direction: row;
    align-items: stretch;
    gap: 1rem;

    padding: 1rem 1rem 0 1rem;
  }

  .date-block {
    margin-right: 0;
    margin-right: 0rem;
    padding-right: 1rem;
  }

  .meta-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .meta-info-container {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 0.5rem;
  }

  .meta-info .date::after,
  .meta-info .author::after,
  .meta-info .category::after {
    display: none;
  }

  .post-content h2 {
    font-size: 1.2rem;
  }

  .widget.tag-cloud {
    width: auto;
    padding: 2rem 1rem;
  }

  .widget.recent-works {
    width: auto;
    margin-bottom: 0rem;
  }

  .works-grid {
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .blog-hero {
    height: 400px;
  }

  .blog-hero .hero-text {
    padding: 1rem;
  }

  .blog-hero .hero-text h1 {
    font-size: 2rem;
  }

  .blog-hero .hero-text p {
    font-size: 1rem;
  }

  .blog-hero .hero-text .separator {
    width: 60px;
    height: 2px;
  }

  .blog-content {
    padding: 0;
    padding-bottom: 0;
  }

  .blog-content .container {
    width: 100% !important;
  }

  .main-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .post-image {
    height: 250px;
  }

  .post-gallery {
    height: 250px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
  }

  .post-content {
    padding: 1rem;
  }

  .meta-info-container h2 {
    font-size: 1.2rem;
  }

  .post-content p {
    font-size: 0.9rem;
  }

  .widget {
    padding: 1rem;
  }

  .works-grid {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
  }

  .works-grid img {
    height: 120px;
    width: 100%;
  }
}

