/* ==============================================================
   CONTACT FORM (extracted for homepage compatibility)
   ============================================================== */
.p4p-contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 640px;
    margin: 0 auto;
}
.p4p-contact-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
@media (max-width: 560px) {
    .p4p-contact-form__row { grid-template-columns: 1fr; }
}
.p4p-contact-form__field {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    font-size: .85rem;
    font-weight: 600;
    color: #cbd5e1;
    cursor: text;
}
.p4p-contact-form__field span {
    font-size: .75rem;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.p4p-contact-form__field input,
.p4p-contact-form__field textarea {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    padding: .9rem 1rem;
    color: #f1f5f9;
    font-size: .95rem;
    outline: none;
    transition: border-color .3s ease, box-shadow .3s ease, background .3s ease;
    font-family: inherit;
}
.p4p-contact-form__field input::placeholder,
.p4p-contact-form__field textarea::placeholder {
    color: #64748b;
}
.p4p-contact-form__field input:focus,
.p4p-contact-form__field textarea:focus {
    border-color: rgba(6,182,212,.4);
    background: rgba(255,255,255,.06);
    box-shadow: 0 0 0 3px rgba(6,182,212,.1);
}
.p4p-contact-form__field textarea {
    resize: vertical;
    min-height: 140px;
}
.p4p-contact-form__submit {
    align-self: flex-start;
}
@media (max-width: 560px) {
    .p4p-contact-form__submit { align-self: stretch; justify-content: center; }
}

/* Success message */
.p4p-contact-success {
    text-align: center;
    background: linear-gradient(160deg,rgba(16,185,129,.08),rgba(6,182,212,.04));
    border: 1px solid rgba(16,185,129,.2);
    border-radius: 20px;
    padding: 3rem 2rem;
    max-width: 560px;
    margin: 0 auto;
}
.p4p-contact-success__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(16,185,129,.15);
    border: 1px solid rgba(16,185,129,.3);
    color: #10b981;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.p4p-contact-success h3 {
    font-family: var(--p4p-font-display);
    font-size: 1.4rem;
    color: #fff;
    margin: 0 0 .5rem;
}
.p4p-contact-success p {
    color: #94a3b8;
    font-size: .9rem;
    margin: 0;
}

/* ==============================================================
   CONTACT POPUP / MODAL
   ============================================================== */
.p4p-contact-popup {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s ease, visibility .4s ease;
}
.p4p-contact-popup.is-open {
    opacity: 1;
    visibility: visible;
}
.p4p-contact-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(8px);
}
.p4p-contact-popup__panel {
    position: relative;
    z-index: 2;
    width: min(100%, 520px);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    background: linear-gradient(160deg, rgba(10,10,15,.95), rgba(5,5,8,.98));
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 30px 80px rgba(0,0,0,.8);
    transform: translateY(20px) scale(.98);
    transition: transform .4s cubic-bezier(.19,1,.22,1);
}
.p4p-contact-popup.is-open .p4p-contact-popup__panel {
    transform: translateY(0) scale(1);
}
.p4p-contact-popup__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    color: #94a3b8;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s ease;
}
.p4p-contact-popup__close:hover {
    background: rgba(255,255,255,.1);
    color: #fff;
    transform: rotate(90deg);
}
.p4p-contact-popup__head {
    text-align: center;
    margin-bottom: 1.5rem;
}
.p4p-contact-popup__head h3 {
    font-family: var(--p4p-font-display);
    font-size: 1.25rem;
    color: #fff;
    margin: 0 0 .25rem;
}
.p4p-contact-popup__head p {
    font-size: .85rem;
    color: #94a3b8;
    margin: 0;
}
.p4p-contact-popup .p4p-contact-form { max-width: 100%; }
.p4p-contact-popup .p4p-contact-form__row { gap: 1rem; }
.p4p-contact-popup .p4p-contact-form__field input,
.p4p-contact-popup .p4p-contact-form__field textarea {
    padding: .8rem .9rem;
    font-size: .9rem;
}
.p4p-contact-popup .p4p-contact-form__field textarea { min-height: 100px; }

/* Floating trigger button */
.p4p-contact-float {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 8000;
    display: flex;
    align-items: center;
    gap: .6rem;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    color: #fff;
    padding: .9rem 1.6rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: .03em;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(6,182,212,.35);
    transition: transform .3s ease, box-shadow .3s ease;
    animation: p4p-float-pulse 3s ease-in-out infinite;
}
.p4p-contact-float:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 15px 40px rgba(6,182,212,.5);
}
@keyframes p4p-float-pulse {
    0%, 100% { box-shadow: 0 10px 30px rgba(6,182,212,.35); }
    50% { box-shadow: 0 10px 40px rgba(6,182,212,.55); }
}
@media (max-width: 560px) {
    .p4p-contact-float {
        right: 1rem;
        bottom: 1rem;
        padding: .8rem 1.2rem;
        font-size: .8rem;
    }
    .p4p-contact-popup__panel {
        padding: 1.5rem 1.25rem;
        border-radius: 16px;
    }
}

/* Hide floating button on contact page */
body.p4p-page--contact .p4p-contact-float { display: none; }
