/* ================================================================
   Kayagil Metal Sanayi — Kurumsal Website
   ================================================================ */

/* ---------- CSS Değişkenleri (renk paleti + ortak değerler) ---------- */
:root {
  --color-primary: #0B2D6F;      /* Lacivert */
  --color-primary-dark: #071D4A; /* Koyu lacivert */
  --color-accent: #E85D04;       /* Turuncu */
  --color-light: #F4F6FA;        /* Açık gri */
  --color-footer: #0F172A;       /* Footer arka planı */
  --color-text: #1c2536;
  --color-muted: #5a6478;
  --color-white: #ffffff;
  --color-placeholder: #c8d4e8;  /* Görsel placeholder rengi */
  --color-whatsapp: #25D366;

  --font-head: 'Barlow Condensed', sans-serif;
  --font-body: 'Inter', sans-serif;

  --container: 1200px;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(11, 45, 111, 0.08);
  --transition: 0.3s ease;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* sticky navbar için offset */
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  line-height: 1.6;
  background: var(--color-white);
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ---------- Genel yardımcı sınıflar ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 90px 0;
}

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

/* Görsel placeholder (tüm img'ler yerine) */
.placeholder-bg {
  background: var(--color-placeholder);
  background-image: linear-gradient(135deg, #c8d4e8 0%, #d8e1f0 50%, #c8d4e8 100%);
}

/* Bölüm başlık grubu */
.section__head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section__eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--color-accent);
  font-size: 15px;
  margin-bottom: 12px;
}

.section__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  color: var(--color-primary);
  margin-bottom: 14px;
}

.section__lead {
  color: var(--color-muted);
  font-size: 17px;
}

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.5px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  text-align: center;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-white);
}
.btn--primary:hover {
  background: #cf5203;
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}
.btn--outline:hover {
  background: var(--color-white);
  color: var(--color-primary);
}

.btn--block {
  width: 100%;
}

/* Outline koyu pill buton (Hakkımızda bölümü) */
.btn--outline-dark {
  background: transparent;
  color: var(--color-primary);
  border-color: #d3dbe8;
  border-radius: 40px;
  padding: 15px 32px;
}
.btn--outline-dark:hover {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.btn--whatsapp {
  background: var(--color-whatsapp);
  color: var(--color-white);
  width: 100%;
  margin-top: 8px;
}
.btn--whatsapp:hover {
  background: #1da851;
  transform: translateY(-2px);
}

/* ================================================================
   NAVBAR
   ================================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 18px 0;
  background: transparent;
  transition: var(--transition);
}

/* Scroll'da eklenen solid beyaz arka plan */
.navbar.scrolled {
  background: var(--color-white);
  padding: 12px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Beyaz zeminde yazı/ikon renkleri koyuya döner */
.navbar.scrolled .navbar__link {
  color: var(--color-primary);
}
.navbar.scrolled .navbar__link:hover {
  color: var(--color-accent);
}
.navbar.scrolled .navbar__link--cta {
  color: var(--color-white); /* turuncu CTA butonu beyaz kalsın */
}
.navbar.scrolled .navbar__logo-text {
  color: var(--color-primary);
}
.navbar.scrolled .navbar__toggle span {
  background: var(--color-primary);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Logo yanı firma adı */
.navbar__logo-text {
  display: flex;
  flex-direction: column;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: 1px;
  color: var(--color-white);
  text-transform: uppercase;
}
.navbar__logo-text strong {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--color-accent);
}

/* Navbar logo görseli */
.navbar__logo-img {
  height: 80px;
  width: auto;
  transition: var(--transition);
}
.navbar.scrolled .navbar__logo-img {
  height: 64px;
}

/* Logo placeholder metni */
.logo-placeholder {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 3px;
  color: var(--color-white);
  padding: 6px 14px;
  border: 2px solid var(--color-accent);
  border-radius: 6px;
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar__link {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 18px;
  color: var(--color-white);
  letter-spacing: 0.5px;
  position: relative;
  transition: var(--transition);
}

/* Alt çizgi animasyonu */
.navbar__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: var(--transition);
}
.navbar__link:hover::after {
  width: 100%;
}
.navbar__link:hover {
  color: var(--color-accent);
}

.navbar__link--cta {
  background: var(--color-accent);
  padding: 8px 20px;
  border-radius: 6px;
}
.navbar__link--cta::after {
  display: none;
}
.navbar__link--cta:hover {
  background: #cf5203;
  color: var(--color-white);
}

/* Hamburger */
.navbar__toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
}
.navbar__toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--color-white);
  border-radius: 2px;
  transition: var(--transition);
}

/* Hamburger aktif -> X ikonu */
.navbar__toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.navbar__toggle.active span:nth-child(2) {
  opacity: 0;
}
.navbar__toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ================================================================
   HERO
   ================================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: var(--color-white);
  /* Görsel yüklenmezse yedek koyu lacivert arka plan */
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, #123a8a 100%);
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.hero__tag {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 3px;
  font-size: 16px;
  color: var(--color-accent);
  padding: 8px 18px;
  border: 1px solid rgba(232, 93, 4, 0.5);
  border-radius: 40px;
  margin-bottom: 24px;
}

.hero__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.02;
  margin-bottom: 22px;
}

.hero__desc {
  font-size: clamp(16px, 2vw, 20px);
  max-width: 560px;
  margin-bottom: 36px;
  color: rgba(255, 255, 255, 0.9);
}

.hero__buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ================================================================
   HAKKIMIZDA
   ================================================================ */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}

/* Etiket — önünde kısa çizgi ile */
.about__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 2px;
  font-size: 15px;
  color: var(--color-accent);
  margin-bottom: 14px;
}
.about__eyebrow::before {
  content: '';
  width: 34px;
  height: 2px;
  background: var(--color-accent);
}

/* İki renkli başlık */
.about__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.12;
  color: var(--color-primary);
  margin-bottom: 22px;
}
.about__title .accent {
  color: var(--color-accent);
}

.about__text p {
  color: var(--color-muted);
  margin-bottom: 16px;
}
.about__text strong {
  color: var(--color-primary);
}

.about__btn {
  margin-top: 30px;
}
.about__btn svg {
  width: 18px;
  height: 18px;
}

/* Statlar */
.about__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 34px;
}

.stat {
  text-align: center;
  padding: 18px 8px;
  background: var(--color-light);
  border-radius: var(--radius);
  border-bottom: 3px solid var(--color-accent);
}

.stat__number {
  display: block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 34px;
  color: var(--color-primary);
  line-height: 1;
}

.stat__label {
  display: block;
  font-size: 13px;
  color: var(--color-muted);
  margin-top: 6px;
}

/* Görsel + dekoratif nokta deseni */
.about__image {
  position: relative;
}
.about__image-ph {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 500px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  object-fit: cover;
}

/* Noktalı desen (radial-gradient ile) */
.about__dots {
  position: absolute;
  z-index: 0;
  width: 150px;
  height: 150px;
  background-image: radial-gradient(var(--color-primary) 2px, transparent 2.5px);
  background-size: 18px 18px;
  opacity: 0.18;
}
.about__dots--tl {
  top: -34px;
  left: -34px;
}
.about__dots--br {
  bottom: -34px;
  right: -34px;
}

/* ================================================================
   HİZMETLER
   ================================================================ */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: var(--color-white);
  padding: 36px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-bottom: 3px solid transparent;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

/* Hover: yükselme + turuncu alt border */
.service-card:hover {
  transform: translateY(-8px);
  border-bottom-color: var(--color-accent);
  box-shadow: 0 18px 40px rgba(11, 45, 111, 0.15);
}

.service-card__icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: var(--color-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  margin-bottom: 20px;
  transition: var(--transition);
}
.service-card:hover .service-card__icon {
  background: var(--color-accent);
  color: var(--color-white);
}
.service-card__icon svg {
  width: 30px;
  height: 30px;
}

.service-card__title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 23px;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.service-card__desc {
  color: var(--color-muted);
  font-size: 15px;
}

/* ================================================================
   PROJELERİMİZ
   ================================================================ */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  position: relative;
  height: 300px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}

.project-card__ph {
  width: 100%;
  height: 100%;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover img {
  transform: scale(1.08);
}

/* Hover overlay */
.project-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 29, 74, 0.9) 0%, rgba(7, 29, 74, 0.2) 100%);
  display: flex;
  align-items: flex-end;
  padding: 24px;
  opacity: 0;
  transition: var(--transition);
}
.project-card:hover .project-card__overlay {
  opacity: 1;
}
.project-card__overlay span {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 22px;
  color: var(--color-white);
  transform: translateY(12px);
  transition: var(--transition);
}
.project-card:hover .project-card__overlay span {
  transform: translateY(0);
}

/* ================================================================
   ÖNCESİ / SONRASI KAYDIRICI
   ================================================================ */
.ba-slider {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: ew-resize;
  user-select: none;
  touch-action: none; /* dokunmatik sürüklemede sayfayı kaydırma */
}

/* Görsel çifti değişirken yumuşak geçiş */
.ba-img {
  transition: opacity 0.5s ease;
}
.ba-slider.ba-fading .ba-img {
  opacity: 0;
}

/* Her iki görsel katmanı da tüm alanı kaplar */
.ba-slider__layer {
  position: absolute;
  inset: 0;
}
.ba-slider__layer img,
.ba-slider__layer .ba-ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Üst katman (ÖNCESİ) — JS clip-path ile sağdan gösterilir */
.ba-slider__before {
  clip-path: inset(0 0 0 50%);
}

/* Placeholder renkleri (görsel eklenince silinebilir) */
.ba-ph--after {
  background: linear-gradient(135deg, #8ea3c8 0%, #b9c6df 100%);
}
.ba-ph--before {
  background: linear-gradient(135deg, #4a5568 0%, #6b7688 100%);
}

/* Köşe etiketleri */
.ba-label {
  position: absolute;
  bottom: 16px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--color-white);
  background: rgba(7, 29, 74, 0.7);
  padding: 6px 16px;
  border-radius: 30px;
}
.ba-label--after {
  left: 16px;
}
.ba-label--before {
  right: 16px;
}

/* Dikey ayraç + tutamak */
.ba-slider__handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: var(--color-white);
  transform: translateX(-50%);
  pointer-events: none; /* sürükleme container üzerinden yönetilir */
}
.ba-slider__grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.ba-slider__grip svg {
  width: 22px;
  height: 22px;
}

/* ================================================================
   İLETİŞİM
   ================================================================ */
/* Ortalanmış başlık altına kısa çizgi */
.contact__title {
  position: relative;
  padding-bottom: 18px;
}
.contact__title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 64px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 50px;
  align-items: stretch;
}

/* Form (kartsız, sade) */
.contact__form-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.15;
  color: var(--color-accent);
  margin-bottom: 26px;
}

.form-row {
  margin-bottom: 16px;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid #d7deea;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-text);
  background: var(--color-white);
  transition: var(--transition);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.12);
}

.form-row textarea {
  resize: vertical;
}

.form-note {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-whatsapp);
  min-height: 20px;
}

/* Gönder butonu (outline pill, ortalanmış) */
.contact__submit {
  margin-top: 8px;
  padding: 15px 44px;
}

/* Sağ görsel */
.contact__image {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.contact__image-el,
.contact__image-ph {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  display: block;
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  background: var(--color-footer);
  color: rgba(255, 255, 255, 0.75);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding: 64px 24px 48px;
}

.footer__logo {
  height: 90px;
  width: auto;
  margin-bottom: 18px;
}

.footer__about {
  font-size: 15px;
  max-width: 340px;
}

.footer__title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 20px;
  color: var(--color-white);
  margin-bottom: 18px;
}

.footer__links li,
.footer__contact li {
  margin-bottom: 10px;
  font-size: 15px;
}

.footer__links a,
.footer__contact a {
  transition: var(--transition);
}
.footer__links a:hover,
.footer__contact a:hover {
  color: var(--color-accent);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 14px;
}

/* ================================================================
   SABİT WHATSAPP BUTONU
   ================================================================ */
.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 60px;
  height: 60px;
  background: var(--color-whatsapp);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
  z-index: 999;
  transition: var(--transition);
  animation: pulse 2.5s infinite;
}
.whatsapp-float:hover {
  transform: scale(1.1);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ================================================================
   SCROLL-REVEAL ANIMASYON (JS Intersection Observer ile tetiklenir)
   ================================================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 992px) {
  .about__grid,
  .contact__grid {
    grid-template-columns: 1fr;
  }
  .about__image-ph {
    height: 340px;
  }
  .services__grid,
  .projects__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 64px 0;
  }

  /* Mobil menü */
  .navbar__nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: var(--color-primary-dark);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    transition: right 0.35s ease;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.3);
  }
  .navbar__nav.open {
    right: 0;
  }
  .navbar__link {
    font-size: 22px;
  }
  .navbar__toggle {
    display: flex;
  }

  .about__stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .navbar__logo-text {
    display: none; /* dar ekranda sadece logo görünsün */
  }
  .services__grid,
  .projects__grid,
  .footer__grid {
    grid-template-columns: 1fr;
  }
  .hero__buttons {
    flex-direction: column;
  }
  .hero__buttons .btn {
    width: 100%;
  }
  .contact__form,
  .contact__info {
    padding: 24px;
  }
}
