@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&family=Playfair+Display:ital,wght@1,700&display=swap');
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
footer {
  background-color: #003f87;
  color: white;
  padding: 1.2rem 1rem;
  text-align: center;
  font-size: 0.9rem;
}
main {
  flex: 1;
  margin-bottom: 50px;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background: #f7f7f7;
  color: #222;
}

/* ===== NAVBAR ===== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #fff;
  padding: 0.8rem 2rem; 
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  position: relative;
}


.navbar-left {
  display: flex;
  align-items: center;
}

.logo {
  height: 36px; 
  width: auto;
}

.navbar ul {
  display: flex;
  justify-content: center;
  list-style: none;
  flex: 1;
  margin-left: 30px;
}

.navbar ul li {
  margin: 0 18px;
}
.navbar ul li a {
  color: black;
  text-decoration: none;
  font-size: 1.05rem; 
  padding: 8px 16px; 
  border-radius: 24px;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.navbar ul li a:hover {
  background-color: #2c57c2;
  color: white;
}

/* ===== HAMBURGER MENU (MOBILE) ===== */
.hamburger {
display: none;
font-size: 2rem;
position: absolute;
top: 50%;
right: 20px;
transform: translateY(-50%);
color: black;
background: none;
cursor: pointer;
z-index: 1001;
}

/* ===== SIDEBAR ===== */
.sidebar {
position: fixed;
top: 0;
left: -250px;
width: 250px;
height: 100%;
background-color: rgba(44, 87, 194, 0.95); 
color: white;
padding-top: 60px;
transition: left 0.3s ease, box-shadow 0.3s ease; 
z-index: 1000;
box-shadow: 4px 0 10px rgba(0, 0, 0, 0.2);
border-top-right-radius: 15px; 
border-bottom-right-radius: 15px; 
overflow: hidden;
}


.sidebar ul {
list-style: none;
padding: 0 20px;
}


.sidebar ul li {
margin: 20px 0;
}


.sidebar ul li a {
color: white;
font-size: 1.1rem;
padding: 10px;
display: block;
border-radius: 6px;
transition: background-color 0.2s, transform 0.2s; 
text-decoration: none; 
font-weight: 500; 
}


.sidebar ul li a:hover {
background-color: #1f82e5; 
transform: scale(1.05); 
}


.close-sidebar {
position: absolute;
top: 15px;
right: 20px;
font-size: 2rem;
background: none;
border: none;
color: white;
cursor: pointer;
transition: color 0.2s ease;
}

.close-sidebar:hover {
color: red; 
}
#sidebar-header {
text-align: center;
margin-bottom: 20px; 
}


#sidebar-header h2 {
color: white;
font-size: 24px;
margin: 0;
}


#sidebar-header {
border-bottom: 2px solid white; 
padding-bottom: 10px; 
}

.hero {
padding: 80px 40px;
background-color: #f5f7fa;
font-family: 'Inter', sans-serif;
}

.hero-content {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
max-width: 1200px;
margin: 0 auto;
gap: 40px;
}

.hero-text {
flex: 1 1 600px;
}

.hero-text h1 {
font-size: 3.8rem;
font-weight: 800;
margin-bottom: 20px;
}

.hero-text h1 em {
  font-family: 'Georgia', serif;
font-style: italic;
color: #2c57c2;
}

.subtitle {
font-size: 1.8rem;
font-weight: 600;
color: #333;
margin-bottom: 20px;
}

.description {
font-size: 1.2rem;
color: #444;
line-height: 1.8;
text-align: justify;
margin-bottom: 20px;
max-width: 700px;
}

.hero-img {
flex: 1 1 500px;
text-align: center;
}

.hero-img img {
width: 100%;
max-width: 480px;
border-radius: 0;
box-shadow: none;
margin: 0;
}
/* ===== CARD SECTION ===== */
.card-section {
display: flex;
justify-content: center;
gap: 40px;
padding: 80px 20px;
flex-wrap: wrap;
max-width: 1300px;
margin: auto;
background-color: #f7f7f7; 
font-family: 'Inter', sans-serif;
}

.card {
background-color: #f7f7f7; 
border-radius: 20px;
padding: 60px 40px;
border: 1px solid #d9dff2; 
max-width: 400px;
flex: 1 1 340px;
display: flex;
flex-direction: column;
align-items: center;
gap: 24px;
cursor: pointer;
text-align: center;
transition: all 0.3s ease;
box-shadow: none; 
}

.card:hover {
background-color: #3b5fd5; 
background:white ;
border: 2px solid #2c57c2; 
}

.card-img {
  width: 100%;                 
  height: 180px;               
  object-fit: contain;         
  border-radius: 16px;         
  background-color: #e6ecff;   
  padding: 20px;              
  transition: transform 0.3s ease;
}

.card:hover .card-img {
transform: scale(1.05); 
}
.card h2 {
font-size: 1.6rem;
color: #2c57c2;
font-weight: 800;
}

.card p {
position: relative;
color: #444;
font-size: 1.5rem;
line-height: 1.5;
font-weight: 400;
}

.card p::after {
content: '';
position: absolute;
left: 0;
bottom: 0;
width: 0;
height: 2px;

transition: width 0.3s ease;
}

.card:hover p::after {
width: 100%;
}

/* ===== DETAILS SECTION ===== */
.details-section {
  background: #ffffff;                               
  border: 2px solid #005ea5;                         
  border-radius: 28px;
  padding: 50px;
  margin: 70px auto;
  box-shadow: 0 4px 12px rgba(0, 94, 165, 0.15);
  width: 90%;
  max-width: 1150px;
  display: none;
  position: relative;
  transition: all 0.3s ease-in-out;
  overflow: hidden;
}

.details-section h2 {
  font-family: "Segoe UI", sans-serif;
  font-size: 2.5rem;
  margin-bottom: 35px;
  color: #005ea5;
  font-weight: 700;
  letter-spacing: -0.7px;
}

.details-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.details-section ul li {
  margin: 14px 0;
}

.details-section ul li a {
  color: #222222;
  text-decoration: none;
  font-family: "Segoe UI", sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  transition: color 0.3s ease;
}

.details-section ul li a:hover {
  color: #005ea5;
}

/* === CLOSE BUTTON === */
.close-btn {
  position: absolute;
  top: 20px;
  right: 25px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #005ea5;
  color: #ffffff;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease, transform 0.3s ease;
  z-index: 10;
}

.close-btn:hover {
  background: #004a87;
  transform: scale(1.1);
}

/* === ACCORDION STYLES === */
.accordion {
  background-color:white;
  border: 1px solid #005ea5;
  padding: 16px;
  font-family: "Segoe UI", sans-serif;
  font-size: 1.1rem;
  color: #005ea5;
  font-weight: 600;
  width: 100%;
  text-align: left;
  cursor: pointer;
  border-radius: 16px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.accordion:hover {
  background-color:white; 
  box-shadow: 0 6px 16px #2c57c2; 
}

.accordion.active {
  background-color: #ffffff;
  color: #005ea5;
  border-color: #005ea5;
  box-shadow: 0 6px 16px rgba(0, 123, 255, 0.25);
}

.accordion::after {
  content: '›';
  position: absolute;
  right: 20px;
  font-size: 1.4rem;
  transition: transform 0.3s ease;
  transform: rotate(0deg);
  color: #005ea5;
}

.accordion.active::after {
  transform: rotate(90deg);
  color: #005ea5;
}

.panel {
  position: relative;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform-origin: top;
  transform: scaleY(0.98); 
  transition:
    max-height 0.6s cubic-bezier(0.25, 1, 0.3, 1),
    opacity 0.5s ease,
    transform 0.3s ease;
  will-change: max-height, opacity, transform;
   padding: 0.5rem 0.5rem 0.1rem 0.5rem;
}

.panel.open {
  max-height: 1000px;
  opacity: 1;
  transform: scaleY(1); 
}

.nested-panel {
  background-color: white;
  border-left: 4px solid #005ea5;
  padding: 5px 5px;
  margin-bottom: 1px;
  border-radius: 12px;
  transform: scale(0.98);
  opacity: 0;
  transition:
    padding 0.4s ease,
    transform 0.4s ease,
    opacity 0.4s ease;
}

.nested-panel.open {
  padding: 24px 30px;
  background-color: white;
  transform: scale(1);
  opacity: 1;
}

.nested-panel ul {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}
.panel ul {
  list-style: none;             
  padding-left: 0;
  margin: 0;
}

.panel ul li {
  font-family: "Segoe UI", sans-serif;
  font-size: 1.05rem;           
  padding: 0.5rem 1rem;          
  border-left: 3px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.panel ul li a {
  text-decoration: none;
  color: #005ea5;
  display: block;
  padding-left: 0.5rem;
  transition: color 0.3s ease;
}

.panel ul li:hover {
  background-color: #f1f8ff;
  border-left-color: #005ea5;    
}

.panel ul li a:hover {
  color: #003f7d;
}

.nested-panel ul li {
  display: inline-block;
  background-color: #005ea5;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-family: "Segoe UI", sans-serif;
  font-weight: 500;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.nested-panel ul li:hover {
  background-color: #2c57c2;
  transform: scale(1.05);
}

.nested-panel .nested-panel {
  background-color: white;
  border-left: 3px dashed #005ea5;
  padding: 12px 20px;
  margin-left: 20px;
  border-radius: 12px;
  transition: background-color 0.4s ease;
}

.nested-panel .nested-panel.open {
  background-color: white;
}
.image-section {
  position: relative;
  margin-top: 30px;
  width: 100%;
  padding: 2rem 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  justify-content: center;
}

.image-section img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;

  /* Per effetto fade-in */
  opacity: 0;
  filter: blur(20px);
  transition: opacity 0.5s ease, filter 0.5s ease;
  background-color: #f0f0f0;
}

.image-section img.loaded {
  opacity: 1;
  filter: blur(0);
}

/* Placeholder con shimmer */
.image-section .placeholder {
  width: 100%;
  height: 250px;
  border-radius: 10px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

/* Animazione shimmer */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Blocca lo scroll del body quando la galleria è aperta */
body.no-scroll {
  overflow: hidden;
}
.image-section {
  position: relative;
  margin-top: 30px;
  width: 100%;
  padding: 2rem 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  justify-content: center;
}

.image-section img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;

  /* Per effetto fade-in */
  opacity: 0;
  filter: blur(20px);
  transition: opacity 0.5s ease, filter 0.5s ease;
  background-color: #f0f0f0;
}

.image-section img.loaded {
  opacity: 1;
  filter: blur(0);
}

/* Placeholder con shimmer */
.image-section .placeholder {
  width: 100%;
  height: 250px;
  border-radius: 10px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

/* Animazione shimmer */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Blocca lo scroll del body quando la galleria è aperta */
body.no-scroll {
  overflow: hidden;
}

/* Bottone per chiudere la galleria */
.close-gallery {
  margin-top: 2rem;
  margin-inline: auto;
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 1rem;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.close-gallery svg {
  width: 32px;
  height: 32px;
  stroke: #444;
  transition: stroke 0.2s ease;
}

.close-gallery:hover svg {
  stroke: #000;
}

.modalImage {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  touch-action: pan-y;
  animation: fadeIn 0.4s ease forwards;
}


@keyframes fadeIn {
  from { opacity: 0; transform: scale(1.02); }
  to { opacity: 1; transform: scale(1); }
}

.modalImage img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  object-fit: contain;
  z-index: 1000;
}


.modalImage img:hover {
  transform: scale(1.1); 
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}


.modalImage .close,
.modalImage .nav-arrow {
  position: absolute;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}


.modalImage .close:hover,
.modalImage .nav-arrow:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.15);
}


.modalImage .close {
  top: 24px;
  right: 24px;
  z-index: 1001;
}


.modalImage .nav-arrow.left,
.modalImage .nav-arrow.right {
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
}


.modalImage .nav-arrow.left {
  left: 24px;
}

.modalImage .nav-arrow.right {
  right: 24px;
}
#closeGallery {
position: fixed;
bottom: 18px;
right: 20px;
width: 50px;
height: 50px;
font-size: 1.8rem;
color: #2c57c2;
background-color: #ffffff;
border: 2px solid #2c57c2;
border-radius: 50%;
display: none;
align-items: center;
justify-content: center;
cursor: pointer;
z-index: 1001;
transition: all 0.3s ease;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
animation: floatY 3s ease-in-out infinite;
}

#closeGallery:hover {
background-color: #2c57c2;
color: white;
box-shadow: 0 6px 14px rgba(44, 87, 194, 0.3);
}

/*body.no-scroll {
overflow: hidden;
}*/


@media (max-width: 768px) {

  :root {
    --primary-color: #005ea5;
    --secondary-color: #003366;
    --bg-color: #f0f4fa;
    --text-color: #002147;
    --padding-sm: 20px;
    --padding-md: 30px;
  }

  .navbar ul {
    display: none;
  }
  .hamburger {
    display: block;
  }

  .hero {
    padding: var(--padding-md) var(--padding-sm);
    background-color: var(--bg-color);
    transition: background-color 0.4s ease;
  }

  .hero-text h1 {
    font-size: 2.6rem;
    margin-bottom: 10px;
    text-align: center;
    color: var(--primary-color);
  }

  .hero-content {
    gap: 20px;
    justify-content: center;
  }

  .hero-text {
    flex: 1 1 100%;
    text-align: center;
  }

  .hero-img {
    flex: 1 1 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .hero-img img {
    max-width: 80%;
    max-height: 300px;
    transition: transform 0.3s ease;
  }

  .hero-img img:hover {
    transform: scale(1.05);
  }

  .subtitle {
    font-size: 1.3rem;
    color: var(--secondary-color);
  }

  .description {
    font-size: 1rem;
    max-width: 100%;
    text-align: justify;
    line-height: 1.5;
  }

  .oid {
    text-align: center;
  }

  .card-section {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: var(--padding-sm);
  }

  .card {
    flex: 1 1 100%;
    max-width: 100%;
    padding: var(--padding-sm);
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
  }

  .card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  }

  .card-img {
    height: 140px;
    padding: 10px;
  }

  .details-section {
    padding: var(--padding-md) var(--padding-sm);
  }

  .details-section h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
  }

  .details-section ul li {
    margin: 5px 0;
    font-size: 1rem;
  }

  .accordion {
    margin-bottom: 12px;
    padding: 12px 16px;
    background-color: #ffffff;
    border-left: 4px solid var(--primary-color);
    transition: background-color 0.4s ease, padding 0.3s ease;
  }

  .accordion:hover {
    background-color: #e6f0ff;
    padding-left: 20px;
  }

  .modalImage .nav-arrow.left,
  .modalImage .nav-arrow.right {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .modalImage .nav-arrow.left:hover,
  .modalImage .nav-arrow.right:hover {
    background-color: var(--secondary-color);
  }

  .modalImage img {
    max-width: 80vw;
    max-height: 75vh;
    transition: transform 0.3s ease;
  }

  .modalImage img:hover {
    transform: scale(1.03);
  }
}
@media (max-width: 1024px) {
  /* Tablet */
  .hero {
    padding: 60px 20px;
  }

  .hero-text h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    text-align: left;
  }

  .hero-content {
    gap: 20px;
    justify-content: center; 
  }

  .hero-text {
    flex: 1 1 100%;
    text-align: center;
  }

  .hero-img {
    flex: 1 1 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .hero-img img {
    max-width: 80%;
  }
}

@media (max-width: 1280px) {
 
  .hero {
    padding: 70px 30px;
  }

  .hero-text h1 {
    font-size: 3.2rem;
    margin-bottom: 20px;
    text-align: left;
  }

  .hero-content {
    gap: 30px;
    justify-content: space-between;
  }

  .hero-text {
    flex: 1 1 45%; 
  }

  .hero-img {
    flex: 1 1 45%; 
  }

  .hero-img img {
    max-width: 95%;
  }
}

@media (max-width: 480px) {
  
  .hero {
    padding: 40px 15px;
  }

  .hero-text h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    
  }

  .hero-content {
    flex-direction: column;
    gap: 15px;
    justify-content: center;
  }

  .hero-img img {
    max-width: 100%;
  }
}