/*
 * Template "ariloano" per Joomla 6 - riproduce il vecchio Shape5 Vertex di www.ariloano.it.
 * Misure e colori presi con Chrome dal sito Joomla 3 (ottobre 2026):
 * sfondo #EAE7E7, arancione #FF5B00, titoli Oswald maiuscoli, testo Verdana,
 * larghezza 90% della finestra, colonne 20% | 60% | 20%.
 */

@font-face {
    font-family: "Oswald";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/oswald-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Oswald";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/oswald-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --al-bg: #eae7e7;
    --al-orange: #ff5b00;
    --al-text: #333;
    --al-border: #c5c5c5;
    --al-shadow: 0 0 8px #e1e1e1;
    --al-menu-bg: #151515;
    --al-title-font: "Oswald", "Arial Narrow", Arial, sans-serif;
    --al-text-font: Verdana, Helvetica, Arial, sans-serif;
    --al-base: 12.8px;
    --al-page-width: 90%;
    --al-line: 1.35;
}
html.font-small { --al-base: 11.2px; }
html.font-large { --al-base: 14.4px; }

html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--al-bg);
    color: var(--al-text);
    font-family: var(--al-text-font);
    font-size: var(--al-base);
    line-height: 1.4;
}
a { color: var(--al-orange); text-decoration: none; }
a:hover, a:focus { color: var(--al-orange); text-decoration: underline; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--al-orange); outline-offset: 2px; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; background: #fff; padding: 8px 12px; }
.skip-link:focus { left: 8px; }

.al-wrap {
    width: var(--al-page-width);
    margin: 0 auto;
    padding-top: 28px;
}

/* ---------- testata ---------- */
.al-header { margin: 0 8px 15px; }
.al-logo {
    background: #fff;
    border-radius: 6px 6px 0 0;
    line-height: 0;
    overflow: hidden;
}
.al-logo a { display: block; }
/* testata: proporzioni originali della foto, mai ingrandita oltre i suoi 1500 px, centrata nella larghezza del sito */
.al-logo__img { display: block; width: 100%; max-width: 1500px; height: auto; margin: 0 auto; object-fit: contain; }

/* ---------- menu principale (barra nera) ---------- */
.al-menu { background: var(--al-menu-bg); font-family: var(--al-title-font); text-transform: uppercase; }
.al-menu__toggle { display: none; }
.al-menu ul { list-style: none; margin: 0; padding: 0; }
.al-menu__list > ul, .al-menu__list .mod-menu {
    display: flex;
    flex-wrap: wrap;
}
.al-menu__list > ul > li, .al-menu__list .mod-menu > li {
    position: relative;
    padding: 7px 17px 0;
    height: 44px;
    box-sizing: border-box;
}
.al-menu__list .mod-menu > li > a,
.al-menu__list .mod-menu > li > span,
.al-menu__list .mod-menu > li > button {
    display: inline-block;
    color: #fff;
    font-size: calc(var(--al-base) * 1.82);
    line-height: 32px;
    background: none;
    border: 0;
    padding: 0;
    font-family: inherit;
    text-transform: inherit;
    cursor: pointer;
}
.al-menu__list .mod-menu > li.current > a,
.al-menu__list .mod-menu > li.active > a,
.al-menu__list .mod-menu > li > a:hover,
.al-menu__list .mod-menu > li > a:focus,
.al-menu__list .mod-menu > li:hover > span,
.al-menu__list .mod-menu > li:hover > a { color: var(--al-orange); text-decoration: none; }
.al-menu__list .mod-menu > li.parent > a::after,
.al-menu__list .mod-menu > li.parent > span::after {
    content: "";
    display: inline-block;
    width: 9px;
    height: 6px;
    margin-left: 6px;
    vertical-align: middle;
    background: url("../images/menu-freccia.png") no-repeat;
}
/* sottomenu a tendina */
.al-menu__list .mod-menu ul {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 50;
    min-width: 230px;
    background: #fff;
    border: 1px solid var(--al-border);
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .2);
    padding: 6px 0;
    text-transform: none;
}
.al-menu__list .mod-menu li:hover > ul,
.al-menu__list .mod-menu li:focus-within > ul { display: block; }
.al-menu__list .mod-menu ul li { padding: 0; }
.al-menu__list .mod-menu ul a,
.al-menu__list .mod-menu ul span {
    display: block;
    padding: 7px 16px;
    color: var(--al-text);
    font-size: calc(var(--al-base) * 1.3);
    white-space: nowrap;
}
.al-menu__list .mod-menu ul a:hover,
.al-menu__list .mod-menu ul a:focus { color: var(--al-orange); background: #f6f6f6; text-decoration: none; }

/* ---------- barra ricerca / dimensione testo / login ---------- */
.al-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    border-radius: 0 0 6px 6px;
    padding: 14px 20px 12px;
    min-height: 30px;
}
.al-bar__search form { margin: 0; }
.al-bar__search label { position: absolute; left: -9999px; }
.al-bar__search input[type="search"], .al-bar__search input[type="text"] {
    width: 200px;
    box-sizing: border-box;
    height: 30px;
    padding: 4px 14px;
    font: 14px/20px "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #000;
    background: #f7f7f7;
    border: 1px solid #d8d8d8;
    border-radius: 15px;
    box-shadow: inset 0 2px 2px rgba(0, 0, 0, .07);
}
.al-bar__search .awesomplete > ul { z-index: 60; }
.al-bar__tools { display: flex; align-items: center; gap: 12px; }
.al-fonts { display: flex; align-items: baseline; gap: 2px; margin-right: 3px; }
.al-fonts button {
    border: 0; background: none; padding: 0 1px; color: var(--al-text); cursor: pointer;
    font-family: var(--al-text-font); line-height: 1;
}
.al-fonts__s { font-size: 10px; }
.al-fonts__m { font-size: 13px; }
.al-fonts__l { font-size: 16px; }
.al-fonts button:hover { color: var(--al-orange); }
.al-login { font-size: var(--al-base); }
.al-facebook {
    display: inline-block; width: 20px; height: 18px;
    background: url("../images/facebook.png") no-repeat;
}

/* ---------- riquadri (moduli) ---------- */
.al-box {
    background: #fff;
    border: 1px solid var(--al-border);
    border-radius: 6px;
    box-shadow: var(--al-shadow);
    padding: 20px 20px 16px;
    margin: 0 7px 14px;
    font-size: calc(var(--al-base) * 1.4);
    line-height: var(--al-line);
    overflow-wrap: break-word;
}
.al-box__title {
    margin: -20px -20px 12px;
    padding: 12px 13px 11px;
    font-family: var(--al-title-font);
    font-weight: 400;
    font-size: calc(var(--al-base) * 1.4);
    line-height: 1.45;
    text-transform: uppercase;
    color: var(--al-text);
    background: linear-gradient(to bottom, #fff 0%, #f9f9f9 100%);
    border-bottom: 1px solid var(--al-border);
    border-radius: 6px 6px 0 0;
}
.al-box__first { color: var(--al-orange); }
.al-box__content > :last-child { margin-bottom: 0; }
.al-box__content img { max-width: 100%; height: auto; }
.al-box__content p { margin: 0 0 6px; }

/* menu nelle colonne: freccetta grigia e riga tratteggiata */
.al-box .mod-menu { display: block; list-style: none; margin: 0; padding: 0; }
.al-box .mod-menu li { display: block; width: 100%; margin: 0; padding: 0; }
.al-box .mod-menu a, .al-box .mod-menu span.mod-menu__heading, .al-box .mod-menu span.mod-menu__separator {
    display: block;
    padding: 6px 0 6px 24px;
    color: #000;
    background: url("../images/freccia.png") no-repeat 0 50%;
    border-bottom: 1px dotted #d3d3d3;
}
.al-box .mod-menu a:hover, .al-box .mod-menu a:focus { color: var(--al-orange); text-decoration: none; }
.al-box .mod-menu li.current > a, .al-box .mod-menu li.active > a { color: var(--al-orange); }
.al-box .mod-menu ul { list-style: none; margin: 0 0 0 14px; padding: 0; }

/* ---------- righe di riquadri ---------- */
.al-row {
    display: grid;
    grid-template-columns: repeat(var(--al-cols, 1), minmax(0, 1fr));
    align-items: start;
}

/* ---------- colonne ---------- */
.al-columns {
    display: grid;
    grid-template-columns: 20% minmax(0, 1fr) 20%;
    grid-template-areas: "left center right";
    align-items: start;
}
.al-columns--c { grid-template-columns: minmax(0, 1fr); grid-template-areas: "center"; }
.al-columns--lc { grid-template-columns: 20% minmax(0, 1fr); grid-template-areas: "left center"; }
.al-columns--cr { grid-template-columns: minmax(0, 1fr) 20%; grid-template-areas: "center right"; }
.al-left { grid-area: left; }
.al-center { grid-area: center; min-width: 0; }
.al-right { grid-area: right; }

/* ---------- contenuto ---------- */
.al-component {
    background: #fff;
    border: 1px solid var(--al-border);
    border-radius: 6px;
    box-shadow: var(--al-shadow);
    padding: 20px;
    margin: 0 7px 14px;
    font-size: calc(var(--al-base) * 1.4);
    line-height: var(--al-line);
    overflow-wrap: break-word;
}
.al-component p { margin: 0; padding: 5px 0; }
.al-component h1, .al-component h2 {
    font-family: var(--al-title-font);
    font-weight: 400;
    font-size: calc(var(--al-base) * 1.96);
    line-height: 1.3;
    color: var(--al-orange);
    margin: 0 0 18px;
}
.al-component h1 a, .al-component h2 a { color: var(--al-orange); }
.al-component h3, .al-component h4 { font-family: var(--al-title-font); font-weight: 400; color: var(--al-text); }
.al-component ul, .al-component ol { margin: 4px 0; padding-left: 1.4em; }
.al-component table { max-width: 100%; }
/* immagini nelle tabelle degli articoli: con max-width:100% la cella le riduce a miniature. Restano alla loro
   dimensione; se la tabella è più larga della colonna (tablet, telefono) scorre in orizzontale */
.al-component td img, .al-component th img { max-width: none; }
.al-component table:has(img) { display: block; overflow-x: auto; height: auto !important; }
/* (height:auto: l'altezza scritta negli articoli non deve diventare una finestra con le frecce di scorrimento) */
/* moduli (contatti, login…): il pulsante di invio non ha etichetta sopra, quindi resterebbe attaccato al campo
   precedente (il CAPTCHA); stesso spazio che le etichette lasciano fra un campo e l'altro */
.al-component .control-group:has(> .controls > button[type="submit"]) { margin-top: 25px; }
.al-component .page-header { margin: 0; padding: 0; border: 0; }
.al-component .blog-item, .al-component .blog .item {
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #ededed;
}
.al-component .blog-item:last-child { border-bottom: 0; }
.al-component .article-info { font-size: .8em; color: #777; margin: 0 0 8px; }
.al-component .readmore { margin: 8px 0 0; }
.al-component .readmore .btn {
    background: var(--al-orange); border-color: var(--al-orange); color: #fff;
    font-family: var(--al-title-font); text-transform: uppercase; font-size: .9em;
}
.al-component .pagination { margin-top: 14px; }
.al-component .page-link { color: var(--al-orange); }
.al-component .active > .page-link { background: var(--al-orange); border-color: var(--al-orange); color: #fff; }
.al-component iframe { max-width: 100%; }
.al-component .com-finder__results { font-size: .9em; }

/* ---------- piè di pagina ---------- */
.al-footer {
    margin: 0 8px;
    padding: 18px 20px 24px;
    font-size: calc(var(--al-base) * .9);
    line-height: 1.6;
}
.al-footer p { margin: 0; }
.al-footer__cookie { margin-top: 8px; text-align: center; }
.al-linkbtn {
    border: 0; background: none; padding: 0; color: var(--al-orange); cursor: pointer;
    font: inherit;
}
.al-linkbtn:hover { text-decoration: underline; }

/* ---------- torna su ---------- */
.al-top {
    position: fixed; right: 18px; bottom: 18px; z-index: 40;
    width: 30px; height: 30px; border-radius: 4px;
    background: url("../images/su.png") no-repeat center, rgba(0, 0, 0, .55);
    opacity: .85;
}
.al-top:hover { opacity: 1; }

/* ---------- avviso cookie ---------- */
html.cookie-open { overflow: hidden; }
.cookie-overlay {
    position: fixed; inset: 0; z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .55);
    padding: 16px;
}
.cookie-overlay[hidden] { display: none; }
.cookie-dialog {
    position: relative;
    max-width: 560px; max-height: 90vh; overflow: auto;
    background: #fff; border-radius: 6px; border-top: 5px solid var(--al-orange);
    padding: 24px 24px 18px;
    font-size: 14px; line-height: 1.5;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.cookie-close {
    position: absolute; top: 6px; right: 10px;
    border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: #666;
}
.cookie-dialog__buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 12px; }
.cookie-btn {
    border: 1px solid var(--al-orange); background: #fff; color: var(--al-orange);
    border-radius: 4px; padding: 8px 16px; cursor: pointer;
    font-family: var(--al-title-font); text-transform: uppercase; font-size: 15px;
}
.cookie-btn[data-consent="tutti"] { background: var(--al-orange); color: #fff; }

/* riquadro al posto dei contenuti di terze parti bloccati (video YouTube, contatore) */
.al-consent__box {
    background: #f4f4f4; border: 1px dashed var(--al-border); border-radius: 6px;
    padding: 14px; text-align: center; font-size: .85em;
}
.al-consent__btn {
    margin-top: 8px; border: 0; border-radius: 4px; padding: 6px 14px; cursor: pointer;
    background: var(--al-orange); color: #fff; font-family: var(--al-title-font); text-transform: uppercase;
}

/* ---------- tablet ---------- */
@media (max-width: 1000px) {
    .al-wrap { width: 96%; }
    .al-columns { grid-template-columns: 24% minmax(0, 1fr) 24%; }
    .al-columns--lc { grid-template-columns: 24% minmax(0, 1fr); }
    .al-columns--cr { grid-template-columns: minmax(0, 1fr) 24%; }
    .al-row--top { grid-template-columns: repeat(min(var(--al-cols, 1), 2), minmax(0, 1fr)); }
}

/* ---------- telefono (come Shape5: sotto i 750 px) ---------- */
@media (max-width: 750px) {
    .al-wrap { width: auto; padding: 0; }
    .al-header { margin: 0 0 12px; }
    .al-logo { border-radius: 0; }
    .al-menu__toggle {
        display: flex; align-items: center; gap: 10px; width: 100%;
        background: linear-gradient(#272727, #0b0b0b); color: #fff; border: 0;
        padding: 12px 16px; font-family: var(--al-title-font); font-size: 20px; text-transform: uppercase; cursor: pointer;
    }
    .al-burger, .al-burger::before, .al-burger::after {
        display: inline-block; width: 22px; height: 3px; background: #fff; border-radius: 2px; position: relative;
    }
    .al-burger::before, .al-burger::after { content: ""; position: absolute; left: 0; }
    .al-burger::before { top: -7px; }
    .al-burger::after { top: 7px; }
    .al-menu__list { display: none; }
    .al-menu.open .al-menu__list { display: block; }
    .al-menu__list .mod-menu { display: block; }
    .al-menu__list .mod-menu > li { height: auto; padding: 0; border-top: 1px solid #333; }
    .al-menu__list .mod-menu > li > a, .al-menu__list .mod-menu > li > span { display: block; padding: 8px 16px; font-size: 20px; }
    .al-menu__list .mod-menu ul {
        display: block; position: static; box-shadow: none; border: 0; border-radius: 0;
        background: #2a2a2a; padding: 0 0 6px;
    }
    .al-menu__list .mod-menu ul a { color: #fff; padding: 6px 30px; font-size: 16px; white-space: normal; }
    .al-menu__list .mod-menu ul a:hover { background: #333; }
    .al-bar { flex-wrap: wrap; border-radius: 0; padding: 10px 16px; }
    .al-bar__search { flex: 1 1 100%; }
    .al-bar__search input[type="search"], .al-bar__search input[type="text"] { width: 100%; }
    .al-bar__tools { margin-left: auto; }
    .al-row, .al-row--top { grid-template-columns: minmax(0, 1fr); }
    .al-columns, .al-columns--lc, .al-columns--cr {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "center" "left" "right";
    }
    .al-box, .al-component { margin: 0 10px 12px; }
    .al-component { padding: 16px; }
    .al-footer { margin: 0; padding: 14px 16px 60px; text-align: center; }
}

/* ---------- pagina di errore ---------- */
.error-code { font-family: var(--al-title-font); font-size: 64px; line-height: 1; color: #ddd; margin: 0 0 10px; padding: 0; }
.error-lead { font-weight: bold; }
.error-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.error-btn {
    display: inline-block; padding: 8px 18px; border-radius: 4px; background: var(--al-orange); color: #fff;
    font-family: var(--al-title-font); text-transform: uppercase;
}
.error-btn:hover, .error-btn:focus { color: #fff; text-decoration: none; filter: brightness(.92); }
.error-btn--secondary { background: #fff; color: var(--al-orange); border: 1px solid var(--al-orange); }
.error-btn--secondary:hover { color: var(--al-orange); }
.error-debug { margin-top: 20px; font-size: 12px; }

/* titoletti dentro riquadri e articoli (come Bootstrap 2 del vecchio template) */
.al-box__content h1, .al-box__content h2, .al-box__content h3, .al-box__content h4, .al-box__content h5, .al-box__content h6,
.al-component h5, .al-component h6 {
    font-family: var(--al-text-font); font-weight: 700; line-height: 1.4; margin: 0 0 2px; color: var(--al-text);
}
.al-box__content h6, .al-component h6 { font-size: 12px; }
.al-box__content h5, .al-component h5 { font-size: 14px; }
.al-component .pagination { justify-content: center; margin: 20px 0; }

/* pulsanti di Joomla (ricerca, contatti, login) nei colori del sito */
.al-component .btn-primary, .al-component .btn-secondary {
    background: var(--al-orange); border-color: var(--al-orange); color: #fff;
}
.al-component .btn-primary:hover, .al-component .btn-secondary:hover,
.al-component .btn-primary:focus, .al-component .btn-secondary:focus { background: #e04f00; border-color: #e04f00; color: #fff; }
.al-component .form-control:focus { border-color: var(--al-orange); box-shadow: 0 0 0 .2rem rgba(255, 91, 0, .2); }

/* ---------- gallerie di foto (al posto di Admiror) ---------- */
.al-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    margin: 12px 0;
}
.al-gallery__item {
    display: flex; align-items: center; justify-content: center;
    aspect-ratio: 4 / 3; overflow: hidden;
    background: #f4f4f4; border: 1px solid #ddd; border-radius: 4px; padding: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.al-gallery__item img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transition: transform .2s; }
.al-gallery__item:hover img, .al-gallery__item:focus img { transform: scale(1.04); }

/* finestra della foto ingrandita */
.al-lightbox {
    position: fixed; inset: 0; z-index: 1500;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .88);
}
.al-lightbox[hidden] { display: none; }
.al-lightbox__img { max-width: 92vw; max-height: 84vh; box-shadow: 0 0 20px rgba(0, 0, 0, .6); background: #fff; }
.al-lightbox__btn {
    position: absolute; border: 0; background: rgba(255, 255, 255, .15); color: #fff; cursor: pointer;
    font-size: 34px; line-height: 1; width: 48px; height: 48px; border-radius: 50%;
}
.al-lightbox__btn:hover, .al-lightbox__btn:focus { background: var(--al-orange); }
.al-lightbox__prev { left: 14px; top: 50%; transform: translateY(-50%); }
.al-lightbox__next { right: 14px; top: 50%; transform: translateY(-50%); }
.al-lightbox__close { right: 14px; top: 14px; font-size: 30px; }
.al-lightbox__count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #ddd; font-size: 14px; }

/* ---------- video YouTube ---------- */
.al-video { position: relative; max-width: 640px; margin: 12px auto; }
.al-video iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
.al-video .al-consent { width: auto !important; min-height: 0 !important; }
.al-video .al-consent__box { aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.al-consent iframe[hidden] { display: none; }
