/*
Theme Name:  Mutfak Sırları
Theme URI:   https://mutfaksirlari.com
Description: Mutfaksirlari.com için özel geliştirilmiş modern magazine teması.
Author:      Mutfak Sırları
Version:     1.0.0
Text Domain: mutfaksirlari
Tags:        magazine, food, recipe, custom-menu, widgets, responsive-layout
*/

/* ============================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
  --color-primary:    #D62B2B;
  --color-primary-dark: #b01e1e;
  --color-secondary:  #FF7A00;
  --color-accent:     #FF9933;
  --color-white:      #FFFFFF;
  --color-bg:         #F5F5F5;
  --color-bg-warm:    #FFF8F5;
  --color-bg-card:    #FFFFFF;
  --color-text:       #2D2D2D;
  --color-text-soft:  #666666;
  --color-text-muted: #999999;
  --color-border:     #E8E8E8;
  --color-border-soft:#F0F0F0;
  --color-footer-bg:  #1A1A1A;
  --color-footer-text:#CCCCCC;
  --color-tag-bg:     #FFF3CD;
  --color-tag-text:   #856404;
  --color-success:    #28a745;
  --color-warning:    #ffc107;

  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-size-base: 16px;
  --font-size-sm:   14px;
  --font-size-xs:   12px;
  --font-size-lg:   18px;
  --font-size-xl:   22px;
  --font-size-2xl:  28px;
  --font-size-3xl:  36px;
  --line-height:    1.7;

  --radius-sm:  4px;
  --radius:     8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full: 9999px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow:     0 2px 8px rgba(0,0,0,.10);
  --shadow-md:  0 4px 16px rgba(0,0,0,.12);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.14);

  --transition: .2s ease;

  --max-width:    1280px;
  --content-pct:  68%;
  --sidebar-pct:  30%;
  --gap:          2%;
  --header-h:     64px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: var(--font-size-base); scroll-behavior: smooth; }

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-bg);
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); text-decoration: none; }

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

ul, ol { padding-left: 1.5em; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

.site-content-wrap {
  display: flex;
  gap: var(--gap);
  max-width: var(--max-width);
  margin: 24px auto;
  padding: 0 16px;
  align-items: flex-start;
}

#primary {
  width: var(--content-pct);
  min-width: 0;
}

#secondary {
  width: var(--sidebar-pct);
  min-width: 0;
  position: sticky;
  top: calc(var(--header-h) + 12px);
}

/* ============================================================
   HEADER
   ============================================================ */
#masthead {
  background: var(--color-white);
  border-bottom: 2px solid var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 500;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8px 16px;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Logo */
.site-branding {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.site-branding .custom-logo-link img {
  height: 44px;
  width: auto;
}

.site-title {
  font-size: var(--font-size-xl);
  font-weight: 900;
  color: var(--color-primary);
  letter-spacing: -0.5px;
}

.site-title a { color: inherit; }
.site-title a:hover { text-decoration: none; }

/* Primary Nav */
.main-navigation {
  flex: 1;
  display: flex;
  justify-content: center;
}

.main-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 4px;
}

.main-navigation ul li a {
  display: block;
  padding: 8px 14px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a {
  color: var(--color-primary);
  background: rgba(214,43,43,.06);
  text-decoration: none;
}

/* Dropdown */
.main-navigation ul li { position: relative; }
.main-navigation ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  z-index: 600;
  flex-direction: column;
  padding: 8px 0;
  gap: 0;
}
.main-navigation ul li:hover > ul { display: flex; }
.main-navigation ul ul li a { padding: 8px 16px; border-radius: 0; white-space: nowrap; }

/* Header Search */
.header-search-wrap {
  flex-shrink: 0;
  position: relative;
}

.header-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  min-width: 240px;
}

.header-search-form input[type="text"] {
  border: none;
  background: transparent;
  font-size: var(--font-size-sm);
  color: var(--color-text);
  outline: none;
  width: 100%;
}

.header-search-form button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-soft);
  padding: 0;
  display: flex;
  align-items: center;
}

.header-search-form button:hover { color: var(--color-primary); }

.search-ingredient-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-size-xs);
  color: var(--color-text-soft);
  cursor: pointer;
  white-space: nowrap;
  padding: 2px 0;
}

.search-ingredient-toggle input[type="checkbox"] {
  accent-color: var(--color-secondary);
}

#header-selected-ingredients {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 14px 4px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.ingredient-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-secondary);
  color: #fff;
  font-size: var(--font-size-xs);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.ingredient-chip .remove-chip {
  cursor: pointer;
  font-weight: bold;
  line-height: 1;
}

/* Live search results */
#live-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 700;
  display: none;
  max-height: 400px;
  overflow-y: auto;
}

#live-search-results .search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-border-soft);
  cursor: pointer;
  transition: background var(--transition);
}

#live-search-results .search-result-item:last-child { border-bottom: none; }
#live-search-results .search-result-item:hover { background: var(--color-bg); }

#live-search-results .search-result-item img {
  width: 48px;
  height: 36px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

#live-search-results .search-result-item span {
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

/* Hamburger menu — hem desktop hem mobilde görünür */
.menu-toggle {
  display: flex;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color-text);
}

/* Category scroll strip */
.category-scroll-wrap {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border-soft);
}

.category-scroll {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.category-scroll::-webkit-scrollbar { display: none; }

.category-scroll a {
  display: block;
  padding: 8px 14px;
  font-weight: 600;
  color: var(--color-text-soft);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  text-decoration: none;
}

.category-scroll a:hover {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-wrap {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border-soft);
}

.breadcrumb-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8px 16px;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.breadcrumb-inner::-webkit-scrollbar { display: none; }

.breadcrumb-inner a {
  color: var(--color-secondary);
  text-decoration: none;
}

.breadcrumb-inner a:hover { color: var(--color-primary); }
.breadcrumb-inner .sep { margin: 0 6px; color: var(--color-border); }

/* ============================================================
   RECIPE CARDS (Archive / Index)
   ============================================================ */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.recipe-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.recipe-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.recipe-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.recipe-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

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

.recipe-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.recipe-card-badge.badge-video { background: var(--color-secondary); color: #fff; }
.recipe-card-badge.badge-star  { background: #f4a30a; color: #fff; }
.recipe-card-badge.badge-new   { background: var(--color-primary); }

.recipe-card-body {
  padding: 14px 16px 16px;
}

.recipe-card-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recipe-card-title a { color: var(--color-text); }
.recipe-card-title a:hover { color: var(--color-primary); text-decoration: none; }

.recipe-card-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.recipe-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.recipe-card-meta i { color: var(--color-secondary); }

/* ============================================================
   ARCHIVE PAGE HEADER
   ============================================================ */
.archive-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--color-border);
}

.archive-header h1 {
  font-size: var(--font-size-2xl);
  color: var(--color-text);
}

.archive-header h1 span { color: var(--color-primary); }

.archive-description {
  margin-top: 8px;
  color: var(--color-text-soft);
  font-size: var(--font-size-sm);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination-wrap {
  margin-top: 32px;
  display: flex;
  justify-content: center;
}

.pagination-wrap .nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
}

.pagination-wrap .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  text-decoration: none;
  transition: all var(--transition);
}

.pagination-wrap .page-numbers:hover,
.pagination-wrap .page-numbers.current {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.widget-area .widget {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.widget-area .widget-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-primary);
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-size: var(--font-size-sm);
}

/* ============================================================
   FOOTER
   ============================================================ */
#colophon {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  margin-top: 48px;
}

.footer-widgets-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 16px 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-widget-area .widget-title {
  color: var(--color-white);
  font-size: var(--font-size-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-widget-area a { color: var(--color-footer-text); }
.footer-widget-area a:hover { color: var(--color-white); text-decoration: none; }

.footer-socket {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px;
}

.footer-socket-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: var(--font-size-xs);
  color: rgba(255,255,255,.5);
}

.footer-socket a {
  color: rgba(255,255,255,.5);
  text-decoration: none;
}

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

/* Footer nav */
.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================================
   SCROLL TO TOP
   ============================================================ */
#scroll-up {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  z-index: 800;
  text-decoration: none;
}

#scroll-up.visible {
  opacity: 1;
  visibility: visible;
}

#scroll-up:hover { background: var(--color-primary-dark); text-decoration: none; }

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--color-primary);
  z-index: 9999;
  width: 0%;
  transition: width .1s linear;
}

/* ============================================================
   PAGE / SINGLE BASIC
   ============================================================ */
.entry-content {
  font-size: var(--font-size-base);
  line-height: 1.8;
  color: var(--color-text);
}

.entry-content p { margin-bottom: 1.2em; }
.entry-content h2 { font-size: var(--font-size-xl); margin: 1.5em 0 .6em; color: var(--color-text); }
.entry-content h3 { font-size: var(--font-size-lg); margin: 1.3em 0 .5em; }
.entry-content ul, .entry-content ol { margin-bottom: 1.2em; }
.entry-content li { margin-bottom: .4em; }
.entry-content strong { color: var(--color-text); }
.entry-content blockquote {
  border-left: 4px solid var(--color-primary);
  padding: 12px 20px;
  margin: 1.5em 0;
  background: var(--color-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--color-text-soft);
}

.entry-content img { border-radius: var(--radius); margin: 1em auto; }

/* ============================================================
   TAGS
   ============================================================ */
.entry-tags {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.entry-tags .tag-label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-text-soft);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.entry-tags a {
  display: inline-block;
  padding: 3px 10px;
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition);
}

.entry-tags a:hover { background: #fde9a0; text-decoration: none; }

/* ============================================================
   SOCIAL SHARE BUTTONS
   ============================================================ */
.share-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: opacity var(--transition);
}

.share-btn:hover { opacity: .85; text-decoration: none; color: #fff; }
.share-btn.share-whatsapp { background: #25D366; }
.share-btn.share-facebook { background: #1877F2; }
.share-btn.share-twitter  { background: #1DA1F2; }
.share-btn.share-pinterest { background: #E60023; }
.share-btn.share-email    { background: #666; }

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section-heading {
  font-size: var(--font-size-lg);
  font-weight: 800;
  color: var(--color-text);
  margin: 32px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Kırmızı dikey çubuk kaldırıldı — sadece sarı border-left (main.css) kullanılıyor */

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.clearfix::after { content: ''; display: table; clear: both; }

.text-primary { color: var(--color-primary); }
.text-soft    { color: var(--color-text-soft); }
.text-muted   { color: var(--color-text-muted); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover { background: var(--color-primary-dark); color: #fff; text-decoration: none; }

.btn-secondary {
  background: var(--color-secondary);
  color: #fff;
}

.btn-secondary:hover { opacity: .85; color: #fff; text-decoration: none; }

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover { background: var(--color-primary); color: #fff; text-decoration: none; }

/* Advertisement placeholders */
.ad-zone {
  overflow: hidden;
  text-align: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1340px) {
  .ad-sidebar-left,
  .ad-sidebar-right { display: none !important; }
}

@media (max-width: 1024px) {
  :root {
    --content-pct: 100%;
    --sidebar-pct: 100%;
  }

  .site-content-wrap { flex-direction: column; }
  #primary { width: 100%; }
  #secondary { width: 100%; position: static; }
}

@media (max-width: 768px) {
  .main-navigation { display: none; }
  .main-navigation.toggled { display: flex; flex-direction: column; position: fixed; top: var(--header-h); left: 0; right: 0; background: var(--color-white); border-top: 1px solid var(--color-border); padding: 16px; box-shadow: var(--shadow-md); z-index: 499; }
  .main-navigation.toggled ul { flex-direction: column; gap: 0; }
  .menu-toggle { display: block; }
  .footer-widgets-wrap { grid-template-columns: 1fr; }
  .header-search-wrap { display: none; }
  .recipe-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .recipe-grid { grid-template-columns: 1fr; }
  :root { --header-h: 56px; }
}

/* ============================================================
   WP ALIGNMENT CLASSES
   ============================================================ */
.alignleft  { float: left;  margin-right: 1.5em; margin-bottom: 1em; }
.alignright { float: right; margin-left: 1.5em;  margin-bottom: 1em; }
.aligncenter { display: block; margin: 0 auto 1em; text-align: center; }
.alignwide   { margin-left: -40px; margin-right: -40px; }
