/*
 * main.css — file CSS consolidato
 * Fonti originali:
 *   1. stylesheet_fonts.css  — font-face Dyxleyx
 *   2. demo.css              — layout generale, header, footer Codrops
 *   3. body.css              — stili body
 *   4. style.css             — griglia ri-grid (gridrotator)
 *   5. Allert.css            — banner di avviso
 *   6. areetematiche.css     — pulsanti sezioni tematiche in basso
 *
 * Fix applicati rispetto agli originali:
 *   - .ri-grid ul li: background #000 → transparent  (evita quadrati neri)
 *   - .ri-grid ul li a: background-size 100% 100% → cover  (foto proporzionate)
 */


/* =============================================================
   1. FONT-FACE  (sorgente: stylesheet_fonts.css)
   I percorsi url() sono relativi a questa cartella css/
   ============================================================= */

@font-face {
    font-family: 'Dyxleyx Wide';
    src: url('Dyxleyx-Wide.eot');
    src: url('Dyxleyx-Wide.eot?#iefix') format('embedded-opentype'),
         url('Dyxleyx-Wide.woff2') format('woff2'),
         url('Dyxleyx-Wide.woff') format('woff'),
         url('Dyxleyx-Wide.svg#Dyxleyx-Wide') format('svg');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Dyxleyx Bold';
    src: url('Dyxleyx-Bold.eot');
    src: url('Dyxleyx-Bold.eot?#iefix') format('embedded-opentype'),
         url('Dyxleyx-Bold.woff2') format('woff2'),
         url('Dyxleyx-Bold.woff') format('woff'),
         url('Dyxleyx-Bold.svg#Dyxleyx-Bold') format('svg');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Dyxleyx Extra Light';
    src: url('Dyxleyx-ExtraLight.eot');
    src: url('Dyxleyx-ExtraLight.eot?#iefix') format('embedded-opentype'),
         url('Dyxleyx-ExtraLight.woff2') format('woff2'),
         url('Dyxleyx-ExtraLight.woff') format('woff'),
         url('Dyxleyx-ExtraLight.svg#Dyxleyx-ExtraLight') format('svg');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Dyxleyx Light';
    src: url('Dyxleyx-Light.eot');
    src: url('Dyxleyx-Light.eot?#iefix') format('embedded-opentype'),
         url('Dyxleyx-Light.woff2') format('woff2'),
         url('Dyxleyx-Light.woff') format('woff'),
         url('Dyxleyx-Light.svg#Dyxleyx-Light') format('svg');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Dyxleyx Regular';
    src: url('Dyxleyx-Regular.eot');
    src: url('Dyxleyx-Regular.eot?#iefix') format('embedded-opentype'),
         url('Dyxleyx-Regular.woff2') format('woff2'),
         url('Dyxleyx-Regular.woff') format('woff'),
         url('Dyxleyx-Regular.svg#Dyxleyx-Regular') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Dyxleyx Thin';
    src: url('Dyxleyx-Thin.eot');
    src: url('Dyxleyx-Thin.eot?#iefix') format('embedded-opentype'),
         url('Dyxleyx-Thin.woff2') format('woff2'),
         url('Dyxleyx-Thin.woff') format('woff'),
         url('Dyxleyx-Thin.svg#Dyxleyx-Thin') format('svg');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}


/* =============================================================
   2. LAYOUT GENERALE  (sorgente: demo.css)
   ============================================================= */

@import url(https://fonts.googleapis.com/css?family=Lato:300,400,700);

*,
*:after,
*:before {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

a {
    color: #555;
    text-decoration: none;
}

a img {
    border: none;
}

.container {
    position: relative;
    background: transparent url(../images/light.png) fixed no-repeat center top;
}

.codrops-header {
    margin: 10px;
    padding: 20px 10px 10px 10px;
    position: relative;
    display: block;
    text-align: center;
    text-shadow: 0 1px 1px rgba(255,255,255,0.7);
}

.codrops-header h1,
.codrops-header-special h1 {
    font-size: 26px;
    line-height: 26px;
    position: fixed;
    top: 30%;
    font-weight: 700;
    color: #000;
}

.codrops-header h2,
.codrops-header-special h2 {
    font-size: 14px;
    line-height: 14px;
    font-weight: 300;
    margin: 0;
    top: 55%;
    padding: 3px 5px;
    margin: 10px 0 5px;
    color: #000;
    display: inline-block;
}

/* Header barra in alto */
.codrops-top {
    line-height: 24px;
    font-size: 11px;
    background: #fff;
    background: rgba(255,255,255,0.8);
    text-transform: uppercase;
    z-index: 9999;
    position: fixed;
    top: 0px;
    width: 100%;
}

.codrops-top a {
    padding: 0px 10px;
    letter-spacing: 1px;
    color: #333;
    display: inline-block;
}

.codrops-top a:hover {
    background: rgba(255,255,255,0.3);
}

.codrops-top span.right {
    float: right;
    margin-right: 5px;
}

.codrops-top span.right a {
    float: right;
    display: block;
}

.codrops-top span.right a:hover {
    color: #fff;
    background: rgba(0,0,0,0.8);
}

/* Footer barra in basso */
.codrops-bottom {
    line-height: 24px;
    font-size: 11px;
    color: #fff;
    background: rgba(0,0,0,0.8);
    text-transform: uppercase;
    z-index: 9998;
    position: fixed;
    box-shadow: 1px 0px 2px rgba(0,0,0,0.2);
    bottom: 0;
    width: 100%;
}

.codrops-bottom a {
    padding: 0px 10px;
    letter-spacing: 1px;
    color: white;
    display: inline-block;
}

.codrops-bottom a:hover {
    background: rgba(232,54,106,0.8);
}

.codrops-bottom span.right {
    float: right;
    margin-right: 5px;
    margin-left: 10px;
}

.codrops-bottom span.right a {
    float: right;
    display: block;
}

.codrops-info {
    padding: 20px;
    margin: 0 auto;
    text-align: center;
    text-shadow: 0 1px 1px rgba(255,255,255,0.7);
    line-height: 22px;
}

/* Demo Buttons */
.codrops-demos {
    text-align: center;
    display: block;
    line-height: 30px;
    padding: 5px 0px;
}

.codrops-demos a {
    display: inline-block;
    margin: 0px 10px;
    font-weight: bold;
    color: #333;
    line-height: 20px;
    font-size: 12px;
    background: rgba(255,255,255,0.4);
    padding: 0 4px;
}

.codrops-demos a:hover {
    border-bottom: 2px solid #f7bb6d;
}

.codrops-demos a.current-demo,
.codrops-demos a.current-demo:hover {
    border-bottom: 2px solid #f7bb6d;
    color: #777;
}

/* Header speciale con fascia fucsia */
.codrops-header-special {
    position: absolute;
    top: 80px;
    left: 0px;
    text-align: left;
}

.codrops-header-special h2 {
    padding: 5px 20px 5px 10px;
    color: #fff;
    position: fixed;
    top: 38%;
    line-height: 26px;
    background: #e8366a;
    background: rgba(232,54,106,0.8);
}

.codrops-header-special h1 {
    background: rgba(0,0,0,0.8);
    display: inline-block;
    font-size: 32px;
    line-height: 32px;
    padding: 20px;
    color: #fff;
    text-shadow: 0 0 1px #fff;
}

.codrops-header-special .codrops-demos {
    text-align: left;
}

.codrops-header-special .codrops-demos a {
    background: rgba(255,255,255,1);
}

.codrops-header-special .codrops-info {
    color: #fff;
    background: rgba(0,0,0,0.8);
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
    padding: 5px 20px 5px 10px;
    line-height: 26px;
    margin-top: 30px;
    text-align: left;
}


/* =============================================================
   3. BODY  (sorgente: body.css)
   ============================================================= */

body {
    font-family: 'Dyxleyx Regular';
    background: #f9f9f9 url(../images/bg.jpg) repeat top left;
    font-weight: 300;
    font-size: 14px;
    color: #333;
    overflow: scroll;
    overflow-x: hidden;
}


/* =============================================================
   4. GRIGLIA GRIDROTATOR  (sorgente: style.css)
   FIX: background su <li> → transparent (era #000, causava quadrati neri)
   FIX: background-size su <a> → cover (era 100% 100%, deformava le foto)
   ============================================================= */

.ri-grid {
    margin: 30px auto 30px;
    position: relative;
    height: auto;
}

.ri-grid ul {
    list-style: none;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Clearfix — https://nicolasgallagher.com/micro-clearfix-hack/ */
.ri-grid ul:before,
.ri-grid ul:after {
    content: '';
    display: table;
}

.ri-grid ul:after {
    clear: both;
}

.ri-grid ul {
    zoom: 1; /* IE 6/7 hasLayout */
}

.ri-grid ul li {
    -webkit-perspective: 400px;
    -moz-perspective: 400px;
    perspective: 400px;
    margin: 0;
    padding: 0;
    float: left;
    position: relative;
    display: block;
    overflow: hidden;
    background: transparent; /* FIX: era #000 — rendeva neri i pixel visibili durante l'animazione */
}

.ri-grid ul li a {
    display: block;
    outline: none;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    -webkit-background-size: cover;  /* FIX: era 100% 100% — deformava le foto */
    background-size: cover;          /* FIX */
    background-position: center center;
    background-repeat: no-repeat;
    background-color: transparent;   /* FIX: era #333 — visibile tra le celle */
    -webkit-box-sizing: content-box;
    box-sizing: content-box;
}

/* Dimensioni wrapper griglia */
.ri-grid-size-1 { width: 55%; }
.ri-grid-size-2 { width: 100%; }
.ri-grid-size-3 { width: 100%; margin-top: 0px; }

/* Stile ombra */
.ri-shadow:after,
.ri-shadow:before {
    content: "";
    position: absolute;
    z-index: -2;
    bottom: 15px;
    left: 10px;
    width: 50%;
    height: 20%;
    max-width: 300px;
    max-height: 100px;
    box-shadow: 0 15px 10px rgba(0,0,0,0.7);
    -webkit-transform: rotate(-3deg);
    transform: rotate(-3deg);
}

.ri-shadow:after {
    right: 10px;
    left: auto;
    -webkit-transform: rotate(3deg);
    transform: rotate(3deg);
}

.ri-grid-loading:after,
.ri-grid-loading:before {
    display: none;
}

.ri-loading-image {
    display: none;
}

.ri-grid-loading .ri-loading-image {
    position: relative;
    width: 30px;
    height: 30px;
    left: 50%;
    margin: 100px 0 0 -15px;
    display: block;
}


/* =============================================================
   5. BANNER DI AVVISO  (sorgente: Allert.css)
   ============================================================= */

.alert {
    padding: 20px;
    background-color: rgba(255,155,0,0.8);
    color: white;
    position: fixed;
    z-index: 999999;
    top: 21%;
    width: 100%;
    height: 300px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
}

.closebtn {
    margin-left: 15px;
    color: white;
    font-weight: bold;
    float: right;
    font-size: 22px;
    line-height: 20px;
    cursor: pointer;
    transition: 0.3s;
    background: none;
    border: none;
    padding: 0;
}

.closebtn:hover {
    color: black;
}


/* =============================================================
   6. PULSANTI SEZIONI TEMATICHE  (sorgente: areetematiche.css)
   ============================================================= */

.sezione1,
.sezione2,
.sezione3,
.sezione4,
.sezione5,
.sezione6,
.sezione7 {
    padding: 10px;
    background-color: rgba(255,255,255,0.8);
    color: grey;
    position: fixed;
    z-index: 999998;
    bottom: 25px;
    height: 34px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
}

.sezione1:hover,
.sezione2:hover,
.sezione3:hover,
.sezione4:hover,
.sezione5:hover,
.sezione6:hover,
.sezione7:hover {
    background-color: rgba(255,255,255,1);
    color: black;
}

/* Posizioni orizzontali delle singole sezioni */
.sezione1 { left: 0;    width: 15%; }
.sezione2 { left: 15%;  width: 14%; }
.sezione3 { left: 29%;  width: 14%; }
.sezione4 { left: 43%;  width: 14%; }
.sezione5 { left: 57%;  width: 14%; }
.sezione6 { left: 71%;  width: 14%; }
.sezione7 { left: 85%;  width: 15%; }

/* ============================================================
   7. chisono.html — stili specifici
      (ex body_info.css + infof.css, scoped su body.chisono)
   ============================================================ */

body.chisono {
    font-family: 'Dyxleyx Light';
    background: #f9f9f9 url(../images/bg.jpg) repeat top left;
    font-weight: 300;
    font-size: 14px;
    color: #333;
    overflow: hidden;
}

#infoRiquadroTXTinfo {
    width: 40%;
    max-width: 600px;
    min-width: 400px;
    float: left;
    position: absolute;
    margin-left: 15%;
    top: 0;
    background-color: rgba(255,255,255,0.95);
    padding-bottom: 150px;
    padding-top: 24px;
}

#RiquadroTraspInfo {
    width: 100%;
    position: fixed;
    margin: 0;
    top: 0; right: 0; left: 0; bottom: 0;
    background-color: rgba(255,255,255,0);
    overflow: scroll !important;
}

.page        { overflow: hidden !important; }

.infoTitolo {
    font-family: 'Dyxleyx regular';
    font-size: 21px;
    margin-left: 10%;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 55px;
}

.infoSottotitolo {
    font-family: 'Dyxleyx Light';
    font-size: 18px;
    line-height: 25px;
    margin-left: 10%;
    margin-bottom: 0;
}

.infoTestoinfo {
    font-family: 'Dyxleyx Light';
    font-size: 15px;
    line-height: 23px;
    color: #333;
    margin-left: 10%;
    margin-right: 10%;
    margin-top: 0;
    margin-bottom: 5px;
}

.infoInciso {
    font-family: 'Dyxleyx Light';
    font-size: 14px;
    line-height: 23px;
    margin-top: 34px;
    margin-bottom: 0;
}


/* =============================================================
   8. RESPONSIVE
   ============================================================= */

@media (max-width: 600px) {
    .codrops-header-special h2 {
        display: none;
    }
}
