:root {
    
}

:root {
    --primary-color: #F1E0CC;
    --secondary-color: #9D1D14;
    --rosso: #8b1d20;
    --avorio: #fefaf6;
    --testo-nero: #2e2e2e;
    --grigio-chiaro: #eae6e1;
    --primary-font: 'Lora', serif;
    --secondary-font: 'Playfair Display', serif;
}

a{
    text-decoration: none;
}

.col-primary{
    color: var(--primary-color) !important;
}

.col-secondary{
    color: var(--secondary-color) !important;
}

body{
    font-family: "Lora", sans-serif;
    color: #404854;
    background-color: #FFFAF8;    
}

.page-wrapper{
    width: calc(100% - 20px);
    max-width: 1200px;
    margin:60px auto;
    background-color: #FFFCF8;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.page-content{
    padding-top: 20px;
}

.top-bar{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 16px;
}

.top-bar *{
    color: var(--secondary-color);
}

.banner{
    background-image: url(/frontend/images/angel.jpg);
    background-size: cover;
    background-position: center;
    height: 300px;
}

@media (max-width: 992px) {
    .banner{
        height: 130px;
    }
}

.top-bar-icons a{
    margin:0 8px;
    padding:0px 4px;
}

h2{
    margin: 0px;
}

.bottom-bar{
    display: flex;
    align-items: center; /* centra verticalmente rispetto all'elemente più alto (il logo) */
    justify-content: space-between; /* logo a sinistra, menu a destra */
    padding: 10px 20px;
}

.logo-container{
    float: left;
}

.logo-container img {
    height: 80px;
    margin:0 auto;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 14px;
    padding: 0;
    margin: 0;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-size: 18px;
    position: relative;
    padding:6px 10px;
}

.main-nav a.active {
    color: #1c1c1c;
}

.main-nav li:hover a::after,
.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    border-bottom:2px dashed var(--secondary-color); /* oro */
    /*background-color: var(--secondary-color);  oro */
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-consult {
    background-color: #23395b;
    color: white;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}

.evidence-menu-link a{
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
}

header .social-icons a {
    display: inline-block;
    text-decoration: none;
    background-color: var(--primary-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    text-align: center;
    transition: opacity 0.2s;
    margin-left: 10px;
}

header .social-icons a i {
    color: #ffffff;
    font-size: 14px;
    line-height: 24px;
}

@media (max-width: 992px) {
    header .container {
        display: block;
    }
    
    .logo{
        float: left;
        width: calc(100% - 120px);
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-actions {
        margin-top:14px;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .evidence-menu-link a{
        background-color: #ffffff !important;
        color: var(--primary-color) !important;
    }
}

@media (max-width: 575px) {
    header .container {
        display: block;
    }
    
    .logo{
        float: none;
        width: 100%
    }
    
    .header-actions {
        margin-top:14px;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
}

.close-menu{
    color: #ffffff;
    position: absolute;
    right: 24px;
    top: 24px;
    font-size: 36px;
    display: none;
    cursor: pointer;
}

.mobile-logo{
    display: none;   
}

.mobile-menu-toggle {
    display: none;
    float: right;
    font-size: 24px;
    padding:6px 8px;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border-radius:5px;
    margin-top:12px;
}

@media (max-width: 992px) {  
    .logo-container{
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .mobile-logo{
        display: block;
        width: 75%;
        margin-left: 10px;
    }
    .close-menu{
        display: block;
    }
    .bottom-bar{
        padding: 12px;
    }
    nav {
        width: 100%;
        display: none;
        visibility: hidden;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10001;
        transition: visibility 0.4s;
        background-color: var(--secondary-color);
        height: 100vh;
        overflow: auto;
        padding: 10px;
    }
    nav.open{
        display: block;
        visibility: visible;
    }
    nav .menu {
        display: block;
        width: 100%;
        padding-top: 10px;
    }
    nav .menu li a {
        color: #ffffff;
        font-size: 20px;
        margin-top: 12px;
        padding: 12px 20px;
        padding-right: 30px;
        display: block;
    }
    .mobile-menu-toggle {
        display: block; /* o usa media query */
        font-size: 24px;
        padding: 6px 8px;
        background-color: var(--secondary-color);
        color: var(--primary-color);
        border-radius: 5px;
        margin-left: 10px;
        flex-shrink: 0;
        margin-top: 0px;
    }
    .logo-container a{
        max-width: 100%;
        display: flex;
    }
    .logo-container img {
        max-width: 100%;
        margin-left: 0px;
        height: auto;
        flex-grow: 1;
        object-fit: contain;
    }
    .menu>li {
        margin-right: 1rem;
    }
}

.sr-slider-container{
    overflow: hidden;
    position: relative;
}

.sr-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.sr-slide {
    flex: 0 0 100%;
    height: 100%;
    position: relative;    
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 550px;    
}

.sr-slide .sr-slide-overlay{
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0px;
    left: 0px;
    background: linear-gradient(to top, #284A8A 0%, transparent 80%);
}

.sr-slide .sr-slide-content{
    position: absolute;
    text-align: center;
    width: 800px;
    left: calc(50% - 400px);
    top: 30%;
    padding-top:2rem;    
}

.sr-slide .sr-slide-content .btn{
    margin-top:20px;
    border-radius: 4px;
    font-size: 14px;
    padding:4px 12px;
}

.sr-slide-title {
    font-weight: 400;
    font-size: 44px;
    margin-bottom: 10px;  
}

.sr-slide-subtitle {
    font-family: "Lora", sans-serif;
    font-weight: 300;
    font-size: 24px;
    margin-top: 10px;  
    margin-bottom: 30px;  
}

@media (max-width: 840px) {
    .sr-slide .sr-slide-overlay{
        background: linear-gradient(to top, #284A8A 0%, transparent 100%);
    }
    
    .sr-slide {
        height: 300px;    
    }
    
    .sr-slide .sr-slide-content{
        width: 60%;
        left:20%;
        right:20%;
        top:20%;
        padding-left:10px;
        padding-right:10px;        
    }
    
    .sr-slide-title {
        font-weight: 400;
        font-size: 24px;
        margin-bottom: 20px;  
    }
}

@media (max-width: 575px) {
    .sr-slide .sr-slide-overlay{
        background: linear-gradient(to top, rgba(40,74,138,0.9) 0%, rgba(40,74,138,0.6) 60%, transparent 100%);
    }
    
    .sr-slide {
        height: 250px;    
    }
    
    .sr-slide .sr-slide-content{
        width: 100%;
        left:0px;
        top:30px !important;
        padding-left:10px;
        padding-right:10px;        
    }
    
    .sr-slide-title {
        font-weight: 400;
        font-size: 20px;
        margin-bottom: 20px;  
    }
}

.sr-prev, .sr-next {
    position: absolute;    
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 10;
    font-family: "Font Awesome 6 Pro";
    font-weight: 900;    
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;    
    font-size: 20px;    
}
.sr-prev:hover, .sr-next:hover {
    opacity: 0.85;
}

.sr-prev {
    content: "\f104";
    left: 8%;
}

.sr-next {
    content: "\f105";
    right: 8%;
}

.sr-prev::before {
    content: "\f104";
    font-family: "Font Awesome 6 Pro";
    font-weight: 900;
}

.sr-next::before {
    content: "\f105";
    font-family: "Font Awesome 6 Pro";
    font-weight: 900;
}

.sr-dots {
    display: none;
    text-align: center;
    margin-top: 10px;
}

.sr-dots span {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 5px;
    background-color: gray;
    border-radius: 50%;
    cursor: pointer;
}

.sr-dots .active {
    background-color: black;
}
@media (max-width: 768px) {    
    .page-wrapper{        
        margin: 10px auto;
    }
    .sr-prev, .sr-next {
        width: 28px;
        height: 28px;
        font-size: 16px;   
        bottom: 10px;
        top: unset;
    }
    
    .sr-prev {
        left: 10px;
    }
    
    .sr-next {
        right: 10px;
    }
}

footer {
    margin-top: 40px;    
    color: #fff;
    padding-top: 80px;
    font-size: 14px;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 20px;
}

.footer-logo img {
    max-width: 200px;
}

.footer-links {
    display: flex;
    gap: 40px;
}

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

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
}

.footer-contact {
    display: flex;
    gap: 40px;
}

.footer-contact ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    margin-bottom: 10px;
}

.footer-contact ul i {
    margin-right: 8px;
}

.footer-social p {
    margin: 10px 0 6px;
}

footer .social-icons a {
    display: inline-block;
    text-decoration: none;
    background-color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    text-align: center;
    transition: opacity 0.2s;
    margin-right: 10px;
}

footer .social-icons a i {
    color: var(--primary-color);
    font-size: 14px;
    line-height: 24px;
}

footer .social-icons a:hover {
    background-color: #d1a100;
    color: #fff;
}

.footer-bottom {
    background-color: var(--secondary-color);
    text-align: center;
    font-size: 16px;
    padding: 12px;
    color: #ddd;
}

.footer-bottom a{
    color: #d6a533;
}

@media (max-width: 768px) {    
    footer{
        padding-top: 30px;
    }    
    .footer-logo img{
        max-width:100%;
    }
    .footer-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-contact {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    
    .footer-contact {
        text-align: center;
    }
    
    footer .social-icons a{
        margin-right:0px;
        margin:4px 6px;
    }
    
    .footer-bottom p{
        margin:6px 0px;
    }
}

.page-title{
    font-family: var(--primary-font), sans-serif;
    color: var(--secondary-color);
    font-weight: 500;
    line-height: 1.2;
    font-size: 4rem;
    margin-bottom: 30px;
}

@media (max-width: 992px) {
    .page-title {
        font-size: 40px;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 36px;
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 24px;
    }
}

.hero {
    padding: 40px 20px;
    position: relative;
}

.hero .container {
    max-width: 1000px;
    margin: 0 auto;
}

.hero h1 {
    color: #911d1d;
    font-size: 4rem;
    margin-top: 20px;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 30px;
    font-family: var(--primary-font), sans-serif;
}

.hero p {
    font-size: 2rem;
    line-height: 1.6;
    color: #222;  
}

@media (max-width: 992px) {
    .hero{
        padding:10px;
    }
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero p {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }
    
    .hero p {
        font-size: 0.95rem;
    }
}

.cut-line {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 4px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100%' height='4'><line x1='0' y1='2' x2='100%' y2='2' stroke='%23b22222' stroke-width='4' stroke-dasharray='30 20' stroke-linecap='round' /></svg>") repeat-x;
    background-repeat: repeat-x;
    background-size: auto 100%;
    z-index: 1;
}

.hero.curve-line{
    margin-bottom: 120px;
}

.hero.curve-line .cut-line {
    background: url(/frontend/images/curva_sottile.png); 
    background-repeat: repeat-x;
    height: 155px;
}
@media (max-width: 768px) {
    .hero.curve-line{
        margin-bottom: 50px;
    }
    
    .hero.curve-line .cut-line{        
        background-image: url(/frontend/images/curv.png); 
        background-size: cover;
        height: 50px;
    }
}

.project-link img, .post-link img{
    border-radius: 10px;
    width: 100%;
}

.project-link, .post-link{
    margin-bottom: 30px;
}

.about-container{
    max-width: 800px;
    margin:0px auto;
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.about-text h1 {
    color: #911d1d;
    font-size: 46px;
    margin-top: 20px;
    font-weight: 500;    
    margin-bottom: 30px;
    font-family: var(--primary-font), sans-serif;
}

.about-text h2 {
    font-size: 24px;
    margin-top: 20px;
    font-weight: 500;
}

.about-text p {
    font-size: 18px;
    line-height: 24px;
    color: #222;  
}

@media (max-width: 992px) {
    .project-link, .post-link{
        margin-bottom: 10px;
    }
    
    .post-link > div, .gallery-item > div{
        padding:0px !important;
    }

    .about-text h1 {
        font-size: 40px;
    }
    
    .about-text h2 {
        font-size: 20px;
    }
    
    .about-text p {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .about-text h1 {
        font-size: 36px;
        margin-bottom: 5px;
    }
    
    .about-text h2 {
        font-size: 20px;
        margin-top: 0px;
    }
    
    .about-text p {
        font-size: 16px;
        line-height: 20px;
    }
}

@media (max-width: 480px) {
    .about-text h1 {
        font-size: 24px;
    }
}

.post-link-title{
    color: var(--secondary-color);
    font-size: 26px;
    font-weight: 500;
    padding:6px 10px;
    height: 80px;
    /*text-align: center;*/
    font-family: var(--primary-font), sans-serif;
}

.post-link-date{
    color: #333333;
    font-size: 20px;
    font-weight: 800;
    margin:0px;
    padding:6px 10px;
}

p.post-link-subtitle{
    font-size: 18px;
    margin:0px;
    padding:0px 10px;
}


@media (max-width: 480px) {
    .post-link-title{
        height: auto;
    }
}

.post-container{
    max-width: 800px;
    margin:0px auto;
}

.post-image {
    border-radius: 20px;
}

.post-text h1 {
    color: #911d1d;
    font-size: 46px;
    margin-top: 20px;
    font-weight: 500;    
    margin-bottom: 30px;
    font-family: var(--primary-font), sans-serif;
}

.post-text h2 {
    font-size: 24px;
    margin-top: 20px;
    font-weight: 500;
}

.post-text p {
    font-size: 18px;
    line-height: 24px;
    color: #222;  
}

.post-container h1{
    color: var(--secondary-color);
}

@media (max-width: 992px) {
    .post-container h1{
        font-size: 26px;
    }
    .post-container h2{
        font-size: 20px;
    }
    .post-text h1 {
        font-size: 40px;
    }
    
    .post-text h2 {
        font-size: 20px;
    }
    
    .post-text p {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .post-text h1 {
        font-size: 36px;
        margin-bottom: 5px;
    }
    
    .post-text h2 {
        font-size: 20px;
        margin-top: 0px;
    }
    
    .post-text p {
        font-size: 16px;
        line-height: 20px;
    }
}

@media (max-width: 480px) {
    .post-text h1 {
        font-size: 24px;
    }
}


/********* BREADCRUMB *********/
.breadcrumb-nav {
    font-size: 0.95rem;
}

.breadcrumb {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    color: #39251C;
}

.breadcrumb li+li::before {
    content: "/";
    margin: 0 8px;
    color: #ccc;
}

.breadcrumb a {
    text-decoration: none;
    color: #222222;
}

.breadcrumb a:hover {
    color: var(--secondary-color);
}

.breadcrumb .active {
    color: var(--secondary-color);
    font-weight: 500;
}

/* Responsive font size */
@media (max-width: 576px) {
    .breadcrumb-nav {
        font-size: 0.85rem;
    }
    
    .breadcrumb li+li::before {
        margin: 0 5px;
    }
}

.gallery-container{
    max-width: 800px;
    margin:0px auto;
    padding:10px;
}

.event-gallery-grid {
    display: grid;
    gap: 25px;
    margin-top: 25px;
}

.gallery-description {
    text-align: center;
    margin-bottom: 30px;
}

.img-box {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.img-box:hover {
    transform: scale(1.03);
}

@media (max-width: 767px) {
    .img-box {
        height: 350px;
    }
}

/* Desktop: 4 colonne fisse */
@media (min-width: 768px) {
    .event-gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet: 3 colonne */
@media (max-width: 767.98px) {
    .event-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile: 2 colonne */
@media (max-width: 576px) {
    .event-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Immagini */
.event-gallery-grid img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
}

.how-it-works {
    padding: 3rem 1rem;
    /*background-color: #fffaf6;*/
    text-align: center;
    font-family: 'Georgia', serif;
    color: #701a1a;
}

.how-it-works h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
}

.step img {
    width: 120px;
    height: auto;
    margin-bottom: 0.8rem;
}

.step h3 {
    font-size: 1.1rem;
    margin-top:0px;
    margin-bottom: 0.3rem;
    color: #701a1a;
}

.step p {
    font-size: 0.95rem;
    color: #333;
}

@media (max-width: 768px) {
    .steps {
        flex-direction: column;
        gap: 2rem;
    }
}

.feedback-box{
    border-radius: 10px;
    border:3px dashed var(--secondary-color);
    padding: 12px 20px;
}

.feedback-box p{
    font-size: 24px;
}

.feedback-box h3{
    margin-top:0px;
    margin-bottom:0px;
    color: var(--secondary-color);
}

.projects-container{
    max-width: 800px;
    margin:0px auto;
    padding:10px;
}

.item-list-image{
    border-radius: 10px;
}

.item-list-title{
    font-family: var(--primary-font), sans-serif;
    color: var(--secondary-color);
    font-size: 18px;
    margin-bottom: 10px;
    margin-top:10px;
    text-align: center;
}

.btn-action{
    display: none;
}