/**
 * GenIApp - Pagina Contatti
 * CSS specifico per la pagina contatti.html
 */

/* Hero Section - Design Moderno e Arrotondato */
.hero-contatti {
    background: linear-gradient(135deg, #595498 0%, #6b5b95 50%, #7b6ba8 100%);
    color: white;
    padding: 20px 20px 18px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 75px;
    position: relative;
    margin: 20px;
    border-radius: 25px;
    box-shadow: 0 15px 35px rgba(89, 84, 152, 0.3), 
                0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Effetto glassmorphism */
.hero-contatti::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Decorazione geometrica */
.hero-contatti::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.hero-contatti h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: white;
    opacity: 1;
    position: relative;
    z-index: 2;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #ffffff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Main Content */
.contatti-main {
    padding: 60px 0;
}

/* Grid centrato per il form */
.contatti-grid-centered {
    display: flex;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.contatti-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Form Section - Ottimizzato per layout centrato */
.contatti-form {
    width: 100%;
    max-width: 700px;
    padding: 50px;
    background-color: #f9f9fb;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.contatti-form h2 {
    font-family: 'Poppins', sans-serif;
    color: #595498;
    margin-bottom: 40px;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 35px;
}

.form-row {
    display: flex;
    gap: 75px;
    margin-bottom: 35px;
    justify-content: flex-start;
}

.form-row .form-group {
    flex: 0 1 40%;
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-family: 'Satoshi', sans-serif;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 16px 18px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Satoshi', sans-serif;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: #595498;
    outline: none;
    box-shadow: 0 0 0 3px rgba(89, 84, 152, 0.2);
}

.form-control.textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.6;
}

.optional-label {
    color: #888;
    font-size: 0.9em;
    margin-left: 5px;
}

.submit-btn {
    background-color: #f1742b;
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-block;
    font-family: 'Satoshi', sans-serif;
}

.submit-btn:hover {
    background-color: #e05f1a;
    transform: translateY(-2px);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Info Section */
.contatti-info {
    padding-top: 20px;
}

.info-card {
    margin-bottom: 40px;
    padding: 30px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.info-card h2 {
    font-family: 'Poppins', sans-serif;
    color: #595498;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.info-item {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
}

.info-icon {
    margin-right: 15px;
    width: 24px;
    height: 24px;
    color: #595498;
}

.info-text h3 {
    font-family: 'Satoshi', sans-serif;
    font-weight: 600;
    margin: 0 0 5px;
    font-size: 1.1rem;
    color: #333;
}

.info-text p {
    margin: 0;
    color: #666;
    line-height: 1.5;
    font-family: 'Satoshi', sans-serif;
}

/* Map Section */
.map-section {
    margin-top: 60px;
    padding: 40px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.map-section h2 {
    font-family: 'Poppins', sans-serif;
    color: #595498;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.map-placeholder {
    background-color: #f2f2f2;
    height: 300px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-family: 'Satoshi', sans-serif;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-contatti h1 {
        font-size: 2.2rem;
    }
    
    .hero-contatti p {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .contatti-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-contatti {
        padding: 18px 0 15px;
        min-height: 65px;
    }
    
    .hero-contatti h1 {
        font-size: 1.9rem;
        letter-spacing: 1px;
    }
    
    .contatti-main {
        padding: 60px 0;
    }
    
    .contatti-grid-centered {
        padding: 0 15px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row .form-group {
        flex: none;
        margin-bottom: 25px;
    }
    
    .contatti-form {
        padding: 30px;
    }
    
    /* Riduce la larghezza dei campi al 80% solo su mobile */
    .form-control {
        width: 80%;
    }
    
    .form-control.textarea {
        width: 80%;
    }
}

/* Media query per tablet - mantiene le caselle affiancate ma più distanziate */
@media (max-width: 991px) and (min-width: 769px) {
    .form-row {
        gap: 60px;
    }
    
    .form-row .form-group {
        flex: 0 1 42%;
    }
}

/* Media query per schermi più piccoli */
@media (max-width: 840px) and (min-width: 577px) {
    .form-row {
        gap: 50px;
    }
    
    .form-row .form-group {
        flex: 0 1 45%;
    }
}

@media (max-width: 576px) {
    .hero-contatti {
        padding: 15px 0 12px;
        min-height: 55px;
    }
    
    .hero-contatti {
        margin: 10px;
        border-radius: 20px;
        padding: 18px 15px 15px;
        min-height: 65px;
    }
    
    .hero-contatti::after {
        width: 200px;
        height: 200px;
        top: -40%;
        right: -15%;
    }
    
    .hero-contatti h1 {
        font-size: 1.7rem;
        letter-spacing: 1.5px;
    }
    
    .contatti-form {
        padding: 20px;
    }
    
    .submit-btn {
        width: 100%;
    }
}

/* Nuovi stili per layout moderno con mappa */

/* Titolo hero grande e in grassetto */
.hero-title-large {
    font-size: 4.5rem !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem !important;
    text-align: center !important;
    background: linear-gradient(135deg, #08024a, #595498);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .hero-title-large {
        font-size: 3.2rem !important;
    }
}

@media (max-width: 480px) {
    .hero-contatti {
        margin: 5px;
        border-radius: 15px;
        padding: 15px 10px 12px;
        min-height: 50px;
    }
    
    .hero-contatti::after {
        width: 150px;
        height: 150px;
        top: -30%;
        right: -10%;
    }
    
    .hero-contatti h1 {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
    
    .hero-title-large {
        font-size: 2rem !important;
    }
}

/* Container principale */
.contatti-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Sezione form moderna */
.modern-form-section {
    background: #fff;
    border-radius: 20px;
    padding: 60px 60px;
    margin-bottom: 60px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    width: 100%;
}

.form-header {
    text-align: center;
    margin-bottom: 50px;
}

.form-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #595498;
    margin-bottom: 15px;
}

.form-header p {
    font-family: 'Satoshi', sans-serif;
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
}

/* Form styling */
.modern-contact-form {
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 75px;
    margin-bottom: 35px;
}

.form-group {
    position: relative;
}

.form-group.half-width {
    width: 100%;
}

.modern-input, .modern-textarea {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Satoshi', sans-serif;
    background: #fafafa;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.modern-input:focus, .modern-textarea:focus {
    outline: none;
    border-color: #595498;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(89, 84, 152, 0.1);
}

.modern-input::placeholder, .modern-textarea::placeholder {
    color: #999;
    font-weight: 400;
}

.modern-textarea {
    height: 140px;
    resize: vertical;
    margin-bottom: 25px;
}

/* Sezione checkbox normale */
.checkbox-section {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 35px;
}

/* Checkbox normale */
.checkbox-container {
    width: 20px;
    height: 20px;
    accent-color: #4285f4;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Testo della checkbox */
.checkbox-text {
    font-family: 'Satoshi', sans-serif;
    font-size: 15px;
    color: #333;
    line-height: 1.5;
    flex: 1;
    cursor: pointer;
}

/* Bottone Submit */
.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #595498, #716cab);
    border: none;
    border-radius: 12px;
    padding: 18px 30px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Satoshi', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(89, 84, 152, 0.3);
    background: linear-gradient(135deg, #4a4888, #6159a3);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit svg {
    transition: transform 0.3s ease;
}

.btn-submit:hover svg {
    transform: translateX(3px);
}

/* Bottone moderno */
.submit-btn-modern {
    width: 100%;
    background: linear-gradient(135deg, #595498, #716cab);
    border: none;
    border-radius: 12px;
    padding: 18px 30px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Satoshi', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.submit-btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(89, 84, 152, 0.3);
}

.submit-btn-modern:active {
    transform: translateY(0);
}

.response-time {
    text-align: center;
    font-family: 'Satoshi', sans-serif;
    font-size: 14px;
    color: #999;
    margin: 0;
}

/* Sezione mappa centralizzata */
.map-section {
    background: #f8f9fa;
    padding: 60px 0;
    text-align: center;
}

.map-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.map-container h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #595498;
    text-align: center;
    margin-bottom: 30px;
}

.map-wrapper {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    background: white;
    margin: 0 auto;
}

.map-wrapper iframe {
    border-radius: 16px;
    width: 100%;
    height: 400px;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-contatti {
        padding: 18px 0 15px;
        min-height: 65px;
    }
    
    .hero-contatti h1 {
        font-size: 2.1rem;
        margin-bottom: 0;
    }
    
    .contatti-container {
        padding: 0 20px;
    }
    
    .modern-form-section {
        padding: 40px 30px;
        margin-bottom: 40px;
    }
    
    .form-header h1 {
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .map-section {
        padding: 30px 25px;
    }
    
    .map-section h2 {
        font-size: 1.6rem;
    }
    
    .map-container iframe {
        height: 300px;
    }
    
    .checkbox-section {
        gap: 10px;
    }
    
    .checkbox-container {
        width: 18px;
        height: 18px;
        margin-top: 1px;
    }
    
    .checkbox-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .modern-form-section {
        padding: 30px 20px;
        border-radius: 16px;
    }
    
    .form-header h1 {
        font-size: 1.8rem;
    }
    
    .form-header p {
        font-size: 1rem;
    }
    
    .modern-input, .modern-textarea {
        padding: 15px 18px;
        font-size: 15px;
    }
    
    .submit-btn-modern {
        padding: 16px 25px;
        font-size: 15px;
    }
}

/* Messaggio di successo */
.success-message {
    display: none;
    background-color: #d4edda;
    color: #155724;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 35px;
    border: 1px solid #c3e6cb;
    text-align: center;
    font-family: 'Satoshi', sans-serif;
}

.success-message.show {
    display: block;
    animation: slideDown 0.5s ease-out;
}

/* Messaggio di errore */
.error-message {
    display: none;
    background-color: #f8d7da;
    color: #721c24;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 35px;
    border: 1px solid #f5c6cb;
    text-align: center;
    font-family: 'Satoshi', sans-serif;
}

.error-message.show {
    display: block;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-message h3,
.error-message h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.success-message p,
.error-message p {
    margin: 0;
    font-size: 1rem;
}

/* Loading state per il bottone */
.btn-submit.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-submit.loading span {
    opacity: 0.7;
}

.btn-submit.loading svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
