/* ============================================
   PassFacile — Registration Form v2
   Stile coerente con Dashboard V2
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
    --pf-primary: #D4652A;
    --pf-primary-dark: #C45A24;
    --pf-primary-light: #FFF1EB;
    --pf-green: #6B9E7A;
    --pf-green-dark: #5A8A68;
    --pf-green-light: #F0F7F2;
    --pf-red: #B85C50;
    --pf-bg: #F7F7F5;
    --pf-surface: #FFFFFF;
    --pf-text: #2C2C2A;
    --pf-text-secondary: #6B6B68;
    --pf-text-hint: #B4B2A9;
    --pf-border: rgba(0, 0, 0, 0.08);
    --pf-input-bg: #FAFAF9;
    --pf-radius: 14px;
    --pf-radius-sm: 10px;
    --pf-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --pf-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
    --pf-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--pf-bg);
    color: var(--pf-text);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   HEADER / HERO
   ============================================ */
.pf-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 220px;
    display: flex;
    align-items: flex-end;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.pf-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.25) 0%,
        rgba(0, 0, 0, 0.60) 100%
    );
    z-index: 1;
}

/* Tricolor top accent */
.pf-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--pf-green) 33%, #F0F0EC 33% 66%, var(--pf-red) 66%);
    z-index: 3;
}

.pf-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 32px 24px 28px;
    color: #fff;
}

.pf-hero-content h1 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.3;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.pf-hero-content .pf-subtitle {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.92;
    margin: 0 0 2px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.pf-hero-content .pf-step {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 4px 12px;
    border-radius: 20px;
    margin-top: 10px;
}

/* ============================================
   FORM CARD
   ============================================ */
.pf-form-wrapper {
    max-width: 480px;
    margin: -20px auto 0;
    padding: 0 16px;
    position: relative;
    z-index: 5;
    flex: 1;
}

.pf-card {
    background: var(--pf-surface);
    border-radius: 18px;
    box-shadow: var(--pf-shadow-lg);
    padding: 28px 24px 24px;
    margin-bottom: 32px;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.pf-form-group {
    margin-bottom: 18px;
}

.pf-form-group label,
.pf-card .form-group > label,
.pf-card .control-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--pf-text);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.pf-card label small {
    font-weight: 400;
    color: var(--pf-text-hint);
    display: inline;
    font-size: 12px;
}

.pf-card .form-control,
.pf-card input[type="text"],
.pf-card input[type="email"],
.pf-card input[type="number"],
.pf-card input[type="tel"],
.pf-card select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    color: var(--pf-text);
    background-color: var(--pf-input-bg);
    border: 1.5px solid var(--pf-border);
    border-radius: var(--pf-radius-sm);
    outline: none;
    transition: border-color var(--pf-transition), box-shadow var(--pf-transition);
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none;
}

.pf-card .form-control:focus,
.pf-card input:focus,
.pf-card select:focus {
    border-color: var(--pf-primary);
    box-shadow: 0 0 0 3px rgba(212, 101, 42, 0.12);
    background-color: #fff;
}

.pf-card .form-control::placeholder,
.pf-card input::placeholder {
    color: var(--pf-text-hint);
    font-weight: 400;
}

/* Select arrow */
.pf-card select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236B6B68' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* Phone row */
.pf-phone-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.pf-phone-prefix {
    flex: 0 0 85px;
}

.pf-phone-number {
    flex: 1;
}

/* Number input — hide spinners */
.pf-card input[type="number"]::-webkit-outer-spin-button,
.pf-card input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.pf-card input[type="number"] {
    -moz-appearance: textfield;
}

/* ============================================
   CHECKBOXES
   ============================================ */
.pf-checkbox-group {
    margin-bottom: 14px;
}

.pf-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
    color: var(--pf-text-secondary);
    padding: 10px 14px;
    background: var(--pf-input-bg);
    border: 1.5px solid var(--pf-border);
    border-radius: var(--pf-radius-sm);
    transition: border-color var(--pf-transition), background var(--pf-transition);
}

.pf-checkbox:hover {
    border-color: rgba(0, 0, 0, 0.15);
}

.pf-checkbox input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    accent-color: var(--pf-primary);
    cursor: pointer;
}

.pf-checkbox a {
    color: var(--pf-primary);
    text-decoration: none;
    font-weight: 500;
}

.pf-checkbox a:hover {
    text-decoration: underline;
}

.pf-checkbox.pf-checkbox--promo {
    background: var(--pf-primary-light);
    border-color: rgba(212, 101, 42, 0.15);
}

/* Bootstrap validator error overrides */
.pf-card .help-block.with-errors {
    font-size: 12px;
    color: var(--pf-red);
    margin-top: 4px;
    margin-bottom: 0;
    padding-left: 2px;
}

.pf-card .has-error .form-control {
    border-color: var(--pf-red) !important;
    box-shadow: 0 0 0 3px rgba(184, 92, 80, 0.12) !important;
}

.pf-card .has-error .help-block {
    color: var(--pf-red);
}

/* Error data nascita */
#error-data-nascita {
    font-size: 12px;
    margin-top: 4px;
    padding-left: 2px;
}

/* ============================================
   BUTTON
   ============================================ */
.pf-btn-submit {
    display: block;
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--pf-primary), var(--pf-primary-dark));
    cursor: pointer;
    transition: transform var(--pf-transition), box-shadow var(--pf-transition);
    box-shadow: 0 4px 14px rgba(212, 101, 42, 0.25);
    margin-top: 8px;
    letter-spacing: 0.02em;
}

.pf-btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(212, 101, 42, 0.35);
}

.pf-btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(212, 101, 42, 0.2);
}

.pf-btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   FOOTER
   ============================================ */
.pf-footer {
    position: relative;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--pf-text);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    font-size: 12px;
    padding: 0 0 8px;
    z-index: 100;
    margin-top: auto;
}

.pf-footer-tricolor {
    height: 3px;
    display: flex;
    margin-bottom: 8px;
}

.pf-footer-tricolor span {
    flex: 1;
}

.pf-footer-tricolor .tc-green { background: var(--pf-green); }
.pf-footer-tricolor .tc-white { background: #F0F0EC; }
.pf-footer-tricolor .tc-red { background: var(--pf-red); }

.pf-footer-logo {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 4px;
    opacity: 0.8;
}

.pf-footer a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
}

.pf-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.pf-footer-links {
    margin-top: 4px;
    font-size: 11px;
}

.pf-footer-links a {
    font-weight: 400;
    color: rgba(255, 255, 255, 0.55);
}

/* ============================================
   STEP 2 — Confirmation
   ============================================ */
.pf-step2-content {
    text-align: center;
    padding: 4px 0 16px;
}

.pf-step2-content h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--pf-text);
    margin: 0 0 12px;
}

.pf-step2-content p {
    font-size: 14px;
    color: var(--pf-text-secondary);
    line-height: 1.6;
    margin: 0 0 16px;
}

.pf-step2-content h5 {
    font-size: 12px;
    font-weight: 500;
    color: var(--pf-text-hint);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 16px;
}

.pf-step2-img {
    max-width: 100%;
    height: auto;
    border-radius: var(--pf-radius);
    margin-bottom: 20px;
}

.pf-step2-info {
    background: var(--pf-green-light);
    border-radius: var(--pf-radius-sm);
    padding: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.pf-step2-info h2 {
    font-size: 16px;
    text-align: left;
    margin-bottom: 8px;
}

.pf-step2-info p {
    margin: 0;
    font-size: 13px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 600px) {
    .pf-hero {
        min-height: 280px;
    }
    .pf-hero-content {
        padding: 40px 32px 36px;
    }
    .pf-hero-content h1 {
        font-size: 28px;
    }
    .pf-form-wrapper {
        margin-top: -30px;
    }
    .pf-card {
        padding: 36px 32px 28px;
    }
}

@media (max-width: 360px) {
    .pf-card {
        padding: 22px 18px 20px;
    }
    .pf-hero-content {
        padding: 24px 18px 22px;
    }
    .pf-hero-content h1 {
        font-size: 19px;
    }
    .pf-checkbox {
        padding: 8px 10px;
        font-size: 12px;
    }
}
