/* ==========================================
   RUNHAMS DECORATING - CONTACT FORM
   Styles for the contact-section.php include
   All class names match the form HTML exactly
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Overpass:wght@300;400;600;700&display=swap');

/* ==========================================
   RESET & BASE
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: 'Overpass', sans-serif;
    line-height: 1.6;
    color: #333;
    width: 100%;
    overflow-x: hidden;
}

/* ==========================================
   CONTACT SECTION WRAPPER
   Dark gradient with subtle dot pattern
   ========================================== */

.contact-us {
    background-color: #1e1e1e;
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(180deg, #2b2b2b 0%, #1a1a1a 100%);
    background-size: 20px 20px, 100% 100%;
    padding: 5rem 0;
    position: relative;
    font-family: 'Overpass', sans-serif;
}

.contact-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

/* ==========================================
   FORM CARD
   Slightly lighter than the wrapper for depth
   ========================================== */

.contact-form {
    background-color: #333;
    padding: 2.75rem;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ==========================================
   HEADING (inside form card)
   ========================================== */

.contact-heading {
    font-size: 2rem;
    color: #fff;
    text-align: center;
    margin-bottom: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    position: relative;
    padding-bottom: 1rem;
}

.contact-heading::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background-color: #d90f0f;
    margin: 1rem auto 0;
}

/* ==========================================
   FORM FIELDS
   White inputs on dark card
   ========================================== */

.form-group {
    margin-bottom: 1.125rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.07);
    font-size: 0.9375rem;
    font-family: 'Overpass', sans-serif;
    color: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
    opacity: 1;
}

/* Textarea — fixed height, no resize */
.contact-form textarea {
    height: 160px;
    resize: none;
}

/* Focus States */
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #d90f0f;
    box-shadow: 0 0 0 3px rgba(217, 15, 15, 0.15);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Autofill override — keep dark look */
.contact-form input:-webkit-autofill,
.contact-form input:-webkit-autofill:hover,
.contact-form input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0 1000px #3d3d3d inset;
    border-color: rgba(255, 255, 255, 0.12);
    transition: background-color 5000s ease-in-out 0s;
}

/* ==========================================
   SUBMIT BUTTON
   ========================================== */

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.9rem;
    background-color: #d90f0f;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.9375rem;
    font-family: 'Overpass', sans-serif;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.3px;
    margin-top: 0.75rem;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.submit-btn:hover {
    background-color: #b50d0d;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(217, 15, 15, 0.35);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-btn .button-text {
    display: inline;
}

.submit-btn .loading-spinner {
    display: none;
    color: inherit;
    font-size: 0.875rem;
    font-weight: 600;
}

/* ==========================================
   FORM MESSAGES
   ========================================== */

.form-messages {
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: 4px;
    font-size: 0.875rem;
    line-height: 1.5;
    font-weight: 500;
    font-family: 'Overpass', sans-serif;
}

.form-messages.success {
    background-color: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.2);
    display: none !important;
}

.form-messages.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ==========================================
   FIELD ERRORS
   ========================================== */

.error-message {
    color: #fca5a5;
    font-size: 0.8125rem;
    display: none;
    margin-top: 0.375rem;
    font-weight: 500;
    font-family: 'Overpass', sans-serif;
}

.form-group input.error,
.form-group textarea.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
    background-color: rgba(239, 68, 68, 0.05);
}

/* ==========================================
   LOADING OVERLAY
   ========================================== */

.form-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(51, 51, 51, 0.92);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.overlay-content {
    text-align: center;
    padding: 2rem;
}

.overlay-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top: 3px solid #d90f0f;
    border-radius: 50%;
    animation: runhams-spin 0.8s linear infinite;
    margin: 0 auto 1.25rem;
}

.overlay-text {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    font-family: 'Overpass', sans-serif;
}

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

/* ==========================================
   RESPONSIVE - TABLET (1024px)
   ========================================== */

@media (max-width: 1024px) {

    .contact-us {
        padding: 4.5rem 0;
    }

    .contact-heading {
        font-size: 1.75rem;
    }
}

/* ==========================================
   RESPONSIVE - MOBILE (768px)
   ========================================== */

@media (max-width: 768px) {

    .contact-us {
        padding: 4rem 0;
    }

    .contact-container {
        padding: 0 1.5rem;
    }

    .contact-heading {
        font-size: 1.75rem;
    }

    .contact-form {
        padding: 2rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 0.8rem 0.875rem;
        font-size: 1rem;
    }

    .contact-form textarea {
        height: 140px;
    }

    .submit-btn {
        padding: 0.8rem;
    }

    .form-messages {
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
    }

    .error-message {
        font-size: 0.75rem;
    }
}

/* ==========================================
   RESPONSIVE - SMALL MOBILE (480px)
   ========================================== */

@media (max-width: 480px) {

    .contact-us {
        padding: 3rem 0;
    }

    .contact-container {
        padding: 0 1rem;
    }

    .contact-heading {
        font-size: 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 0.75rem;
        font-size: 1rem;
    }

    .contact-form textarea {
        height: 130px;
    }

    .submit-btn {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
}