/* İletişim formu kartı (Contant.css'teki eski .contactForm stillerini ezer) */

/* Harita ile altındaki bilgi + form alanı arasındaki boşluk (Contant.css'te 30px) */
.contactcontainer {
  margin-top: 90px;
}

.contactcontainer .contactinfo {
  width: 40%;
}

/* Telefon numarası: son 4 hane (6273) döngü halinde yukarı kayarak M-A-R-E harflerine
   dönüşür, sonra tekrar rakamlara döner (tuş takımında 6=M, 2=A, 7=R, 3=E) */
/* Satır yüksekliği ile pencere yüksekliği aynı (1.3em) → rakamlar numaranın geri kalanıyla aynı hizada */
.phone-mare {
  line-height: 1.3;
}

.phone-mare__flip {
  display: inline-flex;
  gap: 0.12em; /* haneler arası boşluk */
  vertical-align: top;
}

/* Her hane: 1 satırlık pencere; içinde alt alta rakam ve harf.
   Genişliği de rakam ↔ harf arasında değişir (--dw / --lw, js/contact-form.js ölçer);
   böylece rakam halinde haneler arasında boşluk kalmaz. */
.phone-mare__ch {
  display: inline-block;
  width: var(--dw, auto);
  height: 1.3em;
  line-height: 1.3em;
  overflow: hidden;
  animation: phoneMareWidth 6s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.phone-mare__ch > span {
  display: block;
  width: max-content;
  height: 1.3em;
  animation: phoneMareFlip 6s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

/* Harfler Mare mavisinde ve kalın */
.phone-mare__ch > span:last-child {
  color: rgb(74, 138, 169);
  font-weight: 700;
}

/* Dalga etkisi: haneler sırayla dönsün */
.phone-mare__ch:nth-child(2), .phone-mare__ch:nth-child(2) > span { animation-delay: 0.12s; }
.phone-mare__ch:nth-child(3), .phone-mare__ch:nth-child(3) > span { animation-delay: 0.24s; }
.phone-mare__ch:nth-child(4), .phone-mare__ch:nth-child(4) > span { animation-delay: 0.36s; }

/* 0–40%: rakamlar · 45–85%: MARE · 90–100%: tekrar rakamlar */
@keyframes phoneMareFlip {
  0%, 40% { transform: translateY(0); }
  45%, 85% { transform: translateY(-100%); }
  90%, 100% { transform: translateY(0); }
}

@keyframes phoneMareWidth {
  0%, 40% { width: var(--dw, auto); }
  45%, 85% { width: var(--lw, auto); }
  90%, 100% { width: var(--dw, auto); }
}

@media (prefers-reduced-motion: reduce) {
  .phone-mare__ch,
  .phone-mare__ch > span {
    animation: none;
  }
}

/* Tıklanabilir bilgi kutusu (telefon: arama ekranını açar). Görünüm diğer kutularla aynı. */
.contactcontainer .contactinfo .box--link {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.contactcontainer .contactinfo .box--link .icon {
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.contactcontainer .contactinfo .box--link:hover .icon,
.contactcontainer .contactinfo .box--link:active .icon {
  border-color: rgb(74, 138, 169);
  background: rgb(74, 138, 169);
  color: #fff;
}

.contactcontainer .contactinfo .box--link:hover p,
.contactcontainer .contactinfo .box--link:active p {
  color: rgb(74, 138, 169);
}

.contactForm.cform {
  position: relative;
  z-index: 1;
  width: 48%;
  max-width: 580px;
  padding: 0;
  background: none;
}

/* Contant.css'teki dikey ayraç çizgisini kaldır */
.contactForm.cform::before {
  display: none;
}

/* Başlık */
.cform__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.cform__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(145deg, #1c5169, rgb(74, 138, 169));
  color: #fff;
  font-size: 17px;
  box-shadow: 0 10px 20px -10px rgba(14, 44, 59, 0.7);
}

.contactForm.cform .cform__head h2 {
  margin: 0;
  font-family: 'FuturaPT-Book', sans-serif;
  font-size: 24px;
  font-weight: 500;
  color: #0e2c3b;
}

.contactForm.cform .cform__head p {
  margin: 2px 0 0;
  padding: 0;
  font-size: 15px;
  color: #6e7681;
}

/* Alanlar */
.cform__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cform__field {
  position: relative;
}

.cform__field--full {
  grid-column: 1 / -1;
}

.cform__field input,
.cform__field textarea {
  display: block;
  width: 100%;
  margin: 0;
  padding: 20px 14px 7px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  outline: none;
  background: #f2f7f9;
  color: #0e2c3b;
  font: inherit;
  font-size: 15px;
  resize: vertical;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.cform__field textarea {
  min-height: 110px;
}

.cform__field input:hover,
.cform__field textarea:hover {
  background: #ebf2f5;
}

.cform__field input:focus,
.cform__field textarea:focus {
  border-color: rgb(74, 138, 169);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(74, 138, 169, 0.15);
}

/* Yüzen etiket */
.cform__field label {
  position: absolute;
  left: 15px;
  top: 14px;
  color: #6e7681;
  font-size: 15px;
  pointer-events: none;
  transform-origin: left top;
  transition: transform 0.2s, color 0.2s;
}

.cform__field label::after {
  content: " *";
  color: rgb(74, 138, 169);
}

.cform__field input:focus + label,
.cform__field input:not(:placeholder-shown) + label,
.cform__field textarea:focus + label,
.cform__field textarea:not(:placeholder-shown) + label {
  transform: translateY(-9px) scale(0.78);
  color: rgb(74, 138, 169);
}

/* Hatalı alan */
.cform__error {
  display: none;
  margin: 6px 4px 0;
  color: #c0392b;
  font-size: 13px;
}

.cform__field.is-invalid input,
.cform__field.is-invalid textarea {
  border-color: #e0786c;
  background: #fff7f6;
}

.cform__field.is-invalid label {
  color: #c0392b;
}

.cform__field.is-invalid .cform__error {
  display: block;
}

/* Sunucu hatası */
.cform__alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fdecea;
  color: #8a2a20;
  font-size: 15px;
  line-height: 1.45;
}

.cform__alert[hidden] {
  display: none;
}

.cform__alert i {
  margin-top: 3px;
}

/* Gönder */
.cform__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.cform__submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #1c5169, rgb(74, 138, 169));
  color: #fff;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 14px 24px -12px rgba(14, 44, 59, 0.7);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.cform__submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 28px -12px rgba(14, 44, 59, 0.75);
}

.cform__submit:hover i {
  transform: translate(3px, -3px);
}

.cform__submit i {
  transition: transform 0.25s;
}

.cform__submit:disabled {
  cursor: wait;
  opacity: 0.85;
  transform: none;
}

.cform__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cformSpin 0.8s linear infinite;
}

.cform__submit.is-loading i {
  display: none;
}

.cform__submit.is-loading .cform__spinner {
  display: inline-block;
}

@keyframes cformSpin {
  to { transform: rotate(360deg); }
}

.cform__note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8a949c;
  font-size: 13px;
}

.cform__kvkk {
  flex-basis: 100%;
  color: #8a949c;
  font-size: 12.5px;
  line-height: 1.5;
}

.cform__kvkk a {
  color: rgb(74, 138, 169);
}

/* Başarı ekranı */
.cform__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  padding: 20px;
  text-align: center;
}

.cform__success[hidden] {
  display: none;
}

.cform__check svg {
  width: 88px;
  height: 88px;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cform__check circle {
  stroke: rgb(74, 138, 169);
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: cformDraw 0.6s ease-out forwards;
}

.cform__check path {
  stroke: #1c5169;
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: cformDraw 0.4s ease-out 0.5s forwards;
}

@keyframes cformDraw {
  to { stroke-dashoffset: 0; }
}

.contactForm.cform .cform__success h3 {
  margin: 22px 0 8px;
  font-family: 'FuturaPT-Book', sans-serif;
  font-size: 28px;
  font-weight: 500;
  color: #0e2c3b;
}

.contactForm.cform .cform__success p {
  max-width: 340px;
  margin: 0 0 26px;
  padding: 0;
  font-size: 17px;
  line-height: 1.5;
  color: #555;
}

.cform__again {
  padding: 12px 26px;
  border: 2px solid rgb(74, 138, 169);
  border-radius: 999px;
  background: transparent;
  color: rgb(74, 138, 169);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.cform__again:hover {
  background: rgb(74, 138, 169);
  color: #fff;
}

/* Tablet ve telefon: bilgi bloğu üstte, form altta */
@media (max-width: 991px) {
  .contactcontainer .contactinfo,
  .contactForm.cform {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .contactcontainer {
    margin-top: 50px;
  }

  .cform__head {
    margin-bottom: 18px;
  }

  .cform__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 15px;
  }

  .contactForm.cform .cform__head h2 {
    font-size: 22px;
  }

  .contactForm.cform .cform__head p {
    font-size: 14px;
  }

  .cform__grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .cform__submit {
    flex: 1 1 100%;
    justify-content: center;
  }

  .cform__note {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cform__check circle,
  .cform__check path {
    animation: none;
    stroke-dashoffset: 0;
  }
}
