:root {
  --blue: #0a4db8;
  --orange: #ff8c00;
  --gray: #f4f6f8;
  --dark: #222;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ✅ Menüler tıklanınca yumuşak kaydırma */
html {
  scroll-behavior: smooth;
}

/* ✅ Sticky header varken section'a gidince üstten boşluk bırak */
section {
  scroll-margin-top: 90px;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--dark);
  line-height: 1.6;
}

/* =========================
   LAYOUT
========================= */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 3.5rem 0;
}

.section-gray {
  background: var(--gray);
}

/* =========================
   HEADER
========================= */
.header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.logo {
  height: 100px;
}

/* Navigation */
.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 600;
  position: relative;
  padding: 6px 0;
}

/* aktif menü mavi */
.nav a.is-active {
  color: var(--blue);
}

.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
}

/* Hamburger */
#menu-toggle {
  display: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  width: 26px;
  height: 3px;
  background: var(--dark);
  border-radius: 2px;
}

/* =========================
   HERO SLIDER
========================= */
.hero-slider {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Overlay (mavi hissi) */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    rgba(10, 77, 184, 0.78),
    rgba(10, 77, 184, 0.55)
  );
  z-index: 2;
}

/* Slides track */
.hero-track {
  position: absolute;
  inset: 0;
  display: flex;
  width: 300%;
  height: 100%;
  transform: translateX(0%);
  animation: heroAutoSlide 18s infinite ease-in-out;
  z-index: 1;
  will-change: transform;
}

.hero-slide {
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
}

.hero-slide.s1 { background-image: url("images/hero-1.jpg"); }
.hero-slide.s2 { background-image: url("images/hero-2.jpg"); }
.hero-slide.s3 { background-image: url("images/hero-3.jpg"); }

/* Content */
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 920px;
  color: #fff;
  padding-bottom: 56px;
}

.hero-content h1 {
  margin-bottom: 0.75rem;
  white-space: nowrap;
  font-size: clamp(1.35rem, 6.2vw, 2.8rem);
}

.hero-content p {
  margin-bottom: 1.25rem;
  opacity: 0.95;
  font-size: calc(1rem + 4px);
}

/* Button */
.btn-primary {
  display: block;
  width: fit-content;
  background: var(--orange);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  margin: 0 auto;
}

/* Dots */
.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.dot:hover {
  transform: scale(1.15);
  background: rgba(255, 255, 255, 0.55);
}

/* Active dot */
#hero-slide-1:checked ~ .hero-track ~ .hero-overlay ~ .hero-content ~ .hero-dots label[for="hero-slide-1"],
#hero-slide-2:checked ~ .hero-track ~ .hero-overlay ~ .hero-content ~ .hero-dots label[for="hero-slide-2"],
#hero-slide-3:checked ~ .hero-track ~ .hero-overlay ~ .hero-content ~ .hero-dots label[for="hero-slide-3"] {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.15);
}

/* Auto slide */
@keyframes heroAutoSlide {
  0%   { transform: translateX(0%); }
  28%  { transform: translateX(0%); }
  33%  { transform: translateX(-33.3333%); }
  61%  { transform: translateX(-33.3333%); }
  66%  { transform: translateX(-66.6666%); }
  94%  { transform: translateX(-66.6666%); }
  100% { transform: translateX(0%); }
}

/* =========================
   ABOUT
========================= */
.two-col {
  display: grid;
  gap: 2rem;
  align-items: center;
  grid-template-columns: 1.1fr 0.9fr;
}

.image-box {
  border-radius: 10px;
  overflow: hidden;
}

.image-box img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
}

/* Mobilde About aç/kapa */
.about-toggle {
  display: none;
  margin-top: 1rem;
  background: none;
  border: none;
  color: var(--blue);
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}

/* =========================
   SERVICES
========================= */
.services-section {
  position: relative;
}

.services-grid {
  margin-top: 2rem;
  display: grid;
  gap: 1.25rem;
}

.service-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background-color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.service-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 800;
  padding: 0 1rem;
}

/* image layer */
.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* blue overlay */
.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 77, 184, 0.75),
    rgba(10, 77, 184, 0.55)
  );
  opacity: 0;
  transition: opacity 0.35s ease;
}

/* WEB hover */
@media (min-width: 769px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .service-card {
    height: 70px;
    cursor: pointer;
    transition: height 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
  }

  .service-content {
    height: 70px;
    color: var(--dark);
    transition: color 0.35s ease, padding 0.35s ease, align-items 0.35s ease;
  }

  .service-card:hover {
    height: 200px;
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
  }

  .service-card:hover::before,
  .service-card:hover::after {
    opacity: 1;
  }

  .service-card:hover::before {
    transform: scale(1);
  }

  .service-card:hover .service-content {
    color: #fff;
    align-items: flex-end;
    padding-bottom: 1.25rem;
  }
}

/* Mobile/tablet default open */
@media (max-width: 768px) {
  .service-card {
    height: 200px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
  }

  .service-content {
    height: auto;
    width: 100%;
    text-align: center;
    display: block;
    padding: 0 1rem 1.25rem;
    color: #fff;
  }

  .service-card::before,
  .service-card::after {
    opacity: 1;
    transform: scale(1);
  }
}

/* Service images */
.service-office::before { background-image: url("images/service-office.jpg"); }
.service-plaza::before { background-image: url("images/service-plaza.jpg"); }
.service-construction::before { background-image: url("images/service-construction.jpg"); }
.service-glass::before { background-image: url("images/service-glass.jpg"); }
.service-disinfection::before { background-image: url("images/service-disinfection.jpg"); }
.service-site::before { background-image: url("images/service-site.jpg"); }

/* =========================
   REFERENCES (marquee)
========================= */
.refs-marquee {
  overflow: hidden;
  width: 100%;
  position: relative;
}

.refs-track {
  display: flex;
  width: max-content;
  animation: refsScroll 22s linear infinite;
  align-items: center;
}

.ref-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 36px;
}

.ref-item img {
  max-height: 64px;
  width: auto;
  display: block;
  filter: grayscale(100%);
  opacity: 0.85;
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.ref-item img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

@keyframes refsScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Mobile/tablet references fix */
@media (max-width: 1024px) {
  .refs-marquee {
    overflow: hidden;
    padding: 0 16px;
  }

  .refs-track {
    flex-wrap: nowrap;
    gap: 28px;
    padding-left: 16px;
  }

  .ref-item {
    padding: 0;
    height: 72px;
  }

  .ref-item img {
    height: 44px;
    filter: none;   /* ✅ mobilde renkli */
    opacity: 1;
  }
}

/* =========================
   CONTACT (info left + map right + icons bottom)
========================= */
.contact-section h2 {
  text-align: left;
  margin-bottom: 1.5rem;
}

.contact-grid {
  display: grid;
  gap: 1.5rem;
  align-items: center; /* ✅ METİN MAP İLE DİKEY ORTALI */
  grid-template-columns: 1fr 1fr;
  margin-top: 1rem;
}

.contact-info {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem;
}

.contact-info p {
  margin: 0.55rem 0;
}

.contact-map {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #fff;
  min-height: 320px;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  display: block;
}

/* bottom centered icons */
.contact-actions {
  margin-top: 1.75rem;

  /* ✅ grid item olarak iki kolonu kapla */
  grid-column: 1 / -1;

  /* ✅ ikonları ortalamak için flex şart */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;

  /* opsiyonel */
  width: 100%;
}

/* ✅ SADECE İKON */
.contact-action {
  width: 46px;
  height: 46px;

  display: flex; /* ✅ inline-flex -> flex */
  align-items: center;
  justify-content: center;

  line-height: 0; /* ✅ optik kaymayı azaltır */

  border-radius: 50%;
  padding: 0;

  background: #fff;
  border: 1px solid #e5e7eb;

  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.contact-action:hover {
  transform: translateY(-2px);
  border-color: rgba(10, 77, 184, 0.4);
  box-shadow: 0 10px 18px rgba(0,0,0,0.1);
}

.contact-action img {
  display: block;
  width: auto;        /* ✅ 22x22 zorlaması kaldırıldı */
  height: auto;
  max-width: 22px;    /* ✅ sınır koyuldu */
  max-height: 22px;
  object-fit: contain;
}

/* Mobile contact layout */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-map,
  .contact-map iframe {
    min-height: 260px;
  }
}

/* =========================
   FOOTER
========================= */
.footer {
  background: var(--blue);
  color: #fff;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.9rem;
}

/* =========================
   BACK TO TOP
========================= */
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: none;
  background: var(--blue);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  filter: brightness(1.05);
}

/* =========================
   RESPONSIVE (header + about + hero title)
========================= */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav {
    position: absolute;
    top: 72px;
    right: 0;
    width: 100%;
    background: #fff;
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 0;
    gap: 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    display: none;
  }

  #menu-toggle:checked ~ .nav {
    display: flex;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .image-box img {
    height: 260px;
  }

  .about-text {
    max-height: 7.5em;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
  }

  .about-text::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3.2em;
    pointer-events: none;
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0),
      rgba(255, 255, 255, 1)
    );
  }

  .about-text.is-open {
    max-height: 1200px;
  }

  .about-text.is-open::after {
    opacity: 0;
  }

  .about-toggle {
    display: inline-block;
  }

  /* Mobile: başlık 2 satıra çıkabilsin */
  .hero-content h1 {
    white-space: normal;
    line-height: 1.18;
    font-size: clamp(2rem, 7vw, 2.4rem);
    max-width: 18ch;
  }
}
