/* Global Variables */
:root {
    --cream: #F5F5F5;
    --dark: #1A1A1A;
    --medium-dark: #333333;
    --light-gray: #E5E5E5;
    --primary-blue: #3A6C8E;
    --light-blue: #6A99B9;
    --dark-blue: #1E4760;
    --accent: #3A6C8E;
    --spacing-xs: clamp(6px, 1vw, 8px);
    --spacing-sm: clamp(12px, 2vw, 16px);
    --spacing-md: clamp(24px, 3vw, 32px);
    --spacing-lg: clamp(40px, 5vw, 64px);
    --spacing-xl: clamp(60px, 8vw, 96px);
    --border-radius: 0;
    --header-height: 64px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: clamp(15px, 1.2vw, 16px);
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--cream);
    font-weight: 300;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    max-width: 100vw;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

h1 {
    font-size: clamp(36px, 7vw, 72px);
    letter-spacing: -1.5px;
    font-weight: 700;
}

h2 {
    font-size: clamp(28px, 5vw, 48px);
    letter-spacing: -1px;
}

h3 {
    font-size: clamp(20px, 3vw, 32px);
}

p {
    margin-bottom: var(--spacing-md);
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.7;
}

a {
    color: var(--dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-blue);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    overflow-x: hidden;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: clamp(10px, 1.5vw, 14px) clamp(20px, 3vw, 30px);
    background-color: var(--primary-blue);
    color: white;
    font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.2vw, 16px);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    text-align: center;
    border-radius: 8px;
}

.btn:hover {
    background-color: var(--dark-blue);
    color: white;
}

.btn-outline {
    border: 2px solid var(--dark-blue);
    color: var(--dark-blue);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--dark-blue);
    color: white;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(245, 245, 245, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: var(--header-height);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.header-logo {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 24px;
}

.nav-item {
    margin: 0;
}

.nav-link {
    font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    color: var(--dark);
    font-size: 14px;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.nav-link:hover {
    opacity: 1;
    color: var(--primary-blue);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 102;
    position: absolute;
    right: var(--spacing-sm);
    top: 50%;
    transform: translateY(-50%);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 99;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 120px;
    padding-bottom: var(--spacing-lg);
    position: relative;
    overflow: hidden;
    background-color: var(--cream);
}

.hero .container {
    width: 100%;
    max-width: 1200px;
}

.hero-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
}

.hero-logo-container {
    display: flex;
    justify-content: flex-end;
    width: 40%;
}

.hero-logo {
    width: auto;
    max-width: 380px;
    height: auto;
}

.hero-content {
    width: 40%;
    z-index: 2;
}

.ipad-label {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: clamp(17px, 1.6vw, 22px);
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: var(--spacing-xs);
}

.hero-title {
    font-size: clamp(34px, 4.5vw, 52px);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--dark);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.price-tag {
    font-size: clamp(16px, 1.2vw, 18px);
    color: var(--medium-dark);
    margin-bottom: var(--spacing-md);
    font-weight: 400;
}

/* About Section */
.about {
    padding: var(--spacing-lg) 0;
    background-color: var(--cream);
    margin-bottom: var(--spacing-sm);
}

/* Services Section */
.services {
    padding: var(--spacing-xl) 0;
    background-color: white;
}

.section-header {
    text-align: left;
    margin-bottom: var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
}

.section-subtitle {
    font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(12px, 1.1vw, 14px);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--spacing-xs);
    color: var(--primary-blue);
    font-weight: 500;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.service-item {
    background-color: var(--cream);
    padding: var(--spacing-md);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
    border-radius: 12px;
    border-bottom: 3px solid var(--primary-blue);
}

.service-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.service-icon {
    width: clamp(40px, 5vw, 60px);
    height: clamp(40px, 5vw, 60px);
    margin-bottom: var(--spacing-sm);
    fill: var(--primary-blue);
}

.service-icon path {
    stroke: var(--primary-blue);
}

.service-title {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: clamp(18px, 2vw, 20px);
    margin-bottom: var(--spacing-sm);
    color: var(--primary-blue);
}

/* Projects Section */
.projects {
    padding: var(--spacing-lg) 0 var(--spacing-xl);
    background-color: var(--light-gray);
    overflow: hidden;
    width: 100%;
    margin-top: var(--spacing-sm);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 400px;
    margin: var(--spacing-md) 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

.carousel-item {
    position: absolute;
    width: 60%;
    height: 100%;
    opacity: 0;
    transition: all 0.5s ease;
    transform: translateX(0) scale(0.8);
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.carousel-item.left {
    opacity: 0.7;
    transform: translateX(-60%) scale(0.8);
    z-index: 1;
    filter: brightness(0.7);
}

.carousel-item.center {
    opacity: 1;
    transform: translateX(0) scale(1);
    z-index: 2;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.carousel-item.right {
    opacity: 0.7;
    transform: translateX(60%) scale(0.8);
    z-index: 1;
    filter: brightness(0.7);
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.carousel-button {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--medium-dark);
    transition: color 0.3s ease;
}

.carousel-button:hover {
    color: var(--primary-blue);
}

.carousel-button:hover svg path {
    stroke: var(--primary-blue);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: 25px;
    gap: 8px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    background-color: var(--light-blue);
    border-radius: 50%;
    opacity: 0.5;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    opacity: 1;
    background-color: var(--primary-blue);
    transform: scale(1.2);
}

/* Testimonials Section */
.testimonials {
    padding: var(--spacing-xl) 0;
    background-color: var(--cream);
    width: 100%;
    position: relative;
}

.testimonials-slider {
    position: relative;
    width: 100%;
    margin: var(--spacing-md) auto;
    overflow: visible;
}

.testimonial-track {
    display: flex;
    width: 300%;
    transition: transform 0.5s ease;
}

.testimonial-slide {
    flex: 0 0 33.333%;
    padding: 0 var(--spacing-sm);
    box-sizing: border-box;
}

.testimonial-content {
    background-color: white;
    border-radius: 8px;
    padding: var(--spacing-md);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-text {
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
    color: var(--dark);
    flex-grow: 1;
}

.testimonial-author {
    margin-top: auto;
}

.testimonial-author h4 {
    margin: 0;
    font-size: clamp(18px, 1.5vw, 22px);
    color: var(--dark-blue);
}

.testimonial-author p {
    margin: 0;
    font-size: clamp(14px, 1.2vw, 16px);
    color: var(--medium-dark);
    opacity: 0.7;
}

.testimonial-controls {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-md);
    padding-bottom: 10px;
}

.carousel-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 768px) {
    .testimonial-slide {
        flex: 0 0 100%;
    }
}

.testimonial-dot {
    width: 10px;
    height: 10px;
    background-color: var(--light-blue);
    border-radius: 50%;
    opacity: 0.5;
    cursor: pointer;
    transition: all 0.3s ease;
}

.testimonial-dot.active {
    opacity: 1;
    background-color: var(--primary-blue);
    transform: scale(1.2);
}

/* Certificates Section */
.certificates {
    padding: var(--spacing-lg) 0 var(--spacing-xl);
    background-color: white;
    overflow: hidden;
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    align-items: stretch;
    margin-bottom: var(--spacing-sm);
}

.certificate-item {
    text-align: center;
    padding: var(--spacing-md);
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    min-height: 280px;
}

.certificate-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.certificate-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--spacing-sm);
    display: block;
}

.certificate-image-container {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
    flex-grow: 1;
    width: 100%;
    padding: 0 var(--spacing-sm);
}

.certificate-image {
    max-width: 120px;
    max-height: 100%;
    object-fit: contain;
}

.certificate-item img {
    max-width: 120px;
    max-height: 100%;
    margin: 0 auto;
    object-fit: contain;
}

.certificate-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: #333;
}

.certificate-item p {
    color: #666;
    margin-bottom: var(--spacing-sm);
    font-size: 14px;
}

.certificate-item .btn {
    margin-top: auto;
}

/* Contact Section */
.contact {
    padding: var(--spacing-xl) 0;
    background-color: white;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-lg);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.contact-item {
    margin-bottom: var(--spacing-sm);
}

.contact-label {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--medium-dark);
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

.contact-item p {
    margin-bottom: var(--spacing-xs);
}

.contact-item a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--dark-blue);
}

/* Form Styling */
form {
    width: 100%;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--medium-dark);
    font-size: 14px;
}

.form-control {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
    border-radius: 8px;
}

.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(58, 108, 142, 0.2);
}

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

.form-success {
    background-color: #e7f4e4;
    border: 1px solid #c3e6b9;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    animation: fadeIn 0.5s ease-in-out;
}

.form-success p {
    color: #2c6e2e;
    margin-bottom: 0;
    font-weight: 500;
}

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

.hidden {
    display: none;
}

.full-width {
    grid-column: span 2;
}

/* Map Section */
.map-section {
    width: 100%;
    padding: 0;
    position: relative;
}

.map-container {
    height: 400px;
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer */
.footer {
    padding: var(--spacing-lg) 0 var(--spacing-md);
    background-color: var(--dark-blue);
    color: white;
}

.footer .container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-grid > div {
    flex: 1;
    min-width: 250px;
}

.footer-logo {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: white;
    letter-spacing: -0.5px;
}

.footer p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.footer h3 {
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
    position: relative;
    padding-bottom: var(--spacing-sm);
    font-weight: 600;
    color: white;
    letter-spacing: -0.3px;
}

.footer h3:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-blue);
}

.footer-nav {
    list-style: none;
    padding: 0;
}

.footer-nav-item {
    margin-bottom: var(--spacing-sm);
}

.footer-nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-nav-link:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.copyright .piva {
    color: white;
}

/* Media Queries */
@media (max-width: 1024px) {
    .carousel-container {
        height: 350px;
    }
    
    .certificate-item {
        min-height: 250px;
    }
}

@media (max-width: 768px) {
    .header-logo {
        height: 32px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--cream);
        flex-direction: column;
        padding: 80px var(--spacing-md) var(--spacing-md);
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        z-index: 100;
        transition: right 0.3s ease;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    .nav-item {
        margin: var(--spacing-xs) 0;
        width: 100%;
        text-align: center;
    }
    
    .nav-link {
        display: block;
        padding: var(--spacing-xs) 0;
        width: 100%;
    }
    
    .carousel-container {
        height: 300px;
    }

    .carousel-item.left, .carousel-item.right {
        opacity: 0;
        transform: scale(0.8);
    }

    .carousel-item.center {
        width: 80%;
    }

    .testimonial-slide {
        flex: 0 0 100%;
        min-width: 100%;
    }
    
    .testimonial-track {
        width: 100%;
    }

    .testimonial-content {
        padding: 25px;
    }

    .testimonial-text {
        font-size: 15px;
    }

    .testimonial-author h4 {
        font-size: 16px;
    }

    .testimonial-author p {
        font-size: 14px;
    }

    .testimonial-arrow {
        width: 30px;
        height: 30px;
    }

    .map-container {
        height: 300px;
    }
    
    .footer-grid {
        flex-direction: column;
        text-align: center;
    }
    
    .footer h3:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-nav {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .hero-logo-container {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        margin: 0 auto;
    }
    
    .hero-logo {
        width: 100%;
        max-width: 280px;
    }
    
    .hero-content {
        width: 100%;
        max-width: 100%;
        padding: 0 var(--spacing-sm);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .contact-item {
        text-align: center;
    }
    
    .contact-info {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .header-logo {
        height: 28px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .hero-title {
        font-size: clamp(32px, 8vw, 42px);
    }
    
    .testimonial-slide {
        min-width: 90%;
        padding: 10px;
    }
    
    .testimonial-track {
        width: auto;
        display: flex;
        justify-content: flex-start;
    }
    
    .testimonial-content {
        padding: 20px;
    }
    
    .testimonial-text {
        font-size: 15px;
    }
    
    .testimonial-author h4 {
        font-size: 16px;
    }
    
    .testimonial-author p {
        font-size: 14px;
    }
    
    .carousel-container {
        height: 250px;
    }
    
    .carousel-item {
        width: 85%;
    }
    
    .carousel-item.center {
        width: 85%;
    }
    
    .carousel-controls {
        margin-top: var(--spacing-sm);
    }
    
    .testimonial-content {
        padding: var(--spacing-sm);
        min-height: auto;
    }
    
    .testimonial-text {
        font-size: 15px;
        line-height: 1.6;
        margin-bottom: var(--spacing-sm);
    }
    
    .testimonial-author h4 {
        font-size: 16px;
    }
    
    .testimonial-author p {
        font-size: 14px;
    }

    .hero-logo-container {
        max-width: 180px;
    }
    
    .hero-content {
        padding: 0;
    }
    
    .contact .container {
        padding: 0 var(--spacing-sm);
        width: 100%;
    }
    
    .form-control {
        font-size: 16px;
    }
    
    .certificate-item {
        padding: var(--spacing-sm);
        min-height: 220px;
    }
    
    .testimonial-content {
        min-height: 180px;
    }
}

/* Aggiungiamo orari di ufficio nel footer */
.footer .office-hours {
    margin-top: var(--spacing-sm);
}

.footer .office-hours p {
    margin-bottom: var(--spacing-xs);
    font-size: 14px;
}

@media (max-width: 992px) {
    .hero-wrapper {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .hero-content, .hero-logo-container {
        width: 100%;
        text-align: center;
    }
    
    .hero-logo-container {
        justify-content: center;
        margin-bottom: var(--spacing-md);
    }
}

.testimonial-track + .carousel-dots {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 25px;
    gap: 8px;
} 