/* === GENEL VE ORTAK === */
body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #fffefc;
    margin: 0;
    padding: 0;
    color: #333;
}

.container {
    width: 100%;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.title, .section-title {
    text-align: center;
    font-size: 2.6rem;
    color: #f7931e;
    font-weight: bold;
    margin-bottom: 15px;
    border-radius: 12px;
}

h2.section-title {
  min-height: 48px; /* Başlık font yüklenirken kaymayı engeller */
}

.italic {
    font-style: italic;
}

/* === HEADER (ORTAK) === */
.site-header {
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  will-change: transform;
  contain: layout paint;
  min-height: 75px;
}

.header-container {
    max-width: 1100px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-wrap: wrap;
    min-height: 72px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
  width: 100px;
  height: auto;
  object-fit: contain;
  display: block;
  background-color: #f7931e;
  border-radius: 10px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    justify-content: center;
}

.logo-line {
    font-size: 1.1rem;
    color: #222;
}

.logo-bold {
    color: #f7931e;
    font-weight: bold;
    font-size: 1.1rem;
}

.logo-sub {
    font-size: 0.75rem;
    color: #777;
    margin: 2px 0;
}

.search-bar {
    position: relative;
    display: flex;
    flex: 1;
    max-width: 400px;
    margin: 10px;
    min-height: 40px;
}

.search-bar input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px 0 0 6px;
    border: 1px solid #ccc;
    font-size: 0.95rem;
}

.search-bar button {
    padding: 8px 12px;
    background-color: #f7931e;
    border: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    color: white;
    font-size: 1rem;
}

.search-suggestions {
  position: absolute;
  top: auto;             /* 🔹 arama kutusunun hemen altından başlasın */
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #ddd;
  width: 100%;
  max-width: 380px;
  margin-top: 4px;
  z-index: 999;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
  display: none;
}

.search-query-label {
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
  margin-top: 5px;
  margin-bottom: 25px;
}

.search-query-label strong {
  color: #333;
  font-weight: 600;
}

.suggestion-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.suggestion-item:hover {
  background: #f9f9f9;
}

.suggestion-item img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 10px;
}

.suggestion-text strong {
  font-size: 14px;
  color: #333;
  display: block;
}

.suggestion-text span {
  font-size: 12px;
  color: #888;
}

.view-all {
  text-align: center;
  padding: 8px;
  color: #e58b00;
  font-weight: 600;
  cursor: pointer;
  border-top: 1px solid #eee;
  transition: background 0.2s;
}

.view-all:hover {
  background: #f8f8f8;
}

.menu {
  min-height: 28px; 
  display: flex;
  align-items: center;
  gap: 20px;
}

.menu a {
    margin-left: 20px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.menu a:hover {
    color: #f7931e;
}

/* === TARİF SAYFASINA ÖZEL === */
.main-image {
    width: 100%;
    display: block;
    margin: 10px auto 0 auto;
    max-width: 650px;
    border-radius: 12px;
}

.image-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
}

/* Düşey alfabe */
.alphabet-column {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.alphabet-letter {
  padding: 4px 6px;
  font-size: 8.9px;
  width: 20px;
  text-align: center;
  background-color: #1f1f1f;
  color: white;
  border-radius: 4px;
  margin-bottom: 5px;
}


.alphabet-letter:hover,
.alphabet-letter.active {
  background-color: #0d6efd;
  color: white;
}


/* Ülke etiketi */
.country-label-overlay {
  position: absolute;
  bottom: 55px;
  left: 50%;
  transform: translateX(-50%);
  background-color: white;
  padding: 8px 20px;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 500;
  box-shadow: 0px 3px 8px rgba(0,0,0,0.1);
  border: 1px solid #ddd;
  z-index: 2;
}

.info-box {
    display: flex;
    justify-content: space-between;
    background-color: #f2f2f2;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.info-box div {
    text-align: center;
    width: 48%;
}

.section {
  background-color: #f7f7f7;
  width: 100%;
  display: block;
  margin: 10px auto 0 auto;
  max-width: 650px;
  padding: 10px 15px;
  border-radius: 8px;
}

/* Ana başlıklar (Ingredients / Instructions) */
.section h2 {
  color: #f7931e; /* daha koyu turuncu */
  font-weight: 700;
  margin-top: 0;
  font-size: 1.35rem;
  border-left: 4px solid #f7931e;
  padding-left: 8px;
}

/* Alt başlıklar (Prepare the Dough vb.) */
.instructions h3 {
  color: #333;
  font-weight: 600;
  margin-top: 1.2em;
  margin-bottom: 0.3em;
  font-size: 1.05rem;
}

/* Paragraflar */
.instructions p {
  margin: 0.5em 0;
  line-height: 1.65;
  color: #444;
  font-size: 1rem;
  max-width: 600px;
}

.serve h3 {
  color: #333;
  font-weight: 600;
  margin-top: 1.5em;
}
.serve p {
  color: #444;
  line-height: 1.6;
}

.enjoy-text {
    display: block;
    text-align: center;
    font-style: italic;
    color: #666;
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1rem;
}

/* Liste stilleri */
ul {
  padding-left: 25px;
  margin: 0;
}

li {
  margin-bottom: 8px;
  line-height: 1.6;
  color: #333;
  max-width: 600px;
}

/* === ANA SAYFA (index.html) === */
.featured-recipe {
    margin: 40px 0 20px;
}

/* Featured Tarifi kutusu */
.featured-card {
  background-color: #f7931e;
  padding: 20px;
  border-radius: 36px;
  text-align: center;
  position: relative;
}

.featured-card img {
  width: 100%;
  border-radius: 20px;
  display: block;
  margin: 10px auto 0 auto; /* Görseli biraz aşağı çekmek için */
  max-width: 100%;
}

/* Yemek ismi */
.featured-name {
  margin-bottom: 5px;
  font-size: 1.2rem;
  color: #222;
  font-style: italic;
  text-decoration: underline;
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.recipe-card {
  background: #fff;
  padding: 12px;
  border-radius: 14px;
  text-decoration: none;
  color: #333;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
  width: 100%;
  min-height: 260px;  /* 🧱 yükseklik sabit */
}

.recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.recipe-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  aspect-ratio: 4 / 3;
  background-color: #f3f3f3;
}

#daily-popular {
  min-height: 800px;
}

/* Kart ve ana görseller */
img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 2;
}

/* ✅ Lazy-load shimmer efekti (yüklenmeden önceki placeholder) */
img[loading="lazy"] {
  background: linear-gradient(90deg, #f0f0f0 25%, #e2e2e2 50%, #f0f0f0 75%);
  background-size: 400% 100%;
  animation: shimmer 1.5s infinite;
}

/* Görsel yüklendiğinde shimmer’ı kaldır */
img[data-loaded="true"] {
  animation: none;
  background: none;
}

@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}


.card-country {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 12px;
    background: #f7931e;
    color: white;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: bold;
}


/* Görseller yüklenene kadar alan sabit kalsın */
.recipe-card img,
.main-image,
.country-image {
  aspect-ratio: 4 / 3;           /* 📏 sabit oran */
  background-color: #f3f3f3;     /* 👁️ placeholder */
  object-fit: cover;
}


/* === Load More Butonu === */
.load-more-container {
  text-align: center;
  margin: 30px 0 40px;
  min-height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#loadMoreBtn {
  background-color: #f7931e;
  color: white;
  padding: 10px 20px;
  font-size: 0.95rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

#loadMoreBtn:hover {
  background-color: #e38212;
}

html {
  scroll-behavior: smooth;
}
/* Ülke butonları */

/* Sol panel tüm ülke barı */

/* ========== 📦 GENEL LAYOUT ========== */
.layout-wrapper {
  display: grid;
  grid-template-columns: 260px 1fr; /* Sol panel + sağ içerik */
  gap: 24px;
  align-items: flex-start;
  justify-content: flex-start;
  max-width: 1400px;
  margin-left: 80px; /* ✅ Sola yaslı görünüm */
  padding: 0 20px;
}

/* İçerik (panel dışındaki her şey) */
.layout-wrapper > *:not(.country-panel) {
  margin-left: 0;
}


#countryPanel {
  height: 0;
  overflow: visible;
}

.country-panel {
  display: flex;
  gap: 6px;
  position: fixed;
  top: 100px;
  width: 220px;
  background: #fffefc;
  border-right: 1px solid #eee;
  padding: 8px;
  overflow-y: auto;
  max-height: calc(100vh - 120px);
  border-radius: 8px;
  min-height: 400px; /* 🧱 boşta da sabit alan */
  contain: layout;
}



.country-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  max-height: calc(100vh - 140px);
}


.country-panel .country-link {
  padding: 6px 10px;
  font-size: 14px;
  border: none;
  background-color: #1f1f1f;
  color: white;
  border-radius: 4px;
  text-align: left;
  white-space: nowrap;
  max-width: 15ch;
  min-width: 15ch;
  text-overflow: ellipsis;
  display: inline-block;
  overflow-x: clip;
  text-decoration: none; /* altı çizgiyi kaldırır */
  cursor: pointer;
}

.country-panel button:hover {
}




/* === Footer === */
.footer {
  text-align: center;
  padding: 30px 0 20px;
  font-size: 0.85rem;
  color: #555;
}



.footer .social-icons {
  margin-top: 10px;
}

.footer .social-icons a {
  margin: 0 12px;
  display: inline-block;
}

.footer .social-icons img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  vertical-align: middle;
  transition: transform 0.2s ease;
}

.footer .social-icons a:hover img {
  transform: scale(1.15);
}

/* --bg değişkeni kullanıldığı için tanımlayalım */
:root { --bg: #fffefc; }


/* Ülke listesi için daha rahat scroll yüksekliği */
.country-column{
  max-height: calc(100vh - 223px);
  overflow-y: auto;
}


/* === ÜLKE SAYFASI (COUNTRY INTRO & RECIPE SECTION) === */

/* Ülke başlık, görsel ve açıklama bölümü */
.country-intro {
  text-align: center;
  color: #1f1f1f;
  border-radius: 30px;
  margin: 10px auto 0; /* yukarı yaslı */
  max-width: 650px;
  padding: 0;
}

.country-intro h1 {
  display: inline-block;
  background-color: #f7931e; /* turuncu zemin */
  color: white;              /* beyaz yazı */
  padding: 6px 16px;
  border-radius: 10px;
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 auto 18px auto;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Ülke ana görseli */
.country-intro img.country-image {
  display: block;
  margin: 0 auto 20px; /* görsel ile açıklama arası */
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Ülke açıklaması (otomatik esnek yükseklik) */
.country-description {
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
  background: #fff4e6;
  border-left: 5px solid #f59e0b;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: block;
  text-align: left;
  max-width: 800px;
  margin: 0 auto clamp(15px, 4vw, 40px); /* açıklama uzunluğuna göre dinamik boşluk */
}

/* Tarifler bölümü */
.recipe-section {
  text-align: center;
  margin-top: 0; /* açıklamaya yapışık */
  padding-top: clamp(10px, 2vw, 25px);
}

.recipe-section h2 {
  display: inline-block;
  background-color: #f7931e; /* turuncu arka plan */
  color: white;              /* beyaz yazı */
  padding: 6px 18px;
  border-radius: 10px;
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 auto 25px auto;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Tarif grid yapısı */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
  justify-items: center;
  margin: 0 auto;
  max-width: 1100px;
}

.recipe-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #fff;
  border-radius: 18px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  text-decoration: none;
  color: #333;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  width: 100%;
  max-width: 300px;
}

.recipe-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

.recipe-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 2px solid #f7931e;
  aspect-ratio: 4/3;
  transition: transform 0.3s ease;
  background-color: #f3f3f3;
}

.recipe-card:hover img {
  transform: scale(1.05);
}

.recipe-name {
  color: #333;
  padding: 14px 10px;
  font-size: 1.05rem;
  text-align: center;
  font-style: italic;         
  font-family: 'Georgia', serif; /* zarif italik font */
  font-weight: normal;           /* ← kalınlığı kaldırır */
}


/* === Hamburger Menüsü (Sadece mobilde) === */
.hamburger {
 position: fixed;
  top: 220px;
  font-size: 20px;
  background: #fff;
  color: black;
  z-index: 10000;
  padding: 5px 10px;
  border-radius: 15px;
  border-color: rgb(19,19,19);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: none; /* sadece mobilde gösterilecek */
}


/* find your dish */
.multi-search-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f5a623;
  padding: 15px;
  border-radius: 20px;
  max-width: 700px;
  margin: 0 auto;
  gap: 10px;
}

.multi-search-box input {
  width: 70%;
  max-width: 450px;
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  display: inline-block;
}

/* 🔹 Tag kapsayıcısı */

.tags-container {
  display: none; /* Başta gizli */
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}

.tags-container.active {
  display: flex; /* Tag varsa görünür */
}

/* 🔹 Her bir tag */
.tag {
  background: #fdf2e0;
  border-radius: 20px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.tag button {
  background: none;
  border: none;
  color: #a33;
  font-weight: bold;
  cursor: pointer;
}

/* 🔹 Selectors alanı (ülke seçimi + buton) */
.selectors {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.selectors select,
.selectors button {
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

/* 🔹 Search Results başlığı ve içerik ortalaması */
.search-result-title,
#searchResults {
  text-align: center;
}

#addIngredientBtn {
  background: #fff;
  color: #f7931e;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

#addIngredientBtn:hover {
  background: #f7931e;
  color: white;
}

/* ===========================
   🔽 LOAD MORE (Search Page)
   =========================== */
#loadMoreSearchBtn {
  display: none;
  background-color: #f18c1c;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  margin: 25px auto 40px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-align: center;
}

#loadMoreSearchBtn:hover {
  background-color: #e67c00;
  transform: scale(1.05);
}

#loadMoreSearchBtn:active {
  transform: scale(0.97);
}

/* === Genel Performans Yardımcıları === */
html {
  scroll-behavior: smooth;
  overscroll-behavior: none;
}

* {
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}


/* 📱 === Mobil görünüm (max-width: 900px) === */
@media (max-width: 900px) {

  /* === Header === */
  .header-container {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
  }

  .logo-area {
    justify-content: center;
  }

  .search-bar {
    width: 90%;
    max-width: 350px;
  }

  .menu {
    justify-content: center;
    gap: 12px;
  }

  .hamburger {
    display: block;
    position: fixed;
    top: 85px;
    left: 10px;
    z-index: 10000;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 20px;
    padding: 5px 10px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  }

  /* === Country Panel (Yüzer Popup) === */
  .country-panel {
    display: none;
    position: fixed;
    top: 90px;              /* header altı */
    left: 21%;
    transform: translateX(-50%);
    width: 20%;
    max-height: 85vh;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    padding: 16px;
  }

  .country-panel.active {
    display: flex;
    max-height: 84vh;
  }

  .country-column {
    max-height: 84vh;
  }

  /* === Genel Layout === */
  .layout-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 0 12px;
    margin: 0 auto;
  }

  /* === Daily Popular Recipes === */
  .section-title {
    text-align: center;
    margin-top: 30px;
  }

   .recipe-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* 2 sütun sabit */
    gap: 14px;
    justify-items: center;
    align-items: start;
    width: 100%;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
  }

  .recipe-card {
    width: 100%;             /* 🔹 kart genişliği grid hücresine tam oturur */
    max-width: none;         /* 🔹 eski max-width sınırlarını kaldır */
    box-sizing: border-box;
  }

  .recipe-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
    display: block;
  }
}

@media (max-width: 825px) {
  .recipe-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 🔹 2 sütun */
    gap: 16px;
    justify-items: center;
    align-items: start;
    width: 100%;
    padding: 0 12px;
    box-sizing: border-box;
  }

  .recipe-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin: 0;
  }

  .recipe-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
    display: block;
  }

@media screen and (max-width: 650px) {

   .search-bar {
    width: 80%;
    max-width: 350px;
    }
       
  /* Harf butonları */
  .alphabet-letter {
    font-size: 0.7rem !important;
    padding: 3px 6px !important;
    margin: 2px 0 !important;
  }

  /* Ülke linkleri */
  .country-link {
    font-size: 0.72rem !important;
    padding: 3px 6px !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
  }

  /* Panel genişliği */
  .country-panel {
    width: 25% !important;
    left: 23% !important;
    top: 10% !important;
    transform: translateX(-50%) !important;
    padding: 8px !important;
  }

  .footer {
  bottom: 0;
  left: 0;
  width: 100%;
  background: #fff;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
  padding: 30px 0; /* Yukarıdan ve aşağıdan boşluk */
  z-index: 10;

  /* İçerikleri dikey ortala */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* İçerikleri yukarı taşır */
  gap: 8px; /* Paragraf ve ikonlar arasında aralık */
}

 .footer .social-icons {
  margin-top: 4px; /* biraz daha dar */
}

.footer p {
  margin: 0;
  font-size: 0.8rem;
}
}
