/* Yeni Eklenenler - Kompakt Grid */
.newest-compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-top: 28px;
}
.compact-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--theme-text);
  transition: box-shadow 0.18s;
  min-width: 0;
}
.compact-card:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
}
.compact-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
}
.compact-card .p {
  padding: 12px 10px 10px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.compact-card .badge {
  background: var(--theme-primary);
  color: #fff;
  font-size: 0.85rem;
  border-radius: 6px;
  padding: 2px 8px;
  display: inline-block;
  margin-bottom: 2px;
}
.compact-card .card-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 2px;
}
.compact-card .meta {
  color: var(--muted);
  font-size: 0.92rem;
}
.compact-card .meta .star {
  color: var(--orange);
  font-size: 1em;
  margin-right: 2px;
}
@media (max-width: 700px) {
  .newest-compact-grid { grid-template-columns: repeat(2, 1fr); }
  .compact-card img { height: 70px; }
}
/* Theme-aware defaults. Server injects --theme-primary/--theme-background/--theme-text in header.php */
:root{
  --theme-primary: #ff6a00; /* fallback */
  --theme-background: #ffffff;
  --theme-text: #111827;
  --dark:#1f2937;
  --light:#f8fafc;
  --card:#ffffff;
  --muted:#6b7280;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;font-family:var(--theme-font) !important;background:var(--theme-background);color:var(--theme-text)}

/* Preserve monospace contexts explicitly so code blocks, pre, kbd, and inputs keep expected fonts */
code, pre, kbd, samp, tt, .monospace, input[type="text"], input[type="search"], textarea { 
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}

a{color:var(--orange);text-decoration:none}
a:hover{text-decoration:underline}

.navbar{
  position:sticky; top:0; z-index:1500;
  background:linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.72));
  border-bottom:1px solid rgba(15,23,42,.06);
  backdrop-filter:saturate(1.05) blur(8px);
  -webkit-backdrop-filter:saturate(1.05) blur(8px);
  box-shadow:0 8px 22px rgba(2,6,23,.06);
}
.navbar .container{
  display:flex; align-items:center; justify-content:space-between;
  gap:24px; padding:12px 24px; max-width:1200px; margin:0 auto;
}
.brand{
  font-weight:900; letter-spacing:.2px; font-size:20px; color:var(--theme-primary); text-decoration:none;
}
.navbar nav{display:flex; align-items:center; gap:6px}
.navbar nav a{
  color:var(--theme-text); opacity:.8; font-weight:700; font-size:14px;
  padding:8px 12px; border-radius:12px; transition:.15s ease;
}
.navbar nav a:hover{opacity:1; background:var(--light); text-decoration:none}
.navbar nav a:focus{outline:3px solid rgba(99,102,241,.35); outline-offset:2px}
@media (max-width:640px){ .navbar .container{padding:12px 16px} .navbar nav a{padding:8px 10px} }

.btn{
  background:var(--theme-primary);color:#fff;border:none;border-radius:10px;padding:10px 16px;font-weight:600;cursor:pointer;
}
.btn:disabled{opacity:.7;cursor:not-allowed}

.hero{
  position:relative;
  background: url('../images/hero.jpg') center/cover no-repeat;
  padding:70px 0;color:var(--hero-text);text-align:center;margin-bottom:24px;
}
.hero::before{
  content:''; position:absolute; inset:0; background:var(--theme-primary); opacity:0.65; z-index:1;
}
.hero h1{font-size:44px;margin:10px 0 6px}
.hero p{opacity:.95;margin:0}

.searchbar{display:flex;gap:10px;max-width:880px;margin:18px auto}
.searchbar input{flex:1;border:1px solid rgba(15,23,42,0.06);border-radius:12px;padding:12px 14px;font-size:16px;background:transparent;color:var(--theme-text)}
.searchbar input:focus{outline:none;box-shadow:0 8px 28px rgba(2,6,23,0.08);border-color:color-mix(in srgb, var(--theme-primary) 60%, black)}
.searchbar .btn{padding:12px 20px;background:linear-gradient(180deg,var(--theme-primary), color-mix(in srgb,var(--theme-primary) 65%, black));color:#fff;border-radius:12px;border:none;box-shadow:0 12px 36px rgba(2,6,23,0.12);transition:transform .08s ease, filter .08s ease}
.searchbar .btn:hover{filter:brightness(1.03)}
.searchbar .btn:active{transform:translateY(1px)}

.container{max-width:1200px;margin:0 auto;padding:0 24px}
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}

/* Page content (static pages) — use full container width and avoid boxed white card */
.page-content {
  background: transparent; /* no white boxed background */
  color: var(--theme-text);
  line-height: 1.6;
  font-size: 1rem;
}
.page-content p { margin-bottom: 1rem; }

/* If a grid has only one card, don't let that single card stretch full width.
   Center it and constrain max-width for better appearance on search results with 1 item. */
.grid > a.card:only-child,
.grid > .card:only-child {
  /* left-align the single item by default (inside the container padding) */
  justify-self: start;
  max-width: 980px;     /* don't let it grow beyond a comfortable reading width */
  width: 100%;
}

/* stronger rule for grids explicitly flagged as single-result */
.grid.single-result {
  display: grid;
  grid-template-columns: 1fr; /* ensure single column */
  justify-items: start; /* left-align within container */
  align-items: start;
}
.grid.single-result > a.card,
.grid.single-result > .card {
  /* constrain single card width but keep it left-aligned */
  max-width: 640px !important;
  width: 100% !important;
  justify-self: start !important;
  margin-left: 0 !important;
}

/* For exactly two or very few results, center them and use a two-column constrained layout */
.grid.few-results {
  display: grid;
  /* two-column centered layout with narrower max so cards don't look stretched */
  grid-template-columns: repeat(2, minmax(280px, 360px)); 
  justify-content: start; /* left-align the layout */
  gap: 28px;
}
.grid.few-results > a.card,
.grid.few-results > .card {
  max-width: 360px !important;
  width: 100% !important;
  justify-self: start !important;
}
/* Ensure grid items don't stretch via flex or width rules elsewhere */
.grid.few-results > a.card .p,
.grid.single-result > a.card .p,
.grid.few-results > .card .p,
.grid.single-result > .card .p { max-width: 100%; }

/* Slightly reduce hero image height inside cards for compact look on single/few results */
.grid.single-result .card img,
.grid.few-results .card img,
.grid.single-result > a.card img,
.grid.few-results > a.card img {
  height: 200px; /* was 180/180 earlier for general cards; set compact height */
  object-fit: cover;
}

@media (max-width: 900px) {
  .grid.few-results { grid-template-columns: 1fr; }
  .container > .grid.single-result > a.card { max-width: 100% !important; }
}

.card{
  background:var(--card);border:1px solid rgba(0,0,0,0.04);border-radius:16px;overflow:hidden;
  box-shadow:0 4px 10px rgba(0,0,0,.05);
}
.card img{width:100%;height:180px;object-fit:cover;display:block}
.card .p{padding:14px}
.badge{display:inline-block;background:var(--theme-primary);color:#fff;border-radius:999px;padding:4px 10px;font-size:12px;margin-bottom:6px}

/* HERO CITY - side-by-side layout */
.hero-city {
  position: relative;
  min-height: 260px;
  overflow: hidden;
}
.hero-city .hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('../images/rotterdam-skyline.jpg') center/cover no-repeat;
  opacity: 0.18;
  z-index: 0;
}
.hero-city::before{ content:''; position:absolute; inset:0; background:var(--theme-primary); opacity:0.14; z-index:0 }
.hero-row{ display:block; position:relative; z-index:2; }
.hero-left{ display:block; padding-top:32px; }
.hero-right{ display:none; }
.hero-content { padding: 36px 0; color:var(--theme-text); display:flex; justify-content:center; }

/* improve readability by adding a centered white card behind hero text */
.hero-content-inner{ background: rgba(255,255,255,0.96); padding:30px 36px; border-radius:12px; display:block; box-shadow:0 10px 30px rgba(0,0,0,0.08); max-width:960px; width:84%; text-align:center; }
.hero-content-inner h1{ color:var(--theme-secondary); font-size:44px; margin:6px 0 8px; line-height:1.02; font-weight:800 }
.hero-content p{ margin:8px 0 18px; color:var(--muted); max-width:640px; margin-left:auto; margin-right:auto }
.hero-content .searchbar { display:flex; gap:8px; margin-top:16px }
.hero-content .searchbar input { padding:10px 14px; border-radius:8px; border:1px solid rgba(15,23,42,0.06); font-size:1rem; background:#fff; color:var(--theme-text) }
.hero-content .searchbar input:focus{border-color:var(--theme-primary);box-shadow:0 10px 30px rgba(15,23,42,0.08)}
.hero-content .searchbar .btn { background: linear-gradient(180deg, var(--theme-primary), color-mix(in srgb, var(--theme-primary) 70%, black)); color: #fff; font-weight:700; border-radius:10px; padding:10px 18px; border:none; box-shadow: 0 10px 30px rgba(0,0,0,0.12); transition:transform .08s }
.hero-content .searchbar .btn:active{transform:translateY(1px)}

/* CAROUSEL */
/* Carousel - 3 kart görünümü ve otomatik slider için */
.carousel-wrapper { overflow: hidden; margin-bottom: 0; padding-left:0; }
.carousel {
  display: flex;
  gap: 24px;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* Allow horizontal scrolling so JS can control scrollLeft/scrollTo; wrapper keeps overflow hidden for visual clipping */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* smooth native scrolling on iOS */
}
.carousel::-webkit-scrollbar { display: none; }
.carousel { -ms-overflow-style: none; scrollbar-width: none; }
.carousel .card {
  flex: 0 0 auto;
  min-width: 160px;
  max-width: 1000px;
  /* prefer a computed width when JS sets --carousel-card-width */
  width: var(--carousel-card-width, auto);
  flex-basis: var(--carousel-card-width, auto);
  scroll-snap-align: start;
}
@media (max-width: 900px) {
  .carousel .card { min-width: 160px; max-width: 100%; flex: 0 0 var(--carousel-card-width, 80%); }
}
/* Carousel için mobil uyumlu stil eklemeleri */
@media (max-width: 600px) {
  .carousel {
    display: flex; /* Kartları yatayda sırala */
    overflow-x: auto; /* Yatay kaydırma aktif */
    scroll-snap-type: x mandatory; /* Kartlar arasında snap efekti */
    -webkit-overflow-scrolling: touch; /* iOS için akıcı kaydırma */
    gap: 16px; /* Kartlar arası boşluk */
    padding-bottom: 16px; /* Alt boşluk */
  }
  .carousel .card {
    min-width: 85vw; /* Kart genişliği ekranın büyük kısmını kaplasın */
    flex: 0 0 85vw; /* Kartlar sabit genişlikte olsun */
    scroll-snap-align: start; /* Snap noktası kartın başı */
    margin-right: 8px; /* Kartlar arası boşluk */
  }
}
/* Yeni Eklenenler Grid */
.newest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 32px;
}
.newest-card {
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  border-radius: 12px;
  background: #fff;
  transition: box-shadow 0.2s;
}
.newest-card:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
/* Footer */
.site-footer {
  background: var(--theme-primary);
  color: #fff;
  padding: 32px 0 18px 0;
  margin-top: 64px;
}
.site-footer .footer-content {
  text-align: center;
  font-size: 1.08rem;
  font-weight: 500;
}

/* CHIPS */
.chips {
  display: flex;
  /* force wrapping so many cities are shown across multiple rows */
  flex-wrap: wrap !important;
  gap: 10px;
  margin-bottom: 22px;
  /* ensure chips are not clipped by parent containers */
  overflow: visible !important;
  align-items: center;
}
.chip, .category-chip {
  /* use the theme accent (primary) color for chip backgrounds */
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.95rem;
  text-decoration: none;
  font-weight: 700;
  transition: transform .12s, filter .12s;
  box-shadow: 0 8px 24px rgba(2,6,23,0.06);
}
.chip:hover, .category-chip:hover { transform:translateY(-3px); filter:brightness(1.04) }

/* Pagination styles — theme-aware */
.pagination { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.pagination a { display:inline-flex; align-items:center; justify-content:center; min-width:36px; height:36px; padding:6px 10px; border-radius:8px; text-decoration:none; color:var(--theme-text); background:transparent; border:1px solid rgba(15,23,42,0.06); font-weight:700 }
.pagination a:hover { background: rgba(0,0,0,0.04); color: var(--theme-primary); border-color: color-mix(in srgb, var(--theme-primary) 20%, rgba(15,23,42,0.06)); }
.pagination a.is-active { background: var(--theme-primary); color: #fff; border-color: var(--theme-primary); }


/* CARD */
.card {
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--theme-text);
  transition: box-shadow 0.2s;
}
.card:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}
.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.card .p {
  padding: 18px 16px 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card .badge {
  background: var(--theme-primary);
  color: #fff;
  font-size: 0.9rem;
  border-radius: 999px;
  padding: 6px 12px;
  display: inline-block;
  margin-bottom: 6px;
  box-shadow: 0 6px 18px rgba(2,6,23,0.06);
}

/* İşletme kartları (ana link olarak kullanılan a.card / a.compact-card) için hover'ta alt çizgi olmasın
   global `a:hover { text-decoration: underline }` kuralını !important kullanmadan spesifik selector ile override eder */
a.card, a.card:hover,
a.compact-card, a.compact-card:hover,
.card:hover, .compact-card:hover {
  text-decoration: none; /* alt çizgiyi kaldır */
}

/* Business page pills (top badges) - use theme primary color from settings */
.biz-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  /* semi-opaque background with frosted effect to ensure legibility over images */
  background: color-mix(in srgb, var(--theme-primary, #6b46c1) 78%, black 12%);
  color:#fff;
  border-radius:999px;
  padding:6px 10px; /* comfortable clickable area */
  font-weight:700;
  font-size:0.86rem; /* slightly smaller to fit */
  line-height:1;
  margin-left:6px;
  box-shadow:0 6px 18px rgba(0,0,0,0.18);
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  backdrop-filter: blur(6px) saturate(120%);
}

.biz-pill.closed{
  /* neutral dark translucent background for closed state for best contrast */
  background: rgba(0,0,0,0.62);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 6px 14px rgba(0,0,0,0.28);
}
.biz-pill.open{
  background: color-mix(in srgb, var(--theme-primary, #6b46c1) 78%, black 12%);
  color: #fff;
}

/* smaller icons / emoji alignment inside pills */
.biz-pill img, .biz-pill svg { height: 14px; width: auto; display: inline-block; }
.biz-pill { vertical-align: middle; }

/* responsive tweak: if container is narrow, reduce font-size to keep pills on single row */
@media (max-width:480px){ .biz-pill{ font-size:0.8rem; padding:5px 8px } }

/* Get Directions button in the location card - use theme primary color */
.dir-btn:not(.cta-large){ display:inline-flex; align-items:center; gap:12px; text-decoration:none; background:var(--accent); color:#fff; padding:10px 14px; border-radius:12px; font-weight:900; border:none; box-shadow:0 6px 16px rgba(2,6,23,0.06) }
.dir-btn:not(.cta-large) .dir-ico{ font-size:18px; display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:10px; background:#fff; margin-right:10px; box-shadow:0 2px 8px rgba(2,6,23,0.04) }
.dir-btn:not(.cta-large):hover{ filter:brightness(.96); text-decoration:none }
.dir-btn:active{ transform:none }
.dir-btn.dir-btn--full{ display:inline-flex; width:100%; justify-content:center; align-items:center }
/* Ensure CTA-specific styles are not overridden */
.cta-large{ background:#fff !important; color:var(--accent) !important; border:1px solid color-mix(in srgb, var(--accent) 28%, rgba(2,6,23,0.04)) !important; }
.card-title {
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 2px;
  color: var(--theme-secondary);
}
.card .meta {
  color: var(--muted);
  font-size: 0.98rem;
}
.card .meta .star {
  color: var(--theme-secondary);
  font-size: 1.1em;
  margin-right: 2px;
}

/* GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 18px;
  color: var(--theme-secondary);
}

@media (max-width: 700px) {
  .hero-city h1 { font-size: 2rem; }
  .card img { height: 120px; }
  .carousel .card { min-width: 160px; max-width: 100%; flex-basis: var(--carousel-card-width, auto); }
  /* Dar ekranlarda hero içeriğini daralt ve arama çubuğunu dikeyleştir */
  .hero-content-inner{ max-width:100%; padding:20px 18px; width:92%; }
  .searchbar{ flex-direction:column; gap:10px; max-width:420px; margin-left:auto; margin-right:auto }
  .searchbar input{ width:100%; }
  .searchbar .btn{ width:100%; }
}

/* Mobile-specific tweaks: show results as two columns on small screens
   so search results (and index grids) display 2-up on phones */
@media (max-width: 640px) {
  /* Force grids to two columns for better use of screen space on phones */
  .grid, .newest-compact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* Make sure card sizing works in the two-column layout */
  .card, .compact-card, .newest-card {
    width: 100%;
    min-width: 0;
  }

  /* Slightly reduce image height to fit two columns comfortably */
  .card img, .compact-card img {
    height: 120px;
    object-fit: cover;
  }

  /* Reduce paddings inside cards for narrow screens */
  .card .p, .compact-card .p {
    padding: 12px 10px;
    gap: 6px;
  }

  /* Carousel: small screens should show two full cards side-by-side instead of a partially-visible scroll */
  .carousel {
    /* keep flex so the JS slider can scroll the element */
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }
  .carousel .card {
    min-width: 0; /* prevent forcing a larger min width */
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* site logo sizing */
.site-logo{ max-height:var(--logo-height,48px); max-width:220px; width:auto; display:inline-block; vertical-align:middle; object-fit:contain; }

/* Site-wide page-tabs fallback styles: improve contrast when tabs sit over hero images */
.page-tabs{
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
}
.page-tabs a{ color: #fff !important; }

/* Small-screen touches: increase tap targets and allow tabs to wrap */
@media (max-width:480px){
  .page-tabs .container{ padding:8px 10px; gap:8px }
  .page-tabs a{ padding:10px 12px; min-height:44px; font-size:0.95rem }
  .biz-hero__badges{ gap:8px; flex-wrap:wrap }
}
