/* ============================================
   RUBIKO DIGITAL - FORM COMPONENTS
   - Sizi Arayalım Widget
   - Modal Popup
   - Wizard Form
   - Shortcode Service Form
   - KVKK Checkbox
   - Responsive
   ============================================ */

/* ─── ORTAK FORM ELEMANLARI ─── */
.rubiko-input {
    width: 100%;
    padding: 13px 16px;
    background: rgba(255,255,255,0.95);
    border: 2px solid transparent;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.93rem;
    color: #111;
    transition: border-color 0.25s, box-shadow 0.25s;
    box-sizing: border-box;
}
.rubiko-input:focus {
    outline: none;
    border-color: #E2417C;
    box-shadow: 0 0 0 3px rgba(226,65,124,0.15);
}
.rubiko-input.wz-invalid,
.rubiko-input.sf-invalid {
    border-color: #e74c3c !important;
}
.rubiko-label {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    color: white;
    margin-bottom: 6px;
}
.rubiko-label span { color: #E2417C; }

/* Honeypot - gizli alan */
.rubiko-hp { display: none !important; visibility: hidden !important; }

/* ─── KVKK CHECKBOX ─── */
.rubiko-kvkk-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 4px;
}
.rubiko-kvkk-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    accent-color: #E2417C;
    cursor: pointer;
}
.rubiko-kvkk-row label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
    cursor: pointer;
}
.rubiko-kvkk-row label a {
    color: #E2417C;
    text-decoration: underline;
}
.rubiko-kvkk-row.rcw-error input,
.rubiko-kvkk-row.modal-error input,
.rubiko-kvkk-row.wz-error input,
.rubiko-kvkk-row.sf-error input {
    outline: 2px solid #e74c3c;
    border-radius: 3px;
}

/* ─── SİZİ ARAYALIM WİDGET ─── */
/* Panel kapalıyken flex akışında yer kaplamasın — yoksa görünmez büyük kutu tüm sayfayı keser */
#rubiko-call-widget {
    position: fixed;
    right: 24px;
    bottom: 90px;
    z-index: 9990;
    display: block;
    width: max-content;
    max-width: calc(100vw - 32px);
    pointer-events: none;
}

.rcw-toggle {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 20px;
    background: linear-gradient(135deg, #E2417C, #4684CE);
    color: white;
    border: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(226,65,124,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}
.rcw-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(226,65,124,0.5);
}
.rcw-toggle svg { flex-shrink: 0; }

.rcw-panel {
    position: absolute;
    right: 0;
    bottom: 100%;
    margin-bottom: 10px;
    width: 300px;
    max-width: min(300px, calc(100vw - 32px));
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1530 100%);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(226,65,124,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.97);
    transition: all 0.25s ease;
    pointer-events: none;
}
.rcw-panel.rcw-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.rcw-panel h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin: 0 0 4px 0;
}
.rcw-panel p {
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    margin: 0 0 18px 0;
    line-height: 1.5;
}

#rcw-form { display: flex; flex-direction: column; gap: 12px; }

.rcw-submit {
    width: 100%;
    padding: 13px;
    background: linear-gradient(90deg, #E2417C, #4684CE);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 4px;
}
.rcw-submit:hover { opacity: 0.9; }
.rcw-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.rcw-success {
    display: none;
    text-align: center;
    padding: 10px 0;
}
.rcw-success .rcw-check {
    font-size: 2.5rem;
    color: #2dd4a8;
    margin-bottom: 8px;
}
.rcw-success h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: #2dd4a8;
    margin: 0 0 6px 0;
}
.rcw-success p {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin: 0;
}
.rcw-form-error {
    display: none;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    color: #e74c3c;
    text-align: center;
}

/* ─── MODAL POPUP ─── */
/* Kapalıyken tam ekran overlay tıklamayı yutmasın (mobil Chrome/Safari) */
#rubiko-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}
#rubiko-modal-overlay.modal-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#rubiko-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -48%) scale(0.96);
    z-index: 10001;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1530 50%, #0a0a0a 100%);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: 0 0 80px rgba(226,65,124,0.2), 0 30px 80px rgba(0,0,0,0.6);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
}
#rubiko-modal.modal-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    padding: 4px 8px;
}
.modal-close:hover { color: white; }

.modal-header { margin-bottom: 28px; }
.modal-header h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
    line-height: 1.3;
}
.modal-header h3 span { color: #E2417C; }
.modal-header p {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    margin: 0;
    line-height: 1.6;
}

#modal-form { display: flex; flex-direction: column; gap: 16px; }

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.modal-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(90deg, #E2417C 0%, #4684CE 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    margin-top: 4px;
}
.modal-submit:hover { opacity: 0.92; transform: translateY(-1px); }
.modal-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.modal-success {
    display: none;
    text-align: center;
    padding: 30px 0;
}
.modal-success .modal-check {
    font-size: 3rem;
    color: #2dd4a8;
    margin-bottom: 12px;
}
.modal-success h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    color: #2dd4a8;
    margin: 0 0 10px 0;
}
.modal-success p {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.55);
    margin: 0;
}
.modal-form-error {
    display: none;
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    color: #e74c3c;
    text-align: center;
}

/* ─── WİZARD FORM ─── */
.wz-wrapper {
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1530 50%, #0a0a0a 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 50px 45px;
    box-shadow: 0 0 60px rgba(226,65,124,0.12);
}

/* Progress bar */
.wz-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    margin-bottom: 36px;
    overflow: hidden;
}
.wz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #E2417C, #4684CE);
    border-radius: 4px;
    width: 0%;
    transition: width 0.4s ease;
}

/* Step indicators */
.wz-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}
.wz-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.3);
    transition: color 0.3s;
}
.wz-indicator-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255,255,255,0.3);
    transition: all 0.3s;
    flex-shrink: 0;
}
.wz-indicator.wz-active .wz-indicator-dot {
    border-color: #E2417C;
    background: rgba(226,65,124,0.15);
    color: #E2417C;
}
.wz-indicator.wz-active { color: white; }
.wz-indicator.wz-done .wz-indicator-dot {
    border-color: #2dd4a8;
    background: rgba(45,212,168,0.15);
    color: #2dd4a8;
}
.wz-indicator-sep {
    width: 30px;
    height: 1px;
    background: rgba(255,255,255,0.1);
    align-self: center;
}

/* Steps */
.wz-step { display: none; }
.wz-step.wz-step-active { display: block; }

.wz-step-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 6px;
}
.wz-step-desc {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.45);
    margin-bottom: 24px;
    line-height: 1.5;
}

.wz-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
.wz-field { margin-bottom: 14px; }

/* Butonlar */
.wz-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
    gap: 12px;
}
.wz-btn-prev {
    padding: 12px 28px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.7);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.wz-btn-prev:hover { background: rgba(255,255,255,0.1); color: white; }

.wz-btn-next,
#wz-submit {
    padding: 13px 32px;
    background: linear-gradient(90deg, #E2417C, #4684CE);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    margin-left: auto;
}
.wz-btn-next:hover, #wz-submit:hover { opacity: 0.9; transform: translateY(-1px); }
#wz-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.wz-success {
    display: none;
    text-align: center;
    padding: 50px 20px;
}
.wz-success .wz-check {
    font-size: 3.5rem;
    color: #2dd4a8;
    margin-bottom: 16px;
}
.wz-success h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    color: #2dd4a8;
    margin: 0 0 12px 0;
}
.wz-success p {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: rgba(255,255,255,0.55);
    margin: 0;
}
.wz-form-error {
    display: none;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    color: #e74c3c;
    text-align: center;
    margin-top: 10px;
}

/* Budget seçenekleri */
.wz-budget-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.wz-budget-option {
    position: relative;
}
.wz-budget-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.wz-budget-option label {
    display: block;
    padding: 12px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}
.wz-budget-option input:checked + label {
    border-color: #E2417C;
    background: rgba(226,65,124,0.1);
    color: white;
}
.wz-budget-option label:hover {
    border-color: rgba(226,65,124,0.4);
    color: white;
}

/* ─── SAYFA SONU HİZMET FORMU (template-parts/section-lead-form) ─── */
.rubiko-lead-form-section {
    padding: 72px 20px 88px;
    background: var(--page-bg, #0a0a0a);
}
.rubiko-lead-form-section__inner {
    max-width: 560px;
    margin: 0 auto;
}
.rubiko-lead-form-section .rubiko-sf-wrap {
    margin: 0;
}

/* ─── SHORTCODE HİZMET FORMU ─── */
.rubiko-sf-wrap {
    background: linear-gradient(135deg, rgba(226,65,124,0.06), rgba(70,132,206,0.06));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 36px 32px;
    margin: 40px 0;
}
.rubiko-sf-wrap h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin: 0 0 6px 0;
}
.rubiko-sf-wrap > p {
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.45);
    margin: 0 0 24px 0;
}

.rubiko-service-form { display: flex; flex-direction: column; gap: 14px; }

.sf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.sf-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(90deg, #E2417C, #4684CE);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 4px;
}
.sf-submit:hover { opacity: 0.9; }
.sf-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.sf-error-msg {
    display: none;
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    color: #e74c3c;
    text-align: center;
}

.sf-success {
    text-align: center;
    padding: 30px 0;
}
.sf-success .sf-check {
    font-size: 2.8rem;
    color: #2dd4a8;
    margin-bottom: 10px;
}
.sf-success h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    color: #2dd4a8;
    margin: 0 0 8px 0;
}
.sf-success p {
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.5);
    margin: 0;
}

/* ─── BLOG ARŞİV ─── */
.blog-archive-section {
    padding: 120px 20px 80px;
    background: var(--page-bg, #0a0a0a);
    min-height: 60vh;
}
.blog-archive-header {
    text-align: center;
    margin-bottom: 60px;
}
.blog-archive-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin: 0 0 12px 0;
}
.blog-archive-header h1 span { color: #E2417C; }
.blog-archive-header p {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: rgba(255,255,255,0.5);
    margin: 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto;
}

.blog-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    border-color: rgba(226,65,124,0.2);
}

.blog-card-thumb {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
}
.blog-card-thumb-placeholder {
    width: 100%;
    aspect-ratio: 1/1;
    background: linear-gradient(135deg, rgba(226,65,124,0.1), rgba(70,132,206,0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.blog-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.blog-card-cat {
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #E2417C;
    margin-bottom: 10px;
}
.blog-card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: white;
    margin: 0 0 10px 0;
    line-height: 1.5;
}
.blog-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}
.blog-card-title a:hover { color: #E2417C; }
.blog-card-excerpt {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.7;
    margin: 0 0 20px 0;
    flex: 1;
}
.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}
.blog-card-date {
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.3);
}
.blog-card-read {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #E2417C;
    text-decoration: none;
    transition: opacity 0.2s;
}
.blog-card-read:hover { opacity: 0.75; }

.blog-no-posts {
    text-align: center;
    padding: 80px 20px;
    font-family: 'Poppins', sans-serif;
    color: rgba(255,255,255,0.4);
    font-size: 1rem;
    grid-column: 1 / -1;
}

/* Blog pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 60px;
}
.blog-pagination a,
.blog-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}
.blog-pagination a {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}
.blog-pagination a:hover {
    background: rgba(226,65,124,0.1);
    border-color: rgba(226,65,124,0.3);
    color: white;
}
.blog-pagination span.current {
    background: linear-gradient(135deg, #E2417C, #4684CE);
    border: none;
    color: white;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    #rubiko-call-widget {
        right: 16px;
        bottom: 80px;
    }
    .rcw-panel {
        width: 280px;
        max-width: min(280px, calc(100vw - 32px));
    }

    #rubiko-modal {
        padding: 28px 20px;
        width: 95%;
    }
    .modal-grid { grid-template-columns: 1fr; }

    .wz-wrapper { padding: 30px 20px; }
    .wz-grid { grid-template-columns: 1fr; }
    .wz-budget-options { grid-template-columns: 1fr 1fr; }
    .wz-indicators { gap: 4px; }
    .wz-indicator span:not(.wz-indicator-dot) { display: none; }
    .wz-indicator-sep { width: 16px; }

    .sf-grid { grid-template-columns: 1fr; }
    .rubiko-sf-wrap { padding: 24px 18px; }

    .blog-grid { grid-template-columns: 1fr; }
    .blog-archive-header h1 { font-size: 2rem; }
}

@media (max-width: 480px) {
    .rcw-toggle span { display: none; }
    .rcw-toggle { padding: 14px; border-radius: 50%; }
    .wz-budget-options { grid-template-columns: 1fr; }
}
