/* Custom overrides and typography for Kadir Karaman site */

:root {
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-desc: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-accent: 'Playfair Display', Georgia, serif;
  --color-gold: #ffc013;
  --color-gold-hover: #e5a800;
  --color-bg-dark: #1e232a;
  --color-card-bg: #252b34;
}

/* 0. Fullwidth Container & Body resets */
html, body {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
}

#Wrapper {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

#Content {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

#Footer {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  background-size: cover !important;
  background-position: center top !important;
}

.section.mcb-section {
  width: 100% !important;
  max-width: 100% !important;
  background-size: cover !important;
}

/* 1. Global Typography Pairing */
body,
p,
.desc,
.subtitle,
.post-excerpt,
.column_attr,
.entry-content,
.post-content-body,
.big,
input,
textarea,
select,
button {
  font-family: var(--font-body) !important;
}

h1,
h2,
h3,
h4,
.title,
.intro-title,
.entry-title,
.post-title,
#Subheader .title,
.fancy_heading .title {
  font-family: var(--font-heading) !important;
  font-weight: 400;
}

#menu > ul > li > a {
  font-family: var(--font-body) !important;
  font-size: 15px;
  letter-spacing: 0.3px;
}

/* 2. Dropcap (Süslü Baş Harf) - No clipping, full visibility, consistent Playfair Display Italic */
.dropcap.transparent,
span.dropcap.transparent,
.dropcap {
  background-color: transparent !important;
  background: none !important;
  color: var(--color-gold) !important;
  font-family: var(--font-heading) !important;
  font-style: italic !important;
  font-weight: 600 !important;
  font-size: 85px !important;
  line-height: 70px !important;
  height: auto !important;
  min-height: 70px !important;
  width: auto !important;
  min-width: 50px !important;
  float: left !important;
  margin-right: 18px !important;
  margin-top: 0 !important;
  margin-bottom: 5px !important;
  padding: 8px 12px 12px 6px !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  border-radius: 0 !important;
  display: inline-block !important;
  box-shadow: none !important;
  border: none !important;
  text-align: center !important;
}

/* Ensure text inside paragraph or legacy heading containing dropcap follows body font */
.column_attr h6,
.column_attr h5,
.post-content-body h5,
.post-content-body h6 {
  font-family: var(--font-body) !important;
  font-size: 15px !important;
  line-height: 1.85 !important;
  font-weight: 400 !important;
  color: inherit !important;
}

/* 3. Header & Navigation - Remove stray border lines */
#Top_bar .menu > li > a span,
#Top_bar .menu > li > a span:not(.description) {
  border: none !important;
  border-right: none !important;
  border-left: none !important;
  box-shadow: none !important;
}

#Header_wrapper {
  background-color: #18202a;
  position: relative;
  z-index: 1000;
  width: 100% !important;
  max-width: 100% !important;
}

/* 4. SubHeader & Breadcrumbs */
#Subheader {
  padding: 140px 0 90px !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: cover !important;
  text-align: center !important;
  position: relative !important;
  background-color: var(--color-bg-dark) !important;
}

#Subheader .title {
  color: #ffffff !important;
  font-size: 46px !important;
  line-height: 1.2 !important;
  margin-bottom: 12px !important;
  letter-spacing: 0.5px !important;
}

.breadcrumbs {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 auto 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-size: 13px !important;
  font-family: var(--font-body) !important;
}

.breadcrumbs a {
  color: var(--color-gold) !important;
  text-decoration: none !important;
  transition: opacity 0.2s ease;
}

.breadcrumbs a:hover {
  text-decoration: underline !important;
}

.breadcrumbs .sep {
  color: rgba(255, 255, 255, 0.4) !important;
  font-size: 12px !important;
}

.breadcrumbs .current {
  color: #d1d5db !important;
}

/* 5. Fixed Floating Side Navigation (Previous / Next Post) */
.fixed-nav {
  position: fixed;
  bottom: 80px;
  height: 80px;
  z-index: 999;
  display: flex;
  align-items: center;
  text-decoration: none !important;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.fixed-nav.fixed-nav-prev {
  left: 0;
  transform: translateX(-270px);
}

.fixed-nav.fixed-nav-prev:hover {
  transform: translateX(0);
}

.fixed-nav.fixed-nav-next {
  right: 0;
  transform: translateX(270px);
}

.fixed-nav.fixed-nav-next:hover {
  transform: translateX(0);
}

.fixed-nav .arrow {
  width: 40px;
  height: 80px;
  background-color: var(--color-gold);
  color: #18202a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  flex: 0 0 40px;
}

.fixed-nav .photo {
  width: 80px;
  height: 80px;
  overflow: hidden;
  flex: 0 0 80px;
  background: #18202a;
}

.fixed-nav .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fixed-nav .desc {
  width: 190px;
  height: 80px;
  background: #ffffff;
  padding: 12px 15px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.fixed-nav.fixed-nav-next .desc {
  order: 1;
}
.fixed-nav.fixed-nav-next .photo {
  order: 2;
}
.fixed-nav.fixed-nav-next .arrow {
  order: 3;
}

.fixed-nav .desc h6 {
  margin: 0 0 4px;
  font-family: var(--font-heading) !important;
  font-size: 13px !important;
  color: #18202a !important;
  line-height: 1.3 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fixed-nav .desc .date {
  font-size: 11px;
  color: #8c93a0;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 6. Footer Layout */
#Footer,
.footer-fixed #Footer,
.footer-sliding #Footer {
  position: relative !important;
  z-index: 10 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  background-repeat: no-repeat;
  background-position: center top;
}

#Content,
.footer-fixed #Content,
.footer-sliding #Content {
  position: relative !important;
  z-index: 5 !important;
  margin-bottom: 0 !important;
}

/* 7. Action Banner Blocks */
.action-box {
  padding: 35px 30px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
}
.action-box:hover {
  filter: brightness(1.15);
}

/* 8. Smooth Transitions & Hover */
a {
  transition: color 0.2s ease, opacity 0.2s ease;
}

.button_theme:hover {
  background-color: var(--color-gold-hover) !important;
  color: #18202a !important;
}

/* 9. Accessible Visually Hidden Utilities (Screen Readers & SEO Google Indexing) */
.sr-only,
.visually-hidden {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* 10. Equal Height 3-Cards Per Row Articles Grid */
.articles-grid,
.posts_group.col-3 {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 30px !important;
  width: 100% !important;
  align-items: stretch !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Reset legacy float and margin overrides for grid children */
.articles-grid > *,
.posts_group.col-3 > * {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

@media only screen and (max-width: 991px) {
  .articles-grid,
  .posts_group.col-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px !important;
  }
}

@media only screen and (max-width: 640px) {
  .articles-grid,
  .posts_group.col-3 {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
}


/* 11. Equal Height 2-Cards Per Row Books Grid */
.books-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 30px !important;
  width: 100% !important;
  align-items: stretch !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
}

.books-grid > * {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  height: 100% !important;
}

@media only screen and (max-width: 768px) {
  .books-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
}

/* 12. Homepage Featured Books 3-Column Grid */
.featured-books-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 30px !important;
  width: 100% !important;
  align-items: stretch !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
}

.featured-books-grid > * {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

.featured-book-card {
  background: #252b34 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25) !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.2, 0, 0.2, 1),
              border-color 0.3s ease !important;
}

.featured-book-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4) !important;
  border-color: rgba(255, 192, 19, 0.3) !important;
}

.featured-book-card .book-cover-box {
  height: 290px;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.featured-book-card .book-cover-img {
  max-height: 240px;
  max-width: 170px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.55);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.featured-book-card:hover .book-cover-img {
  transform: scale(1.05) translateY(-4px);
  box-shadow: 0 15px 32px rgba(0, 0, 0, 0.65);
}

.featured-book-card .book-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  text-align: center;
  align-items: center;
  box-sizing: border-box;
}

.featured-book-card .book-year-badge {
  background: #ffc013;
  color: #18202a;
  font-weight: 700;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 12px;
  display: inline-block;
  letter-spacing: 0.5px;
}

.featured-book-card .book-title {
  font-family: var(--font-heading) !important;
  font-size: 20px;
  line-height: 1.35;
  margin: 0 0 6px;
  min-height: 2.7em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-book-card .book-title a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.featured-book-card .book-title a:hover {
  color: #ffc013;
}

.featured-book-card .book-subtitle {
  color: #ffc013;
  font-size: 13px;
  font-style: italic;
  margin: 0 0 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.featured-book-card .book-excerpt {
  color: #cbd3e1;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 20px;
  flex: 1 1 auto;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.8em;
}

.featured-book-card .book-footer {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 14px;
  margin-top: auto;
  display: flex;
  justify-content: center;
}

.featured-book-card .book-link-btn {
  color: #ffc013;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease, gap 0.2s ease;
}

.featured-book-card .book-link-btn:hover {
  color: #ffffff;
  gap: 10px;
}

@media only screen and (max-width: 991px) {
  .featured-books-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px !important;
  }
}

@media only screen and (max-width: 640px) {
  .featured-books-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
}

