:root {
    --primary-orange: #d64f00;
    --primary-blue: #0f4c81;
    --primary-gray: #434955;
    --light-gray: #6c757d;
    --header-orange: #ff6b1b;
    --header-height: 40px;
    --navbar-height: 80px;
}

/* Top Bar */
.top-bar {
    background: linear-gradient(45deg, var(--primary-orange), var(--header-orange));
    color: white;
    font-size: 0.9rem;
    height: var(--header-height);
    transition: transform 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}
.top-bar a {
    color: white !important;
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0.9;
}
.top-bar a:hover {
    color: white !important;
    text-decoration: none;
    opacity: 1;
    text-shadow: 0 0 1px rgba(255,255,255,0.5);
}
.top-bar .bi {
    color: white;
    opacity: 0.9;
}
.top-bar .bi:hover {
    opacity: 1;
}

.top-bar .social-icons {
    text-align: right;
    transform: translateY(3px);
}

.top-bar .d-none.d-md-block,
.top-bar .d-md-none {
    transform: translateY(3px);
}

/* Navbar */
.navbar {
    background-color: #fafafa !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    height: var(--navbar-height);
    transition: all 0.3s ease;
    z-index: 1020;
    padding: 0;
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header-height);
    display: flex;
    align-items: center;
}
.navbar.fixed {
    position: fixed;
}
.navbar.fixed.with-topbar {
    top: var(--header-height);
}
.navbar.fixed.without-topbar {
    top: 0;
}
.navbar.bg-white {
    background-color: white !important;
}
.navbar.shadow-sm {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@media (min-width: 992px) {
    .navbar.compact {
        padding: 0.7rem 0;
        height: calc(var(--navbar-height) - 10px);
    }
    .navbar.compact .logo-img {
        height: 55px;
    }
}

.navbar .nav-link {
    color: var(--primary-gray) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}
.navbar .nav-link.active,
.navbar .nav-link:hover {
    color: #B94500 !important;
}

/* Adjust main content for fixed header */
body {
    padding-top: calc(var(--header-height) + var(--navbar-height));
}
body.homepage {
    padding-top: 0;
}
main {
    min-height: calc(100vh - var(--header-height) - var(--navbar-height));
    position: relative;
    z-index: 1;
}

/* Logo */
.logo-img {
    aspect-ratio: 158 / 67;
    height: 60px;
    width: auto;
    transition: height 0.3s ease;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
    color: white !important;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    background-color: #0c3d6b !important;
    border-color: #0c3d6b !important;
    transform: translateY(-2px);
}
.btn-outline-primary {
    color: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
    background-color: transparent !important;
    transition: all 0.3s ease;
}
.btn-outline-primary:hover {
    color: white !important;
    background-color: var(--primary-blue) !important;
    transform: translateY(-2px);
}
.btn-secondary {
    background-color: var(--primary-gray) !important;
    border-color: var(--primary-gray) !important;
    color: white !important;
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    background-color: #535b69 !important;
    border-color: #535b69 !important;
    transform: translateY(-2px);
}

/* Cards */
.card {
    transition: transform 0.3s ease;
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.card:hover {
    transform: translateY(-5px);
}
.card-img-top {
    aspect-ratio: 499 / 329;
    width: 100%;
    height: auto;
}
.card-title {
    color: var(--primary-gray);
    font-weight: 600;
}

/* Headings */
h1, h2 {
    color: var(--primary-blue);
    font-weight: 600;
}
h3, h4, h5, h6 {
    color: var(--primary-gray);
    font-weight: 600;
}
.display-4 {
    color: var(--primary-gray);
    font-weight: 700;
}

/* Bootstrap overrides */
.text-primary {
    color: var(--primary-blue) !important;
}
.bg-primary {
    background-color: var(--primary-blue) !important;
}
.border-primary {
    border-color: var(--primary-blue) !important;
}

/* Form controls */
.form-check-input:checked {
    background-color: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
}
.form-check-input:focus {
    border-color: var(--primary-blue) !important;
    box-shadow: 0 0 0 0.25rem rgba(15, 76, 129, 0.25) !important;
}
.form-switch .form-check-input:checked {
    background-color: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
}

footer h5.text-white {
    color: var(--primary-orange) !important;
}

/* Sidebar filtri progetti */
.filters-sidebar .card-header {
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--header-orange) 100%) !important;
    border-bottom: 1px solid var(--primary-orange);
}
.filters-sidebar .card-header h5 {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
}
.filters-sidebar .card-header i {
    color: white;
    font-size: 0.8rem;
    opacity: 0.9;
}
.filters-sidebar .btn {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}
.filters-sidebar .btn i {
    font-size: 0.75rem;
    color: var(--primary-blue);
    opacity: 0.8;
}
.filters-sidebar .btn-primary i {
    color: white !important;
    opacity: 1;
}
.filters-sidebar .btn:hover i {
    opacity: 1;
    transform: scale(1.1);
}
.filters-sidebar .badge {
    font-size: 0.65rem;
    padding: 0.25rem 0.4rem;
}
.filters-sidebar .card {
    border: 1px solid #e3e6ea;
    border-radius: 0.5rem;
}
.filters-sidebar .card-body {
    padding: 1rem;
}

.filters-sidebar .card-header .filters-icon {
    transition: transform 0.3s ease-in-out;
}

.filters-sidebar .card-header[aria-expanded="false"] .filters-icon {
    transform: rotate(-90deg);
}

/* Links */
main a:not(.btn):not(.nav-link):not(.navbar-brand) {
    color: var(--primary-gray) !important;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}
main a:not(.btn):not(.nav-link):not(.navbar-brand):hover {
    color: var(--primary-orange) !important;
    border-bottom-color: var(--primary-orange);
}

/* Lead Text */
.lead {
    color: var(--light-gray);
}

/* Footer */
footer {
    background-color: var(--primary-gray) !important;
    color: white !important;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}
footer h5 {
    color: var(--primary-orange) !important;
    margin-bottom: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1rem;
}
footer a {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
    border-bottom: none !important;
}
footer a:hover {
    color: var(--primary-orange) !important;
    text-shadow: none;
    transform: translateY(-2px);
}

/* Social Icons */
footer .social-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
footer .social-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Contact Info Icons */
footer .bi-geo-alt-fill,
footer .bi-telephone-fill,
footer .bi-envelope-fill {
    color: white !important;
    opacity: 0.9;
    transition: all 0.3s ease;
}
footer li:hover .bi-geo-alt-fill,
footer li:hover .bi-telephone-fill,
footer li:hover .bi-envelope-fill {
    opacity: 1;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* Footer text elements */
footer .text-white,
footer .text-white-50 {
    color: white !important;
}

footer .list-unstyled li {
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
}
footer .list-unstyled li:hover {
    transform: translateX(5px);
}
footer hr {
    border-color: rgba(255, 255, 255, 0.2) !important;
    margin: 2rem 0;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 80vh;
    min-height: 500px;
    overflow: hidden;
    margin-top: calc(var(--header-height) + var(--navbar-height));
}

.hero-slider .carousel-item {
    height: 80vh;
    min-height: 500px;
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-orange));
    position: relative;
}

.hero-slider .slide-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.6;
    z-index: 1;
}

.hero-slider .carousel-caption {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg, 
        rgba(214, 79, 0, 0.5), 
        rgba(0, 135, 214, 0.5)
    );
    z-index: 2;
    padding: 0;
}

.hero-slider .carousel-caption h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hero-slider .carousel-caption p {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-slider .btn {
    background: white !important;
    color: var(--primary-blue) !important;
    border: none !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.hero-slider .btn:hover {
    background: var(--primary-blue) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Indicators styling */
.hero-slider .carousel-indicators {
    bottom: 30px;
    z-index: 3;
}

.hero-slider .carousel-indicators button {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin: 0 8px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid white;
    transition: all 0.3s ease;
}

.hero-slider .carousel-indicators button.active {
    background-color: white;
    transform: scale(1.2);
}

/* Controls styling */
.hero-slider .carousel-control-prev,
.hero-slider .carousel-control-next {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 3;
    transition: all 0.3s ease;
}

.hero-slider .carousel-control-prev:hover,
.hero-slider .carousel-control-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.hero-slider .carousel-control-prev-icon,
.hero-slider .carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: #fafafa;
        padding: 1rem;
        border-radius: 0.25rem;
        margin-top: 0.5rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
}

@media (max-width: 768px) {
    .hero-slider,
    .hero-slider .carousel-item {
        height: 60vh;
        min-height: 400px;
    }
    
    .hero-slider .carousel-caption h1 {
        font-size: 2rem;
    }
    
    .hero-slider .carousel-caption p {
        font-size: 1rem;
    }
    
    .hero-slider .btn {
        padding: 12px 30px !important;
        font-size: 0.9rem;
    }
    
    .hero-slider .carousel-control-prev,
    .hero-slider .carousel-control-next {
        width: 50px;
        height: 50px;
        margin: 0 10px;
    }
}

@media (max-width: 576px) {
    .hero-slider,
    .hero-slider .carousel-item {
        height: 50vh;
        min-height: 350px;
    }
    
    .hero-slider .carousel-caption h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem !important;
    }
    
    .hero-slider .carousel-caption p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem !important;
    }
}
 
.top-bar .btn-donate {
    background-color: white !important;
    color: var(--primary-orange) !important;
    border: 1px solid var(--primary-orange) !important;
    font-weight: 600;
    transition: all 0.3s ease;
    transform: translateY(4px);
}

.top-bar .btn-donate:hover {
    background-color: var(--primary-orange) !important;
    color: white !important;
    transform: translateY(2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-donate-footer {
    background-color: var(--primary-orange) !important;
    color: white !important;
    border: 1px solid var(--primary-orange) !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-donate-footer:hover {
    background-color: #b94500 !important;
    border-color: #b94500 !important;
    color: white !important;
}
 
/* Sezione Dicono di Noi */
#recensioniCarousel .carousel-item h5 {
    color: #d64f00 !important; /* Colore arancione del logo */
}

.dicono-di-noi-section {
    background-color: #f8f9fa; /* Un grigio molto chiaro */
    border-radius: 15px;
    padding: 3rem 0;
    margin: 3rem 0;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
    border-top: 5px solid #d64f00; /* Bordo arancione in alto */
}

/* Stili per le frecce del carosello "Dicono di Noi" */
#recensioniCarousel .carousel-control-prev,
#recensioniCarousel .carousel-control-next {
    width: auto;
    /* Sposta le frecce più in basso */
    top: auto;
    bottom: 20px; /* Regola questa altezza per posizionarle sotto il pulsante */
    transform: none;
}

#recensioniCarousel .carousel-control-prev {
    left: 15%;
    transform: translateX(-50%);
}

#recensioniCarousel .carousel-control-next {
    right: 15%;
    transform: translateX(50%);
}

#recensioniCarousel .carousel-control-prev-icon,
#recensioniCarousel .carousel-control-next-icon {
    background-color: var(--primary-orange);
    border-radius: 50%;
    padding: 25px; /* Aumenta la dimensione del cerchio */
    background-size: 60% 60%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

#recensioniCarousel .carousel-control-prev-icon:hover,
#recensioniCarousel .carousel-control-next-icon:hover {
    background-color: #b94500; /* Un arancione più scuro al passaggio del mouse */
}

/* Stili per gli indicatori del carosello "Dicono di Noi" */
#recensioniCarousel .carousel-indicators {
    bottom: -50px; /* Sposta gli indicatori più in basso */
}

#recensioniCarousel .carousel-indicators button {
    background-color: var(--primary-orange);
    height: 5px;
    width: 30px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

#recensioniCarousel .carousel-indicators button.active {
    opacity: 1;
}
 
/* --------------------------------------------------------------
/* MAIN
-------------------------------------------------------------- */
body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #434955; /* Grigio scuro per il testo */
    background-color: #fff; /* Sfondo bianco */
}

.text-justify {
    text-align: justify;
}
 