/* SEZIONE CONTATTI */
.contact-section {
    padding: 0;
    background: var(--bg-light-gradient);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

    .contact-section .container-fluid {
        position: relative;
        z-index: 2;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding-top: 80px;
        padding-left: 20px;
        padding-right: 20px;
        overflow: hidden;
    }

.contact-stat-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xs) var(--spacing-sm);
    text-align: center;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(33, 150, 243, 0.1);
    margin-bottom: 23px;
    margin-left: 10px;
    margin-right: 10px;
    width: 96%
}

    .contact-stat-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-lg);
        background: var(--bg-white);
    }

    .contact-stat-card .stat-icon {
        width: 60px;
        height: 60px;
        background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
        border-radius: var(--radius-full);
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto var(--spacing-md);
        transition: var(--transition-normal);
    }

    .contact-stat-card:hover .stat-icon {
        transform: scale(1.1);
    }

    .contact-stat-card .stat-icon i {
        color: var(--text-white);
        font-size: var(--font-size-2xl);
    }

    .contact-stat-card .stat-number {
        font-size: var(--font-size-3xl);
        font-weight: var(--font-weight-bold);
        color: var(--text-primary);
        margin-bottom: var(--spacing-xs);
    }

    .contact-stat-card .stat-label {
        font-size: var(--font-size-sm);
        color: var(--text-secondary);
        font-weight: var(--font-weight-semibold);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

.contact-wrapper {
    margin-top: var(--spacing-md);
    flex-grow: 1;
    align-items: center;
    translate: 0px -20px;
}

.contact-form-container {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(33, 150, 243, 0.1);
    height: fit-content;
}

.form-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

    .form-header h3 {
        color: var(--text-primary);
        font-size: var(--font-size-3xl);
        font-weight: var(--font-weight-bold);
        margin-bottom: var(--spacing-xs);
    }

    .form-header p {
        color: var(--text-secondary);
        font-size: var(--font-size-lg);
    }

/* Modern Form Styling */
.modern-form {
    max-width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.form-group {
    position: relative;
    margin-bottom: var(--spacing-xl);
}

.input-wrapper, .select-wrapper, .textarea-wrapper {
    position: relative;
}

    .input-wrapper input,
    .select-wrapper select,
    .textarea-wrapper textarea {
        width: 100%;
        padding: var(--spacing-sm) var(--spacing-md);
        border: 2px solid var(--primary-50);
        border-radius: var(--radius-md);
        font-size: var(--font-size-sm);
        transition: var(--transition-normal);
        background: var(--bg-lighter);
        color: var(--text-dark);
        outline: none;
    }

        .input-wrapper input:focus,
        .select-wrapper select:focus,
        .textarea-wrapper textarea:focus {
            border-color: var(--color-primary);
            background: var(--bg-white);
            box-shadow: var(--shadow-sm);
        }

    .input-wrapper label,
    .select-wrapper label,
    .textarea-wrapper label {
        position: absolute;
        top: 50%;
        left: var(--spacing-md);
        transform: translateY(-50%);
        color: var(--text-muted);
        font-size: var(--font-size-base);
        pointer-events: none;
        transition: var(--transition-normal);
        background: transparent;
    }

    .textarea-wrapper label {
        top: 20px;
        transform: none;
    }

    .input-wrapper input:focus + label,
    .input-wrapper input:not(:placeholder-shown) + label,
    .select-wrapper select:focus + label,
    .select-wrapper select:not([value=""]) + label,
    .textarea-wrapper textarea:focus + label,
    .textarea-wrapper textarea:not(:placeholder-shown) + label {
        top: -15px;
        left: var(--spacing-sm);
        font-size: var(--font-size-sm);
        color: var(--color-primary);
        background: var(--bg-white);
        padding: 0 var(--spacing-xs);
        font-weight: var(--font-weight-semibold);
    }

.input-highlight {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-dark));
    transition: var(--transition-normal);
    transform: translateX(-50%);
    border-radius: var(--radius-sm);
}

.input-wrapper input:focus ~ .input-highlight,
.select-wrapper select:focus ~ .input-highlight,
.textarea-wrapper textarea:focus ~ .input-highlight {
    width: 100%;
}

.textarea-wrapper textarea {
    resize: vertical;
    min-height: 80px;
    padding-top: var(--spacing-lg);
}

    .textarea-wrapper textarea::placeholder {
        color: var(--text-muted);
        opacity: 0;
        transition: var(--transition-normal);
    }

    .textarea-wrapper textarea:focus::placeholder {
        opacity: 1;
    }

.checkbox-group {
    margin: var(--spacing-md) 0;
}

.custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    cursor: pointer;
}

    .custom-checkbox input[type="checkbox"] {
        display: none;
    }

.checkmark {
    width: 24px;
    height: 24px;
    border: 2px solid var(--primary-50);
    border-radius: 6px;
    position: relative;
    transition: var(--transition-normal);
    flex-shrink: 0;
    background: var(--bg-lighter);
}

.custom-checkbox input:checked + .checkmark {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border-color: var(--color-primary);
}

    .custom-checkbox input:checked + .checkmark::after {
        content: '✓';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: var(--text-white);
        font-weight: var(--font-weight-bold);
        font-size: 14px;
    }

.custom-checkbox label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: var(--line-height-normal);
    cursor: pointer;
}

.form-submit {
    text-align: center;
    margin-top: 30px;
}

.submit-btn {
    background: linear-gradient(45deg, var(--color-primary), var(--color-primary-dark));
    color: var(--text-white);
    border: none;
    padding: 18px var(--spacing-xl);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

    .submit-btn:hover {
        background: linear-gradient(45deg, var(--color-primary-dark), var(--color-primary-darker));
        transform: translateY(-3px);
        box-shadow: var(--shadow-xl);
    }

    .submit-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: var(--transition-slower);
    }

    .submit-btn:hover::before {
        left: 100%;
    }

.btn-icon {
    transition: var(--transition-normal);
}

.submit-btn:hover .btn-icon {
    transform: translateX(5px);
}

.contact-info-container {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border-radius: var(--radius-xl);
    padding: var(--spacing-sm);
    color: var(--text-white);
    position: relative;
    overflow: hidden;
    height: fit-content;
    bottom: 130px;
    padding-top: var(--spacing-xl);
    padding-bottom: 36px;
}

    .contact-info-container::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -20%;
        width: 300px;
        height: 300px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        z-index: 1;
    }

.info-header {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
}

    .info-header h3 {
        font-size: 1.8rem;
        font-weight: 700;
        margin-bottom: 10px;
    }

    .info-header p {
        opacity: 0.9;
        font-size: 1.1rem;
        color: var(--text-white);
    }

.contact-info-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
}

.info-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 18px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

    .info-card:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

.info-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .info-icon i {
        font-size: 1.4rem;
        color: white;
    }

.info-content h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.info-content p {
    opacity: 0.9;
    line-height: 1.6;
    font-size: 0.95rem;
    color: var(--text-white);
}

.info-content a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

    .info-content a:hover {
        opacity: 0.8;
        text-decoration: underline;
    }

/* Emergency CTA */
.contact-cta {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    position: relative;
    z-index: 2;
}

    .contact-cta h4 {
        font-size: 1.3rem;
        font-weight: 700;
        margin-bottom: 20px;
    }

.emergency-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 15px 25px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

    .emergency-btn:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        color: white;
        text-decoration: none;
    }

    .emergency-btn i {
        font-size: 1.2rem;
    }

/* RESPONSIVE */
@media (min-width: 1200px) {
    .contact-section .container {
        max-width: 1200px;
    }

    .contact-wrapper {
        align-items: stretch;
    }

    .contact-form-container,
    .contact-info-container {
        height: 100%;
    }
}

@media (min-width: 992px) {
    .contact-section {
        scroll-margin-top: var(--navbar-height);
    }

    .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .contact-section {
        height: auto;
        min-height: 100vh;
        padding: var(--section-padding-mobile);
    }

        .contact-section .container {
            height: auto;
            padding-top: 60px;
            justify-content: flex-start;
        }

    .contact-wrapper {
        margin-top: 30px;
        align-items: flex-start;
    }

    .contact-form-container,
    .contact-info-container {
        padding: 25px 20px;
        margin-bottom: 25px;
        height: auto;
        bottom: 0px;
    }

    .contact-section .section-title {
        font-size: 2.2rem;
    }

    .form-header h3 {
        font-size: 1.6rem;
    }

    .info-header h3 {
        font-size: 1.5rem;
    }

    .form-row {
        gap: 15px;
    }

    .info-card {
        padding: 18px;
    }

    .contact-cta {
        padding: 20px 15px;
    }

    .textarea-wrapper textarea {
        min-height: 100px;
    }
}

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-section .section-title {
        font-size: 2rem;
    }

    .stat-icon {
        width: 50px !important;
        height: 50px !important;
        margin-bottom: 5px !important;
    }

        .stat-icon .fa-clock {
            font-size: var(--font-size-xl) !important;
        }
    .contact-stat-card {
        margin-bottom: 10px !important;
        margin-bottom: 10px !important;
        margin-left: 0px !important;
        margin-right: 0px !important;
        width: 100%;
    }

    .stat-label {
        font-size: var(--font-size-x    xs) !important;
    }

    .stat-number {
        font-size: var(--font-size-2xl) !important;
    }

    .contact-section .container-fluid{
        padding-top:10px;
    }
}
