/* ==========================================================================
   ROOF 360 SOLUTIONS - Contact Page Styles (contact.css)
   ========================================================================== */

/* Section 1: Request Your Free Estimate (Light + Elevated Form Card) */
.r360-contact-form-section {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #f4f6f9 100%);
    padding: 5.5rem 0 6rem;
    overflow: hidden;
}

.r360-form-card {
    background: #12141c;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #d90b16;
    border-radius: 22px;
    padding: 2.75rem 2.5rem;
    box-shadow: 0 28px 64px rgba(11, 12, 16, 0.24);
    position: relative;
    z-index: 2;
    color: #ffffff;
}

.r360-form-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: #e2e6ef;
    margin-bottom: 0.45rem;
    letter-spacing: 0.02em;
}

.r360-form-control,
.r360-form-select {
    background-color: #1b1e28;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 11px;
    color: #ffffff;
    padding: 0.82rem 1rem;
    font-size: 0.96rem;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

.r360-form-control::placeholder {
    color: #8b93a3;
}

.r360-form-control:focus,
.r360-form-select:focus {
    background-color: #202431;
    border-color: #d90b16;
    color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(217, 11, 22, 0.22);
    outline: none;
}

.r360-form-select option {
    background-color: #1b1e28;
    color: #ffffff;
}

/* ==========================================================================
   Animated Submit Button (Adapted Uiverse marcelodolza)
   ========================================================================== */
.r360-submit-btn {
    cursor: pointer;
    border-radius: 14px;
    color: #111319;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.14);
    border: none;
    background: transparent;
    box-shadow: 0 0.5px 0.5px 1px rgba(255, 255, 255, 0.2),
                0 12px 26px rgba(0, 0, 0, 0.35),
                0 4px 6px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    min-width: 225px;
    padding: 0 26px;
    height: 64px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
}

.r360-submit-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 1px 2px rgba(217, 11, 22, 0.45),
                0 15px 30px rgba(0, 0, 0, 0.42),
                0 10px 4px -3px rgba(0, 0, 0, 0.1);
}

.r360-submit-btn:active {
    transform: scale(1);
}

.r360-submit-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    border: 2.5px solid transparent;
    background: linear-gradient(#f7f8fa, #e4e7ef) padding-box,
                linear-gradient(to bottom, rgba(217, 11, 22, 0.35), rgba(0, 0, 0, 0.45)) border-box;
    z-index: 0;
    transition: all 0.4s ease;
}

.r360-submit-btn:hover::after {
    transform: scale(1.04, 1.09);
    box-shadow: inset 0 -1px 3px 0 rgba(255, 255, 255, 1);
}

.r360-submit-btn::before {
    content: "";
    inset: 6px 6px 6px 6px;
    position: absolute;
    background: linear-gradient(to top, #f7f8fa, #e4e7ef);
    border-radius: 30px;
    filter: blur(0.4px);
    z-index: 2;
}

.r360-submit-outline {
    position: absolute;
    border-radius: inherit;
    overflow: hidden;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
    inset: -2px -3.5px;
}

.r360-submit-outline::before {
    content: "";
    position: absolute;
    inset: -100%;
    background: conic-gradient(from 180deg, transparent 55%, #d90b16 78%, #ffffff 90%, transparent 100%);
    animation: r360-btn-spin 2s linear infinite;
    animation-play-state: paused;
}

@keyframes r360-btn-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.r360-submit-btn:hover .r360-submit-outline {
    opacity: 1;
}

.r360-submit-btn:hover .r360-submit-outline::before {
    animation-play-state: running;
}

.r360-submit-state {
    padding-left: 30px;
    z-index: 2;
    display: flex;
    align-items: center;
    position: relative;
}

.r360-submit-state p {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.r360-submit-default p span:nth-child(6) {
    margin-right: 6px;
}

.r360-submit-icon {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    transform: scale(1.22);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d90b16;
}

.r360-submit-icon svg {
    overflow: visible;
}

.r360-submit-state p span {
    display: block;
    opacity: 0;
    animation: r360-slide-down 0.8s ease forwards;
}

.r360-submit-btn:hover .r360-submit-state p span {
    opacity: 1;
    animation: r360-wave 0.5s ease forwards;
}

.r360-submit-btn:focus .r360-submit-default p span {
    opacity: 1;
    animation: r360-disappear 0.6s ease forwards;
}

/* Staggered delays without CSS variables */
.r360-submit-state p span:nth-child(1) { animation-delay: 0s; }
.r360-submit-state p span:nth-child(2) { animation-delay: 0.03s; }
.r360-submit-state p span:nth-child(3) { animation-delay: 0.06s; }
.r360-submit-state p span:nth-child(4) { animation-delay: 0.09s; }
.r360-submit-state p span:nth-child(5) { animation-delay: 0.12s; }
.r360-submit-state p span:nth-child(6) { animation-delay: 0.15s; }
.r360-submit-state p span:nth-child(7) { animation-delay: 0.18s; }
.r360-submit-state p span:nth-child(8) { animation-delay: 0.21s; }
.r360-submit-state p span:nth-child(9) { animation-delay: 0.24s; }
.r360-submit-state p span:nth-child(10) { animation-delay: 0.27s; }
.r360-submit-state p span:nth-child(11) { animation-delay: 0.30s; }
.r360-submit-state p span:nth-child(12) { animation-delay: 0.33s; }
.r360-submit-state p span:nth-child(13) { animation-delay: 0.36s; }

@keyframes r360-wave {
    30% {
        opacity: 1;
        transform: translateY(4px);
    }
    50% {
        opacity: 1;
        transform: translateY(-3px);
        color: #d90b16;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes r360-slide-down {
    0% {
        opacity: 0;
        transform: translateY(-20px) translateX(5px) rotate(-90deg);
        color: #d90b16;
        filter: blur(5px);
    }
    30% {
        opacity: 1;
        transform: translateY(4px);
        filter: blur(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-3px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes r360-disappear {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: translateX(5px) translateY(20px);
        color: #d90b16;
        filter: blur(5px);
    }
}

.r360-submit-default .r360-submit-icon svg {
    animation: r360-land 0.6s ease forwards;
}

.r360-submit-btn:hover .r360-submit-default .r360-submit-icon {
    transform: rotate(45deg) scale(1.22);
}

.r360-submit-btn:focus .r360-submit-default svg {
    animation: r360-take-off 0.8s linear forwards;
}

.r360-submit-btn:focus .r360-submit-default .r360-submit-icon {
    transform: rotate(0) scale(1.22);
}

@keyframes r360-take-off {
    0% {
        opacity: 1;
    }
    60% {
        opacity: 1;
        transform: translateX(70px) rotate(45deg) scale(2);
    }
    100% {
        opacity: 0;
        transform: translateX(160px) rotate(45deg) scale(0);
    }
}

@keyframes r360-land {
    0% {
        transform: translateX(-60px) translateY(30px) rotate(-50deg) scale(2);
        opacity: 0;
        filter: blur(3px);
    }
    100% {
        transform: translateX(0) translateY(0) rotate(0);
        opacity: 1;
        filter: blur(0);
    }
}

.r360-submit-default .r360-submit-icon::before {
    content: "";
    position: absolute;
    top: 50%;
    height: 2px;
    width: 0;
    left: -5px;
    background: linear-gradient(to right, transparent, rgba(217, 11, 22, 0.55));
}

.r360-submit-btn:focus .r360-submit-default .r360-submit-icon::before {
    animation: r360-contrail 0.8s linear forwards;
}

@keyframes r360-contrail {
    0% {
        width: 0;
        opacity: 1;
    }
    8% {
        width: 15px;
    }
    60% {
        opacity: 0.7;
        width: 80px;
    }
    100% {
        opacity: 0;
        width: 160px;
    }
}

.r360-submit-sent {
    display: none;
}

.r360-submit-sent svg {
    transform: scale(1.22);
    margin-right: 8px;
}

.r360-submit-btn:focus .r360-submit-default {
    position: absolute;
}

.r360-submit-btn:focus .r360-submit-sent {
    display: flex;
}

.r360-submit-btn:focus .r360-submit-sent span:nth-child(1) { animation-delay: 0.6s; }
.r360-submit-btn:focus .r360-submit-sent span:nth-child(2) { animation-delay: 0.75s; }
.r360-submit-btn:focus .r360-submit-sent span:nth-child(3) { animation-delay: 0.9s; }
.r360-submit-btn:focus .r360-submit-sent span:nth-child(4) { animation-delay: 1.05s; }

.r360-submit-btn:focus .r360-submit-sent .r360-submit-icon svg {
    opacity: 0;
    animation: r360-appear 1.2s ease forwards 0.8s;
}

@keyframes r360-appear {
    0% {
        opacity: 0;
        transform: scale(4) rotate(-40deg);
        color: #d90b16;
        filter: blur(4px);
    }
    30% {
        opacity: 1;
        transform: scale(0.6);
        filter: blur(1px);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Section 2: Get in Touch, Find Us & Connect With Us (Dark Two-Column) */
.r360-contact-info-section {
    position: relative;
    background: radial-gradient(circle at 80% 25%, rgba(217, 11, 22, 0.14) 0%, transparent 46%),
                linear-gradient(160deg, #0d0f15 0%, #151822 58%, #0b0c10 100%);
    padding: 6rem 0;
    overflow: hidden;
    color: #ffffff;
}

.r360-info-panel {
    background: linear-gradient(180deg, #191c26 0%, #12141b 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.25rem;
    height: 100%;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.38);
    position: relative;
    z-index: 2;
}

.r360-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.r360-info-item:last-of-type {
    border-bottom: none;
}

.r360-info-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 12px;
    background: rgba(217, 11, 22, 0.16);
    border: 1px solid rgba(217, 11, 22, 0.38);
    color: #ff4b55;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.r360-info-label {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #8f97a6;
    margin-bottom: 0.15rem;
}

.r360-info-value {
    font-size: 1.02rem;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.r360-info-value:hover {
    color: #ff4b55;
}

.r360-connect-box {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.r360-connect-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.9rem;
}

.r360-connect-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 1.05rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e4e7ee;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.r360-connect-btn:hover {
    background: #d90b16;
    border-color: #d90b16;
    color: #ffffff;
    transform: translateY(-2px);
}

.r360-map-wrap {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.42);
    height: 100%;
    min-height: 430px;
    position: relative;
    z-index: 2;
    background: #141720;
}

.r360-map-iframe {
    width: 100%;
    height: 100%;
    min-height: 430px;
    border: 0;
    display: block;
}

@media (max-width: 991.98px) {
    .r360-contact-form-section,
    .r360-contact-info-section {
        padding: 4.25rem 0;
    }

    .r360-map-wrap,
    .r360-map-iframe {
        min-height: 340px;
    }
}

@media (max-width: 575.98px) {
    .r360-form-card {
        padding: 1.75rem 1.25rem;
    }

    .r360-info-panel {
        padding: 1.5rem 1.25rem;
    }

    .r360-map-wrap,
    .r360-map-iframe {
        min-height: 290px;
    }

    .r360-submit-btn {
        width: 100%;
        max-width: 280px;
    }
}
