/**
 * Contact Hero Widget
 * Dark hero section with Gravity Forms styling
 */

.cinematic-contact-hero {
    --cch-bg: #0d0d0d;
    --cch-label-color: rgba(255, 255, 255, 0.6);
    --cch-title-color: #ffffff;
    --cch-desc-color: rgba(255, 255, 255, 0.6);
    --cch-input-bg: #1a1a1a;
    --cch-input-border: rgba(255, 255, 255, 0.15);
    --cch-input-color: #ffffff;
    --cch-input-placeholder: rgba(255, 255, 255, 0.4);
    --cch-label-color-form: rgba(255, 255, 255, 0.8);
    --cch-submit-bg: #5AC7EA;
    --cch-submit-color: #ffffff;
    --cch-link-color: rgba(255, 255, 255, 0.8);
    --cch-link-underline: rgba(255, 255, 255, 0.5);
    --cch-checkbox-border: rgba(255, 255, 255, 0.3);

    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.cinematic-contact-hero__inner {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.cinematic-contact-hero__label {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cch-label-color);
    margin-bottom: 0.5rem;
}

.cinematic-contact-hero__title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--cch-title-color);
    margin: 0 0 1rem;
    line-height: 1.2;
}

.cinematic-contact-hero__description {
    color: var(--cch-desc-color);
    margin: 0 0 2rem;
    line-height: 1.6;
    max-width: 32em;
    margin-left: auto;
    margin-right: auto;
}

.cinematic-contact-hero__form {
    text-align: left;
    margin-top: 1.5rem;
}

/* Gravity Forms wrapper – contained within hero form */
.cinematic-contact-hero__form .gform_wrapper {
    max-width: 100%;
}

.cinematic-contact-hero__form .gform_wrapper.gform-theme--none,
.cinematic-contact-hero__form .gform_legacy_markup_wrapper {
    font-family: inherit;
}

/* Fields grid: first two side-by-side, rest full width */
.cinematic-contact-hero__form .gform_fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1.5rem;
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    border: none;
}

.cinematic-contact-hero__form .gfield {
    margin: 0;
    padding: 0;
    min-height: 0;
}


/* From third field onward full width */
.cinematic-contact-hero__form .gfield:nth-child(n+3) {
    grid-column: 1 / -1;
}

@media (max-width: 600px) {
    .cinematic-contact-hero__form .gform_fields {
        grid-template-columns: 1fr;
    }

    .cinematic-contact-hero__form .gfield:nth-child(1),
    .cinematic-contact-hero__form .gfield:nth-child(2) {
        grid-column: 1 / -1;
    }
}

/* Labels */
.cinematic-contact-hero__form .gfield_label,
.cinematic-contact-hero__form .gform_wrapper label {
    color: var(--cch-label-color-form);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.cinematic-contact-hero__form .gfield_required {
    color: inherit;
}

/* Inputs and textarea */
.cinematic-contact-hero__form .gform_wrapper input[type="text"],
.cinematic-contact-hero__form .gform_wrapper input[type="email"],
.cinematic-contact-hero__form .gform_wrapper input[type="tel"],
.cinematic-contact-hero__form .gform_wrapper input[type="url"],
.cinematic-contact-hero__form .gform_wrapper textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background-color: var(--cch-input-bg);
    border: 1px solid var(--cch-input-border);
    border-radius: 6px;
    color: var(--cch-input-color);
    font-size: 1rem;
    padding: 0.75rem 1rem;
    margin: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cinematic-contact-hero__form .gform_wrapper input::placeholder,
.cinematic-contact-hero__form .gform_wrapper textarea::placeholder {
    color: var(--cch-input-placeholder);
}

.cinematic-contact-hero__form .gform_wrapper textarea {
    min-height: 140px;
    resize: vertical;
}

.cinematic-contact-hero__form .gform_wrapper input:focus,
.cinematic-contact-hero__form .gform_wrapper textarea:focus {
    outline: none;
    border-color: var(--cch-submit-bg);
    box-shadow: 0 0 0 2px rgba(90, 199, 234, 0.2);
}

/* Checkbox (consent) */
.cinematic-contact-hero__form .gform_wrapper .gfield_checkbox,
.cinematic-contact-hero__form .gform_wrapper .gfield_consent {
    margin-top: 0.5rem;
    margin-bottom: 1.25rem;
}

.cinematic-contact-hero__form .gform_wrapper input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--cch-submit-bg);
    margin-right: 0.5rem;
    vertical-align: middle;
}

.cinematic-contact-hero__form .gform_wrapper .gfield_consent_content,
.cinematic-contact-hero__form .gform_wrapper .gfield_checkbox .gchoice {
    color: var(--cch-label-color-form);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Links inside consent/labels (e.g. terms & privacy) */
.cinematic-contact-hero__form .gform_wrapper a {
    color: var(--cch-link-color);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: var(--cch-link-underline);
}

.cinematic-contact-hero__form .gform_wrapper a:hover {
    text-decoration-color: var(--cch-submit-bg);
}

/* Submit button */
.cinematic-contact-hero__form .gform_footer {
    margin-top: 1rem;
    margin-bottom: 0;
    padding: 0;
    text-align: center;
}

.cinematic-contact-hero__form .gform_wrapper input[type="submit"],
.cinematic-contact-hero__form .gform_wrapper .gform_button,
.cinematic-contact-hero__form .gform_wrapper button[type="submit"] {
    display: inline-block;
    background-color: var(--cch-submit-bg) !important;
    color: var(--cch-submit-color) !important;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.875rem 2rem;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.cinematic-contact-hero__form .gform_wrapper input[type="submit"]:hover,
.cinematic-contact-hero__form .gform_wrapper .gform_button:hover,
.cinematic-contact-hero__form .gform_wrapper button[type="submit"]:hover {
    opacity: 0.9;
}

.cinematic-contact-hero__form .gform_wrapper input[type="submit"]:active,
.cinematic-contact-hero__form .gform_wrapper .gform_button:active,
.cinematic-contact-hero__form .gform_wrapper button[type="submit"]:active {
    transform: scale(0.98);
}

/* Validation */
.cinematic-contact-hero__form .gform_wrapper .gfield_error input,
.cinematic-contact-hero__form .gform_wrapper .gfield_error textarea {
    border-color: #e74c3c;
}

.cinematic-contact-hero__form .gform_wrapper .gfield_error .gfield_description,
.cinematic-contact-hero__form .gform_wrapper .validation_message {
    color: #e74c3c;
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

.cinematic-contact-hero__form .gform_wrapper .validation_error {
    color: #e74c3c;
    margin-bottom: 1rem;
}

/* Confirmation / success message */
.cinematic-contact-hero__form .gform_confirmation_message {
    color: var(--cch-label-color-form);
    padding: 1rem;
    text-align: center;
}
