/* ================================================================
   IMPORTS & FONTS
   ================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

/* ================================================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ================================================================ */
:root {
    /* Colors */
    --bgcolor-menu: #036;
    --black: #000000;
    --white: #FFFFFF;
    --white2: #dfdfdf;
    --blue: #0078d4;
    --blueZoo: #0078d4;
    --back: #E4D9FF;
    --text: #30343F;
    --colorSection: #1e2749;
    
    /* Gradients */
    --color: linear-gradient(115deg, #00348f, #00a4d6);
    --linear: linear-gradient(115deg, #0099ff, #003366);
}

/* ================================================================
   RESET & BASE STYLES
   ================================================================ */
* {
    /* border: 1px solid red; */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Roboto, sans-serif, 'Times New Roman', Times, serif;
    font-size: 1rem;
}

/* ================================================================
   UTILITY CLASSES
   ================================================================ */
/* Colors */
.red { color: rgb(207, 0, 0); }
.blue { color: rgb(0, 0, 204); }
.green { color: rgb(0, 155, 0); }
.navy { color: navy; }
.orange { color: rgb(212, 113, 0); }
.white { color: var(--white); }

/* Effects & States */
.box-shadow { box-shadow: 1px 1px 1px navy; }
.hide { 
    display: none !important; 
    transition: min-height 0.5s ease-in-out; 
}
.no-overflow { overflow: hidden !important; }
.bordo-rosso { border: 2px solid red; }

/* Spacing */
.mtop500 { margin-top: 500px; }

/* Font Awesome Icons */
.fa-home { font-size: 1.125rem !important; }
.fa-undo { padding-right: 5px; }
.fa-caret-down { margin-left: 5px; }
.dropdown .fa-circle-user { 
    font-size: large; 
    margin-left: 3px; 
}

/* ================================================================
   LAYOUT - HEADER & NAVIGATION
   ================================================================ */
/* Background Containers */
.container-bg,
.container-bg-subfolder {
    position: relative;
    background: var(--blueZoo);
}

.container-bg:before {
    content: '';
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    opacity: 0.99;
    background: var(--white);
    background-repeat: no-repeat;
    background-position: 50% 0;
    background-size: cover;
    z-index: -1;
}

.container-opacity:before {
    opacity: 0.20;
}

.container {
    position: relative;
    color: rgb(var(--color));
}

/* Header */
.head {
    width: 100vw;
    height: 70px;
    display: flex;
    align-items: center;
    position: fixed;
    z-index: 100;
    box-shadow: 0 0 10px black;
    background: var(--white);
    padding: 0 20px;
    top: 0px;
}

/* Logo */
.logo {
    top: 0px;
    width: 50px;
    height: auto;
}

.logo-name {
    display: flex;
    line-height: inherit;
    font-size: 1.1em;
    color: var(--blueZoo);
    text-shadow: 1px 0 0px black;
    margin-left: 5px;
}

/* Menu Icon */
#menu-icon {
    content: icon;
    cursor: pointer;
    height: auto;
    width: 30px;
    margin-right: 30px;
    margin-left: 40px;
    text-align: center;
    font-size: x-large;
}

/* Navigation Menu */
.nav-links {
    display: flex;
    justify-content: flex-end;
    flex: 1;
    color: var(--blueZoo);
}

.nav-links a {
    background: var(--white2);
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    padding: 6px 10px;
    margin: 0 1px;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
}

.nav-links a:hover {
    background: var(--color);
    color: var(--blueZoo);
}

/* ================================================================
   DROPDOWN MENUS
   ================================================================ */
/* Mobile Dropdown Menu */
.dropdown-menu {
    display: block;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: fixed;
    right: 0px;
    top: 69px;
    background: var(--white);
    box-shadow: 0 4px 6px rgb(19, 19, 19);
    width: 100%;
    text-align: right;
    font-size: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 80px);
    z-index: 100;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.dropdown-menu::-webkit-scrollbar {
    width: 8px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--blueZoo);
    border-radius: 4px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #004c8c;
}

#menu::-webkit-scrollbar {
    display: none;
}

.dropdown-menu.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.dropdown-menu a {
    display: block;
    color: var(--blueZoo);
    text-decoration: none;
    cursor: pointer;
    padding: 13px;
}

.dropdown-menu a:hover {
    background: var(--linear);
    color: var(--white);
}

/* Dropdown Voices */
.dropdown-voice,
.dropdown-voice-area-riservata {
    width: 98%;
    display: flex;
    text-align: left;
    justify-content: flex-start;
    align-items: center;
    border-bottom: 1px solid #b3b3b3;
    margin-left: 10px;
    margin-right: 10px;
    min-height: 44px;
    padding: 8px 0;
}

.dropdown-voice a,
.dropdown-voice-area-riservata a {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.95rem;
    text-align: left;
}

.dropdown-voice .finger,
.dropdown-voice-area-riservata .finger {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px;
    flex-shrink: 0;
}

.dropdown-voice .finger i {
    font-size: 1.2rem;
    color: var(--blueZoo);
}

.dropdown-dropdown a {
    display: block;
    padding: 12px 15px;
    color: black;
    text-decoration: none;
    cursor: pointer;
    margin-right: 10px;
    width: 100%;
    font-size: 0.9rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-dropdown a:hover {
    background: var(--linear);
    color: rgb(255, 255, 255);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Mobile Submenu Styles */
.dropdown-dropdown a[style*="padding-left: 35px"] {
    background: #f5f5f5;
    font-size: 0.9rem;
    border-left: 3px solid var(--blueZoo);
}

.dropdown-dropdown a[style*="padding-left: 35px"]:hover {
    background: var(--linear);
    color: var(--white);
}

.dropdown-dropdown {
    max-height: 0;
    overflow: hidden;
    color: #000000;
    background: var(--white);
    padding: 0;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.4s ease;
}

/* Nuovi stili per i sottomenu annidati */
.dropdown-voice-sub {
    width: 96%;
    display: flex;
    text-align: left;
    justify-content: flex-start;
    align-items: center;
    border-bottom: 1px solid #d0d0d0;
    margin-left: 15px;
    margin-right: 10px;
    padding: 6px 0;
    background: #f8f8f8;
    min-height: 40px;
    border-radius: 4px;
    margin-top: 2px;
    margin-bottom: 2px;
}

.dropdown-voice-sub a {
    flex: 1;
    display: block;
    padding: 8px 12px;
    color: #000000;
    text-decoration: none;
    font-weight: 400;
    font-size: 0.9rem;
    text-align: left;
}

.dropdown-voice-sub .finger {
    padding-right: 12px;
    min-width: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.dropdown-voice-sub .finger i {
    font-size: 1.2rem;
    color: #666;
}

.dropdown-dropdown-sub {
    max-height: 0;
    overflow: hidden;
    background: #f0f0f0;
    padding: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    margin-left: 25px;
    margin-right: 10px;
    border-radius: 4px;
    position: relative;
    z-index: 10;
}

.dropdown-dropdown-sub a {
    display: block;
    padding: 10px 15px;
    color: #444;
    text-decoration: none;
    font-size: 0.85rem;
    border-left: 3px solid var(--blueZoo);
    margin-left: 5px;
    min-height: 42px;
    display: flex;
    align-items: center;
    margin-bottom: 1px;
}

.dropdown-dropdown-sub a:hover {
    background: var(--linear);
    color: var(--white);
    transition: all 0.3s ease;
}

.dropdown-dropdown-sub a:active {
    background: var(--colorSection);
}

/* Desktop Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: var(--blueZoo);
    background: var(--white);
    transition: 0.5s ease-in-out;
}

.dropdown a:hover {
    background: var(--linear);
    color: var(--white);
    transition: 0.5s all;
}

.dropdown-menu1 {
    display: none;
    position: absolute;
    background: var(--white);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.466);
    z-index: 1;
    padding: 10px 0;
    border-radius: 10px;
}

.dropdown-menu1 a {
    color: var(--blueZoo);
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    text-align: left;
    background: transparent;
    border: none;
}

.dropdown-menu1 a:hover {
    background: var(--linear);
    color: var(--white);
}

.dropdown:hover .dropdown-menu1 {
    display: block;
}

/* Nested Submenu Styles */
.dropdown-menu1 .dropdown {
    position: relative;
    width: 100%;
}

.dropdown-menu1 .dropdown > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.dropdown-menu1 .dropdown .dropdown-menu1 {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 2px;
    min-width: max-content;
    z-index: 1000;
}

.dropdown-menu1 .dropdown:hover > .dropdown-menu1 {
    display: block;
}

.dropdown-menu1 .dropdown:hover {
    background: var(--linear);
}

.dropdown-menu1 .dropdown:hover > a {
    background: var(--linear);
    color: var(--white);
    margin-left: -15px;
}

/* Menu Icons */
#menu div i {
    justify-content: center;
    text-align: center;
    display: flex;
    padding-top: 10px;
    width: 60px;
    height: 40px;
    color: var(--blueZoo);
}

#menu div i:hover {
    color: var(--white);
    background: var(--color);
    border-radius: 10px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#menu {
    max-height: auto;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease;
}

#menu.open {
    opacity: 1;
    pointer-events: auto;
    max-height: auto;
}

/* ================================================================
   LAYOUT - MAIN CONTENT
   ================================================================ */
/* Image Carousel */
.immagine {
    justify-content: center;
    align-items: center;
    width: 100%;
    position: sticky;
    display: flex;
    height: 100%;
    background-attachment: fixed;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, 0);
    z-index: -1;
    border: 1px solid #000000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

/* Carousel Controls */
.scroll {
    margin-top: 200px;
    position: absolute;
    transform: translateY(-50%);
    color: white;
    padding: 20px 17px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    justify-content: center;
}

#scroll-left {
    z-index: 20;
    left: 20px;
    top: 10%;
}

#scroll-right {
    z-index: 20;
    right: 20px;
    top: 10%;
}

#scroll-left:hover,
#scroll-right:hover {
    color: rgb(58, 58, 58);
}

#scroll-left:active,
#scroll-right:active {
    transform: translateY(-50%) scale(0.95);
}

#carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    transition: opacity 1s, filter 1s, transform 1s ease-in-out;
}

/* ================================================================
   COMPONENTS - CARDS
   ================================================================ */
/* Card Container */
.cardc {
    display: block;
    justify-content: center;
    width: max-content;
    margin: 0 auto;
}

/* Base Card Styles */
.card {
    display: flex;
    flex-direction: column;
    min-height: 125px;
    border-radius: 10px solid rgba(0, 0, 0, 0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0);
    justify-content: space-between;
    padding: 10px 30px;
    transition: 0.5s;
    text-align: center;
}

/* Card Sections */
.header-card {
    border: none;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    padding: 0px;
    padding-bottom: 5px;
    text-align: center;
    font-weight: bolder;
    font-size: 1.125rem;
    color: var(--white);
}

.body-card {
    flex: 1;
    border: none;
    padding: 5px 0;
    color: var(--white);
    text-align: left;
}

.footer-card {
    border: none;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    padding: 0;
    text-align: center;
    bottom: 10px;
    font-size: 2em;
    color: var(--white);
}

/* Card Grid Layout */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    padding: 10px;
    margin: 0 auto;
    justify-content: center;
    width: max-content;
    margin-top: 70px;
}

.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }

.card-grid .card {
    max-width: 300px;
    min-width: 300px;
    border-radius: 5px;
    background: var(--linear);
    transition: all 0.6s ease;
}

.card-grid .card:hover {
    box-shadow: 1px 4px 20px rgba(0, 0, 0, 0.541);
    transform: translateY(-3px);
}

.card .footer-card a {
    text-decoration: none;
    color: var(--white);
    transition: all 0.3s;
    border-radius: 8px;
}

.card .footer-card a:hover {
    padding: 0 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.658);
    color: var(--blueZoo);
    background: var(--white);
    transition: all 0.3s;
}

/* ================================================================
   COMPONENTS - DOCUMENTS SECTION
   ================================================================ */
.section-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white2);
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin: 5px;
}

.content {
    flex: 1;
    min-height: 75px;
}

.title {
    font-size: 4rem;
}

.text {
    margin: 5px 0;
    padding: 10px 0;
    margin-right: 20px;
    font-weight: bold;
    color: navy;
}

.icon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: fit-content;
}

.icon {
    font-size: 1.5rem;
    margin: 0;
    padding: 10px 0;
    color: #1e2749;
}

/* ================================================================
   COMPONENTS - INFORMATION SECTION
   ================================================================ */
.informazioni {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 10vh;
    margin: 20px 10px;
    text-decoration: none !important;
    border-radius: 5px;
}

.informazioni .info1 {
    font-size: 1rem;
    color: #000000;
    margin: auto 10px;
    margin-bottom: 10px;
    padding: 20px;
    background: var(--white);
    width: 100%;
    border-radius: 5px;
}

.informazioni #News {
    justify-content: center;
    text-align: center;
}

/* ================================================================
   LAYOUT - FOOTER
   ================================================================ */
footer {
    margin-top: 8.9%;
    background: #eaeff3;
    padding: 45px 5%;
    width: 100%;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.568);
    color: #000000;
}

footer p {
    text-decoration: none;
    margin: 0;
    color: #000000;
    margin-top: 5px;
}

footer a:link,
footer a:visited {
    color: #000000;
    text-decoration: solid;
}

/* Footer Layout */
.footer-div {
    display: flex;
    gap: 10px;
}

.footer-div-item,
.footer-div-map {
    flex: 1;
}

/* Footer Logo */
.footer-logo {
    width: 85px;
    background: transparent;
    padding: 5px;
}

.footer-logo-ce {
    align-content: center;
    color: rgb(0, 0, 0);
    padding-left: 10px;
    font-size: 1.5rem;
}

/* Copyright */
.copyright {
    background: black;
    color: white;
    text-align: center;
    padding-top: 5px;
    padding-bottom: 5px;
}

.copyright a:link,
.copyright a:visited,
.copyright a:hover {
    color: #f0f0f0;
    text-decoration: none;
}

/* ================================================================
   COMPONENTS - MENU SECTION
   ================================================================ */
.menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0.5rem;
    background: var(--bgcolor-menu);
    height: auto;
    width: 90%;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgb(0, 0, 0);
    padding: 24px 18px;
    transition: 0.5s;
    text-align: center;
    margin-top: -5px;
}

.menu h1 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.menu a {
    padding: 10px 20px;
    margin-top: 15px;
    text-decoration: none;
    color: white;
    font-size: 1rem;
}

.menu a:link {
    color: var(--white);
}

.menu a:hover {
    background: var(--white);
    color: var(--blueZoo);
    border-radius: 10px;
    transition: all 0.5s;
}

.menu i {
    color: var(--white);
    font-size: 1.125rem;
}

.menu a:hover i {
    color: var(--blueZoo);
}

/* ================================================================
   COMPONENTS - COOKIE POPUP
   ================================================================ */
#cookie-popup {
    position: fixed;
    left: 50%;
    bottom: 20px;
    right: 5px;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    padding: 16px 24px;
    z-index: 10;
    border-radius: 8px;
    font-family: sans-serif;
    max-width: 350px;
    text-align: center;
}

#cookie-popup .cookie-message {
    margin-bottom: 12px;
}

/* Cookie Buttons */
#cookie-accept {
    background: #0078d4;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    margin-right: 10px;
}

#cookie-deny {
    background: #e0e0e0;
    color: #333;
    border: none;
    padding: 8px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}

#cookie-btn {
    position: fixed;
    right: 20px;
    bottom: 80px;
    z-index: 10;
    background: #0078d4;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}

/* ================================================================
   MISC STYLES
   ================================================================ */
#contenuto {
    margin-top: 100px;
}