:root {
  --primary-color: #a02c2c;
  --text-dark: #333333;
  --text-light: #6c757d;
  --border-color: #dee2e6;
  --bg-light: #f8f9fa;
}

.single-header {
  text-align: left;
  color: white;
}

.post-meta-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.post-categories {
  display: flex;
  gap: 0.5rem;
}

.post-category-badge {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

/* Post Date Header - Content Area */
.post-date-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 0;
  flex-wrap: wrap;
  gap: 1rem;
}

.post-date-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-light);
  padding: 0.75rem 1rem;
  border-radius: 5px;
  color: var(--text-light);
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
}

.post-date-info i {
  color: var(--primary-color);
}

.single-main {
  padding: 4rem 0;
}

.back-section {
  margin-bottom: 2rem;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  transition: all 0.3s ease;
}

.back-button:hover {
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Content wrapper with image */
.content-with-image {
  margin-bottom: 3rem;
}

/* Featured image float - ensures content wraps around */
.featured-image-float {
  float: left;
  margin: 0 1.5rem 1rem 0;
  max-width: 350px;
  width: 100%;
  shape-outside: margin-box; /* Modern CSS for better text wrapping */
}

.featured-image-wrapper {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.featured-image-wrapper:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.featured-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  margin: 0;
}

.featured-image-caption {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
  background: var(--bg-light);
  border-top: 1px solid var(--border-color);
  text-align: center;
}

/* Clear fix */
.clearfix {
  clear: both;
}

.single-content {
  line-height: 1.8;
  font-size: 1.1rem;
  max-width: none;
  text-align: justify; /* Better text flow around image */
}

.single-content h1,
.single-content h2,
.single-content h3,
.single-content h4 {
  color: var(--text-dark);
  margin: 2rem 0 1rem;
  clear: none; /* Allow headings to wrap around floated image */
}

/* Ensure all content elements flow around the image properly */
.single-content p,
.single-content ul,
.single-content ol,
.single-content blockquote {
  clear: none; /* Allow elements to wrap around floated image */
}

.single-content h2 {
  font-size: 1.5rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.single-content h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
}

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

.single-content ul,
.single-content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.single-content li {
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.single-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-light);
  background: var(--bg-light);
  border-radius: 5px;
}

.single-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}

.pdf-section {
  margin-bottom: 3rem;
}

.pdf-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pdf-title i {
  color: #dc3545;
  font-size: 1.2rem;
}

.pdf-grid {
  display: grid;
  gap: 1rem;
}

.pdf-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: white;
  border: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--text-dark);
  transition: all 0.3s ease;
  border-radius: 5px;
}

.pdf-item:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--primary-color);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.pdf-icon {
  font-size: 1.5rem;
  color: #dc3545;
  margin-right: 1rem;
  width: 60px;
  text-align: center;
  flex-shrink: 0;
}

.pdf-info {
  flex: 1;
}

.pdf-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.pdf-size {
  font-size: 0.8rem;
  color: var(--text-light);
}

.pdf-download {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-left: 1rem;
}

.gallery-section {
  margin-bottom: 3rem;
}

.gallery-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gallery-title i {
  color: var(--primary-color);
  font-size: 1.2rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  aspect-ratio: 4/3;
  border: 1px solid var(--border-color);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-overlay i {
  color: white;
  font-size: 1.5rem;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
  position: relative;
  margin: auto;
  padding: 20px;
  width: 90%;
  max-width: 1200px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: #ccc;
}

.modal-prev,
.modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  font-size: 18px;
  font-weight: bold;
  padding: 16px 23px;
  cursor: pointer;
  transition: background 0.3s ease;
  z-index: 10001;
  border-radius: 50%;
}

.modal-prev {
  left: 20px;
}

.modal-next {
  right: 20px;
}

.modal-prev:hover,
.modal-next:hover {
  background: rgba(255, 255, 255, 0.4);
}

#modalImage {
  width: 85%;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
}

.modal-caption {
  color: #ccc;
  text-align: center;
  margin-top: 1rem;
  font-size: 1rem;
  max-width: 80%;
}

@media (max-width: 768px) {
  .post-meta-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .single-main {
    padding: 2rem 0;
  }

  .single-content {
    font-size: 1rem;
  }

  /* Mobile: Featured image full width, no float */
  .featured-image-float {
    float: none;
    margin: 0 0 1.5rem 0;
    max-width: 100%;
  }

  .featured-image-wrapper {
    margin-bottom: 1rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .pdf-item {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem;
  }

  .pdf-icon {
    margin-right: 0;
    margin-bottom: 1rem;
    width: auto;
  }

  .pdf-download {
    margin-left: 0;
    margin-top: 1rem;
  }

  .post-date-header {
    justify-content: center;
    padding: 0;
  }

  .post-date-info {
    font-size: 0.85rem;
    padding: 0.6rem 0.8rem;
  }
}

/* ========================================
   SOCIAL SHARE BUTTON STYLES
   ======================================== */

/* Main Share Button */
.social-share-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(160, 44, 44, 0.2);
}

.social-share-btn:hover {
  background: #8a2525;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(160, 44, 44, 0.3);
}

.social-share-btn i {
  font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .social-share-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }

  .social-share-btn span {
    display: none;
  }
}

/* ============================================= */
/* YENİ - SOL SÜTUN GALERİ DÜZENİ */
/* ============================================= */

/* Sol sütundaki galeri bloğu */
.post-gallery-wrapper {
  padding: 1rem;
  margin-bottom: 2rem;
}

/* Sol sütunun üste yapışması (scroll ederken) */
@media (min-width: 992px) {
  .post-gallery-wrapper.sticky-top {
    top: 100px;
    z-index: 100; /* Navbar'dan düşük (navbar genellikle 1000+) */
  }
}

/* Galeri Başlığı (Mevcut .gallery-title'ı eziyoruz) */
.post-gallery-wrapper .gallery-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color, #a02c2c);
}
.post-gallery-wrapper .gallery-title i {
  color: var(--primary-color, #a02c2c);
}

/* Ana galeri görseli (büyük olan) */
.main-gallery-image-new {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 6px;
  margin-bottom: 10px;
  border: 1px solid var(--border-color, #dee2e6);
}

.main-gallery-image-new img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/10; /* Görsel oranını koru */
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* Ana görselin üstündeki overlay (mevcut stili kullanır) */
.main-gallery-image-new .gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.main-gallery-image-new:hover .gallery-overlay {
  opacity: 1;
}

.main-gallery-image-new:hover img {
  transform: scale(1.05);
}

/* Küçük resim ızgarası ("Slide" yerine)
   Yatay kaydırılabilir bir alan oluşturur.
*/
.thumbnail-gallery-grid-new {
  display: grid;
  /* 5 sütunlu bir ızgara, gerekirse taşar */
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  overflow-x: auto; /* Yatayda taşarsa scroll bar çıkar */
  padding: 5px;
}

/* Yatay scroll bar'ı güzelleştirme (opsiyonel) */
.thumbnail-gallery-grid-new::-webkit-scrollbar {
  height: 6px;
}
.thumbnail-gallery-grid-new::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}
.thumbnail-gallery-grid-new::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}
.thumbnail-gallery-grid-new::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* Küçük resimler */
.thumbnail-item-new {
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s ease;
  height: 70px; /* Sabit yükseklik */
}

.thumbnail-item-new img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumbnail-item-new:hover {
  border-color: var(--primary-color, #a02c2c);
}

/* Mobil Cihazlar (LG altında)
   Galeriyi içeriğin ÜSTÜNE alıyoruz (order-lg-1/2 kalkar)
*/
@media (max-width: 991.98px) {
  .post-gallery-wrapper {
    margin-bottom: 2rem;
    /* Mobil için top değerini sıfırla */
    top: 0;
  }

  .thumbnail-gallery-grid-new {
    /* Mobilde 4 sütun göster */
    grid-template-columns: repeat(4, 1fr);
  }
}
