/* ============================================
   CONTACT SECTION - Dark Glassmorphism Theme
   Mobile First Responsive Design
   ============================================ */

/* ============================================
   SECTION BACKGROUND
   ============================================ */
.contact-section {
    position: relative;
    padding: clamp(2.5rem, 8vw, 7.5rem) 0;
    overflow: hidden;
    background: linear-gradient(165deg, #0a1628 0%, #0c2d3f 50%, #0a4d68 100%);
    min-height: auto;
}

.contact-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.contact-gradient {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(0, 212, 170, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(26, 95, 122, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse 40% 30% at 50% 50%, rgba(255, 209, 102, 0.05) 0%, transparent 50%);
}

.contact-particles {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.03) 0.0625rem, transparent 0.0625rem),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.02) 0.0625rem, transparent 0.0625rem),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.02) 0.0625rem, transparent 0.0625rem);
    background-size: 6.25rem 6.25rem, 9.375rem 9.375rem, 5rem 5rem;
    animation: particleFloat 30s linear infinite;
}

@keyframes particleFloat {
    from { background-position: 0 0, 0 0, 0 0; }
    to { background-position: 6.25rem 6.25rem, -9.375rem 9.375rem, 5rem -5rem; }
}

/* ============================================
   CONTACT WRAPPER - Mobile First Grid Layout
   ============================================ */
.contact-wrapper {
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 4vw, 3rem);
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
}

/* ============================================
   BRANCH CARDS
   ============================================ */
.contact-branches {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2.5vw, 1.5rem);
    width: 100%;
}

.branch-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(1.25rem);
    -webkit-backdrop-filter: blur(1.25rem);
    border: 0.0625rem solid rgba(255, 255, 255, 0.08);
    border-radius: clamp(1rem, 2.5vw, 1.5rem);
    padding: clamp(1rem, 3vw, 2rem);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.branch-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 212, 170, 0.3);
    transform: translateY(-0.25rem);
}

.branch-icon {
    width: clamp(3rem, 7vw, 3.5rem);
    height: clamp(3rem, 7vw, 3.5rem);
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.2), rgba(26, 95, 122, 0.2));
    border: 0.0625rem solid rgba(0, 212, 170, 0.3);
    border-radius: clamp(0.75rem, 2vw, 1rem);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: clamp(0.875rem, 2vw, 1.25rem);
}

.branch-icon svg {
    width: 50%;
    height: 50%;
    color: #00d4aa;
}

.branch-card h3 {
    color: #ffffff;
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    margin-bottom: clamp(0.75rem, 2vw, 1rem);
    font-family: 'Syne', sans-serif;
}

.branch-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(0.875rem, 1.5vw, 0.95rem);
    margin-bottom: clamp(0.625rem, 1.5vw, 0.75rem);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    line-height: 1.6;
}

.branch-info p:last-child {
    margin-bottom: 0;
}

.info-label {
    color: #00d4aa;
    font-size: clamp(0.7rem, 1.2vw, 0.75rem);
    text-transform: uppercase;
    letter-spacing: 0.0625rem;
    font-weight: 600;
}

/* Phone Link Styles - No blue color, no underline on mobile */
.phone-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.phone-link:hover {
    color: #00d4aa;
}

.phone-link:active {
    color: #00d4aa;
}

/* ============================================
   CONTACT FORM CARD
   ============================================ */
.contact-form-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(1.875rem);
    -webkit-backdrop-filter: blur(1.875rem);
    border: 0.0625rem solid rgba(255, 255, 255, 0.1);
    border-radius: clamp(1rem, 3vw, 2rem);
    padding: clamp(1.25rem, 4vw, 3rem);
    position: relative;
    overflow: hidden;
}

.contact-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0.0625rem;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 170, 0.5), transparent);
}

.form-header {
    margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
    text-align: center;
}

.form-header h3 {
    color: #ffffff;
    font-size: clamp(1.35rem, 2.5vw, 1.8rem);
    font-family: 'Syne', sans-serif;
    position: relative;
    display: inline-block;
}

.form-header h3::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(2.5rem, 8vw, 3.75rem);
    height: 0.1875rem;
    background: linear-gradient(90deg, #00d4aa, #1a5f7a);
    border-radius: 0.125rem;
}

/* ============================================
   FORM GROUPS
   ============================================ */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2.5vw, 1.25rem);
    width: 100%;
}

.form-group {
    position: relative;
}

/* ============================================
   INPUT WRAPPER
   ============================================ */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: clamp(0.875rem, 2vw, 1.125rem);
    top: 50%;
    transform: translateY(-50%);
    width: clamp(1.125rem, 2vw, 1.375rem);
    height: clamp(1.125rem, 2vw, 1.375rem);
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.input-icon svg {
    width: 100%;
    height: 100%;
}

.textarea-icon {
    top: clamp(0.875rem, 2vw, 1.125rem);
    transform: none;
}

/* ============================================
   INPUT STYLES - Touch Optimized
   ============================================ */
.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: clamp(0.875rem, 2vw, 1.125rem) clamp(0.875rem, 2vw, 1.25rem) clamp(0.875rem, 2vw, 1.125rem) clamp(2.75rem, 6vw, 3.375rem);
    background: rgba(255, 255, 255, 0.05);
    border: 0.0625rem solid rgba(255, 255, 255, 0.1);
    border-radius: clamp(0.75rem, 1.5vw, 0.875rem);
    color: #ffffff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    transition: all 0.3s ease;
    outline: none;
    /* Minimum touch target */
    min-height: 2.75rem;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 212, 170, 0.5);
    box-shadow: 0 0 0 0.25rem rgba(0, 212, 170, 0.1), 0 0 1.875rem rgba(0, 212, 170, 0.1);
}

.contact-form input:focus + .input-icon,
.contact-form select:focus ~ .input-icon,
.contact-form textarea:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: #00d4aa;
}

/* ============================================
   SELECT STYLES
   ============================================ */
.select-wrapper {
    position: relative;
}

.contact-form select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: clamp(2.5rem, 5vw, 3.125rem);
}

.contact-form select option {
    background: #0c2d3f;
    color: #ffffff;
    padding: clamp(0.5rem, 1.5vw, 0.75rem);
}

.select-arrow {
    position: absolute;
    right: clamp(0.875rem, 2vw, 1.125rem);
    top: 50%;
    transform: translateY(-50%);
    width: clamp(1rem, 2vw, 1.25rem);
    height: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    transition: color 0.3s ease;
}

.select-wrapper:focus-within .select-arrow {
    color: #00d4aa;
}

/* ============================================
   TEXTAREA
   ============================================ */
.contact-form textarea {
    min-height: clamp(7.5rem, 15vw, 8.75rem);
    max-height: 18.75rem;
    resize: vertical;
    padding-top: clamp(0.875rem, 2vw, 1rem);
}

/* ============================================
   ERROR MESSAGES
   ============================================ */
.error-message {
    display: block;
    color: #ef6351;
    font-size: clamp(0.75rem, 1.2vw, 0.8rem);
    margin-top: 0.375rem;
    padding-left: 0.25rem;
    min-height: 1.125rem;
    opacity: 0;
    transform: translateY(-0.3125rem);
    transition: all 0.3s ease;
}

.error-message.visible {
    opacity: 1;
    transform: translateY(0);
}

.form-group.error .input-wrapper input,
.form-group.error .input-wrapper select,
.form-group.error .input-wrapper textarea {
    border-color: rgba(239, 99, 81, 0.5);
    background: rgba(239, 99, 81, 0.05);
}

.form-group.success .input-wrapper input,
.form-group.success .input-wrapper select,
.form-group.success .input-wrapper textarea {
    border-color: rgba(0, 212, 170, 0.5);
}

/* ============================================
   CHECKBOX GROUP
   ============================================ */
.checkbox-group {
    margin-top: clamp(0.25rem, 1vw, 0.5rem);
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: clamp(0.625rem, 1.5vw, 0.875rem);
    cursor: pointer;
    position: relative;
    /* Minimum touch target */
    min-height: 2.75rem;
}

.checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    width: clamp(1.25rem, 2.5vw, 1.375rem);
    height: clamp(1.25rem, 2.5vw, 1.375rem);
    min-width: clamp(1.25rem, 2.5vw, 1.375rem);
    background: rgba(255, 255, 255, 0.05);
    border: 0.0625rem solid rgba(255, 255, 255, 0.2);
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-top: 0.125rem;
}

.checkmark::after {
    content: '';
    width: 0.375rem;
    height: 0.625rem;
    border: solid #00d4aa;
    border-width: 0 0.125rem 0.125rem 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s ease;
}

.checkbox-wrapper input:checked ~ .checkmark {
    background: rgba(0, 212, 170, 0.2);
    border-color: #00d4aa;
}

.checkbox-wrapper input:checked ~ .checkmark::after {
    transform: rotate(45deg) scale(1);
}

.checkbox-wrapper input:focus ~ .checkmark {
    box-shadow: 0 0 0 0.1875rem rgba(0, 212, 170, 0.2);
}

.checkbox-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(0.85rem, 1.5vw, 0.9rem);
    line-height: 1.5;
}

.kvkk-link {
    color: #00d4aa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.kvkk-link:hover {
    color: #00ffcc;
    text-decoration: underline;
}

/* ============================================
   HONEYPOT FIELD (HIDDEN SPAM PROTECTION)
   ============================================ */
.honeypot-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    pointer-events: none;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* ============================================
   reCAPTCHA CONTAINER
   ============================================ */
.recaptcha-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin: clamp(0.5rem, 1.5vw, 1rem) 0;
}

.recaptcha-group .g-recaptcha {
    transform: scale(0.9);
    transform-origin: center;
}

.recaptcha-group.error .g-recaptcha {
    border: 2px solid rgba(239, 99, 81, 0.5);
    border-radius: 4px;
    padding: 2px;
}

.recaptcha-group.success .g-recaptcha {
    border: 2px solid rgba(0, 212, 170, 0.5);
    border-radius: 4px;
    padding: 2px;
}

.recaptcha-group .error-message {
    text-align: center;
}

/* reCAPTCHA responsive scaling */
@media (min-width: 30.0625em) { /* 481px */
    .recaptcha-group .g-recaptcha {
        transform: scale(1);
    }
}

@media (max-width: 320px) {
    .recaptcha-group .g-recaptcha {
        transform: scale(0.77);
    }
}

/* ============================================
   SUBMIT BUTTON - Touch Optimized
   ============================================ */
.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.5rem, 1.5vw, 0.75rem);
    width: 100%;
    padding: clamp(1rem, 2.5vw, 1.25rem) clamp(1.5rem, 3vw, 2rem);
    margin-top: clamp(0.5rem, 1.5vw, 0.75rem);
    background: linear-gradient(135deg, #00d4aa 0%, #00a884 100%);
    border: none;
    border-radius: clamp(0.75rem, 1.5vw, 0.875rem);
    color: #0a1628;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    /* Minimum touch target */
    min-height: 2.75rem;
}

.submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #00ffcc 0%, #00d4aa 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.submit-btn:hover:not(:disabled)::before {
    opacity: 1;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-0.1875rem);
    box-shadow: 0 0.75rem 2.5rem rgba(0, 212, 170, 0.4);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(-0.0625rem);
}

.btn-text,
.btn-icon {
    position: relative;
    z-index: 1;
}

.btn-icon {
    width: clamp(1.125rem, 2vw, 1.375rem);
    height: clamp(1.125rem, 2vw, 1.375rem);
    transition: transform 0.3s ease;
}

.submit-btn:hover:not(:disabled) .btn-icon {
    transform: translateX(0.25rem) translateY(-0.25rem);
}

/* ============================================
   LOADING STATE
   ============================================ */
.btn-loading {
    display: none;
    align-items: center;
    gap: 0.625rem;
    position: relative;
    z-index: 1;
}

.spinner {
    width: clamp(1.125rem, 2vw, 1.375rem);
    height: clamp(1.125rem, 2vw, 1.375rem);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.submit-btn.loading .btn-text,
.submit-btn.loading .btn-icon {
    display: none;
}

.submit-btn.loading .btn-loading {
    display: flex;
}

.submit-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    bottom: clamp(1rem, 3vw, 2rem);
    right: clamp(1rem, 3vw, 2rem);
    left: clamp(1rem, 3vw, auto);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: clamp(0.625rem, 1.5vw, 0.875rem);
    padding: clamp(0.875rem, 2vw, 1.125rem) clamp(1rem, 2.5vw, 1.5rem);
    border-radius: clamp(0.75rem, 1.5vw, 0.875rem);
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(1.25rem);
    border: 0.0625rem solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 1.25rem 3.75rem rgba(0, 0, 0, 0.4);
    min-width: auto;
    max-width: 100%;
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(1.25rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast.hiding {
    animation: toastSlideOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(1.25rem);
    }
}

.toast-icon {
    width: clamp(1.5rem, 3vw, 1.75rem);
    height: clamp(1.5rem, 3vw, 1.75rem);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-icon svg {
    width: 60%;
    height: 60%;
}

.toast.success .toast-icon {
    background: rgba(0, 212, 170, 0.2);
    color: #00d4aa;
}

.toast.error .toast-icon {
    background: rgba(239, 99, 81, 0.2);
    color: #ef6351;
}

.toast-message {
    color: #ffffff;
    font-size: clamp(0.875rem, 1.5vw, 0.95rem);
    line-height: 1.4;
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.3s ease;
    /* Minimum touch target */
    min-height: 2.75rem;
    min-width: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: #ffffff;
}

.toast-close svg {
    width: clamp(0.875rem, 1.5vw, 1.125rem);
    height: clamp(0.875rem, 1.5vw, 1.125rem);
}

/* ============================================
   MEDIUM AND ABOVE: ≥481px
   ============================================ */
@media (min-width: 30.0625em) { /* 481px */
    .toast-container {
        left: auto;
        right: clamp(1rem, 3vw, 2rem);
    }
    
    .toast {
        min-width: 18.75rem;
        max-width: 28.125rem;
    }
    
    @keyframes toastSlideIn {
        from {
            opacity: 0;
            transform: translateX(6.25rem);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
    
    @keyframes toastSlideOut {
        from {
            opacity: 1;
            transform: translateX(0);
        }
        to {
            opacity: 0;
            transform: translateX(6.25rem);
        }
    }
}

/* ============================================
   TABLET AND ABOVE: ≥768px
   ============================================ */
@media (min-width: 48em) { /* 768px */
    .contact-wrapper {
        display: grid;
        grid-template-columns: 1fr;
        gap: clamp(2rem, 3vw, 2.5rem);
    }

    .contact-branches {
        flex-direction: row;
        gap: clamp(1.25rem, 2.5vw, 1.5rem);
    }

    .branch-card {
        flex: 1;
    }
}

/* ============================================
   DESKTOP: ≥1200px
   ============================================ */
@media (min-width: 75em) { /* 1200px */
    .contact-wrapper {
        grid-template-columns: 1fr 1.2fr;
        gap: clamp(2.5rem, 3vw, 3rem);
    }

    .contact-branches {
        flex-direction: column;
    }

    .branch-card:first-child {
        margin-top: clamp(2.5rem, 4vw, 3.75rem);
    }
}

/* ============================================
   ACCESSIBILITY - Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .contact-particles {
        animation: none;
    }

    .toast {
        animation: none;
    }

    .spinner {
        animation: none;
    }

    * {
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */
@media (prefers-contrast: high) {
    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        border-width: 0.125rem;
    }

    .branch-card {
        border-width: 0.125rem;
    }
    
    .contact-form-card {
        border-width: 0.125rem;
    }
}

/* ============================================
   FOCUS STYLES FOR KEYBOARD NAVIGATION
   ============================================ */
.contact-form input:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible,
.submit-btn:focus-visible,
.checkbox-wrapper:focus-within .checkmark {
    outline: 0.125rem solid #00d4aa;
    outline-offset: 0.125rem;
}
