@font-face {
  font-family: 'Comic Sans MS';
  src: url('COMIC.TTF') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Comic Sans MS';
  src: url('COMICBD.TTF') format('truetype');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: 'Comic Sans MS';
  src: url('COMICI.TTF') format('truetype');
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: 'Comic Sans MS';
  src: url('COMICZ.TTF') format('truetype');
  font-weight: bold;
  font-style: italic;
}

:root {
    /* Colori principali */
    --primary-color: #ff6600;
    --primary-color-dark: #e65c00;
    --secondary-color: #ffcc00;
    --secondary-color-dark: #e6b800;
    --background-color: #f8f8f8;
    --text-color-light: rgba(255, 255, 255, 0.95);
    --text-color-dark: black;
    --footer-bg-color: var(--primary-color);
    --error-color: red;
    --warning-color: #333;

    /* Font */
    --main-font: 'Comic Sans MS', sans-serif;
    --font-size-base: 125%;
    --font-size-small: 70%;

    /* Dimensioni e bordi */
    --border-radius: 5px;
    --container-radius: 10px;

    /* Ombre */
    --box-shadow-light: 0 0 5px rgba(0,0,0,0.2);
    --box-shadow-medium: 0 0 10px rgba(0,0,0,0.1);
    --box-shadow-dark: 0 0 10px #000000;

    /* Spaziature */
    --padding-base: 10px;
    --padding-medium: 15px;
    --padding-large: 20px;
}

/* BODY e HTML: sticky footer setup */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* assicura che body occupi tutta l'altezza */
    font-family: var(--main-font);
    font-size: var(--font-size-base);
    background-color: var(--background-color);
    background-image: url("images/background.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.icon {
    color: #00000080;
    /*color: var(--primary-color-dark);*/
}

.white {
    color: white;
}

.slogan {
    font-style: italic;
    font-size: 1.1rem;
    transform: skewX(-12deg);
}

/* Navbar */
.navbar {
    background: var(--primary-color);
    padding: var(--padding-medium) var(--padding-large);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 1000;
}

/* Logo */
.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 45px;
    margin-right: 10px;
}

.logo-text {
    color: var(--text-color-light);
    font-size: 24px;
    font-weight: bold;
}

/* Dropdown Menu */
.navbar .dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-button {
    font-family: var(--main-font) !important;
    background: var(--text-color-light);
    color: var(--primary-color);
    padding: var(--padding-base);
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--text-color-light);
    min-width: 190px;
    width: auto;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: var(--border-radius);
}

.dropdown-content a {
    color: var(--text-color-dark);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background 0.3s;
}

.dropdown-content a:hover {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Container principale */
.container {
    flex: 1; /* permette al container di occupare lo spazio disponibile */
    max-width: 1200px;
    margin: 130px auto 50px;
    padding: 20px 20px 50px;
    background: var(--text-color-light);
    border-radius: var(--container-radius);
    box-shadow: var(--box-shadow-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

h1 {
    text-align: center;
}

/* Testo generico */
.text-content {
    width: 90%;
    margin: auto;
}

.text-content h3 {
    text-align: center;
}

/* Bottone principale */
.bottone {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    border: none;
    padding: var(--padding-base) 15px;
    font-size: 16px;
    cursor: pointer;
    border-radius: var(--border-radius);
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
    margin-top: 15px;
    width: 100%;
}

.bottone:hover {
    background-color: var(--primary-color-dark);
    transform: scale(1.05);
}

/* Foto e sponsorizzazioni */
.photos-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: var(--padding-large);
}

.photos-img {
    max-width: 100%;
    border-radius: var(--container-radius);
    box-shadow: var(--box-shadow-light);
    transition: transform 0.3s;
    object-fit: contain;
    cursor: pointer;
}

.photos-img:hover {
    transform: scale(1.1);
}

/* Modal immagini fullscreen */
.fullscreen-img {
    display: none;
    position: fixed;
    top:0; left:0;
    width:100%;
    height:100%;
    background: rgba(0,0,0,0.8);
    justify-content:center;
    align-items:center;
    z-index:2000;
}

.fullscreen-img img {
    max-width: 90%;
    max-height: 90%;
    border-radius: var(--container-radius);
}

.fullscreen-img.active {
    display: flex;
}

/* Footer */
.site-footer {
    background-color: var(--footer-bg-color);
    color: var(--text-color-light);
    padding: 40px 20px 20px;
    font-family: var(--main-font);
}

/* Footer interno */
.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: auto;
    gap: 20px;
}

.footer-section {
    flex: 1 1 250px;
    text-align: center;
}

.footer-section h4 {
    margin-bottom: 10px;
    font-size: 18px;
}

.footer-section p, 
.footer-section a {
    font-size: 16px;
    color: var(--text-color-light);
    text-decoration: none;
    margin: 5px 0;
}

.footer-section a:hover {
    color: var(--secondary-color-dark);
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

/* Media Queries */
@media (max-width: 768px) {
    body { font-size: 100%; background-size: contain; }
    .navbar { flex-direction: row; padding: 10px; }
    .dropdown-content { min-width: 170px;}
    .container { margin: 100px 10px 30px; padding: 15px; }
    .text-content { font-size: 14px; }
    .text-content form { padding: 15px; max-width: 100%; }
    input, select, .bottone { font-size: 14px; }
    .footer-container { flex-direction: column; text-align: center; }
    .footer-section { flex: 1 1 100%; }
    .photos-img { height: 150px !important; }
    #custom-cookie-banner { flex-direction: column; text-align: center; padding: 15px; }
    #custom-cookie-banner span { text-align: center; justify-content: center; }
    #cookie-accept-btn { width: 100%; max-width: 200px; }
}

@media (max-width: 800px) { .mod_images_form { flex: 1 1 calc(33.33% - 10px); } }
@media (max-width: 600px) { .mod_images_form { flex: 1 1 calc(50% - 10px); } }
@media (max-width: 400px) { .mod_images_form { flex: 1 1 100%; } }

/* Errori e avvisi */
.error { color: var(--error-color); }
.warning { color: var(--warning-color); font-size: var(--font-size-small); margin: 10px 0; }

/* Immagini caricate */
.uploaded_image { height: 150px; }

/* Mod container */
.mod-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 1000px;
    margin: auto;
    padding: 10px;
    box-sizing: border-box;
}

/* Centrare testo */
.center { text-align: center; }

/* Link */
.hl:link, .hl:visited, .hl:active { color: #0066ff; }
.hl:link:hover, .hl:visited:hover, .hl:active:hover .hl:hover { color: #0011ff;}

a[href^="mailto:"],
a[href^="tel:"] {
    text-decoration: none !important;
    color: inherit;
}

/* Banner cookie */
#custom-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: var(--padding-medium) var(--padding-large);
    background-color: #333;
    color: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    box-sizing: border-box;
    min-height: 60px;
    font-size: 16px;
}

#custom-cookie-banner a {
    color: var(--secondary-color);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s;
    margin-left: 5px;
}

#custom-cookie-banner a:hover { color: var(--secondary-color-dark); }

#cookie-accept-btn {
    background-color: var(--secondary-color);
    color: #222;
    border: none;
    padding: var(--padding-base) 15px;
    font-size: 16px;
    cursor: pointer;
    border-radius: var(--border-radius);
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
}

#cookie-accept-btn:hover {
    background-color: var(--secondary-color-dark);
    transform: scale(1.05);
}

.news-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: var(--padding-large);
}

.news-card {
    background-color: var(--text-color-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-medium);
    width: 280px;
    padding: var(--padding-medium);
    box-sizing: border-box;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-card:hover {
    transform: scale(1.03);
    box-shadow: var(--box-shadow-dark);
}

.news-title {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 20px;
    margin-bottom: 10px;
    text-align: center;
}

.news-meta {
    color: var(--warning-color);
    font-size: var(--font-size-small);
    text-align: center;
    margin-bottom: 10px;
}

.news-link {
    display: block;
    background-color: var(--primary-color);
    color: var(--text-color-light);
    text-align: center;
    padding: var(--padding-base);
    border-radius: var(--border-radius);
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
}

.news-link:hover {
    background-color: var(--primary-color-dark);
    transform: scale(1.05);
}

hr {
    border: none;
    border-top: 2px solid var(--primary-color);
    margin: 20px 0;
    width: 80%;
}
