/* ==========================================================
   CONTACT PAGE - Video + Form with Floating Labels
   ========================================================== */

.contact-page {
    max-width: 1300px;
    margin: 3rem auto;
    padding: 0 3rem;
    position: relative;
    z-index: 2;
}
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* ---------- VIDEO + BLOB ---------- */
.contact-video-wrap {
    position: sticky;
    top: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* ה-blob (המסגרת הענן) */
.contact-video-blob {
    position: relative;
    background: #e5e5e5;
    padding: 2.5rem;
    max-width: 480px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* צורה אורגנית - border-radius לא סימטרי בארבעה כיוונים */
    border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
    animation: blobMorph 14s ease-in-out infinite;
    transition: transform 0.4s ease;
}
.contact-video-blob::before {
    /* צל עדין מתחת ל-blob */
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 20px 60px rgba(61, 79, 57, 0.1);
    z-index: -1;
}

@keyframes blobMorph {
    0%   { border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%; }
    25%  { border-radius: 47% 53% 38% 62% / 63% 42% 58% 37%; }
    50%  { border-radius: 37% 63% 46% 54% / 48% 55% 45% 52%; }
    75%  { border-radius: 58% 42% 63% 37% / 52% 63% 37% 48%; }
    100% { border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%; }
}

/* הוידאו בתוך ה-blob - גם עם צורה עדינה */
.contact-video {
    display: block;
    width: 100%;
    max-width: 400px;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 58% 42% 48% 52% / 52% 55% 45% 48%;
    animation: blobMorph 14s ease-in-out infinite reverse;
    box-shadow: 0 10px 30px rgba(61, 79, 57, 0.15);
}

/* אפקט hover עדין */
.contact-video-blob:hover {
    transform: scale(1.02);
}

/* למשתמשים שהגדירו "reduce motion" - לבטל morphing */
@media (prefers-reduced-motion: reduce) {
    .contact-video-blob,
    .contact-video {
        animation: none;
    }
}

/* ---------- CONTENT / FORM ---------- */
.contact-content-wrap {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(61, 79, 57, 0.08);
    position: relative;
}
.contact-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(61, 79, 57, 0.08);
}
.contact-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--color-forest);
    margin: 0 0 0.5rem;
}
.contact-subtitle {
    font-family: var(--font-handwritten);
    font-size: 1.3rem;
    color: var(--color-rose-deep);
    margin: 0;
}

/* הסתרת img של פרח דקורטיבי אם קיים בתוכן */
.contact-form-container > img:first-child {
    position: absolute;
    top: -40px;
    left: -40px;
    width: 110px;
    opacity: 0.85;
    z-index: 1;
    pointer-events: none;
}

/* ==========================================================
   CF7 FORM - Floating Labels + עיצוב יפה
   ========================================================== */
.wpcf7-form {
    position: relative;
    z-index: 2;
}
/* מרווח בין שדות */
.wpcf7-form p {
    margin: 0 0 1.2rem;
}
.wpcf7-form p:last-of-type { margin-bottom: 0; }

/* ---------- שדות עם Floating Label ---------- */
.wpcf7-form p.tp-field {
    position: relative;
    margin-bottom: 1.4rem;
}
.wpcf7-form p.tp-field > label {
    display: block;
    position: relative;
    margin: 0;
    padding: 0;
}
.wpcf7-form p.tp-field .wpcf7-form-control-wrap {
    display: block;
}

/* Input / Textarea base */
.wpcf7-form p.tp-field input.wpcf7-text,
.wpcf7-form p.tp-field input.wpcf7-email,
.wpcf7-form p.tp-field textarea.wpcf7-textarea {
    width: 100%;
    padding: 1.05rem 1rem 0.55rem;
    border: 1.5px solid rgba(61, 79, 57, 0.15);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-forest);
    background: white;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}
.wpcf7-form p.tp-field textarea.wpcf7-textarea {
    min-height: 120px;
    resize: vertical;
    padding-top: 1.3rem;
}
.wpcf7-form p.tp-field input.wpcf7-text:focus,
.wpcf7-form p.tp-field input.wpcf7-email:focus,
.wpcf7-form p.tp-field textarea.wpcf7-textarea:focus {
    border-color: var(--color-sage);
    box-shadow: 0 0 0 3px rgba(122, 139, 111, 0.15);
}

/* Floating Label */
.wpcf7-form p.tp-field .tp-field-label {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    color: var(--color-sage);
    background: white;
    padding: 0 0.4rem;
    pointer-events: none;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    font-weight: 400;
    z-index: 2;
    max-width: calc(100% - 2rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* ל-textarea - התווית תמיד למעלה (לא במרכז) */
.wpcf7-form p.tp-field:has(textarea) .tp-field-label {
    top: 1.3rem;
    transform: translateY(-50%);
}

/* floating state - כשהשדה focused או מלא */
.wpcf7-form p.tp-field:has(input:focus) .tp-field-label,
.wpcf7-form p.tp-field:has(input:not(:placeholder-shown)) .tp-field-label,
.wpcf7-form p.tp-field:has(textarea:focus) .tp-field-label,
.wpcf7-form p.tp-field:has(textarea:not(:placeholder-shown)) .tp-field-label {
    top: 0;
    transform: translateY(-50%) scale(0.88);
    color: var(--color-sage-dark);
    font-weight: 500;
    transform-origin: right center;
}

/* ---------- כפתור שליחה ---------- */
.wpcf7-form .wpcf7-submit {
    padding: 0.95rem 2.5rem;
    background: linear-gradient(135deg, var(--color-sage) 0%, var(--color-sage-dark) 100%);
    color: white;
    border: none;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 20px rgba(122, 139, 111, 0.25);
    position: relative;
    overflow: hidden;
}
.wpcf7-form .wpcf7-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(122, 139, 111, 0.4);
}
.wpcf7-form .wpcf7-submit::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}
.wpcf7-form .wpcf7-submit:hover::before { left: 100%; }

/* Spinner */
.wpcf7-spinner {
    margin-right: 0.5rem;
    background-color: var(--color-sage-light);
}

/* ---------- הודעות (validation / success / error) ---------- */
.wpcf7-not-valid-tip {
    color: var(--color-rose-deep);
    font-size: 0.75rem;
    margin-top: 0.3rem;
    display: block;
    padding-right: 0.3rem;
}
.wpcf7-form p.tp-field:has(.wpcf7-not-valid) input,
.wpcf7-form p.tp-field:has(.wpcf7-not-valid) textarea {
    border-color: var(--color-rose-deep);
}
.wpcf7-response-output {
    margin-top: 1.5rem !important;
    border-radius: 12px !important;
    padding: 1rem 1.5rem !important;
    font-size: 0.9rem;
}
.wpcf7 form.sent .wpcf7-response-output {
    border-color: #4CAF50 !important;
    background: rgba(76, 175, 80, 0.08);
    color: #2E7D32;
}
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
    border-color: var(--color-rose-deep) !important;
    background: rgba(196, 139, 139, 0.08);
    color: var(--color-rose-deep);
}
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output {
    border-color: #d32f2f !important;
    background: rgba(211, 47, 47, 0.08);
    color: #c62828;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .contact-container { grid-template-columns: 1fr; gap: 2rem; }
    .contact-video-wrap { position: relative; top: 0; padding: 1rem; }
    .contact-video-blob { max-width: 400px; padding: 2rem; }
    .contact-video { max-width: 320px; }
    .contact-content-wrap { padding: 2rem; }
    .contact-title { font-size: 1.8rem; }
}
@media (max-width: 768px) {
    .contact-page { padding: 0 1.2rem; margin: 2rem auto; }
    .contact-content-wrap { padding: 1.5rem; }
    .contact-form-container > img:first-child { width: 70px; top: -25px; left: -20px; }
    .contact-video-blob { padding: 1.5rem; }
    .contact-video { max-width: 260px; }
}
