/*
 * İletişim sayfası stilleri.
 * ---------------------------------------------------------------
 * Bu dosya YALNIZCA iletişim sayfası şablonunda yüklenir ve sadece
 * sitede hiç bulunmayan (form, iletişim kartı, harita) bileşenleri
 * tanımlar. Sitenin ana stil dosyası assets/css/style.css'e hiçbir
 * müdahale yapılmamıştır; buradaki tüm değerler o dosyadaki CSS
 * değişkenlerinden (renk, gölge, yarıçap, geçiş) türetilmiştir.
 * ---------------------------------------------------------------
 */

/* === Sayfa yerleşimi === */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info-col h2 {
    font-size: clamp(1.7rem, 2.6vw, 2.2rem);
    color: var(--primary-color);
    line-height: 1.25;
    margin-bottom: 16px;
}

.contact-info-col h2 .serif-accent {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--secondary-color);
    font-weight: 600;
}

.contact-lead {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 34px;
}

/* === İletişim kartları === */
.contact-cards {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 34px;
}

.contact-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--white);
    border: 1px solid rgba(27, 32, 102, 0.08);
    border-radius: var(--border-radius);
    padding: 22px;
    box-shadow: var(--glass-shadow);
    transition: var(--transition-normal);
}

.contact-card:hover {
    transform: translateY(-4px);
    border-color: rgba(232, 120, 43, 0.35);
    box-shadow: var(--shadow);
}

.contact-card .icon-box {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(232, 120, 43, 0.1);
    color: var(--secondary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.contact-card h4 {
    font-size: 1.05rem;
    color: var(--primary-color);
    margin-bottom: 6px;
    line-height: 1.3;
}

.contact-card p,
.contact-card a {
    display: block;
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
}

.contact-card a:hover {
    color: var(--secondary-color);
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* === Form kartı === */
.contact-form-card {
    background: var(--white);
    border: 1px solid rgba(27, 32, 102, 0.08);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 40px;
}

.contact-form-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.contact-form-card > p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 26px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.contact-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.contact-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 0.02em;
}

.contact-field .required {
    color: var(--secondary-color);
}

.contact-field input,
.contact-field select,
.contact-field textarea {
    width: 100%;
    font-family: var(--font-main);
    font-size: 0.97rem;
    color: var(--text-dark);
    background: var(--bg-light);
    border: 1.5px solid rgba(27, 32, 102, 0.10);
    border-radius: 12px;
    padding: 13px 16px;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.contact-field textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
}

.contact-field select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-light) 50%), linear-gradient(135deg, var(--text-light) 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 15px) calc(50% + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 42px;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
    color: #94a3b8;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
    outline: none;
    background: var(--white);
    border-color: var(--secondary-color);
}

.contact-field.has-error input,
.contact-field.has-error select,
.contact-field.has-error textarea {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.04);
}

.contact-field-error {
    display: none;
    font-size: 0.82rem;
    color: #dc2626;
}

/* Onay kutusu */
.contact-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.6;
}

.contact-consent input {
    width: 17px;
    height: 17px;
    min-width: 17px;
    margin-top: 3px;
    accent-color: var(--secondary-color);
}

.contact-consent a {
    color: var(--secondary-color);
    font-weight: 600;
}

.contact-form .btn {
    align-self: flex-start;
}

/* Bal küpü alanı – ekran okuyucular ve kullanıcılar için gizli */
.contact-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* === Bildirim kutusu === */
.contact-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 24px;
    font-size: 0.93rem;
    line-height: 1.6;
}

.contact-notice ion-icon {
    font-size: 1.3rem;
    min-width: 1.3rem;
}

.contact-notice.is-success {
    background: rgba(37, 211, 102, 0.10);
    border: 1px solid rgba(37, 211, 102, 0.35);
    color: #15803d;
}

.contact-notice.is-error {
    background: rgba(220, 38, 38, 0.07);
    border: 1px solid rgba(220, 38, 38, 0.28);
    color: #b91c1c;
}

/* === Harita === */
.contact-map-section {
    padding: 0 0 80px;
    background: var(--white);
}

.contact-map {
    position: relative;
    width: 100%;
    height: 420px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

/* === Duyarlı yerleşim === */
@media (max-width: 992px) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .contact-cards,
    .contact-form-row {
        grid-template-columns: 1fr;
    }

    .contact-form-card {
        padding: 26px 22px;
    }

    .contact-map {
        height: 320px;
    }

    .contact-form .btn {
        align-self: stretch;
        justify-content: center;
    }
}

/* ===============================================================
 * Doğrulama animasyonları
 * =============================================================== */

/* --- Hata mesajının belirmesi --- */
@keyframes evm-error-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.contact-field.has-error .contact-field-error {
    display: block;
    animation: evm-error-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* --- Hatalı alanın titremesi --- */
@keyframes evm-shake {
    0%, 100% { transform: translateX(0); }
    18%      { transform: translateX(-6px); }
    36%      { transform: translateX(5px); }
    54%      { transform: translateX(-3px); }
    72%      { transform: translateX(2px); }
    86%      { transform: translateX(-1px); }
}

.contact-field.is-shaking input,
.contact-field.is-shaking select,
.contact-field.is-shaking textarea,
.contact-field.is-shaking .contact-consent,
.contact-field.is-shaking .cf-turnstile {
    animation: evm-shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.contact-field.has-error .contact-consent {
    color: #b91c1c;
}

.contact-field.has-error .contact-consent input {
    accent-color: #dc2626;
    outline: 2px solid rgba(220, 38, 38, 0.35);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Alan doğruyken beliren onay işareti --- */
.contact-field > label:not(.contact-consent) {
    display: flex;
    align-items: center;
    gap: 5px;
}

.contact-field-check {
    margin-left: auto;
    color: #16a34a;
    font-size: 1.05rem;
    opacity: 0;
    transform: scale(0.4) rotate(-25deg);
    transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.contact-field.is-valid .contact-field-check {
    opacity: 1;
    transform: none;
}

.contact-field.is-valid input,
.contact-field.is-valid select,
.contact-field.is-valid textarea {
    border-color: rgba(22, 163, 74, 0.45);
}

/* --- Mesaj alanı karakter ipucu --- */
.contact-field-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-4px);
    transition: opacity 0.25s ease, max-height 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-field-hint.is-visible {
    max-height: 28px;
    opacity: 1;
    transform: none;
}

/* --- Gönder butonu yükleniyor durumu --- */
@keyframes evm-spin {
    to { transform: rotate(360deg); }
}

.contact-form .btn.is-loading {
    pointer-events: none;
    opacity: 0.9;
}

.contact-form .btn.is-loading ion-icon {
    display: none;
}

.contact-form .btn.is-loading::after {
    content: '';
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: evm-spin 0.7s linear infinite;
}

/* --- Bildirim kutusu girişi --- */
@keyframes evm-notice-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes evm-notice-pop {
    0%   { transform: scale(0.4); opacity: 0; }
    60%  { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); }
}

.contact-notice {
    animation: evm-notice-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.contact-notice ion-icon {
    animation: evm-notice-pop 0.5s 0.12s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* --- Turnstile alanı --- */
.contact-turnstile {
    min-height: 68px;
}

.contact-turnstile .cf-turnstile {
    display: block;
}

/* --- Hareket azaltma tercihi --- */
@media (prefers-reduced-motion: reduce) {
    .contact-field.has-error .contact-field-error,
    .contact-field.is-shaking input,
    .contact-field.is-shaking select,
    .contact-field.is-shaking textarea,
    .contact-field.is-shaking .contact-consent,
    .contact-field.is-shaking .cf-turnstile,
    .contact-notice,
    .contact-notice ion-icon {
        animation: none;
    }

    .contact-field-check,
    .contact-field-hint {
        transition: none;
    }
}
