/* WordPress + Elementor wrappers — existing HTML/CSS stays intact */

body.cot-theme img.brand-logo,
.brand-logo {
  height: 52px !important;
  width: auto !important;
  max-width: min(280px, 46vw) !important;
}
.elementor-widget-cot-site-header,
.elementor-widget-cot-site-footer,
.elementor-element[data-widget_type="cot-site-header.default"],
.elementor-element[data-widget_type="cot-site-footer.default"] {
  width: 100% !important;
  max-width: none !important;
}
.site-header,
.site-footer { width: 100%; }
body.cot-theme .elementor:has(.site-header),
body.cot-theme .elementor:has(.site-header) .e-con,
body.cot-theme .elementor:has(.site-header) .e-con-inner,
body.cot-theme .elementor:has(.site-footer),
body.cot-theme .elementor:has(.site-footer) .e-con,
body.cot-theme .elementor:has(.site-footer) .e-con-inner {
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
}

body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}

.elementor-widget-wrap > .elementor-element,
.e-con > .elementor-element,
.e-con-inner > .elementor-element { width: 100%; }

.elementor-section,
.e-con,
.e-con-boxed,
.e-con-full {
  --padding-top: 0px;
  --padding-right: 0px;
  --padding-bottom: 0px;
  --padding-left: 0px;
  --gap: 0px;
}

body.cot-theme .elementor-widget:not(:last-child) { margin-bottom: 0 !important; }
body.cot-theme .elementor-element { --widgets-spacing: 0px; }
body.cot-theme .e-con-inner { padding: 0; gap: 0; }
body.cot-theme .elementor-widget-container { padding: 0; }

body.cot-theme h1.entry-title,
body.cot-theme .page-header { display: none; }

/* Header inner widgets sit in the same flex row */
.cot-header-flex.e-con,
.cot-header-flex > .e-con-inner,
.elementor-location-header .e-con-inner {
  display: flex;
  align-items: center;
  gap: 32px;
}
.elementor-location-header .elementor-widget,
.elementor-location-header .elementor-widget-container,
.cot-header-flex .elementor-widget,
.cot-header-flex .elementor-widget-container {
  display: contents;
}

body.elementor-editor-active .site-header { position: relative; }
.cot-hf-canvas { background: var(--page, #f8f7f2); margin: 0; }

.wp-block-image img { max-width: 100%; height: auto; }

/* Elementor `.elementor img { height: auto }` kırpılmış kapakları kaydırıyor */
body.cot-theme .elementor .hero-bg img,
body.cot-theme .elementor .hero-portrait img,
body.cot-theme .elementor .card-overlay > img,
body.cot-theme .elementor .card-split-media img,
body.cot-theme .elementor .category-media img,
body.cot-theme .elementor .post-media img,
body.cot-theme .elementor .video-media img,
body.cot-theme .elementor .about-portrait img,
body.cot-theme .elementor .article-row img,
body.cot-theme .elementor .article-hero-bg img,
body.cot-theme .elementor .ct-map-inner img,
body.cot-theme .elementor .ct-cta-bg img,
body.cot-theme .elementor .ct-cta-portrait img {
  width: 100%;
  max-width: none !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* Gallery page: keep 3-col track size, fill stretched cells (no black bars). */
body.cot-theme .elementor .gallery-grid {
  grid-auto-flow: dense;
}
body.cot-theme .elementor .gallery-item {
  min-width: 0;
  min-height: 0;
}
body.cot-theme .elementor .gallery-item::before {
  content: "";
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
}
body.cot-theme .elementor .gallery-item.tall::before {
  aspect-ratio: 3 / 4;
}
body.cot-theme .elementor .gallery-item img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  aspect-ratio: auto !important;
}
@media (max-width: 1100px) {
  body.cot-theme .elementor .gallery-item::before {
    display: none;
  }
  body.cot-theme .elementor .gallery-item img {
    position: static !important;
    inset: auto !important;
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
  }
}
@media (max-width: 768px) {
  body.cot-theme .elementor .gallery-item img {
    aspect-ratio: 4 / 5 !important;
    min-height: 280px;
  }
  body.cot-theme .elementor .gallery-item.tall img {
    aspect-ratio: 3 / 4 !important;
    min-height: 360px;
  }
}

body.cot-theme .elementor .featured-grid > * {
  min-height: 0;
  height: 100%;
}
body.cot-theme .elementor .card-overlay > img {
  position: absolute !important;
  inset: 0 !important;
}
body.cot-theme .elementor .card-split {
  height: 100%;
  min-height: 0;
}
body.cot-theme .elementor .card-split-media {
  flex: 0 0 47%;
  height: 47%;
  min-height: 0;
}
body.cot-theme .elementor .ct-hero-bg img {
  max-width: none !important;
  width: 62%;
  height: 128% !important;
}
@media (max-width: 640px) {
  body.cot-theme .elementor .ct-hero-bg img {
    width: 100%;
    height: 100% !important;
  }
}

/* HTML `.container.media-layout` — Elementor 4 has no .e-con-inner here */
body.cot-theme .e-con.cot-media-layout {
  display: grid !important;
  grid-template-columns: 1fr 400px;
  gap: 32px;
  align-items: stretch;
  width: 100% !important;
  max-width: var(--container, 1320px);
  margin-inline: auto !important;
  padding-inline: var(--gutter, 40px) !important;
  padding-block: 36px 0 !important;
  box-sizing: border-box;
  flex-direction: unset !important;
}
body.cot-theme .e-con.cot-media-layout > .e-con-inner {
  display: contents !important;
}
body.cot-theme .e-con.cot-media-layout > .elementor-element,
body.cot-theme .e-con.cot-media-layout > .e-con-inner > .elementor-element {
  min-width: 0;
  width: 100%;
}
body.cot-theme .e-con.cot-media-layout .elementor-widget-cot-home-about,
body.cot-theme .e-con.cot-media-layout .elementor-widget-cot-home-about > .elementor-widget-container,
body.cot-theme .e-con.cot-media-layout .about-card {
  height: 100%;
}
body.cot-theme .elementor .about-portrait img {
  object-position: center 20%;
}
@media (max-width: 1280px) {
  body.cot-theme .e-con.cot-media-layout { grid-template-columns: 1fr 340px; }
}
@media (max-width: 1100px) {
  body.cot-theme .e-con.cot-media-layout { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 768px) {
  body.cot-theme .e-con.cot-media-layout { grid-template-columns: 1fr; gap: 0; }
  body.cot-theme .elementor .about-portrait img { object-position: center 10%; }
}

.e-con.cot-media-section { padding-top: 36px; }

body.cot-theme .elementor-kit-1 {
  --e-global-typography-primary-font-family: inherit;
  --e-global-typography-secondary-font-family: inherit;
  --e-global-typography-text-font-family: inherit;
  --e-global-typography-accent-font-family: inherit;
}

/* Contact Form 7 — keep existing ct-form look */
.wpcf7 { margin: 0; }
.wpcf7 .hidden-fields-container,
.wpcf7 .screen-reader-response {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.wpcf7 form.ct-form { display: grid; gap: 18px; }
.wpcf7 .ct-field .wpcf7-form-control-wrap { display: block; }
.wpcf7 p { margin: 0; }
.wpcf7 br { display: none; }
.wpcf7 .ct-select .wpcf7-form-control-wrap { display: block; }
.wpcf7 .ct-select select.ct-input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
  width: 100%;
}
.wpcf7-not-valid-tip { display: block; margin-top: 6px; font-size: 12.5px; color: #b33a3f; }
.wpcf7-response-output {
  margin: 0 !important;
  padding: 12px 14px;
  border: 0 !important;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.45;
}
.wpcf7 form.sent .wpcf7-response-output { background: #eef4ee; color: var(--dark-1); }
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output { background: #f7eeee; color: #7a2e2e; }
.ct-form input.wpcf7-submit {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wpcf7 .wpcf7-spinner { margin: 8px auto 0; }
