/* Difsan Çelik — Radiate-style responsive theme clone */
:root {
  --primary: #d10a10;
  --primary-dark: #9c0409;
  --dark: #444444;
  --text: #333;
  --muted: #666;
  --content-bg: #EAEAEA;
  --card-bg: #ffffff;
  --border: #E1E4E6;
  --white: #fff;
  --header-h: 64px;
  --reveal: 380px;
  --font: 'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
}
@media (min-width: 600px) { :root { --reveal: 448px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--content-bg);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

.inner-wrap {
  width: min(1218px, 96%);
  margin-inline: auto;
}
.clearfix::after { content: ""; display: table; clear: both; }

/* Fixed parallax background image (villa) — original: natural size, repeat-x, top */
#parallax-bg {
  position: fixed;
  inset: 0;
  background-color: #d3dade;
  background-repeat: repeat-x;
  background-position: center top;
  background-size: auto;
  z-index: 1;
}

#page {
  position: relative;
  z-index: 10;
}

/* Fixed white header bar */
.site-header { position: relative; }
.header-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
  overflow: visible;
}
.header-inner {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: .5rem;
  min-height: var(--header-h);
}
.site-branding {
  flex: 0 0 auto;
  min-width: 0;
  padding: .4rem 0;
  margin-right: auto;
}
.site-title {
  margin: 0;
  font-size: clamp(1.15rem, 2.4vw, 1.8rem);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.site-title a { color: var(--dark); text-decoration: none; }
.site-title a:hover { color: var(--primary); }
/* Tagline hidden in header (matches original), shown only to screen readers */
.site-description {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* Reveal parallax below fixed header */
#masthead { margin-bottom: var(--reveal); }

/* Header actions (language) */
.header-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.header-admin-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: .4rem .85rem;
  border: 1px solid var(--primary);
  border-radius: 6px;
  color: var(--primary);
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.header-admin-link:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}
.lang-select-wrap { display: flex; align-items: center; }
.lang-select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 40px;
  padding: .4rem 1.9rem .4rem .7rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23444' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .6rem center;
  color: var(--dark);
  font-size: .82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.lang-select:hover, .lang-select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(209, 10, 16, .18);
}

/* Hamburger */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
  flex-shrink: 0;
  order: 3;
}
.menu-toggle span {
  display: block;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: .25s;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Navigation — mobile dropdown (absolute: header-wrap icinde fixed+backdrop containing block hatasi onlenir) */
.main-navigation {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  padding: 1rem;
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 1001;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .15);
  border-top: 1px solid var(--border);
}
.main-navigation.open { display: block; }
.main-navigation ul { list-style: none; margin: 0; padding: 0; }
.main-navigation > .nav-menu > li { border-bottom: 1px solid #eee; }
.main-navigation a {
  display: block;
  padding: .9rem .5rem;
  color: var(--dark);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a { color: var(--primary); }
.main-navigation .sub-menu { padding-left: 1rem; background: #fafafa; }
.main-navigation .sub-menu a { font-size: .95rem; padding: .7rem .5rem; }

/* Content area (gray, scrolls over parallax) */
.site-content {
  position: relative;
  background: var(--content-bg);
  padding: 45px 0 40px;
  min-height: 40vh;
}

/* Featured pages (3 across, top of home) */
#featured_pages {
  padding-bottom: 15px;
  text-align: center;
}
#featured_pages .tg-one-third {
  float: left;
  width: 31.143952%;
  margin: 0 3.284072% 30px 0;
}
#featured_pages .tg-one-third-last { margin-right: 0; }
#featured_pages .page_text_container {
  background: var(--card-bg);
  padding: 24px 24px 20px;
  height: 100%;
}
#featured_pages img {
  width: 100%;
  margin-bottom: 18px;
}
#featured_pages .entry-title {
  margin: 0 0 12px;
  font-size: 1.35rem;
  line-height: 1.2;
}
#featured_pages .entry-title a { color: var(--dark); text-decoration: none; }
#featured_pages .entry-title a:hover { color: var(--primary); }
#featured_pages .more-link {
  display: inline-block;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #555;
  padding: 5px 12px;
  font-size: .85rem;
}
#featured_pages .more-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

/* Primary + secondary layout */
#primary.content-area { width: 100%; }
#secondary.widget-area { width: 100%; }

/* Article */
.site-main article {
  background: var(--card-bg);
  padding: 24px;
}
.entry-header { margin-bottom: 1rem; }
.entry-title {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.3;
  color: var(--dark);
}
.entry-content { color: var(--text); }
.entry-content h1, .entry-content h2, .entry-content h3 {
  color: var(--dark);
  line-height: 1.3;
  margin: 1.5rem 0 .75rem;
}
.entry-content h1:first-child, .entry-content h2:first-child { margin-top: 0; }
.entry-content p { margin: 0 0 1rem; }
.entry-content ul, .entry-content ol { padding-left: 1.25rem; margin: 0 0 1rem; }
.entry-content ul { list-style: square; }
.entry-content img { margin: 1rem 0; }
.entry-content a { color: var(--primary); }
.entry-content a:hover { text-decoration: underline; }

/* Widgets (sidebar) */
#secondary .widget {
  background: var(--card-bg);
  padding: 24px;
  margin-bottom: 30px;
}
#secondary .widget:last-child { margin-bottom: 0; }
.widget-title {
  margin: 0 0 1rem;
  font-size: 1.3rem;
  color: var(--dark);
  line-height: 1.3;
}
.widget-image { padding: 12px !important; }
.widget-image img { width: 100%; }
.widget-image a { display: block; }

/* Search form */
.search-form { display: flex; gap: .5rem; }
.search-field {
  flex: 1;
  min-width: 0;
  padding: .6rem .75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: .95rem;
  font-family: inherit;
  min-height: 44px;
}
.search-field:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(209, 10, 16, .15);
}
.search-submit {
  padding: 0 1.1rem;
  min-height: 44px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.search-submit:hover { background: var(--primary-dark); }

/* Gallery — WordPress .gallery markup rendered as responsive grid */
.gallery-intro > p { margin: 0; }
.entry-content h2:empty { display: none; }
.entry-content .gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 1rem 0 1.5rem;
}
@media (min-width: 560px) { .entry-content .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .entry-content .gallery { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.entry-content .gallery br { display: none; }
.entry-content .gallery .gallery-item {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}
.entry-content .gallery .gallery-icon {
  margin: 0 !important;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .14);
  background: #f0f0f0;
}
.entry-content .gallery .gallery-icon a { display: block; line-height: 0; }
.entry-content .gallery img {
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border: 0 !important;
  cursor: zoom-in;
  transition: transform .35s ease;
}
.entry-content .gallery .gallery-icon:hover img { transform: scale(1.07); }
.entry-content .gallery .gallery-caption { display: none; }

/* Legacy custom gallery grid (unused fallback) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}
@media (min-width: 600px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }
.gallery-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .88);
  padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox__img {
  max-width: 92vw;
  max-height: 86vh;
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .55);
}
.lightbox__close {
  position: absolute;
  top: .75rem;
  right: 1rem;
  width: 46px;
  height: 46px;
  font-size: 2.2rem;
  line-height: 1;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 2rem;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}
.lightbox__nav:hover { background: rgba(255, 255, 255, .25); }
.lightbox__nav--prev { left: 1rem; }
.lightbox__nav--next { right: 1rem; }
@media (max-width: 560px) { .lightbox__nav { width: 42px; height: 42px; font-size: 1.5rem; } }

/* Contact */
.contact-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}
@media (min-width: 560px) { .contact-cards { grid-template-columns: 1fr 1fr; } }
.contact-card {
  background: #fafafa;
  border: 1px solid #eee;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
}
.contact-card__icon { font-size: 1.5rem; line-height: 1; margin-bottom: .5rem; }
.contact-card__title {
  margin: 0 0 .4rem;
  font-size: 1.05rem;
  color: var(--primary);
}
.contact-card__text { margin: 0; color: var(--text); line-height: 1.55; }
.contact-card__text a { color: var(--text); }
.contact-card__text a:hover { color: var(--primary); }
.contact-map {
  margin-top: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
}
.contact-map iframe {
  width: 100%;
  min-height: 320px;
  border: 0;
  display: block;
}
/* legacy */
.contact-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

/* Comments */
.comments-area {
  margin-top: 1.5rem;
  padding: 24px;
  background: var(--card-bg);
}
.comments-title {
  margin: 0 0 1rem;
  font-size: 1.4rem;
  color: var(--dark);
}
.comment-flash {
  margin: 0 0 1rem;
  padding: .7rem 1rem;
  background: #e8f6ec;
  border-left: 4px solid #1a8a3a;
  border-radius: 4px;
  color: #176b30;
}
.comment-list { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.comment {
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}
.comment:last-child { border-bottom: none; }
.comment-head {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  margin-bottom: .35rem;
}
.comment-author { font-weight: 700; color: var(--dark); }
.comment-date { font-size: .8rem; color: var(--muted); }
.comment-body { color: var(--text); }
.no-comments { color: var(--muted); margin: 0 0 1.5rem; }
.comment-form { margin-top: 1rem; }
.comment-form-title { margin: 0 0 .85rem; font-size: 1.15rem; color: var(--dark); }
.comment-form__row { display: grid; gap: 1rem; margin-bottom: 1rem; }
@media (min-width: 560px) { .comment-form__row { grid-template-columns: 1fr 1fr; } }
.comment-form label { display: block; }
.comment-form label span { display: block; margin-bottom: .3rem; font-size: .9rem; font-weight: 600; color: var(--dark); }
.comment-form__full { margin-bottom: 1rem; }
.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: .65rem .8rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
  font-size: .95rem;
}
.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(209, 10, 16, .15);
}

/* Footer */
.site-footer {
  position: relative;
  background: var(--dark);
  color: #ddd;
  padding: 1.75rem 0;
  text-align: center;
  font-size: .9rem;
}
.site-footer a { color: #fff; }

/* Utilities */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ===== Desktop layout (>= 860px) ===== */
@media screen and (min-width: 860px) {
  .menu-toggle { display: none; }
  .header-inner { gap: .75rem; }
  .main-navigation {
    display: block;
    position: static;
    inset: auto;
    background: transparent;
    padding: 0;
    overflow: visible;
    flex: 0 0 auto;
  }
  .main-navigation > .nav-menu {
    display: flex;
    align-items: stretch;
  }
  .main-navigation > .nav-menu > li {
    border: none;
    border-left: 1px solid var(--border);
    position: relative;
  }
  .main-navigation > .nav-menu > li:last-child { border-right: 1px solid var(--border); }
  .main-navigation .nav-menu a {
    padding: 0 clamp(9px, 1vw, 18px);
    line-height: var(--header-h);
    font-size: clamp(.82rem, .95vw, .95rem);
    font-weight: 500;
    color: var(--dark);
    white-space: nowrap;
  }
  .main-navigation .nav-menu > li:hover > a,
  .main-navigation .nav-menu > li.current-menu-item > a {
    background: var(--primary);
    color: #fff;
    text-decoration: none;
  }
  .main-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    padding: 0;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    z-index: 1001;
  }
  .main-navigation .nav-menu > li:hover > .sub-menu { display: block; }
  .main-navigation .sub-menu li { border-bottom: 1px solid #f0f0f0; }
  .main-navigation .sub-menu a { line-height: 1.4; padding: .7rem 1rem; font-size: .9rem; }
  .main-navigation .sub-menu a:hover { background: var(--primary); color: #fff; }
}

/* ===== Two-column content (>= 769px) ===== */
@media screen and (min-width: 769px) {
  #primary.content-area { width: 68%; float: left; }
  #secondary.widget-area { width: 28%; float: right; }
}

/* ===== Mobile header (< 860px) ===== */
@media screen and (max-width: 859px) {
  .site-branding { flex: 1 1 auto; margin-right: 0; min-width: 0; overflow: hidden; }
  .site-title { font-size: 1.2rem; text-overflow: ellipsis; overflow: hidden; }
  .header-actions { margin-left: auto; }
  .lang-select {
    min-height: 38px;
    font-size: .72rem;
    padding: .35rem 1.55rem .35rem .55rem;
    background-position: right .45rem center;
  }
  .header-admin-link { min-height: 38px; padding: .35rem .6rem; font-size: .74rem; }
}
@media screen and (max-width: 480px) {
  .header-admin-link { display: none; }
}

/* ===== Tablet: featured pages stacked cleaner ===== */
@media screen and (max-width: 768px) {
  #featured_pages .tg-one-third {
    width: 100%;
    float: none;
    margin: 0 0 20px 0;
  }
  #secondary.widget-area { margin-top: 30px; clear: both; }
}
