/* ===================================
   SA Consulting - Main Stylesheet
   Palette: Rosso #D32F2F, Blu #1976D2, Bianco, Grigio Antracite
   =================================== */

/* === CSS Variables === */
:root {
    --primary-red: #D32F2F;
    --primary-red-dark: #B71C1C;
    --primary-red-light: #EF5350;
    --secondary-blue: #1976D2;
    --secondary-blue-dark: #1565C0;
    --secondary-blue-light: #42A5F5;
    --text-dark: #212121;
    --text-gray: #424242;
    --text-light: #616161;
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;
    --bg-gray: #ECEFF1;
    --bg-dark: #263238;
    --border-color: #E0E0E0;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-hover: 0 5px 20px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

/* Better contrast for accessibility */
@media (max-width: 768px) {
    :root {
        --text-dark: #1a1a1a;
        --text-gray: #333333;
    }
}

/* === Global Reset === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
    background: var(--bg-white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth scrolling for iOS */
body,
.nav-menu {
    -webkit-overflow-scrolling: touch;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-dark);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

ul {
    list-style: none;
}

/* === Container === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === Navigation === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-hover);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.nav-brand .logo {
    height: 50px;
    width: auto;
}

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

.nav-link {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
    position: relative;
    padding: 8px 0;
}

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

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

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

.nav-dropdown {
    position: relative;
}

.nav-dropdown .nav-link i {
    font-size: 0.75rem;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .nav-link i {
    transform: rotate(180deg);
}

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

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

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-dark);
    font-size: 0.9rem;
    transition: var(--transition);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: var(--transition);
}

.nav-cta {
    margin-left: 20px;
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

.btn-primary:hover {
    background: var(--primary-red-dark);
    border-color: var(--primary-red-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background: transparent;
    color: var(--text-dark);
    border-color: var(--text-dark);
}

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

.btn-outline-red {
    background: transparent;
    color: var(--primary-red);
    border-color: var(--primary-red);
}

.btn-outline-red:hover {
    background: var(--primary-red);
    color: white;
}

.btn-outline-blue {
    background: transparent;
    color: var(--secondary-blue);
    border-color: var(--secondary-blue);
}

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

.btn-white {
    background: white;
    color: var(--primary-red);
    border-color: white;
}

.btn-white:hover {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.05rem;
}

/* === Hero Section === */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.05) 0%, rgba(25, 118, 210, 0.05) 100%);
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    background: var(--primary-red);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 3.2rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-gray);
    margin-bottom: 30px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.hero-visual i {
    font-size: 5rem;
    color: var(--primary-red);
    opacity: 0.8;
    animation: float 3s ease-in-out infinite;
}

.hero-visual i:nth-child(2) {
    color: var(--secondary-blue);
    animation-delay: 0.5s;
}

.hero-visual i:nth-child(3) {
    color: var(--primary-red-light);
    animation-delay: 1s;
}

/* === Sections === */
.section {
    padding: 80px 0;
}

.section-light {
    background: var(--bg-light);
}

.section-white {
    background: var(--bg-white);
}

.section-dark {
    background: var(--bg-dark);
}

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

.section-badge {
    display: inline-block;
    color: var(--primary-red);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.section-badge.light {
    color: var(--secondary-blue-light);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-title.light {
    color: white;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-gray);
    max-width: 700px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

/* === Service Cards === */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    cursor: pointer;
}

.service-card:hover,
.service-card:active {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

/* Touch-friendly interaction */
@media (hover: none) and (pointer: coarse) {
    .service-card:active {
        transform: scale(0.98);
    }
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
}

.service-icon.red {
    background: rgba(211, 47, 47, 0.1);
    color: var(--primary-red);
}

.service-icon.blue {
    background: rgba(25, 118, 210, 0.1);
    color: var(--secondary-blue);
}

.service-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.service-description {
    color: var(--text-gray);
    margin-bottom: 20px;
    line-height: 1.7;
}

.service-link {
    color: var(--primary-red);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.service-link:hover {
    gap: 12px;
}

/* === Two Column Layout === */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.column-content h2 {
    margin-bottom: 30px;
}

.checkmark-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.checkmark-list li {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.checkmark-list i {
    color: var(--primary-red);
    font-size: 1.3rem;
    margin-top: 3px;
    flex-shrink: 0;
}

.column-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-card {
    background: white;
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-red);
    line-height: 1;
    margin-bottom: 10px;
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--secondary-blue);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-gray);
    font-weight: 600;
}

/* === Ambiti Grid === */
.ambiti-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.ambito-card {
    background: white;
    padding: 35px 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border-top: 3px solid transparent;
}

.ambito-card:hover {
    border-top-color: var(--primary-red);
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.ambito-card i {
    font-size: 2.5rem;
    color: var(--primary-red);
    margin-bottom: 20px;
}

.ambito-card h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.ambito-card p {
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* === Partnership Cards === */
.partnership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 40px;
}

.partnership-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.partnership-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.partnership-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 25px;
}

.partnership-icon.blue {
    background: rgba(25, 118, 210, 0.1);
    color: var(--secondary-blue);
}

.partnership-icon.red {
    background: rgba(211, 47, 47, 0.1);
    color: var(--primary-red);
}

.partnership-logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.partnership-logo-main {
    max-width: 180px;
    height: auto;
    border-radius: 12px;
}

.partnership-card h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
}

.partnership-card p {
    color: var(--text-gray);
    margin-bottom: 25px;
    line-height: 1.7;
}

.partnership-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.feature-tag {
    background: var(--bg-light);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-gray);
    font-weight: 600;
}

/* === Testimonials === */
.testimonials-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto 40px;
    min-height: 300px;
}

.testimonial-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.testimonial-card.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.testimonial-icon {
    color: var(--secondary-blue);
    font-size: 2rem;
    margin-bottom: 20px;
}

.testimonial-text {
    color: white;
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 25px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.testimonial-author strong {
    color: white;
    font-size: 1.05rem;
}

.testimonial-author span {
    color: var(--secondary-blue-light);
    font-size: 0.9rem;
}

.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.slider-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: var(--secondary-blue);
    border-color: var(--secondary-blue);
}

.slider-dots {
    display: flex;
    gap: 10px;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    background: var(--secondary-blue);
    width: 30px;
    border-radius: 5px;
}

/* === CTA Section === */
.section-cta {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    padding: 80px 0;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.15rem;
    margin-bottom: 30px;
}

/* === Footer === */
.footer {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    height: 50px;
    margin-bottom: 20px;
}

.footer-description {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
    font-size: 1.1rem;
}

.social-link:hover {
    background: var(--primary-red);
    transform: translateY(-3px);
}

.footer-title {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    transition: var(--transition);
    padding: 4px 0;
}

.footer-links a:hover {
    color: var(--primary-red);
    padding-left: 8px;
}

.footer-text {
    font-size: 0.95rem;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-partners {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.footer-partner {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-partner strong {
    color: white;
    font-size: 1.05rem;
}

.footer-partner-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.partner-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 8px;
    border-radius: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
}

.footer-legal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-legal p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-legal-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-legal-links a {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    padding: 4px 0;
}

.footer-legal-links a:hover {
    color: var(--primary-red);
}

/* === Footer Mobile Optimization === */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 35px;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 50px 0 25px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 35px;
        margin-bottom: 35px;
    }
    
    .footer-col {
        text-align: left;
    }
    
    .footer-logo {
        height: 45px;
        margin-bottom: 15px;
    }
    
    .footer-description {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 20px;
    }
    
    .footer-title {
        font-size: 1.3rem;
        margin-bottom: 18px;
        border-bottom: 2px solid var(--primary-red);
        padding-bottom: 10px;
        display: inline-block;
    }
    
    .footer-links {
        gap: 16px;
    }
    
    .footer-links a {
        font-size: 1.05rem;
        padding: 6px 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .footer-links li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 10px;
    }
    
    .footer-links li:last-child {
        border-bottom: none;
    }
    
    .footer-social {
        gap: 15px;
        margin-top: 5px;
    }
    
    .social-link {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }
    
    .partner-logo {
        max-width: 140px;
        margin-bottom: 10px;
    }
    
    .footer-partner {
        gap: 10px;
        padding: 15px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .footer-partner:last-child {
        border-bottom: none;
    }
    
    .footer-partner strong {
        font-size: 1.1rem;
    }
    
    .footer-partner-desc {
        font-size: 0.95rem;
    }
    
    .footer-text {
        font-size: 1rem;
        margin-bottom: 18px;
    }
    
    .footer-bottom {
        padding-top: 25px;
    }
    
    .footer-legal {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-legal p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .footer-legal-links {
        justify-content: center;
        gap: 15px;
    }
    
    .footer-legal-links a {
        font-size: 0.95rem;
        padding: 8px 0;
    }
    
    .partnership-logo-main {
        max-width: 160px;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-grid {
        gap: 30px;
    }
    
    .footer-title {
        font-size: 1.2rem;
    }
    
    .footer-links a {
        font-size: 1rem;
    }
    
    .partner-logo {
        max-width: 130px;
    }
    
    .social-link {
        width: 46px;
        height: 46px;
    }
}

/* === Scroll to Top === */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-hover);
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--primary-red-dark);
    transform: translateY(-5px);
}

/* === WhatsApp Floating Button === */
.whatsapp-float {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: var(--transition);
    text-decoration: none;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    background: #20BA5A;
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-float .whatsapp-tooltip {
    position: absolute;
    right: 75px;
    background: #25D366;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 0.9rem;
    font-family: 'Open Sans', sans-serif;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.whatsapp-float .whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 8px solid #25D366;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7);
    }
}

/* === Call Button Mobile === */
.call-button-mobile {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-hover);
    z-index: 1000;
    transition: var(--transition);
    text-decoration: none;
}

.call-button-mobile:hover {
    background: var(--primary-red-dark);
    transform: scale(1.1);
}

/* === Animations === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.fade-in-left {
    animation: fadeInLeft 0.8s ease forwards;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease forwards;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* === Responsive Design === */
@media (max-width: 1024px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    .hero-title { font-size: 2.5rem; }
    
    .hero-container,
    .two-column-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-visual {
        justify-content: center;
    }
    
    .partnership-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        box-shadow: var(--shadow-hover);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        gap: 0;
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
        padding: 15px 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin-top: 10px;
        padding-left: 20px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav-dropdown.active .dropdown-menu {
        max-height: 500px;
    }
    
    .nav-cta {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .hero-cta .btn {
        width: 100%;
    }
    
    .services-grid,
    .ambiti-grid {
        grid-template-columns: 1fr;
    }
    
    .column-stats {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cta-title {
        font-size: 1.8rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-legal {
        flex-direction: column;
        text-align: center;
    }
    
    .testimonial-card {
        padding: 30px 20px;
    }
    
    .testimonial-text {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    /* Typography */
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .section-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    body {
        font-size: 16px;
        line-height: 1.7;
    }
    
    p {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 16px;
    }
    
    /* Buttons */
    .btn {
        padding: 14px 26px;
        font-size: 1rem;
        min-height: 48px;
    }
    
    .btn-large {
        padding: 16px 32px;
        font-size: 1.05rem;
        min-height: 52px;
    }
    
    /* Cards and sections */
    .section {
        padding: 45px 0;
    }
    
    .container {
        padding: 0 18px;
    }
    
    .partnership-grid {
        grid-template-columns: 1fr;
    }
    
    .partnership-card {
        padding: 30px 22px;
    }
    
    .service-card,
    .ambito-card,
    .value-card {
        padding: 28px 20px;
    }
    
    .service-card h3,
    .ambito-card h4 {
        font-size: 1.2rem;
        line-height: 1.4;
    }
    
    .service-description,
    .ambito-card p {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    /* Hero optimizations */
    .hero {
        padding: 90px 0 50px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 12px;
    }
    
    .hero-cta .btn {
        width: 100%;
        padding: 16px 20px;
    }
    
    /* Section headers */
    .section-header {
        margin-bottom: 35px;
    }
    
    .section-badge {
        font-size: 0.85rem;
        padding: 7px 16px;
    }
    
    .section-subtitle {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    /* Floating buttons */
    .whatsapp-float,
    .scroll-to-top {
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
    }
    
    .whatsapp-float {
        bottom: 92px;
        right: 16px;
    }
    
    .scroll-to-top {
        bottom: 16px;
        right: 16px;
    }
    
    .call-button-mobile {
        display: flex;
        width: 52px;
        height: 52px;
        bottom: 16px;
        left: 16px;
        font-size: 1.4rem;
    }
    
    .whatsapp-tooltip {
        display: none !important;
    }
    
    /* Lists */
    .checkmark-list li {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: 28px 20px;
    }
    
    .testimonial-text {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    /* Stats and info */
    .stat-card {
        padding: 25px 18px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

/* === Mobile-Specific Improvements === */
@media (max-width: 768px) {
    /* Better touch targets */
    .btn,
    .nav-link,
    .faq-question,
    .blog-link,
    .service-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Improved spacing for mobile */
    .section {
        padding: 50px 0;
    }
    
    .container {
        padding: 0 20px;
    }
    
    /* Better typography on mobile */
    body {
        font-size: 16px;
        line-height: 1.7;
    }
    
    h1 {
        font-size: 2rem;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    h2 {
        font-size: 1.75rem;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    h3 {
        font-size: 1.4rem;
        line-height: 1.4;
        margin-bottom: 12px;
    }
    
    h4 {
        font-size: 1.2rem;
        line-height: 1.4;
    }
    
    p {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 15px;
    }
    
    /* Better form on mobile */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents iOS zoom */
        padding: 16px 15px;
    }
    
    .form-group label {
        font-size: 1rem;
        margin-bottom: 10px;
        font-weight: 600;
    }
    
    /* Mobile-optimized cards */
    .service-card,
    .ambito-card,
    .value-card {
        padding: 30px 20px;
        margin-bottom: 15px;
    }
    
    .service-card h3,
    .ambito-card h4,
    .value-card h3 {
        font-size: 1.25rem;
        margin-bottom: 12px;
    }
    
    .service-description,
    .ambito-card p,
    .value-card p {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    /* Call button for mobile only */
    .call-button-mobile {
        display: flex;
    }
    
    /* WhatsApp tooltip hidden on mobile */
    .whatsapp-float .whatsapp-tooltip {
        display: none;
    }
    
    /* Better hero on mobile */
    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }
    
    .hero-badge {
        font-size: 0.85rem;
        padding: 8px 18px;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 1.05rem;
        line-height: 1.6;
    }
    
    /* Improved navigation for mobile */
    .nav-menu {
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-menu li {
        padding: 12px 0;
    }
    
    .nav-link {
        font-size: 1.05rem;
    }
    
    /* Better section headers */
    .section-badge {
        font-size: 0.9rem;
        padding: 6px 16px;
    }
    
    .section-title {
        font-size: 1.85rem;
        line-height: 1.3;
    }
    
    .section-subtitle {
        font-size: 1.05rem;
        line-height: 1.7;
    }
    
    /* Better buttons */
    .btn {
        font-size: 1rem;
        padding: 14px 28px;
        min-height: 48px;
    }
    
    .btn-large {
        font-size: 1.05rem;
        padding: 16px 32px;
        min-height: 52px;
    }
    
    /* Better tables on mobile */
    table {
        font-size: 0.95rem;
    }
    
    /* Improved testimonials on mobile */
    .testimonial-card {
        padding: 30px 20px;
    }
    
    .testimonial-text {
        font-size: 1.05rem;
        line-height: 1.7;
    }
    
    .testimonial-author strong {
        font-size: 1.05rem;
    }
    
    .testimonial-author span {
        font-size: 0.95rem;
    }
    
    /* Better slider controls */
    .slider-controls {
        margin-top: 30px;
        gap: 15px;
    }
    
    .slider-btn {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
    
    /* Better lists */
    .checkmark-list li {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 12px;
    }
    
    .checkmark-list i {
        font-size: 1.2rem;
    }
    
    /* Better service blocks */
    .service-block {
        padding: 30px 20px;
    }
    
    .service-block h3 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .service-block p,
    .service-block li {
        font-size: 1rem;
        line-height: 1.7;
    }
}

/* === Tablet Specific === */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        max-width: 750px;
    }
    
    .hero-container {
        gap: 40px;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === Large Mobile Specific === */
@media (min-width: 481px) and (max-width: 767px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
}