/* Fonts & base typography */
@import url("https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,400;0,700;1,400&family=Barlow+Condensed:ital,wght@0,400;0,700;1,400&display=swap");

html, body {
    font-family: "Barlow", sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 18px !important;
    line-height: 1.6;
}

html {
    overflow-y: auto !important;
}

body {
    overflow-y: auto !important;
    overflow-x: hidden;
}

p, li, a, input, textarea, select {
    font-family: "Barlow", sans-serif !important;
    font-size: 18px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Barlow Condensed", sans-serif !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.2;
}

h1 { font-size: 2.38rem !important; }
h2 { font-size: 1.87rem !important; }
h3 { font-size: 1.53rem !important; }

.uk-navbar-nav > li > a {
    font-family: "Barlow Condensed", sans-serif !important;
    font-size: 19px !important;
}

/* Utilities */
.margin-top-10 { margin-top: 10px; }
.margin-top-30 { margin-top: 30px; }
.margin-top-50 { margin-top: 50px; }
.margin-top-70 { margin-top: 70px; }
.margin-top-90 { margin-top: 90px; }

.text-center { text-align: center; }
.color-whitegray { color: #CCC; }
.line-height-18 { line-height: 1.8em; }

.section-title {
    margin-bottom: 30px;
}

.section-bottom-padding {
    padding-bottom: 100px;
}

/* Subpage content width */
.about-information-area .container {
    width: 65% !important;
    max-width: none !important;
}

/* Narrower text-only sections (title, description) */
.about-information-area .container .section-title,
.about-information-area .container .attribute-long,
.about-information-area .container > .content-view-full > .class-folder > .short_description {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* Page media layout: image + text side-by-side with offset background */
.attivita-media {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    align-items: flex-start;
    margin-bottom: 30px;
}

.attivita-media__image {
    position: relative;
    flex: 0 0 30%;
    max-width: 30%;
}

.attivita-media__image::before {
    content: "";
    position: absolute;
    right: -14px;
    bottom: -14px;
    width: 100%;
    height: 100%;
    background: #2a647c;
    z-index: 0;
}

.attivita-media__img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
}

.attivita-media__text {
    flex: 1 1 0;
    min-width: 280px;
    background: transparent;
    padding: 0;
    box-shadow: none;
    border: none;
}

@media (max-width: 768px) {
    .attivita-media {
        gap: 30px;
        margin-bottom: 60px;
    }

    .attivita-media__image,
    .attivita-media__text {
        flex-basis: 100%;
        max-width: 100%;
    }

    .attivita-media__image::before {
        right: -10px;
        bottom: -10px;
    }
}

.attivita-media__text div,
.attivita-media__text .adventure-list-container,
.attivita-media__text .single-list-item {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.attivita-full {
    margin-bottom: 100px;
}



/* Adventure list layout: remove grey box and add offset image background */
.single-list-item .row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

@media (min-width: 768px) {
    .single-list-item .row {
        flex-wrap: nowrap;
        gap: 40px;
    }

    .single-list-item .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .single-list-item .col-md-8 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

.single-list-item .col-md-4,
.single-list-item .col-md-8 {
    padding-left: 0;
    padding-right: 0;
}

.adventure-img {
    border: none !important;
    position: relative;
}

.adventure-img::after {
    content: none !important;
    display: none !important;
}

.adventure-img::before {
    content: "" !important;
    position: absolute !important;
    right: -14px !important;
    bottom: -14px !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: 100% !important;
    background: #2a647c !important;
    z-index: 0;
}

.adventure-img img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
}

.adventure-list-container,
.adventure-list-container::before,
.adventure-list-container::after {
    background: transparent !important;
    border: none !important;
    border-bottom: none !important;
}

.adventure-list-container {
    margin-right: 0 !important;
    padding-left: 0 !important;
    font-size: 1.25rem !important;
    line-height: 1.6 !important;
}

.col-md-8.margin-left-list {
    margin-left: 0 !important;
}

@media (max-width: 768px) {
    .single-list-item .row {
        display: block;
    }

    .adventure-img::before {
        right: -10px;
        bottom: -10px;
    }
}

/* Alternate: even items have image on the right */
@media (min-width: 768px) {
    .section-padding > .row > .col-md-12:nth-child(even) .single-list-item .row {
        flex-direction: row-reverse;
    }

    .section-padding > .row > .col-md-12:nth-child(even) .adventure-img::before {
        right: auto !important;
        left: -14px !important;
        bottom: -14px !important;
    }
}

/* Banner title */
.section-titletop {
    margin-bottom: 80px;
}

.section-titletop p {
    color: #FFF !important;
}

.section-titletop h1 {
    display: inline-block;
    font-size: 35px;
    font-weight: 300;
    line-height: 26px;
    margin-bottom: 18px;
    padding-bottom: 38px;
    position: relative;
    text-transform: uppercase;
}

.banner-area .section-titletop h1 {
    color: #ffffff;
    font-size: 30px;
}
.section-titletop h1::before,
.section-titletop h1::after,
.section-titletop::after,
.section-titletop .title-border::after {
	display: none !important;
	content: none !important;
	background: none !important;
}




/* Slideshow/carousel overrides */
#pointer166 {
    height: 642px;
}

#pointer166 .quadroContenuti,
#pointer166 .bloccoPosizionamentoAusiliarioImmagine {
    height: 100% !important;
}

.HnA_loading {
    z-index: 1 !important;
}

.HS_quadroMisura {
    display: flex;
}

html .HnA_loading {
    background-size: cover !important;
}

.slider-area {
	position: relative;
    margin-top: 0;
    padding-top: 0;
	background: #000;
	overflow: hidden;
    /* Altezza fissa basata sul viewport meno l'header (~120px) */
    height: calc(100vh - 120px);
}

/* Forza l'altezza su tutta la catena di contenitori UIkit */
.slider-area > div {
    height: 100%;
}

.slider-area .uk-slideshow-items {
    height: 100% !important;
    min-height: 0;
}

.slider-area .uk-slideshow-items > li {
    will-change: opacity;
    height: 100% !important;
    width: 100%;
}

.slider-area .uk-slideshow-items > li > a {
    display: block;
    width: 100%;
    height: 100%;
}

.slider-area .uk-slideshow-items img {
    display: block;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
}

.slider-arrow {
    background: transparent !important;
    border: none !important;
    width: 75px;
    height: 75px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: opacity 0.3s;
    color: white !important;
    padding: 0;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
}

.slider-arrow:hover {
    opacity: 1;
    border-color: #fff !important;
}

.slider-arrow svg {
    display: none;
}

.slider-arrow::before,
.slider-arrow[uk-slidenav-previous]::before,
.slider-arrow[uk-slidenav-next]::before {
    content: "";
}

.slider-arrow[uk-slidenav-previous] {
    background-image: url("https://www.istitutodecarneri.it/modules/mod_omnislider/media/risorseBottoni/Omni_linea_bianca/StileBase/frecciasx.png") !important;
}

.slider-arrow[uk-slidenav-next] {
    background-image: url("https://www.istitutodecarneri.it/modules/mod_omnislider/media/risorseBottoni/Omni_linea_bianca/StileBase/frecciadx.png") !important;
}

/* Service area */
.single-service h5 {
    font-size: 16px;
}

.single-icon {
    margin-top: 10px !important;
}

.primary-img, .secondary-img {
    max-height: 100px;
}

/* ATS sections */
.ats-section {
    padding-top: 100px;
    padding-bottom: 100px;
}

.ats-section--news {
    background: rgba(241, 189, 64, 0.3);
}

.ats-section--notices {
    background: rgba(42, 100, 124, 0.3);
    margin-bottom: 120px;
}

.ats-section .section-title {
    margin-bottom: 60px;
}

.ats-section .section-title h1 {
    display: inline-block;
    font-size: 35px;
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 18px;
    padding-bottom: 38px;
    position: relative;
    text-transform: uppercase;
    color: #1c3b5a;
}

.ats-section--news .section-title h1,
.ats-section--notices .section-title h1 {
    color: #1c3b5a;
}

.ats-section .section-title h1::before,
.ats-section .section-title h1::after {
    background: rgba(0, 0, 0, 0.3) none repeat scroll 0 0 !important;
    bottom: 0;
    content: "" !important;
    display: block !important;
    height: 1px;
    position: absolute;
    text-align: center;
    width: 160px;
}

.ats-section .section-title h1::before {
    left: 50%;
    margin-left: -193.5px;
}

.ats-section .section-title h1::after {
    right: 50%;
    margin-right: -193.5px;
}

.ats-section .title-border {
    position: relative;
}

.ats-section .title-border::after {
    background: transparent url("../images/icon/title-icon-2.png") no-repeat scroll 0 0;
    bottom: 11px;
    content: "";
    height: 22px;
    left: 50%;
    margin-left: -34.5px;
    position: absolute;
    width: 67px;
    mix-blend-mode: multiply;
    opacity: 0.9;
}

.ats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
    gap: 24px;
    justify-content: center;
    justify-items: stretch;
}

.ats-card {
    background: #ffffff;
    border-radius: 2px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    padding: 22px 24px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ats-card a {
    color: #1c3b5a;
    text-decoration: none;
    font-weight: 600;
}

.ats-card a:hover {
    text-decoration: underline;
}

.ats-card p {
    margin: 0;
    color: #1c3b5a;
}

.ats-section--notices + .service-area {
    margin-top: 0;
}

.service-area {
    padding-bottom: 120px;
}

/* Partner area */
.partner-area .section-title h1 {
    margin-bottom: 0;
    font-size: 35px !important;
    line-height: 1.2;
    text-transform: uppercase;
    font-weight: 400;
    display: inline-block;
    position: relative;
    padding-bottom: 28px;
    letter-spacing: 1px;
}

.partner-area .title-border::after {
    background: none !important;
    content: none !important;
    display: none !important;
}

.partner-area .section-title h1::before {
    display: none !important;
    content: none !important;
}

.partner-area .section-title h1::after {
    background: rgba(0, 0, 0, 0.4) none repeat scroll 0 0;
    content: "";
    height: 1px;
    left: 50%;
    position: absolute;
    bottom: 0;
    transform: translateX(-50%);
    width: 160px;
}

.partner-area .col-md-3,
.partner-area .partner-item {
    width: auto;
    float: none;
}

.partner-area a {
    display: block;
    margin-bottom: 1px;
}

.partner-carousel {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-top: 28px;
}

.partner-carousel img {
    max-height: 80px;
    max-width: 180px;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.partner-item {
    width: 180px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-area .section-title h1 span {
    font-family: "Barlow Condensed", sans-serif !important;
    font-size: inherit !important;
    font-weight: 700;
    text-transform: uppercase;
    line-height: inherit;
    display: inline-block;
}

.carousel-style-two .owl-buttons div i {
    color: #afafaf;
    font-size: 45px;
}

.carousel-style-two.owl-theme .owl-controls .owl-buttons div {
    background: rgba(0, 0, 0, 0) none repeat scroll 0 0;
    left: -25px;
    opacity: 0;
    position: absolute;
    top: 31%;
    transition: all 0.3s ease-in 0s;
}

.carousel-style-two .owl-buttons div i:hover {
    color: #999999;
}

.carousel-style-two.owl-theme .owl-controls .owl-buttons .owl-next {
    left: auto;
    right: -25px;
}

.carousel-style-two.owl-theme:hover .owl-controls .owl-buttons div {
    opacity: 1;
}

/* Portfolio/staff */
.single-portfolio {
    overflow: hidden;
    position: relative;
}

.single-portfolio img {
    width: 100%;
    height: auto;
    display: block;
}

/* Folder cards — yellow boxes on white background */
.ats-folder-section {
    background: #ffffff;
    padding: 40px 0;
}

.ats-folder-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
    gap: 24px;
    justify-content: center;
    justify-items: stretch;
}

.ats-folder-card {
    background: rgba(241, 189, 64, 0.3);
    border-radius: 2px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    padding: 22px 24px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ats-folder-card:hover {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
    transform: translateY(-2px);
}

.ats-folder-card a {
    color: #1c3b5a;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
}

.ats-folder-card a:hover {
    text-decoration: underline;
}

.single-portfolio.folder {
    margin-bottom: 30px;
}

.portfolio-text {
    background: transparent;
    height: auto;
    left: 0;
    padding: 5px 12px;
    position: absolute;
    transition: all 0.3s ease-in-out 0s;
    width: 100%;
}

.portfolio-text::after {
    background: rgba(255, 255, 255, 0.9) none repeat scroll 0 0;
    content: "";
    height: 135px;
    left: -7px;
    opacity: 1;
    position: absolute;
    top: -76px;
    transform: rotate(4deg) scale(1.1);
    transform-origin: 0 bottom 0;
    width: 100%;
}

.portfolio-text h4 {
    margin-bottom: 8px;
}

.portfolio-text h4 a {
    font-size: 20px;
    text-transform: uppercase;
}

.portfolio-text.folder h4 {
    font-size: 14px;
}

.portfolio-text.folder h4 a {
    color: #000;
}

.portfolio-text > p {
    display: none;
    font-size: 13px;
    margin-bottom: 8px;
}

.portfolio-text p,
.portfolio-text h4 a {
    position: relative;
    z-index: 9;
}

.portfolio-text.effect-bottom {
    bottom: 0;
    top: auto;
}

.portfolio-text.effect-bottom::after {
    bottom: -70px;
    left: -11px;
    opacity: 1;
    top: auto;
}

.portfolio-area .col-md-3 .single-portfolio:first-child {
    margin-bottom: 30px;
}

.single-portfolio:hover .portfolio-text p {
    display: block;
    margin-bottom: 5px;
}

.single-portfolio:hover .portfolio-text::after {
    background: rgba(33, 34, 39, 0.9) none repeat scroll 0 0;
    left: -8px;
    top: -23px;
}

.single-portfolio:hover .portfolio-text.effect-bottom::after {
    background: rgba(33, 34, 39, 0.9) none repeat scroll 0 0;
    left: -11px;
    top: -5px;
}

.single-portfolio:hover .portfolio-text h4 {
    margin-bottom: 13px;
}

.single-portfolio:hover .portfolio-text p,
.single-portfolio:hover .portfolio-text h4 a {
    color: #ffffff;
}

.single-portfolio:hover .portfolio-text {
    animation: 1500ms ease-in-out 0s normal none 1 running flipInX;
}

@keyframes flipInX {
    0% {
        transform: perspective(400px) rotateX(90deg);
        opacity: 0;
    }
    40% {
        transform: perspective(400px) rotateX(-10deg);
    }
    70% {
        transform: perspective(400px) rotateX(10deg);
    }
    100% {
        transform: perspective(400px) rotateX(0deg);
        opacity: 1;
    }
}


/* Member (AKA staff) grid */
.portfolio-area .container {
    width: 90% !important;
    max-width: none !important;
}

.portfolio-area .row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px;
    margin: 0 auto 20px auto !important;
    width: 100%;
}

.portfolio-area .row::before,
.portfolio-area .row::after {
    display: none !important;
}

.member-item {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
    position: relative;
}

@media (max-width: 991px) {
    .portfolio-area .row {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 767px) {
    .portfolio-area .row {
        grid-template-columns: 1fr !important;
    }
}

/* Member (AKA staff) info block (below photo) */
.member-info {
    padding: 12px 4px 0;
    text-align: left;
}

.member-info h4 {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 4px;
    line-height: 1.3;
    color: #222;
}

.member-info .member-discipline {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 2px;
    color: #444;
}

.member-info .member-contact {
    font-size: 14px;
    margin: 0;
    color: #666;
    word-break: break-word;
}

.member-info .member-contact a {
    color: #2a647c;
    text-decoration: none;
}

.member-info .member-contact a:hover {
    text-decoration: underline;
}

/* Attribute list */
.attribute-long {
    font-size: 16px;
}

.attribute-long ul > li {
    padding-left: 13px;
    position: relative;
}

.attribute-long ul li:after {
    content: "";
    font-family: FontAwesome;
    font-size: 14px;
    left: 0px;
    position: absolute;
    top: 2px;
    width: 13px;
    transition: all 0.3s ease 0s;
}

/* Blog */
.single-blog-post-text h4 {
    font-family: "Open Sans", sans-serif;
    font-size: 25px;
}

.blog-text a {
    text-decoration: underline;
}

/* Tables */
table {
    font-size: 0.9em;
    border: 1px solid #c0c0c0;
    border-collapse: collapse;
    margin: 0 auto 1em auto;
}

table caption {
    margin: 0.5em auto 0.3em auto;
    padding: 0.3em 0;
    background-color: #e8e8e8;
    border: 1px solid #D1D1D1;
    text-align: center;
}

table td, table th {
    border: 1px solid #c0c0c0;
    padding: 0.1em 0.2em;
}

table td.lefthead {
    width: 5em;
    background-color: #e8e8e8;
}

table th {
    color: #fff;
    background-color: #909090;
    padding: 0.3em 0.1em;
}

table.renderedtable {
    width: 100%;
}

/* Toolbar */
.tm-toolbar .toolbar-social {
    display: flex;
    align-items: center;
    gap: 40px;
}

.tm-toolbar .toolbar-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #0b4c8f;
}

.tm-toolbar .toolbar-contact-link:hover {
    color: #083a6d;
}

.tm-toolbar .toolbar-contact-link svg {
    width: 32px;
    height: 32px;
}

.tm-toolbar .toolbar-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    text-decoration: none;
    color: #0b4c8f;
    transition: color 0.2s ease;
}

.tm-toolbar .toolbar-social-link:hover {
    background: transparent;
    color: #083a6d;
}

.tm-toolbar .toolbar-social-link svg {
    width: 27px;
    height: 27px;
}

/* ==========================================================================
   RESPONSIVE DESIGN — Mobile-first overrides
   Breakpoints: 1200px (large desktop), 991px (tablet landscape),
                768px (tablet portrait), 576px (mobile landscape), 480px (mobile)
   ========================================================================== */

/* --- Fix footer desktop columns (style.css col-sm-6 sovrascrive col-md-3) */
@media (min-width: 992px) {
    .footer-widget-area .col-lg-3,
    .footer-widget-area .col-md-3 {
        width: 25%;
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* --- Large desktop / Laptop ------------------------------------------- */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }

    .megamenu {
        left: -200px !important;
        max-width: 960px !important;
        width: 90vw !important;
    }
}

/* --- Tablet landscape ------------------------------------------------- */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }

    .section-padding {
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .section-margin {
        margin-top: 60px;
        margin-bottom: 60px;
    }

    .section-title {
        margin-bottom: 40px;
    }

    .section-title h1 {
        font-size: 28px;
    }

    .about-information-area .container {
        width: 85% !important;
    }

    .ats-section {
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .ats-section--notices {
        margin-bottom: 80px;
    }

    .service-area {
        padding-bottom: 80px;
    }

    /* Footer: 2 columns on tablet */
    .footer-widget-area .col-lg-3,
    .footer-widget-area .col-md-3,
    .footer-widget-area .col-sm-3 {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
        margin-bottom: 30px;
    }

    /* Service icons: allow wrapping */
    .single-service {
        width: 140px;
        height: auto;
        min-height: 140px;
    }

    /* Portfolio/staff grid */
    .portfolio-area .container {
        width: 95% !important;
    }

    /* Partner area */
    .partner-carousel {
        gap: 24px;
    }

    .partner-item {
        width: 140px;
        height: 60px;
    }

    .partner-carousel img {
        max-height: 60px;
        max-width: 140px;
    }

    /* Fun factor icons */
    .fun-factor-three .single-icon-three {
        height: auto;
        width: 140px;
    }

    /* Carousel text & buttons */
    .banner-content h1 {
        font-size: 42px !important;
        margin-bottom: 10px;
    }

    .banner-content h2 {
        font-size: 24px !important;
    }

    .banner-content h3 {
        font-size: 16px !important;
    }

    .slider-area .text-content {
        max-width: 90%;
    }

    .buttons-slide {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        margin-top: 16px !important;
    }

    .buttons-slide .btn {
        font-size: 15px !important;
        padding: 8px 14px !important;
    }
}

/* --- Tablet portrait / Large mobile ----------------------------------- */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }

    h1 { font-size: 1.8rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.3rem !important; }

    .section-padding {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .section-bottom-padding {
        padding-bottom: 50px;
    }

    .section-margin {
        margin-top: 40px;
        margin-bottom: 40px;
    }

    .section-title {
        margin-bottom: 30px;
    }

    .section-title h1 {
        font-size: 24px;
        padding-bottom: 24px;
    }

    .section-title h1::before {
        margin-left: -100px;
        width: 80px;
    }

    .section-title h1::after {
        margin-right: -100px;
        width: 80px;
    }

    /* Subpage content: full width on mobile */
    .about-information-area .container {
        width: 95% !important;
    }

    /* ATS sections */
    .ats-section {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .ats-section .section-title {
        margin-bottom: 30px;
    }

    .ats-section .section-title h1 {
        font-size: 24px;
        padding-bottom: 24px;
    }

    .ats-section .section-title h1::before {
        margin-left: -100px;
        width: 80px;
    }

    .ats-section .section-title h1::after {
        margin-right: -100px;
        width: 80px;
    }

    .ats-section--notices {
        margin-bottom: 60px;
    }

    .service-area {
        padding-bottom: 60px;
    }

    /* ATS cards: single column */
    .ats-cards {
        grid-template-columns: 1fr;
    }

    .ats-folder-cards {
        grid-template-columns: 1fr;
    }

    /* Adventure list */
    .adventure-list-container {
        font-size: 1rem !important;
    }

    /* Banner */
    .banner-area .section-titletop h1 {
        font-size: 22px;
    }

    .section-titletop {
        margin-bottom: 40px;
    }

    /* Slider area */
    #pointer166 {
        height: auto;
    }

    .slider-area {
        height: calc(100vh - 100px);
    }

    .slider-arrow {
        width: 45px;
        height: 45px;
    }

    /* Carousel text & buttons */
    .banner-content h1 {
        font-size: 30px !important;
        margin-bottom: 8px;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    }

    .banner-content h2 {
        font-size: 20px !important;
    }

    .banner-content h3 {
        font-size: 14px !important;
    }

    .slider-area .text-content {
        max-width: 92%;
        left: 50% !important;
        right: auto !important;
        transform: translate(-50%, -50%) !important;
    }

    .buttons-slide {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        margin-top: 12px !important;
    }

    .buttons-slide .btn {
        font-size: 14px !important;
        padding: 6px 12px !important;
        white-space: nowrap;
    }

    /* Footer: single column */
    .footer-widget-area .col-lg-3,
    .footer-widget-area .col-md-3,
    .footer-widget-area .col-sm-3 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 24px;
    }

    .footer-widget-area .col-md-6,
    .footer-widget-area .col-sm-6 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 16px;
    }

    .footer-widget-area .payment-image {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        justify-content: center;
    }

    .footer-widget-area .payment-image img {
        height: 40px !important;
        width: auto !important;
    }

    .footer-widget-area .footer-link {
        text-align: center;
        margin-bottom: 16px;
    }

    /* Tables: allow horizontal scroll */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    table.renderedtable {
        width: auto;
        min-width: 100%;
    }

    /* Blog */
    .single-blog-post-text h4 {
        font-size: 20px;
    }

    /* Contact form */
    .contact-form::before {
        width: 100%;
    }

    /* Search */
    .adventure-cat,
    .adventure-cat.destination {
        width: 100%;
        margin-left: 0;
        float: none;
    }

    /* Member / Staff grid */
    .member-info h4 {
        font-size: 16px;
    }

    /* Partner */
    .partner-carousel {
        gap: 16px;
    }

    .partner-item {
        width: 120px;
        height: 50px;
    }

    .partner-carousel img {
        max-height: 50px;
        max-width: 120px;
    }

    /* Page title area */
    .page-title-area .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Float-based layouts: stack vertically */
    .floatleft,
    .floatright {
        float: none !important;
        width: 100% !important;
    }

    /* Attività full section */
    .attivita-full {
        margin-bottom: 50px;
    }
}

/* --- Mobile landscape ------------------------------------------------- */
@media (max-width: 576px) {
    html, body {
        font-size: 16px !important;
    }

    p, li, a, input, textarea, select {
        font-size: 16px;
    }

    h1 { font-size: 1.6rem !important; }
    h2 { font-size: 1.35rem !important; }
    h3 { font-size: 1.15rem !important; }

    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .section-padding {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .section-title h1 {
        font-size: 22px;
        padding-bottom: 20px;
    }

    /* Disable decorative lines on very small screens */
    .section-title h1::before,
    .section-title h1::after {
        width: 60px;
        margin-left: -75px;
        margin-right: -75px;
    }

    /* Slider area */
    .slider-area {
        height: calc(100vh - 80px);
    }

    /* Carousel text & buttons */
    .banner-content h1 {
        font-size: 24px !important;
        margin-bottom: 6px;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    }

    .banner-content h2 {
        font-size: 16px !important;
    }

    .banner-content h3 {
        font-size: 13px !important;
        line-height: 1.4;
    }

    .slider-area .text-content {
        max-width: 94%;
    }

    .buttons-slide {
        margin-top: 10px !important;
        gap: 6px;
    }

    .buttons-slide .btn {
        font-size: 13px !important;
        padding: 5px 10px !important;
    }

    .about-information-area .container {
        width: 100% !important;
    }

    /* Banner-area search elements */
    .banner-area input[type="text"],
    .banner-area input[type="search"],
    .banner-area select {
        width: 100% !important;
        max-width: 100%;
    }

    /* Service area single column */
    .single-service {
        width: 100%;
        max-width: 280px;
        margin: 0 auto 16px;
    }

    /* Breadcrumb */
    .breadcrumb {
        width: auto;
        max-width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* --- Mobile portrait -------------------------------------------------- */
@media (max-width: 480px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .section-title h1 {
        font-size: 20px;
    }

    .ats-section .section-title h1 {
        font-size: 20px;
    }

    /* Slider area */
    .slider-area {
        height: calc(100vh - 60px);
    }

    /* Slider arrows tighter */
    .slider-arrow {
        width: 35px;
        height: 35px;
    }

    /* Carousel text & buttons */
    .banner-content h1 {
        font-size: 20px !important;
        margin-bottom: 4px;
    }

    .banner-content h2 {
        font-size: 14px !important;
    }

    .banner-content h3 {
        font-size: 12px !important;
    }

    .slider-area .text-content {
        max-width: 96%;
        top: 50% !important;
    }

    .buttons-slide {
        margin-top: 8px !important;
        gap: 4px;
    }

    .buttons-slide .btn {
        font-size: 12px !important;
        padding: 4px 8px !important;
        border-radius: 4px;
    }

    /* Full width cards */
    .ats-card {
        padding: 16px 18px;
    }

    .ats-folder-card {
        padding: 16px 18px;
    }

    /* Tables: smaller font */
    table {
        font-size: 0.8em;
    }

    /* Partner area reduced */
    .partner-item {
        width: 100px;
        height: 40px;
    }

    .partner-carousel img {
        max-height: 40px;
        max-width: 100px;
    }

    .partner-carousel {
        gap: 12px;
    }

    /* Margin reductions */
    .attivita-full {
        margin-bottom: 30px;
    }

    .section-titletop {
        margin-bottom: 25px;
    }

    /* Footer logos */
    .footer-widget-area .payment-image img {
        height: 32px !important;
    }
}

/* --- Mobile header tweaks (applies when UIkit hides desktop header) ---- */
@media (max-width: 959px) {
    /* Override Ycss.css: nasconde toolbar desktop su mobile (Ycss forza display:inline-block !important) */
    .tm-toolbar.tm-toolbar-default {
        display: none !important;
    }

    /* Override Ycss.css: rimuove padding-top forzato sull'header mobile */
    .tm-header-mobile {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* Mobile header logo sizing */
    .tm-header-mobile img {
        max-height: 42px;
        width: auto;
    }

    .tm-header-mobile .uk-logo {
        padding: 8px 0;
        padding-left: 12px;
    }

    /* Offcanvas menu styling */
    #tm-dialog-mobile .uk-offcanvas-bar {
        width: 280px;
        padding: 20px;
    }

    /* Offcanvas: loghi affiancati */
    #tm-dialog-mobile .offcanvas-logos {
        display: flex !important;
        align-items: center !important;
        padding-bottom: 16px;
        margin-bottom: 16px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    #tm-dialog-mobile .offcanvas-logos a {
        display: inline-flex !important;
        align-items: center;
    }
    #tm-dialog-mobile .offcanvas-logos img {
        max-height: 36px;
        width: auto;
        display: block !important;
    }
    #tm-dialog-mobile .offcanvas-logos .logo-separator {
        width: 1px;
        height: 28px;
        background: rgba(255,255,255,0.15);
        margin: 0 10px;
        flex-shrink: 0;
    }

    /* Accordion mobile menu */
    #tm-dialog-mobile .mobile-accordion-nav {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    #tm-dialog-mobile .mobile-accordion-nav > li > a {
        font-family: "Barlow Condensed", sans-serif;
        font-size: 17px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        color: #fff;
        padding: 10px 0;
        display: block;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    #tm-dialog-mobile .mobile-accordion-nav > li > a:hover {
        color: rgba(255,255,255,0.7);
        text-decoration: none;
    }

    #tm-dialog-mobile .mobile-accordion-nav > li.uk-parent > a {
        position: relative;
        padding-right: 36px;
    }

    /* Nasconde l'icona di default di UIkit */
    #tm-dialog-mobile .mobile-accordion-nav > li.uk-parent > a::after {
        display: none !important;
    }

    /* Indicatore +/− inline */
    #tm-dialog-mobile .mobile-accordion-nav > li.uk-parent > a > .nav-toggle-icon {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        font-size: 22px;
        font-weight: 400;
        line-height: 1;
        color: rgba(255,255,255,0.6);
        pointer-events: none;
    }

    #tm-dialog-mobile .mobile-accordion-nav .uk-nav-sub {
        list-style: none;
        padding: 6px 0 10px 14px;
        margin: 0;
        display: none;
    }

    #tm-dialog-mobile .mobile-accordion-nav > li.uk-open > .uk-nav-sub {
        display: block;
    }

    #tm-dialog-mobile .mobile-accordion-nav .uk-nav-sub li a {
        font-family: "Barlow", sans-serif;
        font-size: 15px;
        font-weight: 400;
        color: rgba(255,255,255,0.85);
        padding: 6px 0;
        display: block;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    #tm-dialog-mobile .mobile-accordion-nav .uk-nav-sub li:last-child a {
        border-bottom: none;
    }

    #tm-dialog-mobile .mobile-accordion-nav .uk-nav-sub li a:hover {
        color: #fff;
        text-decoration: none;
    }

    #tm-dialog-mobile .uk-offcanvas-bar .header-top,
    #tm-dialog-mobile .uk-offcanvas-bar .header-logo-menu,
    #tm-dialog-mobile .uk-offcanvas-bar .logo-menu-bg,
    #tm-dialog-mobile .uk-offcanvas-bar .logo {
        display: none !important;
    }

    #tm-dialog-mobile .uk-offcanvas-bar .mobile-menu-area {
        display: block !important;
    }

    #tm-dialog-mobile .uk-offcanvas-bar .mobile-menu-area .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    #tm-dialog-mobile .uk-offcanvas-bar .mobile-menu-area .row {
        margin: 0 !important;
    }

    #tm-dialog-mobile .uk-offcanvas-bar .mobile-menu-area .col-lg-12,
    #tm-dialog-mobile .uk-offcanvas-bar .mobile-menu-area .col-md-12,
    #tm-dialog-mobile .uk-offcanvas-bar .mobile-menu-area .col-sm-12 {
        padding: 0 !important;
        width: 100% !important;
    }

    /* Hide legacy page_navigation desktop header inside offcanvas */
    #tm-dialog-mobile .uk-offcanvas-bar > header > .header-top {
        display: none !important;
    }

    #tm-dialog-mobile .uk-offcanvas-bar > header > .header-logo-menu {
        display: none !important;
    }

    /* Navigation links inside offcanvas */
    #tm-dialog-mobile .mean-nav ul li a {
        font-size: 16px;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    #tm-dialog-mobile .mean-nav {
        margin-top: 0 !important;
    }
}

/* --- Mobile landscape (short viewport) -------------------------------- */
@media (max-height: 500px) and (orientation: landscape) {
    .slider-area {
        height: 100vh;
        max-height: none;
    }

    .slider-area .uk-position-center {
        top: 45% !important;
        padding: 0 60px !important;
    }

    .banner-content h1 {
        font-size: 18px !important;
        margin-bottom: 4px;
        line-height: 1.2;
    }

    .banner-content h2 {
        font-size: 13px !important;
        margin-bottom: 2px;
    }

    .banner-content h3 {
        font-size: 11px !important;
        line-height: 1.3;
    }

    .buttons-slide {
        margin-top: 6px !important;
        gap: 4px;
        flex-wrap: nowrap;
    }

    .buttons-slide .btn {
        font-size: 11px !important;
        padding: 3px 8px !important;
    }

    .slider-arrow {
        width: 30px;
        height: 30px;
    }
}

/* --- Print styles ----------------------------------------------------- */
@media print {
    .tm-toolbar,
    .tm-header,
    .tm-header-mobile,
    #tm-dialog-mobile,
    .slider-area,
    .footer-widget-area,
    .banner-area {
        display: none !important;
    }

    .container {
        max-width: 100% !important;
        width: 100% !important;
    }

    .about-information-area .container {
        width: 100% !important;
    }
}