/* ===================================
   FINTEX - CONTATTI CSS
   Stili specifici pagina Contatti
   =================================== */

/* ============= PRELOADER ============= */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    position: relative;
    width: 80px;
    height: 80px;
}

.loader img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.95); opacity: 0.8; }
}

/* ============= HEADER & NAVIGATION ============= */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #FFFFFF;
    z-index: 1000;
    transition: var(--transition-base);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.03);
}

#header.scrolled {
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.08);
}

.navbar {
    padding: 0;
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 80px;
    width: auto;
    transition: var(--transition-base);
}

.logo:hover img {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
    padding: 8px 0;
    transition: var(--transition-base);
}

.nav-link.active {
    color: var(--primary-red);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-red);
    transition: width 0.3s ease;
}

.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-red);
}

.nav-link:hover::after {
    width: 100%;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown .arrow {
    font-size: 10px;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.dropdown:hover .arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 12px 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-base);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition-base);
}

.dropdown-menu a:hover {
    background: var(--bg-light);
    color: var(--primary-red);
    padding-left: 28px;
}

/* Contact Button */
.btn-contact {
    background: var(--gradient-red);
    color: var(--bg-white) !important;
    padding: 10px 24px !important;
    border-radius: 8px;
    font-weight: 600;
}

.btn-contact::after {
    display: none;
}

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-red);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: var(--transition-base);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background: var(--primary-red);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background: var(--primary-red);
}

/* ============= PAGE HEADER ============= */
.page-header {
    background: #000000;
    position: relative;
    overflow: hidden;
    height: 60vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
}

.page-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
}

.page-subtitle {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-red);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 20px;
    padding: 8px 24px;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 50px;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.page-title {
    font-size: 64px;
    font-weight: 800;
    color: var(--bg-white);
    margin-bottom: 24px;
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.page-description {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* ============= TECH EFFECTS ============= */
.tech-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(220, 38, 38, 0.2) 2px, transparent 2px),
        linear-gradient(90deg, rgba(220, 38, 38, 0.2) 2px, transparent 2px);
    background-size: 60px 60px;
    animation: gridScroll 30s linear infinite;
    z-index: 1;
}

@keyframes gridScroll {
    0% { background-position: 0 0; }
    100% { background-position: 60px 60px; }
}

.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.floating-particles::before,
.floating-particles::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
}

.floating-particles::before {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.6) 0%, rgba(220, 38, 38, 0) 70%);
    top: -150px;
    left: -150px;
    animation: floatBlob 15s ease-in-out infinite;
}

.floating-particles::after {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(185, 28, 28, 0.5) 0%, rgba(185, 28, 28, 0) 70%);
    bottom: -150px;
    right: -150px;
    animation: floatBlob 20s ease-in-out infinite reverse;
}

@keyframes floatBlob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(100px, -100px) scale(1.2); }
    50% { transform: translate(-50px, 50px) scale(0.8); }
    75% { transform: translate(80px, 80px) scale(1.1); }
}

.tech-grid::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.3);
    }
}

/* ============= CONTACT INFO SECTION ============= */
.contact-info-section {
    padding: 100px 0;
    background: var(--bg-white);
}

.contact-info-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-info-card {
    background: var(--bg-white);
    border-radius: 24px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition-base);
}

.contact-info-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(220, 38, 38, 0.15);
}

.info-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(185, 28, 28, 0.1) 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    color: var(--primary-red);
}

.contact-info-card h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.info-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-red);
    margin-bottom: 12px;
    line-height: 1.4;
}

.info-value a {
    color: var(--primary-red);
    transition: var(--transition-base);
}

.info-value a:hover {
    opacity: 0.8;
}

.info-description {
    font-size: 15px;
    color: var(--text-gray);
    line-height: 1.6;
}

/* ============= CONTACT FORM SECTION ============= */
.contact-form-section {
    padding: 100px 0;
    background: var(--bg-light);
}

.form-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto;
}

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

.form-header h2 {
    font-size: 42px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 16px;
    line-height: 1.3;
}

.form-header p {
    font-size: 18px;
    color: var(--text-gray);
    line-height: 1.6;
}

.contact-form {
    background: var(--bg-white);
    padding: 60px;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    margin-bottom: 30px;
}

.form-group label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.form-control {
    width: 100%;
    padding: 16px 20px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    background: var(--bg-white);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    transition: var(--transition-base);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.form-control::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

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

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    padding-right: 50px;
}

/* Privacy Section */
.privacy-section {
    margin: 40px 0 30px;
    padding: 30px;
    background: var(--bg-light);
    border-radius: 16px;
}

.privacy-checkbox {
    margin-bottom: 20px;
}

.privacy-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.privacy-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-gray);
}

.checkbox-custom {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    background: var(--bg-white);
    position: relative;
    transition: var(--transition-base);
}

.privacy-checkbox input[type="checkbox"]:checked + label .checkbox-custom {
    background: var(--primary-red);
    border-color: var(--primary-red);
}

.privacy-checkbox input[type="checkbox"]:checked + label .checkbox-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 8px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: translate(-50%, -60%) rotate(-45deg);
}

.privacy-checkbox input[type="checkbox"]:focus + label .checkbox-custom {
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.privacy-links {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.privacy-links a {
    color: var(--primary-red);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-base);
}

.privacy-links a:hover {
    text-decoration: underline;
}

.privacy-links span {
    color: var(--text-gray);
}

/* Form Messages */
.form-messages {
    margin: 30px 0;
}

.message {
    display: none;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}

.message:last-child {
    margin-bottom: 0;
}

.success-message {
    background: #4CAF50;
    color: white;
}

.error-message {
    background: #FF0000;
    color: white;
}

.message.show {
    display: block;
}

/* Form Submit */
.form-submit {
    text-align: center;
    margin-top: 40px;
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 48px;
    font-size: 17px;
    font-weight: 700;
    color: var(--bg-white);
    background: var(--gradient-red);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: var(--shadow-red);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(220, 38, 38, 0.4);
}

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

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

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

/* ============= SIDE INFO ============= */
.side-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-box {
    background: var(--bg-white);
    padding: 40px 32px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition-base);
}

.info-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(220, 38, 38, 0.1);
}

.info-box-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(185, 28, 28, 0.1) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--primary-red);
}

.info-box h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.info-box p {
    font-size: 15px;
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 0;
}

.info-box p strong {
    color: var(--text-dark);
    font-weight: 600;
}

.mt-2 {
    margin-top: 16px;
}

.services-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.services-list li {
    font-size: 15px;
    color: var(--text-gray);
    padding: 10px 0;
    padding-left: 28px;
    position: relative;
    line-height: 1.6;
}

.services-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    width: 6px;
    height: 6px;
    background: var(--primary-red);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.info-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--primary-red);
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition-base);
}

.info-link:hover {
    opacity: 0.8;
    transform: translateX(5px);
}

/* ============= MAP SECTION ============= */
.map-section {
    padding: 100px 0;
    background: var(--bg-white);
}

.map-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.map-header h2 {
    font-size: 42px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 16px;
    line-height: 1.3;
}

.map-header p {
    font-size: 18px;
    color: var(--text-gray);
    line-height: 1.6;
}

.map-wrapper {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.map-wrapper iframe {
    display: block;
}

/* ============= SCROLL TO TOP ============= */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-red);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--bg-white);
    box-shadow: var(--shadow-red);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition-base);
    z-index: 999;
    cursor: pointer;
    border: none;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(220, 38, 38, 0.4);
}

/* ============= ANIMATIONS ============= */
[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ============= RESPONSIVE DESIGN ============= */

/* Tablet */
@media (max-width: 1024px) {
    .nav-container {
        padding: 20px 30px;
    }
    
    .page-title {
        font-size: 52px;
    }
    
	.contact-info-card {
		flex: 0 1 400px;
	}
    
    .form-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-form {
        padding: 50px 40px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .nav-container {
        padding: 15px 20px;
    }
    
    .logo img {
		height: 55px;
	}
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-white);
        flex-direction: column;
        align-items: flex-start;
        padding: 40px 20px;
        gap: 20px;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        width: 100%;
        padding: 12px 0;
        font-size: 16px;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0 0 0 20px;
        margin-top: 10px;
    }
    
    .btn-contact {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .page-header {
        height: 50vh;
        min-height: 400px;
    }
    
    .page-title {
        font-size: 42px;
    }
    
    .page-description {
        font-size: 18px;
    }
    
    .contact-info-section {
        padding: 80px 0;
    }
    
    .contact-info-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-info-card {
        width: 100%;
        max-width: 400px;
    }
    
    .contact-form-section {
        padding: 80px 0;
    }
    
    .form-wrapper {
        gap: 30px;
    }
    
    .form-header h2 {
        font-size: 36px;
    }
    
    .contact-form {
        padding: 40px 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .map-section {
        padding: 80px 0;
    }
    
    .map-header h2 {
        font-size: 36px;
    }
    
    .map-wrapper iframe {
        height: 400px;
    }
    
    .scroll-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
    
    .tech-grid {
        background-size: 40px 40px;
    }
    
    .floating-particles::before {
        width: 300px;
        height: 300px;
    }
    
    .floating-particles::after {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 36px;
    }
    
    .page-description {
        font-size: 16px;
    }
    
    .contact-info-card {
        padding: 32px 24px;
    }
    
    .info-icon {
        width: 80px;
        height: 80px;
    }
    
    .contact-info-card h3 {
        font-size: 20px;
    }
    
    .info-value {
        font-size: 18px;
    }
    
    .form-header h2 {
        font-size: 28px;
    }
    
    .contact-form {
        padding: 32px 20px;
    }
    
    .submit-btn {
        padding: 16px 40px;
        font-size: 16px;
    }
    
    .info-box {
        padding: 32px 24px;
    }
    
    .map-header h2 {
        font-size: 28px;
    }
    
    .map-wrapper iframe {
        height: 350px;
    }
}