/* ==========================================================================
   Page Diventa Distributore — Lindhaus custom template
   ========================================================================== */

/* ---------- Design tokens (shared) ---------- */
:root {
    --lh-blue: #4992BB;
    --lh-blue-light: #DCEBF3;
    --lh-gray-bg: #EBEBEB;
    --lh-text: #565656;
    --lh-text-dark: #333;
    --lh-footer-gray: #777474;
    --lh-white: #fff;
    --lh-radius: 10px;
    --lh-container: 1140px;
    --lh-gap: 32px;
    --lh-section-spacing: 60px;
    --lh-font-heading: 'Inter', sans-serif;
    --lh-font-body: 'Inter', sans-serif;
    --lh-font-btn: 'Roboto', sans-serif;
}

/* ---------- Base ---------- */
.lh-dd-page {
    color: var(--lh-text);
    font-family: var(--lh-font-body);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    overflow-x: hidden;
    overflow-x: clip;
}

.lh-dd-page *,
.lh-dd-page *::before,
.lh-dd-page *::after {
    box-sizing: border-box;
}

.lh-dd-page img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   1. Hero — Same style as Lavora con Noi
   ========================================================================== */
.lh-dd-hero {
    position: relative;
    overflow: hidden;
    background-color: var(--lh-white);
    background-position: right center;
    background-repeat: no-repeat;
    background-size: contain;
    min-height: 60vh;
    min-height: 60dvh;
}

/* Diagonal white overlay */
.lh-dd-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: var(--lh-white);
    clip-path: polygon(0 0, 55% 0, 50% 100%, 0 100%);
    z-index: 1;
}

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

.lh-dd-hero__text-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 400px;
}

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

.lh-dd-hero__subtitle {
    font-family: var(--lh-font-heading);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 20px;
    color: #000;
}

.lh-dd-hero__text {
    font-size: 14px;
    line-height: 1.3;
    color: #000;
}

.lh-dd-hero__text p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   2. Breadcrumb — Same style as Lavora con Noi
   ========================================================================== */
.lh-dd-breadcrumb {
    background: #ebebeb;
    padding: 60px 0;
    font-size: 13px;
    color: var(--lh-footer-gray);
}

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

.lh-dd-breadcrumb__inner p {
    margin: 0;
}

.lh-dd-breadcrumb__inner span:last-child {
    color: var(--lh-text-dark);
}

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

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

/* ==========================================================================
   3. Content (WP editor)
   ========================================================================== */
.lh-dd-content {
    background: var(--lh-white);
    padding: var(--lh-section-spacing) 0;
}

.lh-dd-content__inner {
    max-width: var(--lh-container);
    margin: 0 auto;
    padding: 0 20px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--lh-text);
}

.lh-dd-content__inner h2,
.lh-dd-content__inner h3,
.lh-dd-content__inner h4 {
    font-family: var(--lh-font-heading);
    font-weight: 600;
    color: var(--lh-text-dark);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.lh-dd-content__inner h2 {
    font-size: 28px;
}

.lh-dd-content__inner h3 {
    font-size: 22px;
}

.lh-dd-content__inner h4 {
    font-size: 18px;
}

.lh-dd-content__inner p:first-child {
    margin-top: 0;
}

.lh-dd-content__inner p:last-child {
    margin-bottom: 0;
}

.lh-dd-content__inner a {
    color: var(--lh-blue);
    text-decoration: underline;
}

.lh-dd-content__inner ul,
.lh-dd-content__inner ol {
    padding-left: 1.5em;
}

/* ==========================================================================
   3. Main Body (Intro + Cards)
   ========================================================================== */
.lh-dd-body {
    background: #ebebeb;
    /* Same as breadcrumb */
    padding: 0 0 60px;
    /* No top padding */
}

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

/* Intro Sections (Stacked) */
.lh-dd-section {
    margin-bottom: 40px;
    text-align: left;
    /* Explicit left align */
}

.lh-dd-section:last-child {
    margin-bottom: 0;
}

.lh-dd-section__title {
    font-family: var(--lh-font-heading);
    font-size: 28px;
    font-weight: 700;
    color: #000;
    margin: 0 0 16px;
    text-align: left;
}

.lh-dd-section__subtitle {
    font-family: var(--lh-font-heading);
    font-size: 20px;
    font-weight: 700;
    color: #000;
    margin: 0 0 12px;
    text-align: left;
}

.lh-dd-section__text {
    font-family: var(--lh-font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--lh-text-dark);
}

.lh-dd-section__text p {
    margin: 0 0 12px;
}

.lh-dd-section__text p:last-child {
    margin-bottom: 0;
}

.lh-dd-section__text ul {
    list-style: disc;
    padding-left: 1.5em;
    margin-bottom: 12px;
}

/* Actions Section */
.lh-dd-actions {
    margin-top: 60px;
}

.lh-dd-actions__title {
    font-family: var(--lh-font-heading);
    font-size: 20px;
    font-weight: 600;
    font-style: italic;
    color: var(--lh-blue);
    margin: 0 0 24px;
}

.lh-dd-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* Card Design */
.lh-dd-card {
    background: var(--lh-blue-light);
    /* Celestino background */
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.lh-dd-card__header {
    background: var(--lh-white);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.lh-dd-card__number {
    font-family: var(--lh-font-heading);
    font-size: 42px;
    font-weight: 700;
    color: var(--lh-blue);
    line-height: 1;
}

.lh-dd-card__title {
    font-family: var(--lh-font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--lh-blue);
    margin: 0;
    line-height: 1.2;
}

.lh-dd-card__body {
    font-size: 14px;
    line-height: 1.5;
    color: var(--lh-text-dark);
}

/* List style in cards */
.lh-dd-card__body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lh-dd-card__body li {
    padding-left: 20px;
    position: relative;
    margin-bottom: 10px;
}

.lh-dd-card__body li::before {
    /* Custom icon placeholder or simple bullet */
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 6px;
    height: 6px;
    background: var(--lh-blue);
    border-radius: 50%;
    /* Note: If user wants specific icons per list item, that requires more complex HTML/CSS or specific classes per list item, which WYSIWYG doesn't easily support without plugins or manual HTML. For now, solid blue bullets match the "bullet list" request. */
}

/* ==========================================================================
/* CTA (Inline) */
.lh-dd-section--cta {
    margin-top: 60px;
}

/* ==========================================================================
/* ==========================================================================
   7. Form Section
   ========================================================================== */
.lh-dd-form-section {
    background: #dcebf3;
    /* Light blue background */
    padding: var(--lh-section-spacing) 0;
}

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

/* Description styling above form */
.lh-dd-form__description {
    margin-bottom: 32px;
    color: #000;
}

.lh-dd-form__description h4,
.lh-dd-form__description strong {
    font-family: var(--lh-font-heading);
    font-size: 18px;
    font-weight: 700;
    color: #000;
    display: block;
    margin-top: 24px;
    margin-bottom: 0;
}

.lh-dd-form__description p {
    font-family: var(--lh-font-body);
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.lh-dd-form__description p:last-child {
    margin-bottom: 0;
}

.lh-dd-form__title {
    display: none;
    /* Hide default title if description covers it, or style it to match */
}

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

/* Column spans */
.lh-dd-form__field {
    grid-column: span 6;
}

.lh-dd-form__field--full {
    grid-column: span 12;
}

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

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

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

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

/* ---------- Inputs ---------- */
.lh-dd-form__field input[type="text"],
.lh-dd-form__field input[type="email"],
.lh-dd-form__field input[type="tel"],
.lh-dd-form__field input[type="url"],
.lh-dd-form__field select,
.lh-dd-form__field textarea {
    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-dd-form__field input:focus,
.lh-dd-form__field select:focus,
.lh-dd-form__field textarea:focus {
    border-color: var(--lh-blue);
}

.lh-dd-form__field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23565656' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.lh-dd-form__field textarea {
    resize: vertical;
    min-height: 120px;
}

/* ---------- File input ---------- */
.lh-dd-form__field input[type="file"] {
    font-family: var(--lh-font-body);
    font-size: 14px;
    color: var(--lh-text);
    background: var(--lh-white);
    border: 2px solid var(--lh-white);
    border-radius: var(--lh-radius);
    padding: 12px;
    width: 100%;
    cursor: pointer;
}

/* Style the button for better look */
.lh-dd-form__field input[type="file"]::file-selector-button {
    margin-right: 12px;
    border: none;
    background: #e1e1e1;
    padding: 6px 12px;
    border-radius: 4px;
    color: #333;
    cursor: pointer;
    font-family: inherit;
}

.lh-dd-form__hint {
    display: block;
    font-size: 12px;
    color: var(--lh-footer-gray);
    margin-top: 4px;
}

/* ---------- Checkbox ---------- */
.lh-dd-form__field--checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
    font-size: 14px;
    color: var(--lh-text);
    cursor: pointer;
}

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

.lh-dd-form__field--checkbox a {
    color: var(--lh-blue);
    text-decoration: underline;
}

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

/* ---------- Submit button ---------- */
.lh-dd-form__field--submit {
    margin-top: 20px;
}

.lh-dd-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-family: var(--lh-font-btn);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    min-width: 200px;
    position: relative;
}

.lh-dd-form__submit:hover {
    background: #3a7d9e;
}

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

.lh-dd-form__spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--lh-white);
    border-radius: 50%;
    animation: lh-dd-spin 0.6s linear infinite;
}

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

/* ---------- Feedback messages ---------- */
.lh-dd-form__feedback {
    margin-top: 20px;
    padding: 0;
    font-size: 15px;
    border-radius: 6px;
}

.lh-dd-form__feedback:empty {
    display: none;
}

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

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

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

/* Responsive */

/* Max-width 1100px (like Lavora con Noi) */
@media (max-width: 1100px) {
    .lh-dd-hero {
        background-size: cover;
        background-position: center center;
    }

    .lh-dd-hero::before {
        display: none;
    }

    .lh-dd-hero__text-col {
        max-width: 100%;
        padding: 20px;
        background: rgba(255, 255, 255, 0.95);
        border-radius: var(--lh-radius);
    }
}

/* Tablet */
@media (max-width: 768px) {
    .lh-dd-hero {
        /* Inherits cover from 1100px */
        min-height: 300px;
    }

    .lh-dd-hero__inner {
        min-height: 300px;
    }

    /* Removed clip-path override as ::before is hidden */
    /* Removed text-col max-width override as it is 100% */

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

    .lh-dd-breadcrumb {
        padding: 40px 0;
    }

    /* Intro sections */
    .lh-dd-intro-block__title {
        font-size: 26px;
    }

    .lh-dd-intro-block__subtitle {
        font-size: 20px;
    }

    .lh-dd-intro-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* Cards: 2 columns on tablet */
    .lh-dd-cards__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .lh-dd-cards__title {
        font-size: 24px;
        margin-bottom: 32px;
    }

    /* CTA */
    .lh-dd-cta__title {
        font-size: 24px;
    }

    .lh-dd-cta__text {
        font-size: 16px;
    }

    /* Form grid stack */
    .lh-dd-form__field,
    .lh-dd-form__field--full,
    .lh-dd-form__field--third,
    .lh-dd-form__field--quarter {
        grid-column: span 12;
    }

    .lh-dd-form__title {
        font-size: 20px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .lh-dd-hero {
        min-height: auto;
        background-size: 100% 200px;
        background-position: top center;
    }

    .lh-dd-hero::before {
        display: none;
    }

    .lh-dd-hero__inner {
        padding-top: 200px;
        min-height: auto;
    }

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

    .lh-dd-hero__title {
        font-size: 26px;
    }

    .lh-dd-breadcrumb {
        padding: 30px 0;
    }

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

    /* Cards: 1 column on mobile */
    .lh-dd-cards__grid {
        grid-template-columns: 1fr;
    }
}