/**
 * Custom WordPress-specific Styles
 * Dibolina Theme
 *
 * @package Dibolina
 * @since 1.0.0
 */

/**
 * Global Link Styles - Override Bootstrap
 */
a {
    color: rgb(44, 44, 44);
}

/**
 * Mobile Menu Styles
 */
.mobile-menu-wrapper {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100%;
    background: #fff;
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.mobile-menu-wrapper.active {
    right: 0;
}

body.mobile-menu-active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

body.mobile-menu-active,
body.overflow-hidden {
    overflow: hidden !important;
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    color: #333;
    z-index: 10;
}

.mobile-menu-close:hover {
    color: var(--theme-color-2, #004540);
}

.mobile-menu {
    padding: 80px 30px 30px;
}

.mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu ul li {
    margin-bottom: 10px;
    width: 100%;
}

.mobile-menu ul li a {
    display: block;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    font-size: 18px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.mobile-menu ul li a:hover,
.mobile-menu ul li.current-menu-item > a,
.mobile-menu ul li.current_page_item > a,
.mobile-menu ul li.current-menu-parent > a {
    background: rgba(0, 69, 64, 0.1);
    color: var(--theme-color-3, #004540);
}

/**
 * WordPress Admin Bar Adjustments
 */
body.admin-bar .mobile-menu-wrapper {
    top: 32px;
    height: calc(100% - 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .mobile-menu-wrapper {
        top: 46px;
        height: calc(100% - 46px);
    }
}

/**
 * Navigation Active State - WordPress Dynamic Classes
 */
.main-menu-2 ul li.current-menu-item > a,
.main-menu-2 ul li.current_page_item > a,
.main-menu-2 ul li.current-menu-parent > a,
.main-menu-2 ul li.current-menu-ancestor > a {
    color: var(--theme-color-2, #004540);
    background: rgba(217, 217, 217, 0.16);
}

/**
 * Footer Social Links Styling
 */
.footer-social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.footer-social-links .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 18px;
    transition: all 0.3s ease;
}

.footer-social-links .social-links a:hover {
    background: var(--theme-color-2, #004540);
    transform: translateY(-3px);
}

/**
 * WordPress Core Overrides
 */

/* Remove extra spacing from WordPress blocks if not using them */
.wp-block-group {
    margin: 0;
}

/* Alignments */
.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1em;
}

/* Responsive images */
img {
    height: auto;
    max-width: 100%;
}

/**
 * Accessibility Improvements
 */

/* Prefers reduced motion: rispetta la preferenza utente (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
    video.video-presentazione,
    video.presentazione {
        display: none !important;
    }

    [data-aos] {
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .swiper-wrapper {
        transition-duration: 0s !important;
    }

    .swiper-slide {
        transition: none !important;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    z-index: 100000;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* Focus visible for keyboard navigation (WCAG 2.4.7)
 * Regola globale con !important per sovrascrivere i reset
 * di outline:0 / box-shadow:none presenti in main.css.
 * Usa :focus-visible per attivarsi solo da tastiera,
 * senza mostrare outline al click del mouse. */
*:focus-visible {
    outline: 2px solid var(--theme-color-2, #004540) !important;
    outline-offset: 2px !important;
    box-shadow: none;
}

/* Eccezione: non mostrare outline sui contenitori non interattivi */
.tab-content:focus-visible,
.swiper-wrapper:focus-visible,
.swiper-slide:focus-visible {
    outline: none !important;
}

/**
 * Utility Classes
 */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Reset button nativo per hamburger menu (ora è un <button> per accessibilità) */
button.header-bar-3 {
    border: none;
    font: inherit;
    color: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/**
 * Custom Dibolina Styles (from HTML)
 */

/* Container and Shapes */
.container {
    position: relative;
}

.container .shape-9 {
    position: absolute;
    right: 0;
    top: -128px;
}

/* Header */
.header-bottom-layout-2 {
    position: relative;
    width: 80%;
    margin: 0 auto;
}

.top-bar {
    height: 46px;
}

.logo-wrap-2 {
    background: transparent;
    padding: 20px !important;
    border: none !important;
    width: 240px;
}

.logo-wrap-2 img {
    max-width: 225px;
    position: absolute;
    left: 15px;
    top: -83px;
}

/* Navigation */
.main-menu-2 ul li a {
    font-size: 25px;
}

/* Buttons */
.e-primary-btn.grande {
    font-size: 25px;
}

/* Hero Section */
.video-presentazione {
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
    display: block;
    position: absolute;
    top: 0;
    z-index: -10;
}

.hero-slider-active-1 .hero-slider-social .social-links a {
    width: 60px;
    height: 60px;
    font-size: 25px;
}

h1 span {
    display: block;
}

.hero-content-1 .text p {
    font-size: 26px;
}

/* Content Typography */
.grande-contenuto p {
    font-size: 21px;
    margin-bottom: 30px;
}

.grande-contenuto .service p {
    margin-bottom: 0px;
}

/* About Section */
.zig-zag {
    position: absolute;
    z-index: 10;
    width: 100%;
    bottom: 0px;
}

.zig-zag img {
    width: 100%;
}

/* Why Us Section */
.why-us-section .thumb .thumb-2 {
    position: absolute;
    top: 67%;
    left: -16px;
    z-index: 2;
    width: 45%;
}

.why-us-section .thumb .thumb-3 {
    position: absolute;
    bottom: -225px;
    right: 10px;
    z-index: 2;
    width: 53%;
}

.why-us-section .thumb .thumb-3 img {
    border-radius: 10px;
    border: 5px solid var(--white-color);
}

.why-us-section .thumb .thumb-3 .shape-wrapped-thumb .s-shape-1 img {
    border: none;
}

/* Project Cards */
.project-card .thumb > a:before {
    display: none;
}

/* Thumbnails */
.thumb-wrap.gg {
    width: 126%;
}

.thumb-wrap.gg img {
    border-radius: 10px;
}

/* Presentation Video */
.presentazione {
    width: 100%;
    border-radius: 20px;
}

/* Volunteer CTA Section */
.volunteer-cta-wrap {
    position: relative;
    z-index: 1;
    background: #f8f7f0;
    border-radius: 10px;
    padding: 50px 50px 50px 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 104px;
}

.volunteer-cta-wrap .content-wrap {
    max-width: 518px;
}

.volunteer-cta-wrap .content-wrap .common-title {
    margin-bottom: 10px;
}

.volunteer-cta-wrap .content-wrap .common-title h2 span {
    font-size: 35px;
}

.volunteer-cta-wrap .content-wrap .text {
    margin-bottom: 40px;
}

.volunteer-cta-wrap .c-shape-1 {
    position: absolute;
    z-index: -1;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
}

/* Services Section */
.what-we-do-section {
    position: relative;
    overflow: hidden;
}

.what-we-do-section .section-top-2 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    gap: 40px;
}

.what-we-do-section .section-top-2 .left {
    flex: 1;
}

.what-we-do-section .section-top-2 .right {
    flex: 1;
    color: #fff;
}

.what-we-do-section .common-subtitle span {
    color: #fff;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 2px;
}

.what-we-do-section .common-title h2 {
    color: #fff;
    font-size: 42px;
    line-height: 1.2;
    margin-top: 15px;
}

.what-we-do-section .right p {
    margin-bottom: 20px;
    font-size: 18px;
}

.service-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.service-card .icon-wrap {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    font-size: 36px;
    color: #fff;
}

.service-card .service-title {
    color: #fff;
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 600;
}

.service-card .service-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

.shape-10,
.shape-11 {
    position: absolute;
    z-index: 0;
    opacity: 0.3;
}

.shape-10 {
    top: 50px;
    left: -50px;
}

.shape-11 {
    bottom: 50px;
    right: -50px;
}

.page-template-page-contatti .donation-cta-wrapper .author-wrap img {
    width: 24%;
     height:auto;
    border-radius:0px!important;
    object-fit: cover;
     box-shadow:none;
}






/* Responsive Styles */

@media (max-width: 1950px) {
.main-menu-2 ul li a {font-size: 20px;}
.e-primary-btn.grande {font-size: 17px;}
}

@media (max-width: 1620px) {
.logo-wrap-2 img {max-width: 190px;}
.header-bottom-layout-2 {width: 90%;}

}

@media (max-width: 1450px) {
.header-bottom-layout-2 {width: 100%;}
}

@media (max-width: 1250px) {
.main-menu-2 ul li a {font-size: 18px;}
.e-primary-btn.grande {font-size: 15px;}

}

@media (max-width: 1199px) {
    .volunteer-cta-wrap {
        gap: 50px;
        padding: 40px;
    }
}

@media (max-width: 991px) {
    .volunteer-cta-wrap {
        flex-direction: column;
        padding: 40px 30px;
        gap: 30px;
    }

    .volunteer-cta-wrap .content-wrap {
        max-width: 100%;
    }

    .what-we-do-section .section-top-2 {
        flex-direction: column;
    }

    .what-we-do-section .common-title h2 {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .volunteer-cta-wrap {
        padding: 30px 20px;
    }

    .volunteer-cta-wrap .content-wrap .text {
        margin-bottom: 20px;
    }

    .service-card {
        padding: 30px 20px;
    }

    .service-card .icon-wrap {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .service-card .service-title {
        font-size: 20px;
    }
}

/* Mofiche */
.blog-excerpt {margin-bottom: 20px;}
.breadcrumb-title h1, .breadcrumb-nav a, .breadcrumb-nav  {color:#fff}
.breadcrumb-nav a {opacity: 0.8;}
.page-template-page-contatti .contact-info-section {background: #ffffff}

/**
 * Mobile Optimizations - Sprint 3
 * Reduce oversized fonts, fix spacing, optimize logo and burger menu
 */

/* Mobile devices (max-width: 767px) */
@media (max-width: 767px) {
    /* Header - Logo Optimization */
    .header-bottom-layout-2 {
        width: 100%;
    }

    .logo-wrap-2 {
        width: auto;
        padding: 10px 15px !important;
    }

    .logo-wrap-2 img {
        max-width: 120px !important;
        position: static;
        left: auto;
        top: auto;
    }

    /* Burger Menu - Assicura posizione a destra */
    .header-right {
        margin-left: auto;
    }

    .header-bar-3 {
        width: 60px;
        height: 60px;
    }

    /* Typography - Reduce oversized fonts */
    .hero-content-1 .text p {
        font-size: 18px !important;
        line-height: 1.5;
    }

    .grande-contenuto p {
        font-size: 16px !important;
        margin-bottom: 20px;
    }

    .main-menu-2 ul li a {
        font-size: 18px;
    }

    .e-primary-btn.grande {
        font-size: 18px;
        padding: 12px 24px;
    }

    /* Services Section */
    .what-we-do-section .common-title h2 {
        font-size: 24px !important;
    }

    .what-we-do-section .right p {
        font-size: 16px;
    }

    /* Volunteer CTA */
    .volunteer-cta-wrap .content-wrap .common-title h2 span {
        font-size: 24px;
    }

    /* Spacing Adjustments */
    .m-t-120 {
        margin-top: 60px !important;
    }

    .m-t-md-100 {
        margin-top: 50px !important;
    }

    .m-t-xs-80 {
        margin-top: 40px !important;
    }

    .p-t-100 {
        padding-top: 50px !important;
    }

    .p-b-120 {
        padding-bottom: 60px !important;
    }

    .p-t-xs-80 {
        padding-top: 40px !important;
    }

    .p-b-xs-80 {
        padding-bottom: 40px !important;
    }

    /* Hero Section Adjustments */
    .hero-section-5 {
        padding-top: 160px !important;
        padding-bottom: 100px !important;
    }
}

/* Tablet devices (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .logo-wrap-2 img {
        max-width: 150px !important;
        position: static;
    }

    .hero-content-1 .text p {
        font-size: 20px;
    }

    .grande-contenuto p {
        font-size: 18px;
    }

    .e-primary-btn.grande {
        font-size: 20px;
    }

    .what-we-do-section .common-title h2 {
        font-size: 28px !important;
    }
}

/* Small mobile devices (max-width: 480px) */
@media (max-width: 480px) {
    /* Extra small logo for very small screens */
    .logo-wrap-2 img {
        max-width: 130px !important;
    }

    /* Even more compact text */
    .hero-content-1 .text p {
        font-size: 16px !important;
    }

    .grande-contenuto p {
        font-size: 15px !important;
    }

    /* Buttons more compact */
    .e-primary-btn.grande {
        font-size: 16px;
        padding: 10px 20px;
    }

    /* Reduce hero title further if needed */
    .hero-content-5 .title h1 {
        font-size: 28px !important;
    }

    /* Common titles */
    .common-title h2 {
        font-size: 20px !important;
    }

    /* Service cards */
    .service-card .service-title {
        font-size: 18px;
    }

    .service-card .service-description {
        font-size: 14px;
    }

    /* Volunteer CTA */
    .volunteer-cta-wrap .content-wrap .common-title h2 span {
        font-size: 20px;
    }
}

/* Fix for header layout on all mobile sizes */
@media (max-width: 1199px) {
    .header-bottom-layout-2 {
        width: 95%;
    }

    .logo-wrap-2 img {
        position: static;
    }
}

/* Ensure burger menu is always on the right */
.header-bottom-layout-2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    justify-content: flex-end;
}



/* ULteriori */
@media (max-width: 767px) {
h2 {font-size: 20px;}
.main-menu-2 ul li.current-menu-item > a, .main-menu-2 ul li.current_page_item > a, .main-menu-2 ul li.current-menu-parent > a, .main-menu-2 ul li.current-menu-ancestor > a

 {color: #08741e;}



.contact-description {
    font-size: 18px;}

/* Disable ONLY AOS animations on mobile - Show everything immediately */
[data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

.aos-animate {
    opacity: 1 !important;
    transform: none !important;
}

.why-us-section .thumb .thumb-1 {width: 89%;}
.p-b-100 {padding-bottom: 0px;}
.grande-contenuto  {margin-bottom: 30px;}
.why-us-section .thumb .thumb-3 {bottom: -100px;}
.breadcrumb-content {height: 300px;}

.altezza-sopra { height:auto!important;}
.breadcrumb-content {border-radius: 0px; }
.breadcrumb-thumb {border-radius: 0 0px 10px 10px;}

.breadcrumb-section .container-fluid {--bs-gutter-x: 0px;}

/* Attività Culturali - Invert order on mobile (images .lab before text) */
.page-template-page-attivita-culturali .row .col-xl-6.lab {
    order: -1;
}

h1 {font-size: 29px; line-height: 1.3;}
.breadcrumb-content { margin-right: 0;padding: 149px 20px 0px 20px;}
.shape-wrapped-thumb-1 {margin: 0px 0 44px;}
.thumb-wrap.gg {width: 100%!important;}
.e-primary-btn { margin-bottom: 20px;}
.common-title {margin-bottom: 20px!important;}

/* Breadcrumb Image - Mobile Optimization */
.breadcrumb-thumb {
    height: 250px !important;
    margin-left: 0 !important;
}

.altezza-sopra.sopra-due {
    height: 250px !important;
}

.breadcrumb-thumb img {
    object-fit: cover;
    object-position: center;
}

/* Breadcrumb Section - Stack vertically on mobile (Titolo prima, immagine dopo) */
.breadcrumb-section .row {
    flex-direction: column;
}



}

/* Tablet - Medium screens (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .breadcrumb-thumb {
        height: 400px !important;
    }

    .altezza-sopra.sopra-due {
        height: 400px !important;
    }

    .breadcrumb-section .row {
        flex-direction: column;
    }
}

/* Contact Form 7 Submit Button */
.wpcf7-submit {
    background-color: var(--theme-color-3, #004540) !important;
    color: #fff !important;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wpcf7-submit:hover {
    background-color: #003330 !important;
}

/* Heading hierarchy fixes - preserve visual appearance */
.contact-map-box h2,
.contact-form-box h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--theme-color-3);
    margin-bottom: 25px;
}

.contact-info-item h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #393939;
}

.contact-social h3 {
    font-size: 20px;
    font-weight: 600;
}

.event-card .event-card-top .top-left .event-date .h3 {
    color: var(--theme-color-3);
    font-weight: 500;
    font-size: 40px;
    line-height: 14px;
    margin-bottom: 0;
}

.event-card .event-card-top .top-left .event-date .h3 span {
    color: var(--body-color);
    font-size: 18px;
    line-height: 22px;
}

.experience-shape-2 .h3 {
    line-height: 86%;
    margin-bottom: 0;
    color: transparent;
    -webkit-text-stroke: 1px var(--theme-color-3);
    font-style: normal;
    font-weight: 800;
    font-size: 72px;
}

.footer-address h4,
.email h4,
.phone h4 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
}

.qualita-cta-title {
    font-size: 24px;
}

@media (max-width: 991px) {
    .contact-map-box h2,
    .contact-form-box h2 {
        font-size: 24px;
    }

    .event-card .event-card-top .top-left .event-date .h3 {
        font-size: 28px;
        line-height: 0.8;
    }

    .event-card .event-card-top .top-left .event-date .h3 span {
        font-size: 16px;
        line-height: 1;
    }
}

@media (max-width: 767px) {
    .event-card .event-card-top .top-left .event-date .h3 {
        font-size: 24px;
        line-height: 0.8;
    }

    .event-card .event-card-top .top-left .event-date .h3 br {
        display: none;
    }

    .event-card .event-card-top .top-left .event-date .h3 span {
        font-size: 16px;
        line-height: 1;
    }

    .experience-shape-2 .h3 {
        font-size: 40px;
    }
}