/* ========================================
   KST MAĞAZACILIK - User CSS
   Mobile-First Responsive Design
   ========================================
   
   SİSTEM GELİŞTİRİCİSİ: ESBİ BİLİŞİM | WEB TASARIM VE PROGRAMLAMA EKİBİ
   SİSTEM YAZARI: ESBİ BİLİŞİM | WEB TASARIM VE PROGRAMLAMA EKİBİ
   E-MAIL: bilgi@esbi.com.tr
   TELEFON: 0264 777 16 66
   WEB SİTESİ: https://www.esbi.com.tr
   ======================================== */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* CSS Variables */
:root {
    --bynr-ana-renk: #ee403d;
    --bynr-ikinci-renk: #2c3e50;
    --bynr-basari-rengi: #27ae60;
    --bynr-uyari-rengi: #f39c12;
    --bynr-hata-rengi: #e74c3c;
    --bynr-font-family: 'Poppins', sans-serif;
    --bynr-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --bynr-shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
    --bynr-border-radius: 12px;
    --bynr-transition: all 0.3s ease;
    --bynr-bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --bynr-header-gradient: linear-gradient(135deg, var(--bynr-ana-renk) 0%, var(--bynr-ikinci-renk) 100%);
}

/* ========================================
   BASE STYLES
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--bynr-font-family);
    line-height: 1.6;
    color: #333;
    background: var(--bynr-bg-gradient);
    min-height: 100vh;
    font-size: 16px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ========================================
   HEADER STYLES
   ======================================== */

.main-header {
    background: var(--bynr-header-gradient);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: var(--bynr-shadow);
    position: relative;
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
}

.logo-section {
    margin-bottom: 0px;
}

.main-logo {
    max-height: 60px;
    width: auto;
}

.logo-placeholder .company-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 1px;
}

.form-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.form-subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.9;
    margin: 0;
}

/* ========================================
   MAIN CONTENT STYLES
   ======================================== */

.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 300px);
}

/* Form Kapalı Mesajı */
.form-closed-message {
    max-width: 600px;
    margin: 0 auto;
}

.form-closed-message .alert {
    border: none;
    border-radius: var(--bynr-border-radius);
    box-shadow: var(--bynr-shadow);
    padding: 2rem;
}

.form-closed-message .alert-content i {
    color: var(--bynr-uyari-rengi);
}

/* ========================================
   FORM CONTAINER
   ======================================== */

.application-form-container {
    background: white;
    border-radius: var(--bynr-border-radius);
    box-shadow: var(--bynr-shadow);
    overflow: hidden;
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.application-form {
    padding: 0;
}

/* ========================================
   FORM SECTIONS
   ======================================== */

.form-section {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.form-section:last-child {
    border-bottom: none;
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-title {
    color: var(--bynr-ikinci-renk);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.section-title i {
    color: var(--bynr-ana-renk);
    font-size: 1.2rem;
}

.section-subtitle {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

/* ========================================
   PHOTO UPLOAD SECTION
   ======================================== */

.photo-section {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--bynr-border-radius);
    margin-bottom: 2rem;
}

.photo-upload-container {
    max-width: 320px;
    margin: 0 auto;
}

.photo-upload-area {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto;
    border: 3px dashed #bdc3c7;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--bynr-transition);
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.photo-upload-area:hover {
    border-color: var(--bynr-ana-renk);
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.photo-upload-area.dragover {
    border-color: var(--bynr-ana-renk);
    background: rgba(238, 64, 61, 0.05);
    border-style: solid;
    transform: scale(1.02);
}

.photo-upload-placeholder {
    text-align: center;
    color: #6c757d;
    padding: 1.5rem;
}

.photo-upload-placeholder i {
    color: var(--bynr-ana-renk);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.photo-upload-placeholder h5 {
    font-weight: 600;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    color: #495057;
}

.photo-upload-placeholder p {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.photo-upload-placeholder small {
    font-size: 0.8rem;
    color: #868e96;
    display: block;
    margin-top: 0.5rem;
}

.photo-preview {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--bynr-hata-rengi);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--bynr-transition);
    font-size: 0.8rem;
}

.photo-remove-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

/* ========================================
   FORM INPUTS
   ======================================== */

.form-floating {
    margin-bottom: 0;
}

.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.875rem 0.75rem;
    font-size: 1rem;
    transition: var(--bynr-transition);
    box-shadow: none;
    font-family: var(--bynr-font-family);
}

.form-control:focus, .form-select:focus {
    border-color: var(--bynr-ana-renk);
    box-shadow: 0 0 0 0.2rem rgba(238, 64, 61, 0.25);
}

.form-floating > label {
    color: #6c757d;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control:focus ~ label,
.form-control:not(:placeholder-shown) ~ label,
.form-select:focus ~ label,
.form-select:not([value=""]) ~ label {
    color: var(--bynr-ana-renk);
    font-weight: 600;
}

/* Invalid States */
.is-invalid .form-control,
.is-invalid .form-select {
    border-color: var(--bynr-hata-rengi);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--bynr-hata-rengi);
    font-weight: 500;
}

/* ========================================
   POSITION SELECTION
   ======================================== */

.position-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.position-option {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: var(--bynr-border-radius);
    padding: 1.2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--bynr-transition);
    position: relative;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.position-option:hover {
    border-color: var(--bynr-ana-renk);
    transform: translateY(-2px);
    box-shadow: var(--bynr-shadow-hover);
}

.position-general {
    border: 2px solid var(--bynr-uyari-rengi);
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
}

.position-general .position-icon {
    background: var(--bynr-uyari-rengi);
    color: white;
}

.position-general .position-title {
    color: #856404;
    font-weight: 600;
}

.position-general .position-desc {
    color: #664d03;
}

.position-option.selected {
    border-color: var(--bynr-ana-renk);
    background: rgba(238, 64, 61, 0.05);
}

.position-option .position-icon {
    font-size: 1.8rem;
    color: var(--bynr-ana-renk);
    margin-bottom: 0.8rem;
}

.position-option .position-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--bynr-ikinci-renk);
    margin-bottom: 0.4rem;
}

.position-option .position-desc {
    font-size: 0.85rem;
    color: #6c757d;
}

.position-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.position-option .check-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--bynr-transition);
    font-size: 0.7rem;
}

.position-option.selected .check-indicator {
    background: var(--bynr-ana-renk);
    border-color: var(--bynr-ana-renk);
    color: white;
}

/* ========================================
   WORK TYPE OPTIONS
   ======================================== */

.work-type-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.work-type-option {
    margin-bottom: 0;
}

.work-type-option .form-check-label {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: var(--bynr-border-radius);
    padding: 1.2rem;
    cursor: pointer;
    transition: var(--bynr-transition);
    display: block;
    width: 100%;
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.work-type-option .form-check-label:hover {
    border-color: var(--bynr-ana-renk);
    transform: translateY(-2px);
    box-shadow: var(--bynr-shadow-hover);
}

.work-type-option .form-check-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.work-type-option .form-check-input:checked + .form-check-label {
    border-color: var(--bynr-ana-renk);
    background: rgba(238, 64, 61, 0.05);
}

.option-content {
    text-align: center;
}

.option-content i {
    font-size: 1.8rem;
    color: var(--bynr-ana-renk);
    margin-bottom: 0.8rem;
}

.option-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--bynr-ikinci-renk);
    margin-bottom: 0.4rem;
}

.option-desc {
    font-size: 0.85rem;
    color: #6c757d;
}

/* ========================================
   TEXTAREA STYLES
   ======================================== */

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* ========================================
   KVKK SECTION
   ======================================== */

.kvkk-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: var(--bynr-border-radius);
    padding: 1.2rem;
}



.kvkk-section .form-check-input {
    width: 18px;
    height: 18px;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.kvkk-section .form-check-label {
    font-size: 0.9rem;
    line-height: 1.5;
}

.kvkk-section .form-check-label a {
    color: var(--bynr-ana-renk);
    font-weight: 600;
    text-decoration: none;
}

.kvkk-section .form-check-label a:hover {
    text-decoration: underline;
}

/* ========================================
   FORM ACTIONS
   ======================================== */

.form-actions {
    padding: 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-actions .btn {
    border-radius: 50px;
    padding: 0.8rem 1.8rem;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    transition: var(--bynr-transition);
    min-width: 160px;
    font-family: var(--bynr-font-family);
}

.form-actions .btn-primary {
    background: linear-gradient(135deg, var(--bynr-ana-renk) 0%, #d73527 100%);
    color: white;
}

.form-actions .btn-primary:hover {
    background: linear-gradient(135deg, #d73527 0%, var(--bynr-ana-renk) 100%);
    transform: translateY(-2px);
    box-shadow: var(--bynr-shadow-hover);
}

.form-actions .btn-secondary {
    background: #6c757d;
    color: white;
}

.form-actions .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: var(--bynr-shadow-hover);
}

.form-actions .btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none !important;
}

/* ========================================
   INFO NOTE SECTION
   ======================================== */

.info-note-section {
    max-width: 600px;
    margin: 0 auto;
}

.info-note-section .alert {
    border: none;
    border-radius: var(--bynr-border-radius);
    box-shadow: var(--bynr-shadow);
    background: linear-gradient(45deg, #e3f2fd, #f3e5f5);
    border-left: 4px solid var(--bynr-ana-renk);
}

.info-note-section .btn {
    border-radius: 50px;
    font-weight: 600;
}

/* ========================================
   FOOTER STYLES
   ======================================== */

.main-footer {
    background: var(--bynr-ikinci-renk);
    color: white;
    padding: 1.5rem 0;
    margin-top: 2rem;
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

/* ========================================
   LOADING STATES
   ======================================== */

.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--bynr-ana-renk);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Desktop Large Styles (1200px+) */
@media (min-width: 1200px) {
    .container {
        max-width: 1100px;
        padding: 0 30px;
    }
    
    .application-form-container {
        padding: 3rem;
    }
    
    .form-section {
        margin-bottom: 1rem;
    }
    
    .photo-upload-area {
        width: 220px;
        height: 220px;
    }
    
    .photo-upload-container {
        max-width: 350px;
    }
    
    .position-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }
    
    .row.g-3 {
        --bs-gutter-x: 2rem;
    }
}

/* Tablet Styles (768px - 1199px) */
@media (min-width: 768px) {
    .container {
        max-width: 1000px;
        padding: 0 20px;
    }
    
    .main-header {
        padding: 3rem 0;
    }
    
    .logo-placeholder .company-name {
        font-size: 2rem;
        letter-spacing: 2px;
    }
    
    .form-title {
        font-size: 2.5rem;
    }
    
    .form-subtitle {
        font-size: 1.2rem;
    }
    
    .main-content {
        padding: 3rem 0;
    }
    
    .form-section {
        padding: 2rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .photo-upload-area {
        width: 300px;
        height: 200px;
    }
    
    .position-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    /*.work-type-options {
        grid-template-columns: repeat(2, 1fr);
    }*/
    
    .form-actions {
        padding: 2rem;
        flex-direction: row;
    }
    
    .form-actions .btn {
        min-width: 180px;
        font-size: 1.1rem;
        padding: 0.875rem 2rem;
    }
}

/* Mobile Styles (Max 767px) */
@media (max-width: 767px) {
    body {
        overflow-x: hidden;
    }
    
    .container {
        max-width: 100%;
        padding: 0 8px;
        margin: 0 auto;
        width: 100%;
    }
    
    .main-header {
        padding: 1.5rem 0;
    }
    
    .logo-placeholder .company-name {
        font-size: 2rem;
    }
    
    .form-title {
        font-size: 1.8rem;
    }
    
    .form-subtitle {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 1.5rem 0;
    }
    
    .application-form-container {
        margin: 0 4px 1rem 4px;
        border-radius: 8px;
    }
    
    .form-section {
        padding: 0.8rem;
    }
    
    .section-title {
        font-size: 1.1rem;
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .section-title i {
        font-size: 1rem;
        flex-shrink: 0;
    }
    
    .section-header {
        margin-bottom: 1rem;
    }
    
    .photo-upload-area {
        width: 140px;
        height: 140px;
    }
    
    .photo-upload-placeholder h5 {
        font-size: 0.9rem;
    }
    
    .photo-upload-placeholder p {
        font-size: 0.8rem;
    }
    
    .position-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .position-option {
        padding: 1rem;
        min-height: 100px;
    }
    
    .position-option .position-icon {
        font-size: 1.5rem;
        margin-bottom: 0.6rem;
    }
    
    .position-option .position-title {
        font-size: 0.95rem;
    }
    
    .position-option .position-desc {
        font-size: 0.8rem;
    }
    
    .work-type-options {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .work-type-option .form-check-label {
        padding: 1rem;
        min-height: 80px;
    }
    
    .option-content i {
        font-size: 1.5rem;
    }
    
    .option-title {
        font-size: 0.95rem;
    }
    
    .option-desc {
        font-size: 0.8rem;
    }
    
    .kvkv-section {
        padding: 1rem;
    }
    
    .form-actions {
        padding: 1.2rem 1rem;
        flex-direction: column;
        align-items: center;
    }
    
    .form-actions .btn {
        font-size: 0.95rem;
        padding: 0.75rem 1.5rem;
        min-width: auto;
        width: 100%;
        max-width: 250px;
    }
}

/* Small Mobile Styles (Max 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 4px;
    }
    
    .logo-placeholder .company-name {
        font-size: 1.8rem;
        letter-spacing: 0.5px;
    }
    
    .form-title {
        font-size: 1.6rem;
    }
    
    .form-subtitle {
        font-size: 0.95rem;
    }
    
    .application-form-container {
        margin: 0 2px 1rem 2px;
        border-radius: 6px;
    }
    
    .form-section {
        padding: 0.6rem;
    }
    
    .photo-upload-area {
        width: 300px;
        height: 200px;
    }
    
    .photo-remove-btn {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }
    
    .form-control, .form-select {
        font-size: 16px; /* iOS zoom prevention */
        padding: 0.75rem;
        border-radius: 8px;
    }
    
    .form-floating > label {
        font-size: 0.85rem;
    }
    
    /* Bootstrap row spacing fix for mobile */
    .row.g-3 {
        --bs-gutter-x: 0.5rem;
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }
    
    .row.g-3 > * {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    
    /* Form floating labels mobile fix */
    .form-floating {
        margin-bottom: 0.75rem;
    }
    
    textarea.form-control {
        min-height: 80px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .main-header,
    .main-footer,
    .form-actions,
    .info-note-section {
        display: none !important;
    }
    
    .application-form-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .form-section {
        page-break-inside: avoid;
    }
    
    body {
        background: white;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Focus States */
.form-control:focus,
.form-select:focus,
.position-option:focus,
.work-type-option .form-check-label:focus,
.btn:focus {
    outline: 2px solid var(--bynr-ana-renk);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .position-option,
    .work-type-option .form-check-label {
        border-width: 3px;
    }
    
    .form-control,
    .form-select {
        border-width: 3px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .application-form-container {
        animation: none;
    }
}
