/**
 * Modern Restyling 2024 - Punto Servizi Ciampino
 * Design moderno con gradient, card, animazioni
 * Created: 2025-10-15
 */

/* ===================================
   FLEXSLIDER HOMEPAGE - COMPACT VERSION
==================================== */

#slider.sl {
    margin-bottom: 0;
    padding: 0;
}

#slider.sl .flexslider {
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

#slider.sl .flexslider .slides > li {
    position: relative;
    height: 380px;
    overflow: hidden;
}

#slider.sl .flexslider .slides > li img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    object-position: center;
}

#slider.sl .da-slide {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    z-index: 10;
    max-width: 600px;
    text-align: left;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 50px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

#slider.sl .da-slide h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #5380BD;
    margin-bottom: 15px;
    line-height: 1.2;
}

#slider.sl .da-slide p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

#slider.sl .da-slide .da-link {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #5380BD, #4EC899);
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#slider.sl .da-slide .da-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(83, 128, 189, 0.4);
}

/* Navigation arrows */
#slider.sl .flex-direction-nav a {
    width: 50px;
    height: 50px;
    line-height: 50px;
    background: rgba(83, 128, 189, 0.8);
    opacity: 0.8;
    transition: all 0.3s ease;
}

#slider.sl .flex-direction-nav a:hover {
    background: rgba(83, 128, 189, 1);
    opacity: 1;
}

#slider.sl .flex-direction-nav .flex-prev {
    left: 20px;
}

#slider.sl .flex-direction-nav .flex-next {
    right: 20px;
}

/* Control nav (dots) */
#slider.sl .flex-control-nav {
    bottom: 20px;
}

#slider.sl .flex-control-paging li a {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid #fff;
}

#slider.sl .flex-control-paging li a.flex-active {
    background: #5380BD;
    border-color: #5380BD;
}

/* Responsive */
@media (max-width: 992px) {
    #slider.sl .flexslider .slides > li,
    #slider.sl .flexslider .slides > li img {
        height: 350px;
    }

    #slider.sl .da-slide {
        left: 5%;
        max-width: 90%;
        padding: 30px 35px;
    }

    #slider.sl .da-slide h2 {
        font-size: 2rem;
    }

    #slider.sl .da-slide p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    #slider.sl .flexslider .slides > li,
    #slider.sl .flexslider .slides > li img {
        height: 300px;
    }

    #slider.sl .da-slide {
        padding: 25px;
    }

    #slider.sl .da-slide h2 {
        font-size: 1.6rem;
    }

    #slider.sl .da-slide p {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    #slider.sl .da-slide .da-link {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
}

/* ===================================
   MODERN HERO SECTION
==================================== */

.hero-modern {
    background: linear-gradient(135deg, #5380BD 0%, #4EC899 100%);
    position: relative;
    overflow: hidden;
    padding: 50px 0;
    color: #fff;
}

.hero-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="hero-pattern" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23hero-pattern)"/></svg>');
    pointer-events: none;
    z-index: 1;
}

.hero-modern .container {
    position: relative;
    z-index: 2;
}

.hero-modern h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    line-height: 1.2;
}

.hero-modern .subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 8px;
    font-weight: 400;
}

.hero-modern .tagline {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 20px;
    font-weight: 300;
}

/* Hero CTA Buttons */
.hero-cta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 15px;
}

.hero-cta .btn-hero {
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.hero-cta .btn-hero-primary {
    background: #fff;
    color: #5380BD;
    border-color: #fff;
}

.hero-cta .btn-hero-primary:hover {
    background: transparent;
    color: #fff;
    border-color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.hero-cta .btn-hero-secondary {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

.hero-cta .btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    transform: translateY(-3px);
}

/* Responsive Hero */
@media (max-width: 768px) {
    .hero-modern {
        padding: 50px 0;
    }

    .hero-modern h1 {
        font-size: 2.2rem;
    }

    .hero-modern .subtitle {
        font-size: 1.1rem;
    }

    .hero-modern .tagline {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-cta .btn-hero {
        width: 100%;
        justify-content: center;
    }
}

/* ===================================
   MODERN SERVICE CARDS
==================================== */

.services-section {
    padding: 80px 0;
    background: #fff;
}

.services-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.services-section .lead {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 50px;
}

/* Modern Service Card */
.service-card {
    position: relative;
    background: #fff;
    border-radius: 15px;
    padding: 35px 25px;
    margin-bottom: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #5380BD, #4EC899);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(83, 128, 189, 0.25);
    border-color: rgba(83, 128, 189, 0.2);
}

.service-card .icon {
    margin-bottom: 25px;
    transition: transform 0.4s ease;
}

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

.service-card .icon i {
    color: #5380BD;
    transition: color 0.3s ease;
}

.service-card:hover .icon i {
    background: linear-gradient(135deg, #5380BD, #4EC899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.service-card .icon img {
    max-width: 100px;
    height: auto;
}

.service-card h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.service-card:hover h2 {
    color: #5380BD;
}

.service-card p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.service-card .btn-service {
    display: inline-block;
    padding: 10px 25px;
    background: linear-gradient(135deg, #5380BD, #4EC899);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

.service-card:hover .btn-service {
    opacity: 1;
    transform: translateY(0);
}

.service-card .btn-service:hover {
    box-shadow: 0 5px 15px rgba(83, 128, 189, 0.4);
    transform: translateY(-2px);
}

/* Badge "Più Richiesto" */
.service-card.popular {
    border-color: #FFB84D;
}

.service-card.popular::after {
    content: '★ Più Richiesto';
    position: absolute;
    top: 15px;
    right: -35px;
    background: linear-gradient(135deg, #FFB84D, #ff9900);
    color: #fff;
    padding: 5px 40px;
    font-size: 0.75rem;
    font-weight: 700;
    transform: rotate(45deg);
    box-shadow: 0 2px 8px rgba(255, 184, 77, 0.4);
}

/* ===================================
   STICKY HEADER WITH BLUR
==================================== */

header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

header.sticky .navbar {
    min-height: 70px;
}

header.sticky .navbar-brand {
    margin-top: 15px;
    transition: all 0.3s ease;
}

header.sticky .navbar-nav > li {
    padding-top: 20px;
    padding-bottom: 20px;
}

/* Sticky Header - Mobile Optimization */
@media (max-width: 768px) {
    header.sticky .navbar {
        min-height: 60px;
    }

    header.sticky .navbar-brand {
        margin-top: 10px;
        font-size: 14px;
    }

    header.sticky .navbar-brand img {
        width: 70px !important;
    }

    header.sticky .navbar-brand .big {
        font-size: 18px;
    }

    header.sticky .navbar-brand .low {
        font-size: 14px;
    }

    header.sticky .navbar-nav > li {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    header.sticky .top {
        display: none;
    }

    /* Fix navbar-brand normale su mobile */
    .navbar-brand {
        font-size: 16px !important;
        white-space: nowrap;
        display: flex !important;
        align-items: center;
        gap: 8px;
    }

    .navbar-brand img {
        flex-shrink: 0;
    }

    .navbar-brand .big {
        font-size: 20px !important;
    }

    .navbar-brand .low {
        font-size: 16px !important;
    }
}

/* ===================================
   WHATSAPP FLOATING BUTTON
==================================== */

.whatsapp-float {
    position: fixed;
    top: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    z-index: 9998;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.7);
    color: #fff;
    text-decoration: none;
}

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

@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 90px;
        right: 15px;
        top: auto;
        z-index: 9997;
    }
}

/* Z-index per evitare sovrapposizioni */
.scrollup {
    z-index: 9996 !important;
}

/* Fix per schermi pieghevoli tipo Z Fold */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 90%;
    }

    .hero-modern h1 {
        font-size: 2.2rem;
    }

    .services-section h2 {
        font-size: 2rem;
    }

    .service-card {
        padding: 25px 20px;
    }

    header.sticky .navbar-brand img {
        width: 100px !important;
    }
}

/* ===================================
   MODERN FOOTER
==================================== */

footer.modern-footer {
    background: linear-gradient(135deg, #5380BD 0%, #4a7bb3 100%);
    color: #fff;
    padding: 60px 0 0;
}

footer.modern-footer h4 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 25px;
    font-size: 1.3rem;
}

footer.modern-footer a {
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.3s ease;
}

footer.modern-footer a:hover {
    color: #fff;
    text-decoration: none;
    transform: translateX(5px);
    display: inline-block;
}

footer.modern-footer .quick-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer.modern-footer .quick-links li {
    margin-bottom: 12px;
}

footer.modern-footer .quick-links li a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

footer.modern-footer .quick-links li a::before {
    content: '→';
    transition: transform 0.3s ease;
}

footer.modern-footer .quick-links li a:hover::before {
    transform: translateX(5px);
}

footer.modern-footer .social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

footer.modern-footer .social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

footer.modern-footer .social-icons a:hover {
    background: #4EC899;
    transform: translateY(-5px);
}

footer.modern-footer .map-container {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

footer.modern-footer .map iframe {
    width: 100%;
    height: 300px;
    border: none;
}

/* Footer Bottom */
#sub-footer.modern {
    background: rgba(0, 0, 0, 0.2);
    padding: 25px 0;
    margin-top: 50px;
}

/* ===================================
   MODERN TYPOGRAPHY & SPACING
==================================== */

body {
    letter-spacing: 0.3px;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.5px;
}

.text-gradient {
    background: linear-gradient(135deg, #5380BD, #4EC899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===================================
   MICRO-ANIMATIONS
==================================== */

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth Transitions */
a, button, .btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   UTILITY CLASSES
==================================== */

.section-padding {
    padding: 80px 0;
}

.gradient-bg {
    background: linear-gradient(135deg, #5380BD 0%, #4EC899 100%);
}

.shadow-sm {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.shadow-md {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.shadow-lg {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* ===================================
   SMOOTH SCROLL
==================================== */

html {
    scroll-behavior: smooth;
}

/* ===================================
   RESPONSIVE FIXES
==================================== */

/* Fix per schermi molto grandi (>1400px) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Fix per tablet landscape e pieghevoli */
@media (min-width: 768px) and (max-width: 991px) {
    body {
        font-size: 15px;
    }

    .service-card h2 {
        font-size: 1.2rem;
    }

    .service-card p {
        font-size: 0.9rem;
    }
}
