* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; min-height: 100%;
    font-family: Arial, sans-serif;
}
body { overflow: auto; }
.page-wrapper { display: flex;
}
.side-image {
    display: none;
    width: 250px;
    background-size: cover;
    background-position: center;
}

.side-image:first-child {
    background-position: -70px center;
}
.stitched { position: relative;
}
.stitched::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    border: 4px dashed rgba(59,42,26,0.8);
    pointer-events: none;
}
.container { display: flex; flex-direction: column; min-height: 100vh; flex: 1;
}
header, footer { flex: 0 0 auto;
}
main { flex: 1 1 auto; display: flex;
}
header {
    background: url('../img/light-scratched.webp') center/cover no-repeat;
    color: #3b2a1a;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding: 0px 40px;
}
.header-left img { max-height: 100px;
}
.header-right .tagline {
    font-size: 28px;
    font-weight: bold;
}
.slider {
    width: 50%;
    background: url('../img/dark-leather.webp') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.slider .top-text,
.slider .middle-bottom-text {
    line-height: 1.2;
    padding: 20px;
    color: #f5e8da;
    text-align: center;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.3);
}

.slider .bottom-text {
    text-indent: 20px;
    line-height: 1.2;
    text-align: justify;
    padding: 15px;
    color: #f5e8da;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.3);
}

.slider .middle {
    flex: 1;
    position: relative;
}
.slider .middle .stitched {
    width: 100%;
    height: 100%;
}

.form-container {
    width: 50%;
    background: url('../img/dark-leather.webp') center/cover no-repeat;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
}
.form-header {
    color: #f5e8da;
    font-size: 20px;
    text-align: center;
    margin-bottom: 20px;
}
.form { background: transparent;
    display: flex;
    flex-direction: column; }
.form label { margin-bottom: 4px; color: #f5e8da; font-weight: bold; }
.form-hint, .form-hints {
    color: #f5e8da;
    font-size: 14px;
    margin-bottom: 8px;
}
.form input[type="text"], .form input[type="email"], .form textarea, .form input[type="file"] {
    margin-bottom: 16px; padding: 8px;
    border: 2px solid #f5e8da; border-radius: 4px; width: 100%;
    background: rgba(245,232,218,0.2); color: #f5e8da;
    font-size: 20px;
}
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px rgba(245,232,218,0.2) inset !important;
    -webkit-text-fill-color: #f5e8da !important;
    transition: background-color 5000s ease-in-out 0s;
}
.form input::placeholder, .form textarea::placeholder { color: rgba(245,232,218,0.6); }
.form .honeypot { display: none;
}
.form button {
    margin-top: 10px; padding: 12px;
    background: #f5e8da; color: #5a3e1b;
    border: 2px solid #5a3e1b; border-radius: 6px;
    position: relative; cursor: pointer;
    font-size: 20px;
}
.form button::after {
    content: "";
    position: absolute; top: 2px; left: 2px; right: 2px;
    bottom: 2px;
    border: 1px dashed #5a3e1b; border-radius: 4px; pointer-events: none;
}
footer {
    background: url('../img/light-scratched.webp') center/cover no-repeat;
    padding: 10px 20px;
    display: flex;
    justify-content: center; align-items: center; gap: 20px;
}
.footer-left, .footer-right { color: #3b2a1a; font-size: 14px;
}
.footer-middle { color: #3b2a1a; font-size: 16px;
    font-weight: bold; }
.footer-left a { color: #3b2a1a; text-decoration: none; margin-left: 5px;
}

.rv-slider-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rv-slider-wrapper > div {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rv-slider-wrapper img {
    display: block;
    width: 100%;
}
.slider .middle .top-text-on-slider,
.slider .middle .bottom-text-on-slider {
    position: absolute;
    left: 0;
    right: 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: #f5e8da;
    text-align: center;
    z-index: 10;
}
.slider .middle .top-text-on-slider {
    top: 0;
}
.slider .middle .bottom-text-on-slider {
    bottom: 0;
}
.slider .middle.stitched {
    padding: 10px;
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
form.form button[type="submit"] .button-loader {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(90, 62, 27, 0.25);
    border-radius: 50%;
    border-top-color: #5a3e1b;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
form.form button[type="submit"].is-loading .button-loader {
    display: inline-block;
}
.rvcs-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

.rvcs-modal.is-visible {
    display: flex;
}

.rvcs-modal-content {
    background-color: #fefefe;
    color: #333;
    margin: auto;
    padding: 25px 30px;
    border: 1px solid #bbb;
    width: 90%;
    max-width: 450px;
    border-radius: 6px;
    position: relative;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.rvcs-modal-content.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.rvcs-modal-content.error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.rvcs-modal-close-btn {
    color: #777;
    position: absolute;
    top: 8px;
    right: 15px;
    font-size: 30px;
    font-weight: bold;
    line-height: 1;
}

.rvcs-modal-close-btn:hover,
.rvcs-modal-close-btn:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

#rvcs-modal-message-text {
    margin: 0;
    font-size: 1.1em;
    line-height: 1.5;
}
@keyframes pulseButtonColors {
    0% {
        background-color: #f5e8da;
        color: #5a3e1b;
        --stitch-color: #5a3e1b;
    }
    50% {
        background-color: #6B4F3A;
        color: #f5e8da;
        --stitch-color: #f0e6d6;
    }
    100% {
        background-color: #f5e8da;
        color: #5a3e1b;
        --stitch-color: #5a3e1b;
    }
}

form.form button[type="submit"] {
    --stitch-color: #5a3e1b;
    animation-name: pulseButtonColors;
    animation-duration: 7s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}
form.form button[type="submit"]::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border: 1px dashed var(--stitch-color);
    border-radius: 4px;
    pointer-events: none;
}
.photo-previews-container {
    justify-content: center;
}

.photo-preview-item {
    position: relative;
    display: inline-block;
    vertical-align: top;
    width: 90px;
    height: 90px;
    margin: 5px;
    padding: 4px;
    border: 1px solid #e0e0e0;
    background: #fdfdfd;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border-radius: 3px;
    box-sizing: border-box;
}

.photo-preview-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    display: block;
    border-radius: 2px;
}
.remove-preview-btn {
    position: absolute;
    top: -100px;
    right: -60px;
    z-index: 10;
    width: 22px;
    height: 22px;
    background-color: #7d5343;
    color: #f5e8da;
    border: 1px solid rgba(40,40,40,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: background-color 0.2s ease-out, transform 0.15s ease-out, box-shadow 0.2s ease-out;
}

.remove-preview-btn:hover {
    background-color: #5a3e1b;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.remove-preview-btn:active {
    transform: scale(0.95);
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
#photos {
    color: transparent;
}
#photos::file-selector-button {
    padding: 8px 12px;
    margin-right: 10px;
    background-color: rgba(245, 232, 218, 0.7);
    color: #755c48;
    border: 1px solid #bcaea0;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#photos::file-selector-button:hover {
    background-color: rgba(245, 232, 218, 1);
    color: #5a3e1b;
}
.rvcs-field-error {
    color: #e79c9c;
    font-size: 0.875em;
    margin-top: 5px;
    margin-bottom: 5px;
    display: none;
    line-height: 1.2;
}
.form input.rvcs-input-error,
.form textarea.rvcs-input-error {
    border-color: #dc3545;
}

p {
    text-indent: 20px;
}


@media (max-width: 1024px) {
    .side-image { display: none;
    }
    .container { padding: 0;
    }
}
@media (min-width: 1025px) {
    .side-image { display: block;
    }
}

.header-phone-desktop a,
.header-phone-mobile a,
.footer-phone-desktop a,
.footer-phone-mobile a {
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    color: #3b2a1a;
}

.footer-phone-form a {
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    color: #e4dbd7;
}

.header-phone-desktop a {
    font-size: 22px;
}

.header-phone-mobile a {
    font-size: 18px;
}

.footer-phone-desktop a,
.footer-phone-mobile a {
    font-size: 16px;
}

.phone-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-right: 10px;
    border-radius: 50%;
    background-color: #7d5343;
    color: #f5e8da;
    font-size: 15px;
    border: 1px solid rgba(245, 232, 218, 0.3);
    animation: pulseIconBackground 2.5s infinite ease-in-out;
}

.phone-icon::before {
    content: "📞";
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', 'Arial Unicode MS', sans-serif;
}

@keyframes pulseIconBackground {
    0% {
        background-color: #7d5343;
        transform: scale(1);
        box-shadow: 0 0 2px rgba(245,232,218,0.2);
    }
    50% {
        background-color: #886131;
        transform: scale(1.08);
        box-shadow: 0 0 7px rgba(245,232,218,0.6);
    }
    100% {
        background-color: #b89484;
        transform: scale(1);
        box-shadow: 0 0 2px rgba(245,232,218,0.2);
    }
}

.header-phone-mobile {
    display: none;
}

.header-phone-desktop {
    display: block;
    margin-bottom: 8px;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.footer-middle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-middle-text {
    margin-right: 10px;
}

.footer-phone-desktop {
    display: inline-flex;
}

.footer-phone-mobile {
    display: none;
}

.footer-phone-desktop .phone-icon,
.footer-phone-mobile .phone-icon {
    width: 22px;
    height: 22px;
    font-size: 12px;
    margin-right: 7px;
}


@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        padding: 10px;
    }
    .header-right .tagline {
        font-size: 18px;
        margin-bottom: 10px;
    }
    main { flex-direction: column; }
    .slider, .form-container { width: 100%; height: auto; overflow: visible; }
    .slider { min-height: 200px; }
    .slider .top-text, .slider .bottom-text, .slider .middle-bottom-text { font-size: 18px; padding: 10px; }

    .form-container { padding: 20px; }
    .form-header { font-size: 20px; }

    footer {
        flex-direction: column;
        gap: 10px;
    }

    .footer-left {
        margin: 4px 0;
        order: 1;
    }
    .footer-middle {
        margin: 4px 0;
        font-size: 20px;
        font-weight: bold;
        order: 2;
    }
    .footer-right {
        margin: 4px 0;
        order: 3;
    }

    .header-left {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-bottom: 10px;
    }

    .header-left .logo {
        max-height: 70px;
        margin-right: 0;
    }

    .header-right {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        text-align: center;
    }

    .header-phone-desktop {
        display: none;
    }

    .header-phone-mobile {
        display: block;
    }

    .header-phone-mobile .phone-icon {
        width: 24px;
        height: 24px;
        font-size: 13px;
        margin-right: 8px;
    }

    .footer-middle {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-middle-text {
        margin-right: 0;
        margin-bottom: 8px;
    }

    .footer-phone-desktop {
        display: none;
    }

    .footer-phone-mobile {
        display: inline-flex;
    }
}

.header-desktop-view {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    padding: 0px 40px;
}

.header-mobile-view {
    display: none;
    width: 100%;
}

.mobile-estimate-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    background: #f5e8da;
    color: #5a3e1b;
    border: 2px solid #5a3e1b;
    border-radius: 6px;
    position: relative;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    --stitch-color: #5a3e1b;
    animation-name: pulseButtonColors;
    animation-duration: 7s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

.mobile-estimate-button .button-text {

}

.mobile-estimate-button .button-loader {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(90, 62, 27, 0.25);
    border-radius: 50%;
    border-top-color: #5a3e1b;
    animation: spin 0.8s linear infinite;
    margin-left: 6px;
    vertical-align: middle;
}

.mobile-estimate-button::after {
    content: "";
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    border: 1px dashed var(--stitch-color);
    border-radius: 4px;
    pointer-events: none;
}

@media (max-width: 768px) {
    .header-desktop-view {
        display: none;
    }
    .header-mobile-view {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 10px 5px;
    }

    .mobile-top-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        margin-bottom: 10px;
    }

    .mobile-header-left-item {
        flex: 1 1 auto;
        text-align: left;
        margin-right: 5px;
    }
    .mobile-estimate-button {
    }

    .mobile-header-center-item {
        flex: 0 1 auto;
        text-align: center;
    }
    .mobile-header-center-item .logo {
        max-height: 75px;
        display: inline-block;
    }

    .mobile-header-right-item {
        flex: 1 1 auto;
        text-align: right;
        margin-left: 5px;
    }
    .header-phone-mobile a {
        font-size: 16px;
        white-space: nowrap;
    }
    .header-phone-mobile .phone-icon {
        width: 20px;
        height: 20px;
        font-size: 11px;
        margin-right: 4px;
    }

    .mobile-tagline-row {
        text-align: center;
        width: 100%;
    }
    .mobile-tagline-row .tagline {
        font-size: 18px;
        color: #3b2a1a;
        font-weight: bold;
    }
}
