/* Container & Layout */
.custom-contact-form {
    max-width: 600px;
    margin: 0 auto;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-group {
    flex: 1;
    margin-bottom: 20px;
}

/* Stack columns on mobile */
@media (max-width: 480px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Labels */
.custom-contact-form label {
    display: block;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
    color: #1e293b;
    margin-bottom: 8px;
    text-transform: uppercase;
}

/* Input Fields */
.wpcf7-form-control:not([type="submit"]) {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background-color: #f8fafc !important;
    color: #334155 !important;
    font-size: 15px !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease-in-out;
}

.wpcf7-form-control:not([type="submit"]):focus {
    background-color: #ffffff !important;
    border-color: #ef4444 !important;
    /* Matches button color */
    outline: none;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* Textarea adjustment */
textarea.wpcf7-form-control {
    height: 120px !important;
    resize: vertical;
}

/* Submit Button */
.wpcf7-submit {
    width: 100% !important;
    background-color: #ef4444 !important;
    color: #ffffff !important;
    padding: 16px !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    cursor: pointer !important;
    transition: background 0.3s ease !important;
}

.wpcf7-submit:hover {
    background-color: #dc2626 !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* CF7 Specific validation styling */
.wpcf7-not-valid-tip {
    font-size: 13px;
    margin-top: 5px;
    color: #ef4444;
}

.wpcf7-response-output {
    border-radius: 8px !important;
    margin: 20px 0 0 0 !important;
    font-size: 14px;
    padding: 12px 16px !important;
}

/* Additional refinement for validation errors */
.wpcf7-not-valid {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

border-color: #ef4444 !important;
background-color: #fef2f2 !important;
}

/* =========================================
   Footer Newsletter Form (Card Style)
   Usage: Wrap CF7 shortcode in <div class="footer-newsletter-form">...</div>
   ========================================= */

/* Container Card */
.footer-newsletter-form {
    background-color: #ffffff;
    border-radius: 24px;
    padding: 40px 32px;
    /* Deeper, softer shadow to pop against white footer */
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.1), 0 10px 20px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.5);
    max-width: 400px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.footer-newsletter-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* Decorative background blob (optional "cool" factor) */
.footer-newsletter-form::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

/* Title Styling */
.footer-newsletter-form h3,
.footer-newsletter-form h4 {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.footer-newsletter-form p {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 28px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Form Container */
.footer-newsletter-form form {
    position: relative;
    width: 100%;
    z-index: 1;
}

.footer-newsletter-form .wpcf7-form-control-wrap {
    display: block;
    margin-bottom: 16px;
}

/* Input Field */
.footer-newsletter-form input[type="email"] {
    width: 100% !important;
    padding: 16px 20px !important;
    border-radius: 16px !important;
    border: 2px solid #f1f5f9 !important;
    background-color: #f8fafc !important;
    color: #334155 !important;
    font-size: 15px !important;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: none !important;
    margin-bottom: 16px !important;
}

.footer-newsletter-form input[type="email"]::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.footer-newsletter-form input[type="email"]:focus {
    border-color: #ef4444 !important;
    /* Focus matches brand color */
    background-color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
    outline: none;
}

/* Submit Button */
.footer-newsletter-form input[type="submit"] {
    width: 100% !important;
    margin: 0 !important;
    padding: 16px 24px !important;
    border-radius: 16px !important;
    /* Gradient for "cool" factor */
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    text-transform: none !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: static !important;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3);
}

.footer-newsletter-form input[type="submit"]:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.4);
}

.footer-newsletter-form input[type="submit"]:active {
    transform: translateY(0);
}

/* Response Output */
.footer-newsletter-form .wpcf7-response-output {
    border: 1px solid #fecaca !important;
    color: #b91c1c !important;
    text-align: center;
}

/* =========================================
   Inline Footer Newsletter (Latest Request)
   Usage: <div class="newsletter-inline">...</div>
   ========================================= */
.newsletter-inline {
    width: 100%;
    margin-top: 10px;
}

.newsletter-inline form {
    display: flex !important;
    flex-direction: column !important;
    /* Stack vertically */
    gap: 16px !important;
    /* Space between input and button */
    align-items: stretch !important;
    /* Allow items to stretch full width */
    position: relative;
    max-width: 500px;
}

/* Handle CF7 paragraph wrapping */
.newsletter-inline form p {
    display: contents;
    /* Removes p tag from layout flow */
    width: 100%;
}

.newsletter-inline .wpcf7-form-control-wrap {
    width: 100% !important;
    /* Full width input */
    margin: 0;
    display: block;
}

/* Inline Email Input */
.newsletter-inline input[type="email"] {
    width: 100% !important;
    padding: 14px 20px !important;
    border-radius: 50px !important;
    /* Pill shape */
    border: 1px solid #e2e8f0 !important;
    background-color: #ffffff !important;
    color: #334155 !important;
    font-size: 15px !important;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 0 !important;
    height: 52px !important;
    /* Fixed height for alignment */
}

.newsletter-inline input[type="email"]:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
    outline: none;
}

/* Inline Submit Button */
.newsletter-inline input[type="submit"] {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 32px !important;
    border-radius: 50px !important;
    /* Pill shape */
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    height: 52px !important;
    /* Match input height */
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3);
    white-space: nowrap;
}

.newsletter-inline input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.4);
}

/* Mobile Stack for Inline Form */
@media (max-width: 480px) {
    .newsletter-inline form {
        flex-direction: column;
        gap: 10px;
    }

    .newsletter-inline input[type="submit"] {
        width: 100% !important;
    }
}

/* Inline Response */
.newsletter-inline .wpcf7-response-output {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-top: 8px !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
    z-index: 10;
}