/* Poppins Fontunu Google Fonts'tan yükle */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* --- Genel Ayarlar --- */
:root {
    --primary-color: #558B2F; /* Zeytin Yeşili Tonu */
    --primary-hover: #456D24;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --box-shadow-light: 0 4px 12px rgba(0, 0, 0, 0.05);
    --box-shadow-heavy: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.custom-contact-page-wrapper {
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
    font-family: 'Inter', sans-serif !important;
    color: var(--text-color);
}
.contact-page-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-weight: 700;
    font-size: 32px;
}
.contact-page-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
    font-weight: 400;
}

/* Zorunlu Alan Uyarılarını Engelleme (Tarayıcının kendi popup'ını göstermesini engeller) */
.contact-form-panel input:invalid:not(:focus):not(form:valid),
.contact-form-panel select:invalid:not(:focus):not(form:valid),
.contact-form-panel textarea:invalid:not(:focus):not(form:valid) {
    box-shadow: none !important;
}


/* --- 1. İletişim Bilgileri Kutuları (Ortalama Ayarı) --- */
.contact-info-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}
.info-box {
    display: flex;
    flex-direction: column;
    align-items: center; /* Yatayda ortala */
    text-align: center; /* Metni ortala */
    padding: 25px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: var(--box-shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}
.info-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-heavy);
}
.info-icon-circle {
    min-width: 50px; 
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px; 
    margin-bottom: 15px; 
}
.info-details {
    text-align: center; 
}
.info-details h4 {
    margin: 0 0 3px 0 !important;
    font-size: 15px;
    color: var(--text-color);
    font-weight: 600;
}
.info-link, .info-text {
    display: block;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    line-height: 1.5;
    transition: color 0.3s;
}
.info-link:hover {
    color: var(--primary-color);
}
.info-text {
    font-size: 11px;
    color: #999;
}

/* --- 2. Form Paneli (Tek Sütun Yapı) --- */
.contact-form-panel {
    padding: 40px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: var(--box-shadow-heavy);
    border-top: 5px solid var(--primary-color);
}
.form-group {
    margin-bottom: 20px;
    min-width: 0;
}

.contact-form-panel input[type='text'], 
.contact-form-panel input[type='email'], 
.contact-form-panel input[type='tel'], 
.contact-form-panel textarea,
.contact-form-panel select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.contact-form-panel input:focus, 
.contact-form-panel select:focus, 
.contact-form-panel textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(85, 139, 47, 0.3);
    outline: none;
}
.contact-form-panel select {
    appearance: none;
    background: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2012%2012%22%3E%3Cpath%20fill%3D%22%23558B2F%22%20d%3D%22M6%209l4-4H2z%22%2F%3E%3C%2Fsvg%3E") no-repeat right 15px center;
    background-size: 10px;
}

/* Telefon Alanı Özelleştirme */
.phone-group {
    display: flex;
    align-items: stretch;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}
.phone-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(85, 139, 47, 0.3);
}
.phone-group input[type='tel'] {
    border: none;
    padding-left: 10px;
}
.country-code-box {
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-weight: 500;
    color: var(--text-color);
    border-right: 1px solid #eee;
    background-color: #f7f7f7;
    height: auto; 
    font-size: 14px;
}
.phone-flag {
    font-size: 20px;
    margin-right: 5px;
}

/* Buton */
.contact-form-panel button[type='submit'] {
    background-color: var(--primary-color) !important;
    color: white !important;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.3s;
}
.contact-form-panel button[type='submit']:hover {
    background-color: var(--primary-hover) !important;
}
.contact-form-panel small {
    display: block;
    text-align: right;
    margin-top: 5px;
    font-size: 11px;
    color: #888;
}

/* --- TOAST BİLDİRİM STİLLERİ (İkon Yukarı Ortalı) --- */
#contact-toast-container {
    position: fixed;
    top: 50%; /* Dikeyde merkeze */
    left: 50%; /* Yatayda merkeze */
    transform: translate(-50%, -50%); /* Tam merkeze hizalama */
    z-index: 99999;
    pointer-events: none;
    width: 100%;
    max-width: 400px;
}

.contact-toast {
    background-color: #fff;
    color: var(--text-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column; /* Dikey hizalama için */
    align-items: center; /* Yatayda ortalama */
    text-align: center; /* Metni ortala */
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
    position: relative;
    pointer-events: auto;
}
.contact-toast.show {
    opacity: 1;
    transform: scale(1);
}

.toast-icon {
    font-size: 32px; 
    margin-bottom: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.contact-toast.success .toast-icon { color: var(--primary-color); }
.contact-toast.error .toast-icon { color: #d9534f; }

.toast-message {
    font-size: 14px;
    font-weight: 500;
    flex-grow: 1;
    padding: 0; 
}
.toast-message strong {
    display: block; 
    font-size: 16px;
    margin-bottom: 5px;
}

.toast-close-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    background: none;
    border: none;
    font-size: 20px;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
}
.toast-close-btn:hover {
    color: #555;
}

/* --- Mobil Uyum (Responsive) --- */
@media (max-width: 768px) {
    .custom-contact-page-wrapper {
        margin: 20px 10px;
    }
    .contact-info-boxes {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .contact-form-panel {
        padding: 20px;
        box-shadow: none;
        border-top: 3px solid var(--primary-color);
    }
    .contact-toast {
        max-width: 90%;
        margin: 0 auto;
    }
}