/* ==========================================================================
   Page Registrazione Garanzia — Lindhaus custom template
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
    --lh-blue: #4992BB;
    --lh-blue-dark: #3a7a9e;
    --lh-blue-light: #DCEBF3;
    --lh-gray-bg: #EBEBEB;
    --lh-text: #565656;
    --lh-text-dark: #333;
    --lh-white: #fff;
    --lh-radius: 10px;
    --lh-container: 1140px;
    --lh-section-spacing: 60px;
    --lh-font-heading: 'Inter', sans-serif;
    --lh-font-body: 'Inter', sans-serif;
}

/* ---------- Page wrapper ---------- */
.lh-rg-page {
    color: var(--lh-text);
    font-family: var(--lh-font-body);
    font-weight: 400;
    line-height: 1.6;
}

/* ==========================================================================
   1. Hero — White bg left, primary blue diagonal right
   ========================================================================== */

.lh-rg-hero {
    position: relative;
    background: var(--lh-white);
    min-height: 60vh;
    min-height: 60dvh;
    overflow: hidden;
}

/* Primary blue diagonal overlay on right side */
.lh-rg-hero::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: var(--lh-blue);
    clip-path: polygon(55% 0, 100% 0, 100% 100%, 45% 100%);
    z-index: 1;
}

.lh-rg-hero__inner {
    position: relative;
    z-index: 2;
    max-width: var(--lh-container);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    min-height: 60vh;
    min-height: 60dvh;
}

.lh-rg-hero__text-col {
    max-width: 400px;
    padding: 60px 0;
}

.lh-rg-hero__title {
    font-family: var(--lh-font-heading);
    font-size: 42px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--lh-blue);
    margin: 0 0 16px;
    text-transform: uppercase;
}

.lh-rg-hero__text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--lh-text-dark);
}

.lh-rg-hero__text p {
    margin: 0;
}

/* ==========================================================================
   2. Breadcrumb
   ========================================================================== */

.lh-rg-breadcrumb {
    background: var(--lh-blue-light);
    padding: 60px;
}

.lh-rg-breadcrumb__inner {
    max-width: var(--lh-container);
    margin: 0 auto;
    padding: 0 20px;
}

.lh-rg-breadcrumb p {
    margin: 0;
    font-size: 13px;
    color: var(--lh-text);
}

.lh-rg-breadcrumb span {
    color: var(--lh-text-dark);
}

.lh-rg-breadcrumb a {
    color: var(--lh-blue);
    text-decoration: none;
}

.lh-rg-breadcrumb a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   3. Form Section
   ========================================================================== */

.lh-rg-form-section {
    background: var(--lh-blue-light);
    padding: 0 0 var(--lh-section-spacing) 0;
}

.lh-rg-form-section__inner {
    max-width: var(--lh-container);
    margin: 0 auto;
    padding: 0 20px;
}

.lh-rg-form__title {
    font-family: var(--lh-font-heading);
    font-size: 22px;
    font-weight: 600;
    color: var(--lh-text-dark);
    margin: 0 0 32px;
}

/* ---------- Form grid ---------- */
.lh-rg-form__grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 10px;
}

/* Column spans */
.lh-rg-form__field--full {
    grid-column: span 12;
}

.lh-rg-form__field--half {
    grid-column: span 6;
}

.lh-rg-form__field--third {
    grid-column: span 4;
}

.lh-rg-form__field--two-thirds {
    grid-column: span 8;
}

.lh-rg-form__field--quarter {
    grid-column: span 3;
}

/* ---------- Labels ---------- */
.lh-rg-form__field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--lh-text-dark);
    margin: 0;
}

.lh-rg-form__field .required {
    color: #c0392b;
}

/* ---------- Inputs ---------- */
.lh-rg-form__field input[type="text"],
.lh-rg-form__field input[type="email"],
.lh-rg-form__field input[type="tel"],
.lh-rg-form__field input[type="date"],
.lh-rg-form__field select {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-family: var(--lh-font-body);
    border: 2px solid var(--lh-gray-bg);
    border-radius: var(--lh-radius);
    background: var(--lh-white);
    transition: border-color 0.2s;
    outline: none;
}

.lh-rg-form__field input:focus,
.lh-rg-form__field select:focus {
    border-color: var(--lh-blue);
}

.lh-rg-form__field input::placeholder {
    color: #aaa;
}

/* Select arrow */
.lh-rg-form__field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23565656' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* ---------- Checkboxes ---------- */
.lh-rg-form__field--checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-weight: 400;
    cursor: pointer;
}

.lh-rg-form__field--checkbox input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--lh-blue);
}

.lh-rg-form__field--checkbox span {
    font-size: 13px;
    line-height: 1.5;
    color: var(--lh-text);
}

/* ---------- Actions row (submit + privacy link) ---------- */
.lh-rg-form__actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.lh-rg-form__privacy-link {
    color: var(--lh-blue);
    font-size: 13px;
    text-decoration: underline;
}

.lh-rg-form__privacy-link:hover {
    color: var(--lh-blue-dark);
}

/* ---------- Error state ---------- */
.lh-rg-form__input--error {
    border-color: #c0392b !important;
    box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.15);
}

/* ---------- Submit button ---------- */
.lh-rg-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 40px;
    background: var(--lh-blue);
    color: var(--lh-white);
    border: none;
    border-radius: var(--lh-radius);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--lh-font-body);
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.lh-rg-form__submit:hover {
    background: var(--lh-blue-dark);
}

.lh-rg-form__submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Spinner */
.lh-rg-form__spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--lh-white);
    border-radius: 50%;
    animation: rg-spin 0.8s linear infinite;
    position: absolute;
}

@keyframes rg-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- Feedback ---------- */
.lh-rg-form__feedback {
    display: none;
    margin-top: 24px;
    padding: 16px 20px;
    border-radius: var(--lh-radius);
    font-size: 14px;
}

.lh-rg-form__feedback--success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.lh-rg-form__feedback--error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet */
@media (max-width: 992px) {
    .lh-rg-hero__text-col {
        max-width: 55%;
    }

    .lh-rg-form__field--half,
    .lh-rg-form__field--third,
    .lh-rg-form__field--two-thirds,
    .lh-rg-form__field--quarter {
        grid-column: span 6;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .lh-rg-hero {
        min-height: auto;
    }

    .lh-rg-hero::after {
        clip-path: polygon(0 85%, 100% 70%, 100% 100%, 0 100%);
    }

    .lh-rg-hero__inner {
        min-height: auto;
    }

    .lh-rg-hero__text-col {
        max-width: 100%;
        padding: 40px 0 80px;
    }

    .lh-rg-hero__title {
        font-size: 28px;
    }

    .lh-rg-form__field--half,
    .lh-rg-form__field--third,
    .lh-rg-form__field--two-thirds,
    .lh-rg-form__field--quarter {
        grid-column: span 12;
    }

    .lh-rg-form__submit {
        width: 100%;
    }
}