/* ==============================================
   PAMASOFT CUSTOM STYLES - Spacing & SEO Optimization
   ============================================== */

/* Footer Newsletter Subscribe Box - Ridotta altezza */
.footer-area .subscribe-box {
    min-height: auto !important;
    padding: 8px !important;
}

.footer-area .subscribe-box input[type="email"] {
    height: 50px !important;
    padding: 12px 20px !important;
}

.footer-area .subscribe-box .theme-btn {
    height: 50px !important;
    padding: 0 24px !important;
}

/* Hero Section Spacing and Alignment Fixes */
.hero-empowerment-area {
    padding-top: 60px !important; /* Ridotto spazio tra header e hero */
    padding-bottom: 40px !important; /* Ridotto spazio sotto l'hero section */
    margin-bottom: 0 !important; /* Rimosso margin aggiuntivo */
}

.hero-empowerment-left-content {
    padding-top: 0 !important;
    margin-top: -30px; /* Sposta il contenuto verso l'alto */
}

/* Client/Logo Section Spacing Fix */
.client-area {
    padding: 30px 0 !important; /* Ulteriormente ridotto padding del carosello loghi */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Mobile Responsive Fixes */
@media (max-width: 991px) {
    /* Nascondi completamente il div destro dell'hero su mobile */
    .hero-empowerment-area .hero-empowerment-right-content {
        display: none !important;
    }
    
    /* Centra il contenuto left su mobile */
    .hero-empowerment-area .hero-empowerment-left-content {
        margin-top: 0 !important;
        padding-top: 0 !important;
        text-align: center;
    }
    
    /* Riduce ulteriormente padding hero su mobile */
    .hero-empowerment-area {
        padding-top: 40px !important;
        padding-bottom: 30px !important;
    }
    
    /* Fix spacing e dimensioni card con icone su mobile */
    .service-card {
        padding: 25px 18px !important; /* Ulteriormente ridotto padding interno per card più compatte */
        margin-bottom: 15px !important; /* Ridotto spazio tra le card */
        min-height: auto !important; /* Permetti altezze variabili su mobile */
    }
    
    .service-card img {
        width: 52px !important; /* Icone leggermente più grandi */
        height: 52px !important;
        margin-bottom: 12px !important;
    }
    
    /* Font Awesome icons nelle card */
    .service-card .fas,
    .service-card .fab,
    .service-card .service-icon {
        font-size: 52px !important;
        margin-bottom: 12px !important;
    }
    
    .service-card h3 {
        font-size: 21px !important; /* Titoli leggermente più grandi */
        margin-bottom: 8px !important;
        line-height: 1.25 !important;
    }
    
    .service-card p {
        font-size: 16px !important; /* Testi più grandi per migliore leggibilità */
        line-height: 1.45 !important;
        margin-bottom: 12px !important;
    }
    
    .service-card .theme-simple-btn {
        font-size: 15px !important;
        padding: 8px 16px !important;
    }
    
    /* Ridotto gap nella griglia delle card su mobile */
    .services-list {
        gap: 15px !important; /* Ulteriormente ridotto da 20px a 15px */
        row-gap: 15px !important;
    }
    
    .services-list .service-card {
        padding: 25px 18px !important;
        margin-bottom: 0 !important; /* Rimuovi margin perché usiamo gap */
    }
    
    /* Fix per le card nelle pagine interne (servizi, industry) */
    .service-area .services-list,
    .services-page .services-list {
        gap: 15px !important;
        row-gap: 15px !important;
    }
    
    .service-area .service-card,
    .services-page .service-card {
        padding: 25px 18px !important;
        margin-bottom: 0 !important;
    }
}

/* Ottimizzazioni aggiuntive per schermi molto piccoli (mobile portrait) */
@media (max-width: 576px) {
    /* Card ancora più compatte su schermi piccoli */
    .service-card {
        padding: 22px 16px !important;
    }
    
    .service-card h3 {
        font-size: 20px !important;
    }
    
    .service-card p {
        font-size: 15px !important;
    }
    
    /* Ulteriore riduzione dei gap per mobile portrait */
    .services-list {
        gap: 12px !important;
        row-gap: 12px !important;
    }
    
    .service-area .services-list,
    .services-page .services-list {
        gap: 12px !important;
        row-gap: 12px !important;
    }
}

/* Mobile Menu Icons Visibility Fix */
@media (max-width: 991px) {
    /* Burger menu icon - FORCE VISIBILITY */
    .header-area .header-left .menu-bar,
    .header-area .header-left-right .menu-bar {
        display: block !important;
        width: 53px !important;
        height: 53px !important;
        text-align: center !important;
        line-height: 53px !important;
        background: transparent !important;
        border-radius: 8px !important;
        border: 1px solid rgba(28, 28, 28, 0.1) !important;
        font-size: 26px !important;
        color: #1c1c1c !important;
        cursor: pointer !important;
        transition: 0.3s !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .header-area .header-left .menu-bar i,
    .header-area .header-left-right .menu-bar i {
        display: inline-block !important;
        font-size: 26px !important;
        color: #1c1c1c !important;
    }
    
    /* Close menu icon - FORCE VISIBILITY */
    .header-area .navbar-wrapper .close-menu-bar {
        display: block !important;
        position: absolute !important;
        right: 80px !important;
        top: 20px !important;
        width: 45px !important;
        height: 45px !important;
        text-align: center !important;
        line-height: 45px !important;
        background: #fff !important;
        border-radius: 10px !important;
        border: 1px solid rgba(28, 28, 28, 0.1) !important;
        font-size: 20px !important;
        cursor: pointer !important;
        transition: 0.3s !important;
        color: #1c1c1c !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 9999 !important;
    }
    
    .header-area .navbar-wrapper .close-menu-bar i {
        display: inline-block !important;
        font-size: 20px !important;
        color: #1c1c1c !important;
    }
    
    /* Frecce dropdown menu mobile - FORCE VISIBILITY */
    .header-area .navbar-wrapper ul li .dropdown-menu-item-icon,
    .header-area .navbar-wrapper .dropdown-menu-item-icon {
        display: block !important;
        width: auto !important;
        height: auto !important;
        font-size: 18px !important;
        color: #1c1c1c !important;
        opacity: 1 !important;
        visibility: visible !important;
        cursor: pointer !important;
    }
    
    .header-area .navbar-wrapper ul li .dropdown-menu-item-icon i,
    .header-area .navbar-wrapper .dropdown-menu-item-icon i {
        display: inline-block !important;
        font-size: 18px !important;
        color: #1c1c1c !important;
    }
}

/* ==============================================
   LEGAL PAGES STYLES - Privacy & Terms
   ============================================== */

.legal-page {
    padding: 80px 0;
}

.legal-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.legal-content .last-updated {
    background: #f8f9fa;
    padding: 15px 20px;
    border-left: 4px solid var(--primary_color);
    margin-bottom: 40px;
    border-radius: 5px;
}

.legal-content h2 {
    color: #111;
    font-size: 28px;
    font-weight: 700;
    margin-top: 50px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary_color);
}

.legal-content h3 {
    color: #111;
    font-size: 22px;
    font-weight: 600;
    margin-top: 35px;
    margin-bottom: 15px;
}

.legal-content p {
    margin-bottom: 20px;
    text-align: justify;
}

.legal-content ul {
    margin-bottom: 25px;
    padding-left: 30px;
}

.legal-content ul li {
    margin-bottom: 12px;
    line-height: 1.7;
}

.legal-content a {
    color: var(--primary_color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.legal-content a:hover {
    color: #0056b3;
    text-decoration: none;
}

.legal-content strong {
    color: #111;
    font-weight: 600;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.legal-table thead {
    background: var(--primary_color);
    color: white;
}

.legal-table th,
.legal-table td {
    padding: 15px 20px;
    text-align: left;
    border: 1px solid #e9ecef;
}

.legal-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.legal-table tbody tr:hover {
    background: #e9ecef;
}

.legal-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
    text-align: center;
    color: #666;
}

.legal-footer p {
    margin-bottom: 10px;
    font-size: 14px;
}

.breadcrumb-section {
    background: linear-gradient(135deg, var(--primary_color) 0%, #0056b3 100%);
    padding: 80px 0 60px;
    margin-bottom: 0;
}

.breadcrumb-wrapper {
    text-align: center;
    color: white;
}

.breadcrumb-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
}

.breadcrumb-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-nav li {
    color: rgba(255,255,255,0.8);
    font-size: 16px;
}

.breadcrumb-nav li:not(:last-child)::after {
    content: "/";
    margin: 0 15px;
    color: rgba(255,255,255,0.5);
}

.breadcrumb-nav li a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb-nav li a:hover {
    opacity: 0.8;
}

.breadcrumb-nav li.active {
    color: white;
    font-weight: 600;
}

/* Responsive Legal Pages */
@media (max-width: 768px) {
    .legal-content {
        font-size: 15px;
    }
    
    .legal-content h2 {
        font-size: 24px;
    }
    
    .legal-content h3 {
        font-size: 20px;
    }
    
    .breadcrumb-title {
        font-size: 32px;
    }
    
    .legal-table {
        font-size: 14px;
    }
    
    .legal-table th,
    .legal-table td {
        padding: 10px;
    }
}

/* ==============================================
   END LEGAL PAGES STYLES
   ============================================== */

/* Testimonial cards - altezza fissa */
.testimonial-item-body {
    min-height: 450px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-item-body h1 {
    flex-grow: 0;
}

.testimonial-item-body p {
    flex-grow: 1;
}

.testimonial-item-body .author-box {
    margin-top: auto;
}

/* Nascondi immagine recensore */
.testimonial-item-body .author-box img {
    display: none !important;
}

.testimonial-item-body .author-box-content {
    margin-left: 0 !important;
}

/* Fix visibilità frecce carousel testimonianze */
.testimonial-slider-wrap .swiper-button-prev,
.testimonial-slider-wrap .swiper-button-next {
    z-index: 10 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 58px !important;
    height: 58px !important;
    border-radius: 50%;
    background: rgba(19, 81, 216, 0.1) !important;
    color: var(--primary_color) !important;
    transition: all 0.3s ease;
}

.testimonial-slider-wrap .swiper-button-prev:hover,
.testimonial-slider-wrap .swiper-button-next:hover {
    background: var(--primary_color) !important;
    color: white !important;
    transform: scale(1.1);
}

.testimonial-slider-wrap .swiper-button-prev {
    left: 20px;
}

.testimonial-slider-wrap .swiper-button-next {
    right: 20px;
}

.testimonial-slider-wrap .swiper-button-prev i,
.testimonial-slider-wrap .swiper-button-next i {
    font-size: 20px !important;
    display: block;
    line-height: 1;
}

/* Assicura che le frecce siano sopra il contenuto */
.testimonial-slider-wrap {
    position: relative;
    z-index: 1;
}

.testimonial-slider {
    overflow: visible !important;
}

/* Responsive - frecce più evidenti su mobile */
@media (max-width: 768px) {
    .testimonial-slider-wrap .swiper-button-prev,
    .testimonial-slider-wrap .swiper-button-next {
        width: 50px !important;
        height: 50px !important;
        background: var(--primary_color) !important;
        color: white !important;
    }
    
    .testimonial-slider-wrap .swiper-button-prev i,
    .testimonial-slider-wrap .swiper-button-next i {
        font-size: 18px !important;
    }
    
    .testimonial-slider-wrap .swiper-button-prev {
        left: 10px;
    }
    
    .testimonial-slider-wrap .swiper-button-next {
        right: 10px;
    }
}

/* ==============================================
   FORM STYLES - Phone Input & HTMX
   ============================================== */

/* Phone input wrapper */
.phone-input-wrapper {
    display: flex;
    gap: 10px;
    width: 100%;
}

.phone-input-wrapper .phone-prefix {
    flex: 0 0 150px;
    padding: 12px 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.phone-input-wrapper .phone-prefix:focus {
    outline: none;
    border-color: var(--primary_color);
}

.phone-input-wrapper input[type="tel"] {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.phone-input-wrapper input[type="tel"]:focus {
    outline: none;
    border-color: var(--primary_color);
}

/* HTMX Loading & Response Styles */
.htmx-indicator {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: text-bottom;
    border: 0.2em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.htmx-request .htmx-indicator {
    display: inline-block !important;
}

.htmx-request.htmx-indicator {
    display: inline-block !important;
}

/* Alert Notification Styles */
.alert-notification {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    animation: fadeIn 0.3s ease-in;
}

.alert-notification.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-notification.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-notification.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

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

/* Button loading state */
.theme-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form success animation */
.form-submitted {
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive phone input */
@media (max-width: 768px) {
    .phone-input-wrapper {
        flex-direction: column;
    }
    
    .phone-input-wrapper .phone-prefix {
        flex: 1;
        width: 100%;
    }
}

/* Input validation states */
.contact-form input.is-invalid,
.contact-form textarea.is-invalid,
.contact-form select.is-invalid {
    border-color: #dc3545 !important;
    background-color: #fff5f5;
}

.contact-form input.is-valid,
.contact-form textarea.is-valid,
.contact-form select.is-valid {
    border-color: #28a745 !important;
}

/* Button submitting state */
.theme-btn.submitting {
    opacity: 0.7;
    cursor: wait;
}

/* Character counter */
.char-counter {
    text-align: right;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    transition: color 0.3s ease;
}

/* ==============================================
   END FORM STYLES
   ============================================== */

/* Riduzione spaziamenti tra sezioni */
.hero-empowerment-area {
    padding: 120px 0 80px 0; /* Ridotto padding bottom */
}

.client-area {
    padding: 60px 0; /* Ridotto da default */
}

.how-we-do-area {
    padding: 80px 0; /* Ridotto da default */
}

.service-area {
    padding: 80px 0; /* Ridotto da default */
}

.case-studio-area {
    padding: 80px 0; /* Ridotto da default */
}

.about-area {
    padding: 80px 0; /* Ridotto da default */
}

.testimonial-area {
    padding: 80px 0; /* Ridotto da default */
}

.project-area {
    padding: 80px 0; /* Ridotto da default */
}

.news-area {
    padding: 80px 0; /* Ridotto da default */
}

.feature-area {
    padding: 80px 0; /* Ridotto da default */
}

.contact-area {
    padding: 80px 0; /* Ridotto da default */
}

/* Responsive spacing adjustments */
@media (max-width: 768px) {
    .hero-empowerment-area {
        padding: 80px 0 60px 0;
    }
    
    .client-area,
    .how-we-do-area,
    .service-area,
    .case-studio-area,
    .about-area,
    .testimonial-area,
    .project-area,
    .news-area,
    .feature-area,
    .contact-area {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .hero-empowerment-area {
        padding: 60px 0 40px 0;
    }
    
    .client-area,
    .how-we-do-area,
    .service-area,
    .case-studio-area,
    .about-area,
    .testimonial-area,
    .project-area,
    .news-area,
    .feature-area,
    .contact-area {
        padding: 40px 0;
    }
}

/* Miglioramenti SEO e UX */
.section-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #333;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.75rem;
    }
}

.section-subtitle {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    color: #667eea;
}

/* Miglioramenti per le card dei servizi */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px;
    padding: 2rem;
    height: 350px; /* Altezza fissa */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Fix altezza card nella pagina Servizi overview */
.services-page .service-area .service-card {
    height: 420px !important;
    min-height: 420px;
}

.services-page .service-area .service-card p {
    flex-grow: 1;
    margin-bottom: 1rem;
}

.services-page .service-area .service-card > div {
    margin-top: auto !important;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* Margini per icone nelle card */
.service-card .service-icon {
    margin-top: 0 !important;
    margin-bottom: 2rem !important;
    color: var(--primary_color);
}

.service-card h3 {
    margin-bottom: 1rem;
    flex-grow: 0;
}

.service-card p {
    flex-grow: 1;
    margin-bottom: 1rem;
}

/* Card servizi nelle pagine interne - ESCLUDO quelle della homepage */
.service-area .how-we-do-card,
.about-area .how-we-do-card {
    height: 280px !important;
    display: flex;
    flex-direction: column;
}

.service-area .how-we-do-card-inner,
.about-area .how-we-do-card-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.service-area .how-we-do-card-inner .icon,
.about-area .how-we-do-card-inner .icon {
    margin-top: 0 !important;
    margin-bottom: 1.5rem !important;
}

.service-area .how-we-do-card-inner h3,
.about-area .how-we-do-card-inner h3 {
    margin-bottom: 1rem;
    flex-grow: 0;
}

.service-area .how-we-do-card-inner p,
.about-area .how-we-do-card-inner p {
    flex-grow: 1;
}

/* Ripristino le card originali della sezione "Come Operiamo" */
.how-we-do-area .how-we-do-card {
    height: auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
}

.how-we-do-area .how-we-do-card .how-we-do-icon {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-right: 1rem !important;
    flex-shrink: 0 !important;
}

.how-we-do-area .how-we-do-card .how-we-do-content {
    flex-grow: 1 !important;
}

.how-we-do-area .how-we-do-card .how-we-do-content h4 {
    margin-bottom: 0.25rem !important;
    flex-grow: initial !important;
}

.how-we-do-area .how-we-do-card .how-we-do-content p {
    flex-grow: initial !important;
    margin-bottom: 0 !important;
}

/* Ottimizzazioni per le immagini */
img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Altezza fissa per immagini blog in homepage */
.news-area .news-items .news-item .news-img-box img,
.news-area .sticky-news .news-img-box img {
    height: 250px;
    object-fit: cover;
    width: 100%;
}

.news-area .sticky-news .news-img-box img {
    height: 400px;
}

/* Card blog con altezza fissa */
.news-area .news-items .news-item {
    height: 450px;
    display: flex;
    flex-direction: column;
}

.news-area .news-items .news-item .news-item-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-area .news-items .news-item .news-item-body h1 {
    flex-grow: 0;
    margin-bottom: 1rem;
}

.news-area .news-items .news-item .news-item-body p {
    flex-grow: 1;
    margin-bottom: 1rem;
}

/* Roadmap spacing fix */
.case-studio-body {
    gap: 2rem;
}

.case-studio-body .left,
.case-studio-body .right {
    flex: 1;
}

.case-studio-img-card {
    margin-bottom: 1.5rem !important;
}

.case-studio-img-card .number {
    margin-bottom: 1rem !important;
}

/* Miglioramenti per i bottoni */
.theme-btn, .theme-btn2 {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.theme-btn:hover, .theme-btn2:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Fix per hover effect - copre tutto il pulsante invece di creare ellisse */
.theme-btn2::after,
.theme-btn2::before,
.theme-btn::after,
.theme-btn::before {
    width: 100% !important;
    border-radius: 8px !important;
}

.theme-btn2::after,
.theme-btn::after {
    border-radius: 8px !important;
}

/* Miglioramenti responsive per il menu */
@media (max-width: 991px) {
    .navbar-wrapper {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: white;
        z-index: 9999;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }
    
    .navbar-wrapper.active {
        right: 0;
    }
}

/* Dropdown menu active state */
.dropdown-menu.active {
    opacity: 1 !important;
    visibility: visible !important;
    top: 100% !important;
}

/* Accessibilità: focus visibile */
.menu-bar:focus,
.close-menu-bar:focus,
.dropdown-menu-item-icon:focus {
    outline: 2px solid #1351D8;
    outline-offset: 2px;
}

/* Stile per button menu (era span) */
.menu-bar,
.close-menu-bar,
.dropdown-menu-item-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: inherit;
    font: inherit;
}

/* Miglioramenti per la leggibilità */
p {
    line-height: 1.6;
    color: #666;
    margin-bottom: 1rem;
}

/* Ottimizzazioni per Core Web Vitals */
.fade-in {
    animation: fadeIn 0.8s ease-in;
}

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

.bounce-in {
    animation: bounceIn 1s ease-out;
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

/* Miglioramenti per l'accessibilità */
.theme-btn:focus,
.theme-btn2:focus,
a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Skip to content per accessibilità */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #667eea;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 4px;
}

.skip-to-content:focus {
    top: 6px;
}

/* Ottimizzazioni per il loading delle immagini */
.loading-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==============================================
   NUOVI STILI AVANZATI - Blog, Portfolio, Modern UI
   ============================================== */

/* Blog Moderno - Card Stile Magazine */
.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.blog-card-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card:hover .blog-card-overlay {
    opacity: 1;
}

.blog-card-overlay i {
    color: white;
    font-size: 2rem;
}

.blog-card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.blog-card-category {
    background: linear-gradient(135deg, var(--primary_color), #5a67d8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card-date {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: #333;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    color: var(--primary_color);
}

.blog-card-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.blog-card-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.blog-card-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #f1f5f9;
}

.blog-card-author-info h6 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.blog-card-author-info p {
    margin: 0;
    font-size: 0.8rem;
    color: #666;
}

.blog-card-read-more {
    background: linear-gradient(135deg, var(--primary_color), #5a67d8);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-card-read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
    color: white;
}

/* Portfolio Cards */
.portfolio-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.portfolio-img {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portfolio-card:hover .portfolio-img img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0,0,0,0.7), rgba(0,0,0,0.5));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay a {
    background: white;
    color: #333;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.portfolio-overlay a:hover {
    background: var(--primary_color);
    color: white;
    transform: scale(1.1);
}

.portfolio-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

.portfolio-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.portfolio-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.portfolio-stats span {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #475569;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Sezioni Moderne */
.modern-section {
    position: relative;
    overflow: hidden;
}

.modern-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.02), rgba(118, 75, 162, 0.02));
    pointer-events: none;
}

.section-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23667eea' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

/* Hero Moderno */
.hero-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpolygon points='50 0 60 40 100 50 60 60 50 100 40 60 0 50 40 40'/%3E%3C/g%3E%3C/svg%3E");
    animation: float 20s ease-in-out infinite;
}

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

/* Stats Moderni */
.stats-modern {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.stats-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.stats-modern .number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary_color), #5a67d8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stats-modern .label {
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

/* Testimonial Moderni */
.testimonial-modern {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    transition: all 0.3s ease;
}

.testimonial-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.testimonial-modern::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 2rem;
    font-size: 4rem;
    color: var(--primary_color);
    opacity: 0.3;
    font-family: serif;
}

.testimonial-modern .content {
    font-style: italic;
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.testimonial-modern .author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-modern .author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid var(--primary_color);
}

.testimonial-modern .author-info h6 {
    margin: 0;
    font-weight: 600;
    color: #333;
}

.testimonial-modern .author-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* CTA Moderni */
.cta-modern {
    background: linear-gradient(135deg, var(--primary_color), #5a67d8);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: float 15s ease-in-out infinite;
}

.cta-modern .content {
    position: relative;
    z-index: 2;
}

.cta-modern h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-modern p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.cta-modern .btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-modern .btn-white {
    background: white;
    color: var(--primary_color);
    padding: 1rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-modern .btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    color: var(--primary_color);
}

.cta-modern .btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 1rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-modern .btn-outline:hover {
    background: white;
    color: var(--primary_color);
    transform: translateY(-2px);
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .blog-card-content,
    .portfolio-content {
        padding: 1.5rem;
    }
    
    .blog-card-title,
    .portfolio-content h3 {
        font-size: 1.2rem;
    }
    
    .stats-modern .number {
        font-size: 2.5rem;
    }
    
    .cta-modern h2 {
        font-size: 2rem;
    }
    
    .cta-modern .btn-group {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-modern .btn-white,
    .cta-modern .btn-outline {
        width: 100%;
        max-width: 300px;
    }
}

/* Animazioni Avanzate */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

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

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

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

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

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

/* Hover Effects Avanzati */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.hover-scale {
    transition: all 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
}
