/* ============================================
   Custom overrides — never modify template files
   ============================================ */

:root {
    --color-primary: #c80b0b;
}

/* ---- Search bar: nice-select nascosto, select nativi gestiti da Tailwind ---- */

.select-area-down {
    border: none;
    gap: 8px;
}

.select-area-down .nice-select {
    display: none !important;
}

/* Proprietà overridate dal template CSS (non gestibili dai layer Tailwind) */
.select-area-down select {
    display: block !important;
    background-color: #f0f1f3 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 18px center !important;
    height: 52px !important;
    padding-left: 24px !important;
    padding-right: 48px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

/* ---- Hamburger: forza colore brand ---- */
.menu-btn {
    background: #c80b0b !important;
}

/* ---- Mobile menu: sottovoci stesse dimensioni dei titoli ---- */
.mobile-menu-main nav ul li.has-droupdown ul a {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--color-heading-1) !important;
}

/* ---- Search bar mobile: select impilati verticalmente ---- */
@media (max-width: 767px) {
    .select-area-down {
        flex-direction: column;
        border-radius: 20px;
        gap: 6px;
    }

    .select-area-down select {
        flex: 0 0 auto !important;
        width: 100% !important;
    }

    .select-area-down .rts-btn {
        width: 100% !important;
        justify-content: center;
    }
}

/* ---- Footer: disabilita il comportamento sticky del template ---- */
/* Il footer fixed coprirebbe qualsiasi contenuto dopo di sé. Lo rendiamo statico
   così la pagina scorre normalmente: sezioni → footer → disclaimer CO2. */
.rts-footer-area.dim-fixed,
.rts-footer-area.dim-static {
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: 1 !important;
}

.rts-wrapper {
    padding-bottom: 0 !important;
}

/* ---- CO2 disclaimer (dopo il footer) ---- */
.co2-disclaimer {
    background: #050B20;
    padding: 28px 0 36px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.co2-disclaimer p {
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
    line-height: 1.75;
    margin: 0 0 10px;
}

.co2-disclaimer p:last-child {
    margin-bottom: 0;
}

/* ---- Configuratore: area di ricerca sfondo bianco ---- */
.rts-select-area.inner {
    background: #fff !important;
}

/* ---- Why Choose Us: icone SVG da arancione (#FF3600) a rosso brand (#c80b0b) ---- */
.why-choose-us-wrapper .icon img,
.why-choose-us-wrapper3 .icon img,
.why-choose-us-wrapper2 .icon img,
.contact-field-list li img {
    filter: hue-rotate(-13deg) brightness(0.78) !important;
}

/* Allineamento titoli Why Choose Us */
.rts-why-choose-us4 .right-content {
    align-items: flex-start !important;
}

/* Allineamento icone per uniformità se necessario */
.why-choose-us-wrapper .icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.why-choose-us-wrapper3 .icon {
    height: 50px; /* Altezza fissa per il container dell'icona */
    display: flex;
    align-items: flex-end; /* Allinea le icone alla base del container */
    margin-bottom: 40px !important;
}

/* ---- Contact cards: inversione colori (di base scure, hover grigie) ---- */
.why-choose-us-wrapper2 {
    background: var(--color-heading-1) !important;
    transition: background 0.3s ease, color 0.3s ease !important;
    height: 100%;
    border-radius: 12px !important;
}

.why-choose-us-wrapper2::after {
    display: none !important; /* Disabilitiamo il background overlay del template */
}

.why-choose-us-wrapper2 .title,
.why-choose-us-wrapper2 .contact-field-list li,
.why-choose-us-wrapper2 .contact-field-list li span,
.why-choose-us-wrapper2 .contact-field-list li a {
    color: #fff !important;
}

/* Hover: diventa grigia con testi scuri */
.why-choose-us-wrapper2:hover {
    background: #f0f1f3 !important; /* Forza il grigio chiaro specifico del template */
}

.why-choose-us-wrapper2:hover .title,
.why-choose-us-wrapper2:hover .contact-field-list li,
.why-choose-us-wrapper2:hover .contact-field-list li span,
.why-choose-us-wrapper2:hover .contact-field-list li a {
    color: var(--color-body) !important;
}

.why-choose-us-wrapper2:hover .title {
    color: var(--color-heading-1) !important;
}

/* Icone: di base ricolorate per il rosso brand (già gestito da filtro sotto)
   All'hover devono tornare "originali" (o meglio, come sono ora di base) */
.why-choose-us-wrapper2:hover .icon img,
.why-choose-us-wrapper2:hover .contact-field-list li img {
    filter: none !important; /* Rimuove il filtro rosso all'hover */
}

.why-choose-us-wrapper2 .contact-clock-icon circle,
.why-choose-us-wrapper2 .contact-clock-icon path {
    stroke: var(--color-primary) !important;
    transition: stroke 0.3s ease;
}

.why-choose-us-wrapper2:hover .contact-clock-icon circle,
.why-choose-us-wrapper2:hover .contact-clock-icon path {
    stroke: #FF3600 !important; /* Colore arancione originale del template all'hover */
}

/* ---- Contact form: bottone "Invia messaggio" stile rts-btn btn-primary ---- */
.submit__btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 16px 32px !important;
    line-height: 1;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden;
    border: none !important;
    position: relative;
    z-index: 1;
    vertical-align: middle;
    transform: translateZ(0);
    transition: color 0.3s !important;
    backface-visibility: hidden;
    border-radius: 6px !important;
    background: var(--color-heading-1) !important;
    color: #fff !important;
    cursor: pointer;
}

.submit__btn::after {
    content: "";
    position: absolute;
    display: block;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-primary);
    transform: scaleY(1);
    transform-origin: center;
    transition: transform 0.3s ease-out;
    will-change: transform;
}

.submit__btn:hover::after {
    transform: scaleY(0);
}

.submit__btn:hover {
    color: #fff !important;
}

.contact-field-list li a {
    color: inherit;
    text-decoration: none;
}

.contact-field-list li a:hover {
    text-decoration: underline;
}

/* ---- Contact cards: altezza uniforme + testo desc leggermente più piccolo ---- */
.why-choose-us-wrapper2 {
    height: 100%;
    border-radius: 12px !important;
}

/* ---- Contact cards: icona centrata nel quadrato ---- */
.why-choose-us-wrapper2 .icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
}

/* ---- Contact cards: lista campi con icona ---- */
.contact-field-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-field-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px !important;
    line-height: 1.75 !important;
    color: var(--color-body);
}

.contact-field-list li:last-child {
    margin-bottom: 0;
}

.contact-field-list li img,
.contact-field-list li svg {
    flex-shrink: 0;
    margin-top: 5px;
}

.why-choose-us-wrapper2 .desc {
    font-size: 13px !important;
    line-height: 1.75 !important;
}

/* ---- Booking form: nice-select nascosto, select nativo a piena larghezza ---- */
.rts-booking-area .nice-select {
    display: none !important;
}

.rts-booking-area select {
    display: block !important;
    width: 100% !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 18px center !important;
    border-radius: 6px !important;
    border: 1px solid rgba(85, 85, 85, 0.15) !important;
    padding: 12px 48px 12px 20px !important;
    height: auto !important;
    font-size: var(--font-size-b2) !important;
    color: var(--color-heading-1) !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    box-sizing: border-box !important;
}

/* ---- Brand: loghi centrati nella card (line-height non funziona con img display:block) ---- */
.rts-brand-area .section-inner ul li {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* ---- About: terza foto allineata a destra come da template ---- */
.rts-about-area .about-image-area .image-main > img {
    display: block;
    margin-left: auto;
}

/* ---- Testimonials: flex side-by-side, nessuna sovrapposizione ---- */
.rts-testimonials-area .left-side-image {
    display: flex !important;
    align-items: flex-start;
    gap: 20px;
    overflow: hidden;
    text-align: left;
}

.rts-testimonials-area .left-side-image .floating-img {
    position: static !important;
    width: 38% !important;
    flex-shrink: 0;
    order: -1;
    margin-top: 30px;
}

.rts-testimonials-area .left-side-image .main-image {
    width: 58% !important;
    flex-shrink: 0;
    margin-left: 0 !important;
}

/* ---- Inner header logo (sfondo bianco → logo rosso) ---- */

.header-three .logo-area-start .logo img {
    filter: brightness(0) invert(14%) sepia(96%) saturate(5000%) hue-rotate(349deg) brightness(80%) contrast(120%);
}

/* ---- Footer BG-1 (inner pages) ---- */

.footer-bg-1,
.footer-bg-1 p,
.footer-bg-1 h1,
.footer-bg-1 h2,
.footer-bg-1 h3,
.footer-bg-1 h4,
.footer-bg-1 h5,
.footer-bg-1 h6,
.footer-bg-1 a,
.footer-bg-1 li,
.footer-bg-1 span {
    color: #fff !important;
}

.footer-bg-1 a:hover {
    color: var(--color-primary) !important;
}

.footer-bg-1 {
    background: #050B20 !important;
    clip-path: none !important;
}

.footer-bg-1::after {
    display: none !important;
}

.footer-bg-1 .footer-wrapper-style-between {
    gap: 60px;
    padding-top: 180px;
    padding-bottom: 70px;
}

.footer-bg-1 .footer-wrapper-style-between .single-wized:nth-child(1) {
    flex-basis: 360px;
    flex-shrink: 0;
}

.footer-bg-1 .footer-wrapper-style-between .single-wized:nth-child(2) {
    flex-basis: 160px;
    flex-shrink: 0;
}

.footer-bg-1 .footer-wrapper-style-between .single-wized:nth-child(3) {
    flex-basis: auto;
    flex-grow: 1;
}

/* Logo area */
.footer-bg-1 .single-wized.logo-area .logo {
    display: inline-block;
    margin-bottom: 24px;
}

.footer-bg-1 .single-wized.logo-area .desc {
    color: rgba(255, 255, 255, 0.65);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 320px;
}

/* Form: horizontal pill */
.footer-bg-1 .single-wized.logo-area form {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 380px;
    background: #fff;
    border: 1px solid #fff;
    border-radius: 6px;
    padding: 5px 5px 5px 20px;
    overflow: hidden;
}

.footer-bg-1 .single-wized.logo-area form input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #111;
    font-size: 14px;
    padding: 0;
    min-width: 0;
}

.footer-bg-1 .single-wized.logo-area form input::placeholder {
    color: #999;
}

.footer-bg-1 .single-wized.logo-area form button {
    background: var(--color-heading-1);
    color: #fff !important;
    border: none;
    border-radius: 999px;
    padding: 11px 28px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    overflow: hidden;
    transform: translateZ(0);
    transition-property: color;
    transition-duration: 0.3s;
    backface-visibility: hidden;
}

.footer-bg-1 .single-wized.logo-area form button::after {
    content: "";
    position: absolute;
    display: block;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-primary);
    transform: scaleY(1);
    transform-origin: center;
    transition: transform 0.3s ease-out;
    will-change: transform;
}

.footer-bg-1 .single-wized.logo-area form button:hover::after {
    transform: scaleY(0);
}

/* Contact & legal column title */
.footer-bg-1 .single-wized .title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 28px;
}

/* Contact & legal links */
.footer-bg-1 .body .nav-bottom {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-bg-1 .body .nav-bottom li {
    margin-bottom: 18px;
}

.footer-bg-1 .body .nav-bottom li a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 15px;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-bg-1 .body .nav-bottom li a:hover {
    color: var(--color-primary);
}

/* Contact Us — 2x2 grid */
.footer-bg-1 .get-in-touch .get-touch {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px 40px;
}

@media (max-width: 767px) {
    .footer-bg-1 .get-in-touch .get-touch {
        grid-template-columns: 1fr;
    }
}

.footer-bg-1 .get-in-touch .map-area {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-bg-1 .get-in-touch .map-area .icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-bg-1 .get-in-touch .map-area .text p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
    margin: 0 0 3px 0;
    line-height: 1;
}

.footer-bg-1 .get-in-touch .map-area .text a {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
    display: block;
}

.footer-bg-1 .get-in-touch .map-area .text a:hover {
    color: var(--color-primary);
}

/* Copyright area */
.footer-bg-1 .copyright-area {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-bg-1 .copyright-area .copyright-area-inner {
    text-align: left;
}

.footer-bg-1 .copyright-area .copyright-area-inner p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    margin: 0;
}

/* Follow Us On social icons in copyright */
.footer-bg-1 .copyright-area .social-area-transparent ul {
    gap: 14px;
}

.footer-bg-1 .copyright-area .social-area-transparent ul li p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    margin: 0;
    white-space: nowrap;
}

.footer-bg-1 .copyright-area .social-area-transparent ul li a {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-bg-1 .copyright-area .social-area-transparent ul li a:hover {
    opacity: 1;
}

/* ---- FAQ: testo della risposta leggibile nell'accordion ---- */
.rts-faq__accordion .accordion .accordion-item .accordion-body {
    color: var(--color-body) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding-bottom: 20px !important;
}

.rts-faq__accordion .accordion .accordion-item.active .accordion-body {
    color: var(--color-body) !important;
}

.rts-faq__accordion .accordion .accordion-item .accordion-header .accordion-button:not(.collapsed) {
    color: var(--color-primary) !important;
}

/* ---- FAQ: stile card accordion ---- */
.rts-faq__accordion .accordion .accordion-item {
    background: #fff !important;
    border: 1px solid rgba(85, 85, 85, 0.15) !important;
    overflow: visible !important;
}

.rts-faq__accordion .accordion .accordion-item.active {
    background: #f0f1f3 !important;
}

/* ---- Contact Page: Mappa e Form arrotondati ---- */
.contact-map-area-fluid,
.contact-map {
    border-radius: 12px !important;
}

.get-in-touch-area,
.contact-form {
    border-radius: 12px !important;
}

/* Arrotondamento input e textarea del form */
.contact-form .input-form,
.contact-form textarea {
    border-radius: 8px !important;
}

.brand-red-icon path {
    fill: #c80b0b !important;
}

.brand-red-icon {
    /* stroke: #c80b0b !important; */
}

.thin-icon {
    stroke: #fff;
    stroke-width: 0.8px;
}

/* ---- Modern Service Cards ---- */
.service-card-modern {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 40px;
    padding: 60px 50px;
    display: flex;
    align-items: center;
    gap: 40px;
    position: relative;
    transition: all 0.3s ease;
    height: 100%;
}

.service-card-modern .number-outline {
    font-size: 100px;
    font-weight: 800;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px #111;
    opacity: 0.8;
    min-width: 140px;
    transition: all 0.3s ease;
}

.service-card-modern:hover .number-outline {
    color: #111;
    -webkit-text-stroke: 0;
    opacity: 1;
}

.service-card-modern .content {
    flex: 1;
}

.service-card-modern .content .title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #111;
}

.service-card-modern .content .desc {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 0;
    max-width: 400px;
}

.service-card-modern .arrow-btn {
    width: 80px;
    height: 80px;
    background: #111;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d4ff00;
    font-size: 24px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
    text-decoration: none;
}

.service-card-modern:hover .arrow-btn {
    background: #d4ff00;
    color: #111;
    transform: scale(1.1);
}

.service-card-modern .arrow-btn i {
    transition: transform 0.4s ease;
}

.service-card-modern:hover .arrow-btn i {
    transform: rotate(45deg);
}

@media (max-width: 1199px) {
    .service-card-modern {
        padding: 40px 30px;
        gap: 25px;
    }
    .service-card-modern .number-outline {
        font-size: 70px;
        min-width: 100px;
    }
    .service-card-modern .content .title {
        font-size: 24px;
    }
}

@media (max-width: 767px) {
    .service-card-modern {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 40px;
    }
    .service-card-modern .arrow-btn {
        align-self: flex-end;
        margin-top: 20px;
    }
    .service-card-modern .content .desc {
        max-width: 100%;
    }
}

[x-cloak] { display: none !important; }

/* ---- Portfolio detail slider ---- */
.rts-portfolio-area.inner .portfolio-slider-area2 .projectSlider4 .image {
    height: 500px;
}

.rts-portfolio-area.inner .portfolio-slider-area2 .projectSlider4 .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rts-portfolio-area.inner .portfolio-slider-area2 .swiper-slide {
    height: 500px;
}

/* Pagination bullets thumbnails */
.rts-portfolio-area.inner .portfolio-slider-area2 .slider-pagination-area .swiper-pagination .swiper-pagination-bullet {
    background-size: cover !important;
    background-position: center !important;
}

/* Pagination bullets thumbnails */
.rts-portfolio-area.inner .portfolio-slider-area2 .slider-pagination-area .swiper-pagination .swiper-pagination-bullet {
    background-size: cover !important;
    background-position: center !important;
}

/* ---- Service detail expandable section ---- */
.service-detail-wrapper {
    background: #f0f1f3;
    border-radius: 12px;
    margin-top: 24px;
    margin-bottom: 16px;
    overflow: hidden;
}

/* Override Livewire wire:transition for smoother animation */
.service-detail-wrapper.wire-transition {
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Override Livewire wire:transition for smoother animation */
.service-detail-wrapper.wire-transition {
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Override Livewire wire:transition per renderlo più fluido */
.service-detail-wrapper.wire-transition {
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 600px;
    }
}

.service-detail-wrapper .detail-content {
    padding: 32px 48px;
}

.service-detail-wrapper .detail-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-body);
    margin: 0;
}

@media (max-width: 767px) {
    .service-detail-wrapper .detail-content {
        padding: 24px;
    }

    .service-detail-wrapper .detail-text {
        font-size: 15px;
    }
}

.service-wrapper-2 .button-area a {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.service-wrapper-2 .button-area a i {
    transform: rotate(0deg) !important;
    transition: transform 0.3s ease;
}

.service-wrapper-2 .button-area a.expanded i {
    transform: rotate(180deg) !important;
}

@media (max-width: 767px) {
    .service-detail-wrapper .detail-content {
        padding: 24px;
    }

    .service-detail-wrapper .detail-text {
        font-size: 15px;
    }
}

.service-wrapper-2 .button-area a {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.service-wrapper-2 .button-area a i {
    transform: rotate(0deg) !important;
    transition: transform 0.3s ease;
}

.service-wrapper-2 .button-area a.expanded i {
    transform: rotate(180deg) !important;
}
