/* BS Porte & Finestre Custom Premium Theme */
:root {
    --brand-orange: #F26422;
    --brand-dark: #191919;
    --brand-light: #F5F5F5;
    --cta-blue: #0056D2;
    /* Colore di fortissimo contrasto per attirare l'attenzione */
    --cta-blue-hover: #0041a8;
}

/* ====== Typography Override ====== */
body,
p,
a,
li,
span,
div,
input,
textarea,
button {
    font-family: 'Mulish', sans-serif !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
    font-family: 'Orbitron', sans-serif !important;
}

/* ====== Brand Colors Application ====== */
.navbar-brand,
.red {
    color: var(--brand-orange) !important;
}

.section-bg-overlay {
    background: var(--brand-orange) !important;
    opacity: 0.9 !important;
}



/* ====== Call to Action Buttons (High Contrast) ====== */
.btn-red,
.bottone,
.btn-blue,
.discover-btn,
.btn-white {
    background: var(--cta-blue);
    color: #ffffff;
    border: none !important;
    border-radius: 15px;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px #0056d266 !important;
    transition: all 0.3s ease;
    padding: 15px 30px;
    display: inline-block;
    text-align: center;
}

.btn-red:hover,
.bottone:hover,
.btn-blue:hover,
.discover-btn:hover,
.btn-white:hover {
    background: var(--cta-blue-hover) !important;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 86, 210, 0.6) !important;
    color: #ffffff;
}

.btn-red.small {
    padding: 10px 25px;
}

/* ====== Glassmorphism Form ====== */
.register-form-wrapper {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) !important;
    border-radius: 20px;
    padding: 40px;
}

.register-form-wrapper h3 {
    color: #ffffff !important;
    margin-bottom: 10px !important;
}

.register-form-wrapper p {
    color: #f1f1f1 !important;
}

.form-control {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    border-radius: 10px !important;
    padding: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    border-color: var(--brand-orange) !important;
    box-shadow: 0 0 10px rgba(242, 100, 34, 0.3) !important;
}

/* ====== Modern Feature Boxes & Services ====== */
.main-services,
.feature-box {
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    padding: 40px 30px !important;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.main-services:hover,
.feature-box:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.main-services::before,
.feature-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--brand-orange) 0%, #ff8a50 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.main-services:hover::before,
.feature-box:hover::before {
    opacity: 1;
}

.main-services i,
.feature-box i {
    font-size: 35px !important;
    color: var(--brand-orange) !important;
    background: rgba(242, 100, 34, 0.1);
    width: 80px;
    height: 80px;
    border-radius: 20px !important;
    margin-bottom: 25px;
    transition: all 0.4s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

div.main-services:hover i,
div.feature-box:hover i {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.feature-box h4,
.main-services h4 {
    color: var(--brand-dark) !important;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    transition: all 0.4s ease;
}

div.main-services:hover h4,
div.feature-box:hover h4,
div.main-services:hover p,
div.feature-box:hover p {
    color: #ffffff !important;
}

/* Text overrides */
span[style*="color:darkred"] {
    color: var(--brand-orange) !important;
}

/* Footer overrides */
.footer p>a,
a.footer-links:hover {
    color: var(--brand-orange) !important;
}

/* General improvements */
.section-subtitle {
    color: var(--brand-dark) !important;
    opacity: 0.8;
}

.accordion .card-header button {
    color: var(--brand-dark) !important;
    font-weight: 700;
}

.accordion .card-header button:hover {
    color: var(--brand-orange) !important;
}

/* ====== Navbar Alignment & Colors ====== */
.navbar-fixed-top .navbar-nav {
    display: flex;
    align-items: center;
}

.navbar-brand,
.logo {
    display: flex;
    align-items: center;
}

.navbar-fixed-top .navbar-nav>li>a {
    color: #191919 !important;
    /* Colore nero/grigio scuro per il menu */
    font-weight: 700 !important;
    font-family: 'Mulish', sans-serif !important;
    transition: all 0.3s ease-in-out !important;
}

.navbar-fixed-top.opaque .navbar-nav>li>a {
    color: #191919 !important;
}

/* Animazione Hover del Menu */
.navbar-fixed-top .navbar-nav>li>a:not(.discover-btn):hover {
    color: var(--brand-orange) !important;
    transform: translateY(-2px);
}

.navbar-fixed-top.opaque .navbar-nav>li>a:not(.discover-btn):hover {
    color: var(--brand-orange) !important;
}

/* Eccezione per il bottone Contattaci nel menu */
.navbar-fixed-top .navbar-nav>li>a.discover-btn {
    color: #ffffff !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    background: var(--cta-blue) !important;
}

.navbar-fixed-top .navbar-nav>li>a.discover-btn:hover {
    color: #fff !important;
}

/* ====== Modern Statistics Section ====== */
.modern-stat-box {
    background: rgba(255, 255, 255, 0.05);
    /* Effetto Glass */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.4s ease;
    height: 100%;
}

.modern-stat-box:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.stat-icon-wrapper {
    margin-bottom: 20px;
}

.stat-icon-wrapper i {
    font-size: 40px;
    color: #ffffff;
    transition: all 0.4s ease;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.modern-stat-box:hover .stat-icon-wrapper i {
    transform: scale(1.1);
    color: var(--brand-dark);
    filter: drop-shadow(0 0 15px rgba(25, 25, 25, 0.3));
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 10px;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

.stat-text {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    opacity: 0.8;
    margin: 0;
    font-family: 'Mulish', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Utility classes */
.relative {
    position: relative;
}

.z-index-2 {
    z-index: 2;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

/* ====== Modern Testimonials ====== */
.review-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.review-card:before {
    content: "\f10d";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 80px;
    color: rgba(242, 100, 34, 0.05);
    z-index: 0;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: rgba(242, 100, 34, 0.2);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.reviewer-info {
    display: flex;
    align-items: center;
}

.avatar-placeholder {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--brand-orange);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    margin-right: 15px;
    font-family: 'Orbitron', sans-serif;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.avatar-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reviewer-name {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--brand-dark);
}

.reviewer-role {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.review-rating {
    color: #FFC107;
    font-size: 14px;
}

.review-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.review-text {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    font-style: italic;
    margin: 0;
    position: relative;
    z-index: 1;
    margin-bottom: 15px;
}

/* Review Project Images */
.review-images {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    position: relative;
    z-index: 2;
}

.review-images img {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.review-images img:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* ====== Modern Portfolio Gallery ====== */
.modern-portfolio-item {
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 30px !important;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: all 0.4s ease;
    border: 6px solid #ffffff;
    background: #ffffff;
}

.modern-portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* ====== Masonry Grid Specific Heights ====== */
@media (min-width: 992px) {
    .modern-portfolio-item.item-tall {
        height: 630px;
    }

    .modern-portfolio-item.item-large {
        height: 400px;
    }

    .modern-portfolio-item.item-small {
        height: 200px;
    }

    .modern-portfolio-item.item-half {
        height: 300px;
    }
}

@media (max-width: 991px) {

    .modern-portfolio-item.item-tall,
    .modern-portfolio-item.item-large,
    .modern-portfolio-item.item-small,
    .modern-portfolio-item.item-half {
        height: 350px;
    }
}

.modern-portfolio-item .portfolio-pic,
.modern-portfolio-item .portfolio-pic a {
    height: 100%;
    width: 100%;
    display: block;
}

.modern-portfolio-item .portfolio-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}

.modern-portfolio-item:hover .portfolio-pic img {
    transform: scale(1.08);
    /* Zoom fluido all'interno */
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f2642255;
    /* Blu aziendale trasparente */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    backdrop-filter: blur(3px);
    /* Effetto glassmorphism */
    -webkit-backdrop-filter: blur(3px);
}

.modern-portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.modern-portfolio-item .eye-wrapper {
    width: 60px;
    height: 60px;
    background: var(--brand-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.5);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Effetto bounce */
}

.modern-portfolio-item:hover .eye-wrapper {
    transform: scale(1);
    opacity: 1;
}

.modern-portfolio-item .eye-icon {
    color: white !important;
    font-size: 24px !important;
    margin: 0 !important;
}

/* ====== Modern Service Cards (Features) ====== */
.modern-service-item {
    background: #ffffff !important;
    border-radius: 15px;
    padding: 35px 30px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.02);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modern-service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.modern-service-item i.fas {
    width: 65px;
    height: 65px;
    line-height: 65px;
    background: rgba(242, 100, 34, 0.1) !important;
    color: var(--brand-orange) !important;
    border-radius: 14px !important;
    font-size: 26px !important;
    margin-bottom: 25px !important;
    align-self: flex-start;
    padding: 0 !important;
}

.modern-service-item .feature-box-text {
    width: 100%;
    text-align: center;
}

.modern-service-item h4 {
    font-family: 'Orbitron', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 15px;
    line-height: 1.4;
    text-transform: none;
}

.modern-service-item p {
    font-family: 'Mulish', sans-serif;
    font-size: 15px;
    color: #6a7695;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ====== Modern FAQ Section ====== */
.faq-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
    border-left: 4px solid var(--brand-orange);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.faq-box:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-left-color: var(--brand-blue);
}

.faq-box h5 {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--brand-dark);
    margin-top: 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.faq-box h5::before {
    content: "\f059";
    font-family: "Font Awesome 5 Free";
    font-weight: 400;
    color: var(--brand-orange);
    margin-right: 12px;
    font-size: 20px;
    transition: color 0.3s ease;
}

.faq-box:hover h5::before {
    color: var(--brand-blue);
}

.faq-box p {
    font-family: 'Mulish', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 0;
}

/* ====== Modern CTA Banners ====== */
.modern-cta-banner {
    background: linear-gradient(135deg, var(--brand-orange) 0%, #db4f0f 100%);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.modern-cta-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" stroke="rgba(255,255,255,0.05)" stroke-width="2" fill="none"/></svg>');
    background-size: 200px 200px;
    z-index: -1;
    opacity: 0.5;
}

.modern-cta-banner .section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #ffffff;
}

.modern-cta-banner .section-subtitle {
    font-family: 'Mulish', sans-serif;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    font-weight: 400;
    line-height: 1.5;
}

.modern-cta-banner .btn-blue {
    background: #ffffff;
    color: var(--cta-blue);
    border: none;
    padding: 15px 35px;
    font-size: 16px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 50px;
    text-transform: uppercase;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.modern-cta-banner .btn-blue:hover {
    background: var(--brand-blue);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 86, 210, 0.4);
}