:root {
    --primary-red: #e30613;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ==================== CONTAINER RESPONSIVE ==================== */
.container {
    max-width: 85% !important;
    /* Aumentato da 80% per non strozzare su mobile */
}

@media (max-width: 768px) {
    .container {
        max-width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* ==================== MODERNA NAVBAR CORRETTA ==================== */
.navbar {
    background-color: #111111 !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    z-index: 1040 !important;
    /* Numero massimo per stare sopra a tutto */
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    font-size: 0.95rem;
    margin: 0 12px;
    position: relative;
    padding: 8px 0 !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-red) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--primary-red);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 80%;
}

/* Hamburger Button Moderno */
.navbar-toggler {
    border: none;
    padding: 0;
    outline: none;
    position: relative;
    z-index: 1041;
    /* Sopra al navbar-collapse */
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-collapse {
    overflow: hidden;
    margin-top: 15px;
}

/* Hero Section */
.hero {
    background-image: linear-gradient(to right, rgba(17, 17, 17, 0.95) 0%, rgba(17, 17, 17, 0.8) 40%, rgba(17, 17, 17, 0.1) 100%),
        url(../images/header.jpg);
    background-size: cover;
    background-position: top;
    min-height: 85vh;
    display: flex;
    align-items: center;
    border-bottom: 3px solid #222;
    padding-top: 80px;
    /* Padding iniziale per non coprire col menù fisso */
}

.hero h1 {
    font-family: impact, "Arial Black", sans-serif;
    letter-spacing: 0.5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero p {
    font-size: 1.15rem;
    color: #f0f0f0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* Pulsanti Hero */
.btn-hero-red {
    background: linear-gradient(to bottom, #d81b21, #a81015);
    border: 1px solid #7d080c;
    color: white;
    border-radius: 2px;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.btn-hero-red:hover {
    background: linear-gradient(to bottom, #f01e25, #c21318);
    color: white;
    transform: translateY(-2px);
}

.btn-hero-outline {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #ffffff;
    color: white;
    border-radius: 2px;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.btn-hero-outline:hover {
    background: #ffffff;
    color: #000;
    transform: translateY(-2px);
}

/* Chi Siamo Cards */
.about-feature-box {
    background-color: #f8f9fa;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    padding: 2rem 1.5rem;
    transition: all 0.3s ease;
    height: 100%;
    border-bottom: 3px solid transparent;
}

.about-feature-box:hover {
    background-color: #fff;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    border-bottom: 3px solid var(--primary-red);
    transform: translateY(-5px);
}

.about-feature-box i {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.about-feature-box h5 {
    font-weight: 800;
    font-size: 1.1rem;
    color: #111;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
}

.about-feature-box p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* Flip Cards Servizi */
#servizi {
    background-image: linear-gradient(to right, rgba(17, 17, 17, 0.95) 0%, rgba(17, 17, 17, 0.8) 40%, rgba(17, 17, 17, 0.1) 100%), url(../images/cosa_facciamo.jpg);
    background-size: cover;
    background-position: center;
}

.flip-card-container {
    background-color: transparent;
    height: 260px;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card-container:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.flip-card-front {
    background-color: #161616;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.06'/%3E%3C/svg%3E");
    border: 1px solid #2d2d2d;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
}

.flip-card-back {
    background: linear-gradient(135deg, var(--primary-red), #9e0b13);
    color: white;
    transform: rotateY(180deg);
    box-shadow: 0 15px 25px rgba(227, 6, 19, 0.3);
    border: 1px solid #ff333f;
}

/* Titoli Sezioni */
.section-slash {
    color: var(--primary-red);
    font-style: italic;
    font-weight: 900;
    margin-right: 12px;
    transform: skewX(-15deg);
    display: inline-block;
}

.section-title {
    position: relative;
    display: inline-block;
}

.title-line {
    flex-grow: 1;
    height: 1px;
    background-color: #dcdcdc;
    margin-left: 20px;
}

.title-line01 {
    flex-grow: 1;
    height: 1px;
    background-color: #dcdcdc;
    margin-right: 20px;
}

/* Prodotti Icone */
#richiedi-info {
    background-image: linear-gradient(to right, rgba(17, 17, 17, 0.95) 0%, rgba(17, 17, 17, 0.8) 40%, rgba(17, 17, 17, 0.1) 100%), url(../images/richiedi_info.jpg);
    background-size: cover;
    background-position: center;
}

.product-icon {
    font-size: 3.5rem;
    color: #111;
    transition: all 0.3s ease;
}

.product-icon:hover {
    color: var(--primary-red);
    transform: scale(1.15);
}

/* Lista */
.custom-check-list li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.custom-check-list li p {
    color: #fff !important;
}

/* Form Modificati */
.custom-form-wrapper {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.custom-form-wrapper h4 {
    color: #fff;
    font-weight: bold;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
    margin-bottom: 25px;
    font-size: 1.6rem;
}

.custom-label {
    color: #e0e0e0;
    font-size: 0.85rem;
    margin-bottom: 4px;
    font-weight: 500;
}

.custom-input {
    background-color: #111 !important;
    border: 1px solid #333 !important;
    color: #fff !important;
    border-radius: 2px;
    padding: 10px 12px;
}

.custom-input:focus {
    border-color: var(--primary-red) !important;
    box-shadow: none !important;
}

.btn-gradient-red {
    background: linear-gradient(to bottom, #e30613, #a1000b);
    border: 1px solid #850009;
    color: white;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-gradient-red:hover {
    background: linear-gradient(to bottom, #f01421, #b8000d);
    color: white;
}

.custom-checkbox-text {
    color: #ccc;
    font-size: 0.85rem;
    line-height: 1.4;
}

.form-check-input:checked {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
}

/* ==================== CAROSELLO TESTIMONIALS MODERNO ==================== */
.testimonial-section {
    position: relative;
    overflow: hidden;
}

.testimonial-carousel {
    position: relative;
    padding-top: 1rem;
}

.testimonial-slide {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(227, 6, 19, 0.1);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Distribuisce spazio uniformemente */
    min-height: 320px;
    /* Altezza minima FISSA per mantenere coerenza tra slide */
    position: relative;
}

.testimonial-slide::before {
    content: '"';
    position: absolute;
    top: 20px;
    right: 30px;
    font-family: Georgia, serif;
    font-size: 10rem;
    color: rgba(227, 6, 19, 0.04);
    line-height: 0;
    pointer-events: none;
}

.testimonial-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
    /* Non comprimere header */
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-red);
    margin-right: 1.5rem;
    box-shadow: 0 5px 20px rgba(227, 6, 19, 0.3);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.testimonial-slide:hover .testimonial-avatar {
    transform: scale(1.1);
}

.testimonial-stars {
    color: #ffc107;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.testimonial-stars .bi-star-fill {
    animation: pulse-gold 2s infinite;
}

@keyframes pulse-gold {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(0.95);
    }
}

.testimonial-quote {
    font-size: 1.15rem;
    line-height: 1.9;
    color: #444;
    font-style: italic;
    margin-bottom: 0 !important;
    /* Nessun margine extra */
    padding-left: 1rem;
    border-left: 3px solid var(--primary-red);
    min-height: 120px;
    /* Altezza minima FISSA per la quote */
    display: flex;
    align-items: flex-start;
}

.testimonial-author {
    font-weight: 700;
    font-size: 1.2rem;
    color: #111;
    margin-bottom: 0.2rem;
}

.testimonial-role {
    font-size: 0.9rem;
    color: var(--primary-red);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.testimonial-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(227, 6, 19, 0.1);
    color: var(--primary-red);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 1rem;
}

/* Carosello Controls Custom */
.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ddd;
    opacity: 1;
    border: none;
    transition: all 0.3s ease;
}

.carousel-indicators [data-bs-target].active {
    background-color: var(--primary-red);
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(227, 6, 19, 0.5);
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(227, 6, 19, 0.9);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.3s ease;
    border: 2px solid white;
}

.testimonial-carousel:hover .carousel-control-prev,
.testimonial-carousel:hover .carousel-control-next {
    opacity: 1;
}

.carousel-control-prev {
    left: 0;
}

.carousel-control-next {
    right: 0;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* ==================== FOOTER MODERNO E AVANZATO ==================== */
footer {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #111111 100%);
    position: relative;
    overflow: hidden;
    margin-top: 4rem;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-red), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {

    0%,
    100% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(100%);
    }
}

.footer-logo {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.footer-logo span {
    color: var(--primary-red);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 0.8rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(227, 6, 19, 0.1);
    transform: translateX(5px);
}

.contact-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-red), #c00510);
    color: white;
    border-radius: 8px;
    margin-right: 1rem;
    box-shadow: 0 4px 15px rgba(227, 6, 19, 0.3);
    font-size: 1.2rem;
}

.contact-text {
    flex: 1;
}

.contact-label {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-value {
    font-size: 1rem;
    color: white;
    font-weight: 500;
}

.contact-value a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-value a:hover {
    color: var(--primary-red);
}

.social-links-container {
    margin-top: 2rem;
}

.social-title {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 1rem;
    font-weight: 600;
}

.social-btn {
    width: 45px;
    height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-radius: 10px;
    margin-right: 12px;
    margin-bottom: 12px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    font-size: 1.3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-btn:hover {
    background: var(--primary-red);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(227, 6, 19, 0.4);
    border-color: var(--primary-red);
}

.social-btn.facebook:hover {
    background: #1877F2;
    border-color: #1877F2;
}

.social-btn.whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
}

.social-btn.instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-color: #e6683c;
}

.social-btn.linkedin:hover {
    background: #0077B5;
    border-color: #0077B5;
}

.quick-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quick-links li {
    margin-bottom: 0.8rem;
}

.quick-links a {
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
}

.quick-links a:hover {
    color: var(--primary-red);
    transform: translateX(5px);
}

.quick-links a::before {
    content: '›';
    margin-right: 8px;
    color: var(--primary-red);
    font-size: 1.5rem;
    line-height: 0;
}

.hours-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.hours-card h5 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.hour-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.hour-day {
    color: #aaa;
}

.hour-time {
    color: #25D366;
    font-weight: 600;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.copyright {
    color: #666;
    font-size: 0.9rem;
    text-align: center;
}

.payment-methods {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    opacity: 0.6;
}

.payment-methods i {
    font-size: 2rem;
    color: white;
}

.credits_link {
    color: #38B5E6 !important;
    font-weight: 700;
    font-family: sans-serif;
}

.credits_link:hover {
    color: #fff !important;
}

.credits_link:before {
    content: "";
    vertical-align: middle;
    width: 16px;
    height: 16px;
    display: inline-block;
    margin-right: 5px;
    margin-left: 5px;
    background-image: url(https://www.clion.it/favicon-96x96.png);
    background-repeat: no-repeat;
    -webkit-background-size: contain;
    background-size: contain;
    background-position: center center;

    transition: all 450ms ease;
}

.credits_link:hover:before {
    transform: rotateZ(360deg) rotateY(360deg);
}

/* ==================== RESPONSIVE CORRETTO ==================== */
@media (max-width: 991.98px) {

    .navbar {
        background-color: #111111 !important;
        backdrop-filter: none !important;
        /*padding: 0px !important;*/
    }

    .navbar-collapse {
        background-color: #111111 !important;
        padding: 20px !important;
        border-radius: 12px;
        margin-top: 10px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        position: relative;
        z-index: 1041;
    }

    .navbar-collapse.show {
        background-color: #111111 !important;
    }

    .navbar-toggler {
        border: none;
        background: transparent !important;
        padding: 10px;
        z-index: 1042;
    }

    /*
    .navbar-brand {
        margin: 0 auto;
        text-align: center;
    }
    */

    .navbar-nav {
        text-align: center;
    }

    .nav-link {
        display: block;
        padding: 12px 0 !important;
        margin: 5px 0 !important;
    }

    .hero {
        /*background-image: linear-gradient(rgba(17, 17, 17, 0.9), rgba(17, 17, 17, 0.9)),
            url(../images/header.jpg);*/
        background-image: linear-gradient(to right, rgba(17, 17, 17, 0.95) 0%, rgba(17, 17, 17, 0.8) 40%, rgba(17, 17, 17, 0.1) 100%),
            url(../images/header.jpg);
        align-items: flex-start;
        padding-top: 160px;
        padding-bottom: 40px;
        min-height: auto;
        display: block;
    }

    .hero h1 {
        font-size: 2.2rem !important;
        margin-bottom: 1.5rem !important;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 2rem !important;
    }

    .hero .d-flex {
        justify-content: center;
        gap: 10px !important;
    }

    .btn-hero-red,
    .btn-hero-outline {
        width: 100%;
        max-width: 280px;
    }

    .product-icon {
        font-size: 2.8rem;
    }

    .testimonial-carousel {
        padding: 2rem 0;
    }

    .testimonial-slide {
        padding: 2rem 1.5rem !important;
        min-height: 350px;
    }

    .testimonial-quote {
        font-size: 1rem !important;
        min-height: 100px;
    }

    .carousel-control-prev,
    .carousel-control-next {
        opacity: 1;
        width: 40px;
        height: 40px;
    }

    .carousel-indicators {
        bottom: -40px;
    }

    .contact-item {
        margin-bottom: 0.5rem;
    }

    .social-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 1.8rem !important;
    }

    .navbar-brand img {
        max-width: 75px;
    }

    .testimonial-slide {
        padding: 1.5rem 1rem !important;
        min-height: 380px;
    }

    .testimonial-quote {
        font-size: 0.95rem !important;
        min-height: 90px;
    }

    .testimonial-avatar {
        width: 60px !important;
        height: 60px !important;
    }

    .testimonial-author {
        font-size: 1rem !important;
    }

    .footer-logo {
        font-size: 1.5rem !important;
    }

    .hours-card {
        padding: 1rem;
    }

    .contact-icon {
        width: 35px;
        height: 35px;
        min-width: 35px;
        font-size: 1rem;
    }
}

/* Overlay Form Desktop */
@media (min-width: 992px) {
    .overlap-form-wrapper {
        margin-bottom: -420px;
        position: relative;
        z-index: 10;
    }

    .testimonial-section {
        /*padding-top: 5rem !important;*/
    }
}