/* ===========================
   CONTACT PAGE SPACING VARIABLES
   Bu değerleri değiştirerek boşlukları ayarlayabilirsiniz
   =========================== */
:root {
    /* Desktop layout boşlukları */
    --contact-column-gap: 3rem;     /* Sol-sağ sütunlar arası boşluk */
    --contact-row-gap: 0rem;        /* Üst-alt satırlar arası boşluk - TAMAMEN KALDIRILDI */
    
    /* Mobile/Tablet layout boşlukları */
    --contact-mobile-gap: 1.5rem;   /* Mobil düzende elemanlar arası boşluk - AZALTILDI */
    --contact-tablet-gap: 1.2rem;   /* Tablet düzende elemanlar arası boşluk - AZALTILDI */
    
    /* Text section boşlukları */
    --contact-text-margin: 0rem;    /* Metin blokları arası boşluk - TAMAMEN KALDIRILDI */
    --contact-social-margin: 0.5rem; /* Social bölümü boşlukları - DAHA DA AZALTILDI */
}

/* Modern Popup styles */
.custom-popup {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-content {
    background-color: #fff;
    margin: 15% auto;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    text-align: center;
    position: relative;
    padding: 0;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.close-popup-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: #555;
    font-size: 22px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.close-popup-btn:hover {
    background-color: #f0f0f0;
}

.popup-success {
    background-color: #4CAF50;
    color: white;
    padding: 35px 25px;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    line-height: 1.5;
}
.popup-success:before {
    content: '✓';
    font-size: 36px;
    display: block;
    margin-bottom: 15px;
}

.popup-error {
    background-color: #F44336;
    color: white;
    padding: 35px 25px;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    line-height: 1.5;
}
.popup-error:before {
    content: '✕';
    font-size: 36px;
    display: block;
    margin-bottom: 15px;
}

.popup-show {
    opacity: 1;
}
.popup-content-show {
    transform: scale(1);
}

/* Custom spacing optimization */
.page-container.contact-container {
    padding-top: 40px;
    padding-bottom: 20px;
}

@media (max-width: 992px) {
    .page-container.contact-container {
        padding-top: 0;
    }
    
    .section-upper-text,
    .section-form,
    .contact-content {
        margin-top: 0;
    }
}

.contact-container .page-title {
    margin-bottom: 15px;
}

/* ===========================
   Contact Page Layout
   =========================== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--contact-mobile-gap); /* Mobilde tek değer */
}

/* Text sections */
.contact-text {
    margin-bottom: var(--contact-text-margin); /* Değişkenle kontrol et */
    line-height: 1.3; /* Daha da kompakt satır yüksekliği */
    text-align: center; /* Metinleri ortalandır */
}

.contact-text p {
    margin-bottom: 0.2rem; /* Çok minimal paragraf boşluğu */
    margin-top: 0; /* Üst margin'i kaldır */
}

.contact-text p:last-child {
    margin-bottom: 0; /* Son paragrafın alt boşluğunu kaldır */
}

/* Mobile layout (default) - Form üstte, diğerleri altta */
.section-upper-text,
.section-form,
.section-lower-text,
.section-social,
.section-map {
    width: 100%;
    margin-bottom: var(--contact-text-margin); /* Değişkenle kontrol et */
}

.section-social {
    margin: var(--contact-social-margin) 0; /* Değişkenle kontrol et */
    text-align: center; /* Social widget'ları ortalandır */
}

.social-widgets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem; /* Daha fazla boşluk */
    margin-top: 1rem;
    justify-items: center; /* Widget'ları ortalandır */
    max-width: 400px; /* Maksimum genişlik */
    margin-left: auto;
    margin-right: auto;
}

/* Lower text özellikle - satır aralarını minimize et */
.section-lower-text .contact-text {
    white-space: pre-line; /* Satır başlarını koru ama ortalandır */
    line-height: 1.2; /* Daha da kompakt */
}

/* Upper text de aynı şekilde */
.section-upper-text .contact-text {
    line-height: 1.2; /* Kompakt */
    margin-bottom: 0; /* Alt boşluğu kaldır */
}

/* Mobil için özel düzenlemeler */
@media (max-width: 767px) {
    .social-widgets {
        grid-template-columns: 1fr; /* Mobilde tek sütun */
        max-width: 300px;
        gap: 1rem;
    }
    
    .contact-form form {
        max-width: 100%; /* Mobilde tam genişlik */
        padding: 1rem 0;
    }
    
    .contact-content {
        gap: var(--contact-mobile-gap); /* Mobil gap değişkeni */
    }
}

/* Tablet layout (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--contact-tablet-gap); /* Tablet gap değişkeni */
    }
    
    .section-upper-text,
    .section-form,
    .section-lower-text,
    .section-social,
    .section-map {
        margin-top: 0;
        margin-bottom: var(--contact-text-margin); /* Değişkenle kontrol et */
    }
    
    .social-widgets {
        grid-template-columns: repeat(2, 1fr);
        max-width: 400px;
        margin: 1rem auto 0;
    }
}

/* Desktop layout (1024px+) - Form sol, metinler sağ */
@media (min-width: 1025px) {
    .contact-content {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "form upper"
            "form lower"
            "form social"
            "form map";
        /* Ayrı ayrı gap değerleri */
        column-gap: var(--contact-column-gap); /* Sütunlar arası boşluk */
        row-gap: var(--contact-row-gap);       /* Satırlar arası boşluk */
        align-items: start;
    }
    
    .section-form {
        grid-area: form;
        margin-top: 55px;
    }
    
    .section-upper-text {
        margin-top: 55px;
        grid-area: upper;
        margin-bottom: 0; /* Alt boşluğu kaldır */
    }
    
    .section-lower-text {
        grid-area: lower;
        margin-bottom: 0; /* Alt boşluğu kaldır */
        margin-top: 0; /* Üst boşluğu da kaldır */
    }
    
    .section-social {
        grid-area: social;
        margin-bottom: 0; /* Alt boşluğu kaldır */
        margin-top: 0; /* Üst boşluğu da kaldır */
        margin: 0; /* Tüm margin'leri kaldır */
    }
    
    .section-map {
        grid-area: map;
        margin-bottom: 0; /* Alt boşluğu kaldır */
        margin-top: 0; /* Üst boşluğu da kaldır */
    }
    
    /* Desktop'ta social widget'ları tek sütunda göster */
    .social-widgets {
        grid-template-columns: 1fr;
        gap: 1.5rem; /* Daha az boşluk */
        margin-top: 0; /* Üst margin'i kaldır */
    }
    
    /* Desktop'ta text section'ları kompakt yap */
    .section-upper-text .contact-text,
    .section-lower-text .contact-text {
        margin-bottom: 0; /* Alt margin'leri kaldır */
        line-height: 1.1; /* Çok kompakt */
    }
    
    /* Ensure margins are reset when in header mode */
    @media (max-width: 992px) {
        .section-upper-text,
        .section-form,
        .contact-content {
            margin-top: 0;
        }
    }
}

/* ===========================
   Map: sabit yükseklik & grayscale
   =========================== */
.map-container {
    position: relative;
    height: 250px;        /* ← İstediğiniz yüksekliği buradan ayarlayın */
    overflow: hidden;
}
  
.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100% !important; /* iframe içindeki height="" attribüsünü geçersiz kılar */
    filter: grayscale(100%);  /* siyah-beyaz efekti */
}

/* ======================================
   Social Widgets Styling
   ====================================== */
.social-widget {
    width: 100%;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.social-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.social-widget a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
}

.social-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    /* İsteğe bağlı Instagram rengi filtresi */
    filter: invert(33%) sepia(74%) saturate(456%)
            hue-rotate(314deg) brightness(98%) contrast(101%);
}

/* Make sure SVG images display properly */
img.social-icon {
    display: inline-block;
    vertical-align: middle;
}

.social-handle {
    /* Kalan alanı kapla, taşarsa kısalt */
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
}

/* Contact form styling - Minimal ve ferah tasarım */
.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 2rem; /* Daha fazla boşluk */
    padding: 1.5rem 0;
    max-width: 500px; /* Form genişliğini sınırla */
    margin: 0 auto; /* Formu ortalandır */
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.form-group label {
    font-weight: 400;
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 0.5rem;
    text-align: left; /* Label'ları sola hizala */
}

.form-group input,
.form-group textarea {
    padding: 1rem 0 0.75rem 0; /* Üst padding daha fazla */
    border: none;
    border-bottom: 1px solid #e0e0e0; /* Sadece alt çizgi */
    border-radius: 0; /* Köşeleri düz */
    background: transparent;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: #888;
    background: transparent;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    padding-top: 1rem;
}

.submit-btn {
    background-color: transparent;
    color: #333;
    border: 1px solid #ddd;
    padding: 1rem 2rem;
    border-radius: 0;
    cursor: pointer;
    font-weight: 400;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    align-self: center; /* Butonu ortalandır */
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    background-color: #333;
    color: #fff;
    border-color: #333;
}

/* Honeypot field – visually hidden but accessible */
.honeypot-field {
    /* Force hidden in all environments */
    display: none !important;
}

/* Desktop'ta formu sola hizala */
@media (min-width: 1025px) {
    .contact-form form {
        margin: 0; /* Desktop'ta ortalama */
        max-width: none; /* Genişlik sınırını kaldır */
    }
    
    .submit-btn {
        align-self: flex-start; /* Sol tarafa hizala */
    }
}

/* ======================================
   Instagram Widgets – contact-info içinde 2 sütun
   ====================================== */
.contact-info .social-widgets {
    display: grid;
    /* İki eşit sütun: ne kadar genişse, o kadar paylaş */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.contact-info .social-widget {
    width: 100%;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.contact-info .social-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.contact-info .social-widget a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
}

.contact-info .social-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    /* İsteğe bağlı Instagram rengi filtresi */
    filter: invert(33%) sepia(74%) saturate(456%)
            hue-rotate(314deg) brightness(98%) contrast(101%);
}

.contact-info .social-handle {
    /* Kalan alanı kapla, taşarsa kısalt */
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
}