/* 
 * Ibrahim Gündüz Website
 * Main Stylesheet
 */

@import url("site-responsive.css");

:root {
  --primary-color: #2c3e50;
  --secondary-color: #e74c3c;
  --text-color: #34495e;
  --light-bg: #f5f5f5;
  --dark-bg: #1a1a1a;
  --white: #ffffff;
  --light-gray: #f8f8f8;
  --medium-gray: #ddd;
  --dark-gray: #777;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --transition-fast: all 0.3s ease;
  --font-main: 'Helvetica Neue', Arial, sans-serif;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--white);
  scroll-behavior: smooth;
}

html {
  scroll-padding-top: 110px;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

ul {
  list-style: none;
}

/* Header styles */
header {
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  padding: 15px 0;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 100;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
}

.logo span {
  color: var(--secondary-color);
}

nav ul {
  display: flex;
}

nav ul li {
  margin-left: 20px;
}

nav ul li a {
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: var(--secondary-color);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--primary-color);
}

/* Hero section */
.hero {
  padding: 120px 0 60px;
  background-color: var(--light-bg);
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 40px;
}

.hero-text {
  flex: 1;
}

.hero-image {
  flex: 1;
  text-align: center;
}

.hero-image img {
  border-radius: 8px;
  box-shadow: 10px 10px 0 var(--secondary-color);
}

.hero h1 {
  font-size: 42px;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.hero h3 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--secondary-color);
  font-weight: normal;
}

.hero p {
  margin-bottom: 30px;
  font-size: 18px;
}

/* Button styles */
.btn {
  display: inline-block;
  padding: 12px 25px;
  background-color: var(--secondary-color);
  color: var(--white);
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  margin-right: 15px;
  transition: var(--transition-fast);
  border: none;
  cursor: pointer;
}

.btn:hover {
  background-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Section styles */
.section {
  padding: 30px 0;
}

.section-title {
  font-size: 32px;
  margin-bottom: 20px;
  color: var(--primary-color);
  text-align: center;
}

.section-subtitle {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--dark-gray);
  text-align: center;
}

/* Articles grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.article-card {
  background-color: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-fast);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}



.article-content {
  padding: 6px 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.article-title {
  font-size: 18px;
  margin: 0;
  padding: 0;
  color: var(--primary-color);
  line-height: 1.2;
}

.article-excerpt {
  margin: 2px 0 0 0;
  padding: 0;
  color: #666;
  flex-grow: 0;
  line-height: 1.2;
  font-size: 13px;
  display: none;
}

.read-more {
  color: var(--secondary-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  transition: transform 0.3s ease;
  margin-top: auto;
  padding: 0;
  font-size: 13px;
}

.read-more:hover {
  transform: translateX(5px);
}


/* Ana Kırmızı Renk ve Buton Düzeltelemeleri */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #e74c3c; /* Canlı kırmızı geri geldi */
  --white: #ffffff;
}

.video-card {
  flex: 0 0 auto;
  width: 350px;
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background-color: rgba(231, 76, 60, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 24px;
}

/* Video Modal */
.video-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  padding-top: 60px;
}

.video-modal-content {
  background-color: var(--white);
  margin: 5% auto;
  padding: 25px;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  width: 80%;
  max-width: 900px;
}

.video-close-btn {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.video-close-btn:hover {
  color: var(--secondary-color);
}

.video-modal-title {
  margin-bottom: 20px;
  color: var(--primary-color);
  font-size: 24px;
  padding-right: 30px;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 5px;
}

/* Books section */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin: 40px 0;
}

/* ==========================================================================
   GÜNCEL: KİTAPLAR BÖLÜMÜ (KARTLAR KÜÇÜLTÜLDÜ VE EŞİTLENDİ)
   ========================================================================== */

.books-grid {
    display: grid;
    /* Kartların minimum genişliğini 220px'e düşürdüm (eski: 300px) */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.book-card {
    display: flex;
    flex-direction: column;
    height: 100%; /* Tüm kartların boyunu en uzun olana eşitler */
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    overflow: hidden; /* Taşmaları önlemek için ekledim */
}

.book-card:hover { transform: translateY(-5px); }

/* Kapak Görsel Çerçevesi */
.book-cover {
    height: 280px !important; /* Kapak yüksekliğini 280px'e sabitledim */
    width: 100%;
    overflow: hidden;
    background-color: var(--light-bg); /* Resim yüklenene kadar boşluğu doldur */
    flex-shrink: 0; /* İçerik çok uzun olsa bile resmi daraltma */
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Resmin kesilmeden çerçeveye sığmasını sağla */
    object-position: center;
}

/* Kart Bilgi Alanı */
.book-info {
    padding: 20px; /* İç boşluğu biraz azalttım */
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Metin kısa olsa bile kartın içini doldur */
}

.book-header { margin-bottom: 10px; }

.book-year {
    font-size: 13px !important; /* Yıl yazısını küçülttüm */
    color: var(--secondary-color);
    font-weight: 600;
}

.book-title {
    font-size: 18px !important; /* Başlığı küçülttüm (eski: 20px) */
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 5px;
    margin-bottom: 10px;
}

.book-description {
    font-size: 14px !important; /* Açıklamayı küçülttüm (eski: 15px) */
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1; /* Açıklama kısa olsa bile butonları en alta it */
}

/* Buton Alanı (Kırmızı ve Gri Butonlar Yanyana) */
.book-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: auto; /* Buton grubunu kartın en altına yapıştır */
}

.book-read-more, .book-buy-btn {
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 13px !important; /* Buton yazılarını küçülttüm */
    font-weight: 600;
    transition: var(--transition-fast);
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

/* Detaylı İncele (Gri) */
.book-read-more {
    background: #f1f3f5;
    color: var(--primary-color);
}
.book-read-more:hover {
    background: #e9ecef;
}

/* Satın Al (Kırmızı) */
.book-buy-btn {
    background: var(--secondary-color) !important;
    color: var(--white) !important;
}

.book-buy-btn:hover {
    background: var(--primary-color) !important;
}

/* Responsive Düzenleme (Mobilde daha az kart sığdır) */
@media (max-width: 768px) {
    .books-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 20px;
    }
    
    .book-cover {
        height: 240px !important; /* Mobilde kapak yüksekliğini biraz daha azalt */
    }
}


.book-info {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.book-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.book-year {
  color: var(--secondary-color);
  font-weight: 500;
  margin-bottom: 15px;
}

.book-read-more {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--secondary-color);
  color: var(--white);
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  text-align: center;
  margin-top: auto;
  transition: background-color 0.3s ease;
}

.book-read-more:hover {
  background-color: var(--primary-color);
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 3px;
  background-color: var(--light-bg);
  top: 0;
  bottom: 0;
  left: 50px;
  margin-left: -1.5px;
}

.timeline-item {
  padding: 0 0 30px 80px;
  position: relative;
}

.timeline-content {
  padding: 20px;
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  border-left: 3px solid var(--secondary-color);
}

.timeline-item::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 42px;
  top: 15px;
  background-color: var(--secondary-color);
  border-radius: 50%;
  z-index: 1;
}

.timeline-year {
  display: inline-block;
  color: var(--white);
  background-color: var(--secondary-color);
  font-weight: bold;
  font-size: 16px;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.timeline-title {
  margin-bottom: 10px;
  font-size: 18px;
  color: var(--primary-color);
}

/* About section */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-image {
  position: relative;
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: -20px 20px 0 var(--secondary-color);
}

/* Newsletter section */
.newsletter-container {
  background-color: var(--primary-color);
  padding: 40px;
  border-radius: 8px;
  color: var(--white);
  text-align: center;
}

.newsletter-title {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--white);
}

.newsletter-description {
  font-size: 16px;
  margin-bottom: 25px;
  color: #ccc;
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  min-width: 250px;
  padding: 12px 15px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
}

.newsletter-message {
  margin-top: 15px;
  padding: 12px 20px;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
  display: none;
  animation: fadeIn 0.3s ease;
}

.newsletter-message.success {
  display: block;
  background-color: rgba(52, 211, 153, 0.2);
  color: #a7f3d0;
  border: 1px solid rgba(52, 211, 153, 0.5);
}

.newsletter-message.error {
  display: block;
  background-color: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.5);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Admin Panel Styles */
.admin-panel {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.admin-panel.active {
  display: flex;
}

.admin-content {
  background: white;
  border-radius: 12px;
  padding: 40px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 15px;
}

.admin-header h2 {
  color: var(--primary-color);
  font-size: 24px;
  margin: 0;
}

.admin-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--primary-color);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.admin-close:hover {
  background-color: var(--secondary-color);
  color: white;
}

.subscribers-list {
  margin-bottom: 20px;
}

.subscriber-item {
  background: var(--light-gray);
  padding: 12px 15px;
  margin-bottom: 8px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.subscriber-item .delete-btn {
  background: var(--secondary-color);
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s ease;
}

.subscriber-item .delete-btn:hover {
  background: #c0392b;
}

.admin-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.admin-btn {
  flex: 1;
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 14px;
}

.admin-btn.export {
  background: var(--primary-color);
  color: white;
}

.admin-btn.export:hover {
  background: #1a2332;
}

.admin-btn.clear {
  background: var(--secondary-color);
  color: white;
}

.admin-btn.clear:hover {
  background: #c0392b;
}

.subscriber-count {
  background: var(--light-gray);
  padding: 15px;
  border-radius: 6px;
  text-align: center;
  margin-bottom: 20px;
  font-weight: 600;
  color: var(--primary-color);
}

/* Contact section */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-form {
  background-color: var(--white);
  padding: 30px;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 20px;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.contact-info-item {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background-color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  color: var(--secondary-color);
  font-size: 20px;
}

/* Flash Messages */
.flash-messages {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 1000;
  width: 300px;
}

.flash-message {
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 4px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  animation: slideIn 0.3s ease-out forwards;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.flash-message button {
  float: right;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 50px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-brand h3 {
  font-size: 24px;
  margin-bottom: 15px;
}

.footer-brand p {
  color: #ccc;
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-radius: 50%;
  text-decoration: none;
  transition: var(--transition-fast);
}

.social-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.footer-links-container h3 {
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: #aaa;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--secondary-color);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.back-to-top.visible {
  opacity: 1;
}

.back-to-top:hover {
  transform: translateY(-5px);
}

/* Header Katman Ayarı: En Üstte Kalması Şart */
header {
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  padding: 15px 0;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 10000 !important; /* Değeri her şeyin üstüne çıkardım */
}

/* Kartların genel yüksekliğini sabitleme */
.article-card {
  display: flex;
  flex-direction: column;
  height: 320px !important; /* Kartların toplam yüksekliğini buradan ayarla */
  background-color: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-fast);
}

/* İçerik alanını esnek yapma */
.article-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* İçeriğin kartın kalanını kaplamasını sağlar */
}

/* Başlıkları 2 satırla sınırla ve yüksekliğini sabitle */
.article-title {
  font-size: 16px !important;
  color: var(--primary-color);
  margin-bottom: 1px;
  height: 40px; /* Başlık alanı sabit yükseklik */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* En fazla 2 satır gösterir */
  -webkit-box-orient: vertical;
  line-height: 1.3;
}

/* Özet metnini 3 satırla sınırla ve yüksekliğini sabitle */
.article-excerpt {
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
  height: 32px; /* Özet alanı sabit yükseklik */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* En fazla 2 satır gösterir */
  -webkit-box-orient: vertical;
  line-height: 1.4;
  flex-grow: 0 !important; /* Metin çok kısaysa boşluğu bu değil, alttaki buton açsın */
}

/* Butonu her zaman en alta itme */
.read-more {
  margin-top: auto !important; /* Bu komut butonu kartın en altına yapıştırır */
  color: #e74c3c;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  padding-top: 0px;
  font-size: 16px;
}

/* Video kartları tamamen tıklanabilir yapma */
.video-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.video-link:hover {
  text-decoration: none;
}

/* Resim çerçevesi zaten sabitti ama emin olalım */
.article-image {
  height: 150px !important;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.article-image .play-button-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 48px;
  color: white;
}

.article-card:hover .article-image .play-button-overlay {
  opacity: 1;
}
@media (max-width: 992px) {
  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
  }
  
  .hero-content {
    flex-direction: column-reverse;
  }
  
  .about-image {
    margin-bottom: 30px;
  }
}

/* Kırmızı Butonları Videolarla Eşitliyoruz (48px) */
.article-nav-btn {
    position: absolute !important;
    top: 100px !important; /* Resmin tam ortası */
    transform: translateY(-50%) !important;
    width: 48px !important; /* 40'tan 48'e çıkardık */
    height: 48px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: none !important;
    background-color: #e74c3c !important;
    color: #fff !important;
    z-index: 100 !important;
    cursor: pointer !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18) !important; /* Videolardaki gölge */
    transition: all 0.3s ease;
}

/* Okları en dışa (kenarlara) yaslıyoruz */
.article-prev { left: -24px !important; }
.article-next { right: -24px !important; }

/* Altta kalan o küçük, hatalı siyah butonları tamamen gizle */
.articles-slider .prev-btn, 
.articles-slider .next-btn,
button[class*="prev"]:not(.article-nav-btn),
button[class*="next"]:not(.article-nav-btn) {
    display: none !important;
}

/* ==========================================
   ARTICLE SLIDER FIX (TEK VE KESİN KOD)
   ========================================== */

/* Okların dışarı taşması için konteyner ayarı */
.articles-slider {
    position: relative !important;
    padding: 0 64px !important; /* Oklar için boşluk */
    max-width: 1200px;
    margin: 40px auto;
    overflow: visible !important;
}

/* Kartların yan yana dizilmesini sağlayan flex kutusu */
.articles-slider-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important; /* Alt satıra geçmeyi engeller */
    gap: 8px !important;
    width: 100% !important;
    overflow-x: hidden !important;
    scroll-behavior: smooth;
    padding: 10px 0 !important;
}

/* Kart boyutları: Masaüstünde tam 3 adet sığdırır */
.articles-slider-wrapper .article-card {
    flex: 0 0 calc(33.333% - 14px) !important;
    min-width: 280px !important;
    height: 360px !important;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden;
}

/* Resim alanı: Kafa kesilmesini önler */
.articles-slider-wrapper .article-image {
    height: 200px !important;
    width: 100% !important;
    overflow: hidden;
}

.articles-slider-wrapper .article-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center top !important;
}

/* Buton Konumlandırma: Videolar ile 1:1 aynı */
.article-nav-btn {
    position: absolute !important;
    top: 100px !important; /* Resmin tam ortası */
    transform: translateY(-50%) !important;
    width: 48px !important;
    height: 48px !important;
    background-color: #e74c3c !important;
    color: #fff !important;
    border-radius: 50% !important;
    border: none !important;
    z-index: 100 !important;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-prev { left: -24px !important; }
.article-next { right: -24px !important; }

/* Mobil Ayarı: 768px altında tek karta düşer */
@media (max-width: 768px) {
    .articles-slider { padding: 0 10px !important; }
    .articles-slider-wrapper .article-card {
        flex: 0 0 100% !important;
    }
    .article-nav-btn { display: none !important; } /* Mobilde gizle (kaydırma elle yapılır) */
}


/* Kartların içindeki resimlerin ortalanması (Genel çözüm) */
.article-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center top !important; /* Fotoğrafları üstten/ortadan hizalar, kafalar kesilmez */
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  nav {
    display: none;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    z-index: 9999;
  }
  
  nav ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
  }
  
  nav ul li {
    margin: 0;
  }
  
  nav ul li a {
    font-size: 16px;
    padding: 10px 0;
    display: block;
  }
  
  .mobile-menu-btn {
    display: block;
    z-index: 10001;
  }
  
  .book-cover {
    height: 260px;
  }
  
  .hero {
    padding-top: 140px;
  }
  
  .hero h1 {
    font-size: 32px;
  }
  
  .hero h3 {
    font-size: 20px;
  }
  
  .hero p {
    font-size: 16px;
  }
  
  .hero-content {
    flex-direction: column-reverse;
    gap: 30px;
  }
  
  .hero-image {
    width: 100%;
    text-align: center;
  }
  
  .hero-image img {
    max-width: 320px;
    margin: 0 auto;
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .newsletter-form {
    flex-direction: column;
    align-items: stretch;
  }
  
  .newsletter-input {
    width: 100%;
    min-width: 0;
  }
  
  .book-actions {
    flex-direction: column;
  }
  
  .book-actions a {
    width: 100%;
  }
  
  .timeline {
    max-width: 100%;
    padding-left: 20px;
  }
  
  .timeline::after {
    left: 20px;
  }
  
  .timeline-item {
    padding-left: 50px;
  }
  
  .timeline-content {
    padding: 18px;
  }
  
  .articles-slider-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  
  .articles-slider-wrapper::-webkit-scrollbar {
    height: 8px;
  }
  
  .articles-slider-wrapper::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 999px;
  }
  
  .flash-messages {
    top: auto;
    bottom: 20px;
    right: 20px;
    width: auto;
  }
}

