/* ============================================================
   STYLE.CSS — Stili principali
   ============================================================ */


/* ── Variabili ────────────────────────────────────────────── */
:root {
    --bg-image:       url(../images/minecraftpattern.jpg);
    --white-panel:    rgba(255, 255, 255, 0.92);
    --panel-radius:   4px;
    --panel-width:    90%;
    --panel-padding:  12px 25px;
    --accent-color:   teal;
    --btn-green:      #4CAF50;
    --btn-green-hover:#45a049;
    --transition-nav: margin-top 600ms cubic-bezier(0.17, 0.04, 0.03, 0.94);
}

@font-face {
  font-family: 'Minecraft';
  src: url('../font/Minecraft.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'MinecraftB';
  src: url('../font/Minecraft-Bold.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

/* ── Reset / Base ─────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
}

body {
    margin:                0;
    color:                 #111;
    /* font-family:           'Source Sans Pro', sans-serif; */
    font-family: 'Minecraft', monospace;
    background-image:      var(--bg-image);
    background-repeat:     repeat;
    background-attachment: fixed;
    scroll-behavior:       smooth;
}


/* ── Tipografia ───────────────────────────────────────────── */
body p  { font-size: 1.5em; text-align: justify; text-justify: inter-word; }
body h1 { font-size: 2.4em; }
body h2 { font-size: 1.9em; }
body h3 { font-size: 1.5em; }

.main > h1 {
    letter-spacing: 0.03em;
    margin:  2px;
    padding: 12px 0;
}

h2.subtitle-custom {
    color:      var(--accent-color);
    font-size:  1.55em;
    margin-top: -25px;
}

.fieldWrapper label,
.fieldWrapper p { font-size: 1.2em; }

/* ── Pannelli principali ──────────────────────────────────── */
.main {
    padding:          var(--panel-padding);
    background-color: var(--white-panel);
    margin:           0 auto;
    margin-top:       -70px;
    position:         relative;
    width:            var(--panel-width);
    transition:       var(--transition-nav);
    border-radius:    var(--panel-radius);
    text-align:       center;
}

.submain {
    padding:          var(--panel-padding);
    background-color: var(--white-panel);
    margin:           25px auto 0;
    position:         relative;
    width:            var(--panel-width);
    transition:       var(--transition-nav);
    border-radius:    var(--panel-radius);
}

#sponsors,
#social,
footer {
    padding:          12px;
    margin:           25px auto 0;
    background-color: var(--white-panel);
    width:            var(--panel-width);
    border-radius:    var(--panel-radius);
    text-align:       center;
}

#sponsors     { padding-bottom: 30px; }
#social       { padding-bottom: 30px; margin-bottom: 20px; }
footer        { margin-bottom:  25px; }


/* ── Bottoni ──────────────────────────────────────────────── */
.subscribe-btn { float: right; }

button[type=submit] {
    background-color: var(--btn-green);
    color:            white;
    font-size:        1.3em;
    padding:          9px 18px;
    margin:           8px 0;
    border:           none;
    border-radius:    var(--panel-radius);
    cursor:           pointer;
}
button[type=submit]:hover { background-color: var(--btn-green-hover); }

.shrt-text { display: none; }


/* ── Form ─────────────────────────────────────────────────── */
input[type=text],
input[type=email],
textarea {
    width:         100%;
    padding:       12px 20px;
    margin:        8px 0;
    display:       inline-block;
    border:        1px solid #ccc;
    border-radius: var(--panel-radius);
    box-sizing:    border-box;
}

.fieldWrapper.size          { margin-left: 20px; float: left; }
.fieldWrapper.fascia_oraria { clear: both; }

.errorlist { background-color: coral; margin: 0; }


/* ── Separatore ───────────────────────────────────────────── */
hr {
    background-color: #ccc;
    border:           0;
    height:           1px;
    background-image: linear-gradient(to right,
                        rgba(0,0,0,0),
                        rgba(0,0,0,0.75),
                        rgba(0,0,0,0));
}


/* ── Immagini ─────────────────────────────────────────────── */
.responsive_img { width: 80%; height: auto; }

.logo-maralonga-home img {
    display:   block;
    margin:    0 auto;
    width:     70%;
    max-width: 750px;
}

img#percorso    { width: 95%; }
#info-img       { width: 30px; }
.inventory_icon { width: 55px; }

.page_elem > .post-thumb > img {
    padding:   5px;
    border:    solid 1px #ccc;
    max-width: 800px;
}


/* ── Tabella ──────────────────────────────────────────────── */
table td {
    vertical-align: middle;
    padding:        0 10px;
}

/* Mappa quadranti */
.map-img {
    width:     250px;
    max-width: 100%;
    height:    auto;
}

/* ── Social ───────────────────────────────────────────────── */
#social img   { height: 50px; padding: 0 20px; }
.link-esterni { list-style: none; padding-left: 0; }


/* ── Lista numerata custom ────────────────────────────────── */
ol {
    display:       block;
    padding:       0 0 0 26px;
    list-style:    none;
    overflow:      hidden;
    counter-reset: numList;
    margin:        0;
}

ol li {
    position:      relative;
    font-size:     1.25em;
    margin-bottom: 10px;
    padding-left:  30px;
}

ol li:before {
    counter-increment: numList;
    content:           counter(numList);
    float:             left;
    position:          absolute;
    left:              -20px;
    font:              bold 17px sans-serif;
    text-align:        center;
    color:             black;
    line-height:       28px;
    width:             30px;
    height:            30px;
    background:        gold;
    border-radius:     999px;
    border:            2px solid black;
}

.info-partecipazione li {
    margin-left: 1.5rem;
}

/* ── Regolamento ──────────────────────────────────────────── */
.regolamento-img {
    max-width: 100%;
    border-radius: 8px;
    border: 2px solid red;
}

/* ── Economia cards ───────────────────────────────────────── */
.economia-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.economia-card {
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid #ccc;
}

.economia-header {
    font-family: 'MinecraftB', monospace;
    font-size: 0.95em;
    padding: 8px 14px;
    color: #fff;
}

.economia-desc {
    font-size: 0.82em;
    padding: 8px 14px;
    color: #444;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.economia-card ul {
    margin: 4px 0;
    padding: 0 14px 6px 28px;
}

.economia-card li {
    margin-bottom: 2px;
    font-size: 0.85em;
}

.economia-subhead {
    font-family: 'MinecraftB', monospace;
    font-size: 0.85em;
    margin: 10px 14px 0;
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.economia-tax {
    color: #666;
    font-size: 0.9em;
}

.economia-tassati  { border-color: #c0392b; }
.economia-tassati  .economia-header { background-color: #c0392b; }

.economia-nontassati { border-color: #2980b9; }
.economia-nontassati .economia-header { background-color: #2980b9; }

.economia-liberi   { border-color: #27ae60; }
.economia-liberi   .economia-header { background-color: #27ae60; }

@media (max-width: 600px) {
    .economia-grid { grid-template-columns: 1fr; }
}

/* ── Varie ────────────────────────────────────────────────── */
#construction {
    display:          none;
    background-color: red;
    color:            burlywood;
    padding:          5px;
}

.col-sm-12 p { margin-top: 0; margin-bottom: 12px; }
#percorso    { min-width: 350px; }
#legenda     { min-width: 500px; }
.clear       { clear: both; }

.page_elem {
    margin-bottom: 40px;
    text-align:    justify;
    text-justify:  inter-word;
}

.main > .page_elem > p { margin: 0; margin-bottom: 12px; }

a.captcha-refresh-button {
    display:     inline-block;
    margin-left: 7px;
    padding:     0 15px;
    border:      none;
    background:  url(../images/refresh-cw.svg) no-repeat bottom;
    width:       24px;
    height:      24px;
}
.captcha { float: left; }


/* ── Sponsors ─────────────────────────────────────────────── */
#sponsors #raffeisen      { height: 68px; }
#sponsors #altri-sponsors { padding: 0 30px; }
#altri-sponsors           { margin-top: 20px; height: 55px; }


/* ============================================================
   RESPONSIVE — Mobile (max-width: 767px)
   ============================================================ */
@media screen and (max-width: 767px) {

    /* ── Variabili mobile ── */
    :root {
        --panel-width:   95%; /* sovrascrive il valore desktop */
        --panel-padding: 10px;
    }

    /* ── Base ── */
    body { line-height: 1.2; }

    /* ── Tipografia ── */
    body p             { font-size: 1.2em; }
    body h1            { font-size: 2.0em; }
    body h2            { font-size: 1.65em; }
    body h3            { font-size: 1.3em; }
    h2.subtitle-custom { font-size: 1.35em; padding-top: 10px; }
    ol li              { font-size: 1.0em; }

    /* ── Pannelli ── */
    .main    { margin-top: -75px; }
    .submain,
    #sponsors,
    #social,
    footer   { margin-top: 20px; }

    #social     { margin-bottom: 25px; }
    #social img { height: 30px; }

    /* ── Bottoni ── */
    button[type=submit] { font-size: 1.0em; }
    .shrt-text          { display: inline-block; }
    .full-text          { display: none; }

    /* ── Immagini ── */
    .inventory_icon { width: 35px; }
    .page_elem > .post-thumb > img     { width: 95%; float: left; clear: both; }
    .main > .page_elem img#percorso    { width: 97%; }

    /* ── Lista numerata ── */
    ol           { padding-top: 20px; margin-left: 0; padding-left: 2px; }
    ol li        { padding-left: 40px; }
    ol li:before {
        position:    absolute;
        left:        0;
        font:        bold 13px sans-serif;
        line-height: 22px;
        width:       25px;
        height:      25px;
    }

    /* ── Varie ── */
    #percorso { min-width: 100%; }
    #info-img { float: left; margin: 5px 5px 5px 0; }

    /* ── Sponsors ── */
    #sponsors #raffeisen      { height: 41px; }
    #sponsors #altri-sponsors { height: 57px; padding: 10px 30px; }

    /* ── Form ── */
    .fascia_oraria { padding-top: 20px; }

    table td { padding: 0 4px; }
    table td ul { padding-left: 1rem; }

}