/* ===================================
   FINTEX - SERVIZI CSS STYLESHEET
   Stili specifici pagina Servizi
   =================================== */

/* ============= 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; }
}


/* Screen reader only - nasconde visivamente ma mantiene accessibile */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============= 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;
}

/* ============= SERVICES INTRO SECTION ============= */
.services-intro {
    padding: var(--section-padding) 0;
    background: var(--bg-white);
}

.intro-content {
    max-width: 900px;
    margin: 0 auto;
}

.intro-paragraph {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 24px;
    text-align: center;
}

.intro-paragraph:last-child {
    margin-bottom: 0;
}

/* ============= SERVICES OVERVIEW SECTION ============= */
.services-overview {
    padding: var(--section-padding) 0;
    background: var(--bg-light);
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 80px;
}

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

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

.overview-icon {
    margin-bottom: 24px;
}

.overview-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.overview-text {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-gray);
}

/* Mission Statement */
.mission-statement {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 40px;
    background: var(--bg-white);
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    border: 2px solid rgba(220, 38, 38, 0.1);
}

.mission-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(220, 38, 38, 0.05);
    border-radius: 50%;
    margin-bottom: 32px;
}

.mission-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.mission-text {
    font-size: 20px;
    line-height: 1.7;
    color: var(--text-gray);
}

.mission-text strong {
    color: var(--primary-red);
    font-weight: 700;
}

/* ============= DETAILED SERVICES SECTION ============= */
.detailed-services {
    padding: var(--section-padding) 0;
    background: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-label {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-red);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.services-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.service-card-large {
    background: var(--bg-light);
    padding: 48px;
    border-radius: 24px;
    transition: var(--transition-base);
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.service-card-large:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-red);
    background: var(--bg-white);
}

.service-card-icon {
    margin-bottom: 32px;
    transition: var(--transition-base);
}

.service-card-large:hover .service-card-icon {
    transform: scale(1.1);
}

.service-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-card-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}

.service-card-title a {
    color: var(--text-dark);
    transition: var(--transition-base);
}

.service-card-title a:hover {
    color: var(--primary-red);
}

.service-card-description {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 32px;
    flex: 1;
}

.service-card-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-red);
    padding: 12px 24px;
    background: rgba(220, 38, 38, 0.05);
    border-radius: 8px;
    transition: var(--transition-base);
}

.service-card-link:hover {
    background: var(--primary-red);
    color: var(--bg-white);
    transform: translateX(8px);
}

.service-card-link svg {
    transition: var(--transition-base);
}

.service-card-link:hover svg {
    transform: translateX(4px);
}

/* ============= 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;
}

.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 ============= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ============= TECH EFFECTS ============= */

/* Tech Grid Background */
.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;
    }
}

/* Tech Particles */
.tech-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(220, 38, 38, 0.8);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.8), 0 0 20px rgba(220, 38, 38, 0.4);
    animation: particleFloat 15s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translate(calc(100vw - 100%), calc(100vh - 100%));
        opacity: 0;
    }
}

/* Circuit Lines */
.circuit-line {
    position: absolute;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.8), transparent);
    animation: circuitPulse 3s ease-in-out infinite;
}

@keyframes circuitPulse {
    0%, 100% {
        opacity: 0;
        transform: scaleX(0);
    }
    50% {
        opacity: 1;
        transform: scaleX(1);
    }
}

/* Floating Particles Background */
.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);
    }
}

/* Glowing effect on tech grid */
.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);
    }
}

/* Ensure content is above effects */
.page-header .container {
    position: relative;
    z-index: 3;
}

.page-header h1,
.page-header p,
.page-subtitle {
    position: relative;
    z-index: 3;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

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

/* Tablet */
@media (max-width: 1024px) {
    .nav-container {
        padding: 20px 30px;
    }
    
    .page-title {
        font-size: 52px;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .services-cards {
        grid-template-columns: 1fr;
    }
}

/* 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;
    }
    
    .intro-paragraph {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 36px;
    }
    
    .overview-card {
        padding: 32px 24px;
    }
    
    .overview-title {
        font-size: 22px;
    }
    
    .mission-statement {
        padding: 40px 24px;
    }
    
    .mission-title {
        font-size: 26px;
    }
    
    .mission-text {
        font-size: 18px;
    }
    
    .service-card-large {
        padding: 32px 24px;
    }
    
    .service-card-title {
        font-size: 26px;
    }
    
    .service-card-description {
        font-size: 16px;
    }
    
    .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;
    }
    
    .tech-particle {
        width: 3px;
        height: 3px;
    }
    
    .circuit-line {
        width: 60px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 36px;
    }
    
    .page-description {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .mission-title {
        font-size: 24px;
    }
    
    .service-card-title {
        font-size: 24px;
    }
}