/* ======================
   styles.css - unificato CORRETTO
   ====================== */

/* RESET E BASE */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: 'Poppins', Arial, sans-serif;
  background-color: #f4f4f4;
  color: #333;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* IMMAGINI */
img { max-width:100%; height:auto; display:block; }

/* LINK */
a { color: inherit; text-decoration: none; }

/* HEADER / LOGO */
.site-header { background: linear-gradient(135deg, #f9f9f9, #f4eb9e); position: relative; z-index: 1500; }
.logo-wrapper { display:flex; justify-content:center; align-items:center; padding: 30px 16px; }
.main-logo-big {
  width: clamp(360px, 70vw, 1000px);
  object-fit: contain;
  filter: drop-shadow(0 5px 15px rgba(0,0,0,0.15));
}

/* MENU TOGGLE (mobile) */
.menu-toggle {
  display:none;
  position: fixed;
  top: 22px;
  right: 20px;
  width: 46px;
  height: 36px;
  z-index: 2001;
  border: none;
  background: none;
  cursor: pointer;
}
.menu-toggle span {
  display:block;
  width:100%;
  height:4px;
  background:#2c2c2c;
  margin-bottom:6px;
  border-radius:3px;
  transition: transform .25s ease, opacity .25s ease;
}
.menu-toggle.active span:nth-child(1){ transform: rotate(45deg) translate(5px,5px); }
.menu-toggle.active span:nth-child(2){ opacity:0; }
.menu-toggle.active span:nth-child(3){ transform: rotate(-45deg) translate(6px,-6px); }

/* NAVBAR */
.navbar {
  background: linear-gradient(135deg, #b6aa5e, #88672e);
  display:flex;
  justify-content:center;
  align-items:center;
  padding: 12px 0;
  position: relative;
}
.navbar ul { list-style:none; display:flex; gap:28px; align-items:center; margin:0; padding:0; }
.navbar li { position: relative; }
.navbar a { color:#fff; font-size:1.2rem; font-weight:600; padding-bottom:4px; display:inline-flex; align-items:center; gap:8px; }
.navbar a img.nav-fungo { width:36px; height:36px; vertical-align:middle; }
.navbar a::after {
  content:''; position:absolute; left:50%; bottom:0; width:0; height:3px; background:#f39c12; transition:all .35s ease; transform:translateX(-50%);
}
.navbar a:hover::after { width:100%; }
.navbar a:hover { color:#fff; opacity:0.95; }
.navbar a.active::after { width:100%; }

/* HERO GENERALE */
.hero {
  height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  position:relative;
  color:#fff;
  background-size:cover;
  background-position:center;
}
.hero::before {
  content:""; position:absolute; inset:0; background:rgba(0,0,0,0.36); z-index:1;
}
.hero__content { position:relative; z-index:2; padding:20px; max-width:1100px; }
.hero__title { font-family: 'Playfair Display', serif; font-weight:700; font-size:clamp(2.5rem,6vw,4rem); text-shadow:2px 2px 15px rgba(0,0,0,0.7); margin-bottom:12px; }
.hero__subtitle { font-family:'Lora', serif; font-size:clamp(1.1rem,3vw,1.7rem); margin-bottom:18px; }
.cta-btn {
  display:inline-block; background:#FFA500; color:#fff; padding:12px 24px; border-radius:8px; font-weight:700; transition:transform .25s ease;
}
.cta-btn:hover { transform:scale(1.05); }

/* Hero specific backgrounds (usa immagini nella cartella images/) */
.hero-1 { background-image: url('../images/hero2.webp'); background-attachment: fixed; }
.hero-2 { background-image: url('../images/hero1.webp'); background-attachment: fixed; }
.hero-3 { background-image: url('../images/hero0.webp'); background-attachment: fixed; }

/* CHI SIAMO - HERO SPECIFICO */
.hero-chi { 
  background: url('../assets/images/herogruppo.webp') center/cover no-repeat; 
  height: 100vh; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  position: relative;
  background-attachment: fixed;
}
.hero-chi::before { 
  content:""; 
  position:absolute; 
  inset:0; 
  background:rgba(0,0,0,0.4); 
  z-index:1; 
}
.hero-chi .hero__content { 
  color:#fff; 
  z-index:2; 
  position: relative;
  padding:24px;
  text-align: center;
  animation: fade-in-up 1.5s ease forwards;
}
.hero-chi .hero__content h1 {
  font-size: clamp(3rem, 8vw, 4rem);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  text-shadow: 2px 2px 15px rgba(0,0,0,0.7);
  margin-bottom: 15px;
}
.hero-chi .hero__content p {
  font-size: clamp(1.2rem, 4vw, 1.7rem);
  font-family: 'Lora', serif;
  margin-top: 20px;
}

/* STORIA SEZIONE */
.storia { 
  padding: 60px 20px; 
  background: #f8f8f8; 
  max-width: 1100px; 
  margin: 0 auto;
  animation: fade-in-side 2s ease forwards;
}
.storia h2 { 
  text-align: center; 
  color: #4C7031; 
  font-size: clamp(2rem, 5vw, 2.8rem); 
  margin-bottom: 30px; 
}
.storia p { 
  font-size: clamp(1rem, 2.5vw, 1.2rem); 
  line-height: 1.7; 
  text-align: justify; 
  max-width: 900px;
  margin: 0 auto;
}

/* TEAM SEZIONE */
.team { 
  padding: 60px 20px; 
  background: linear-gradient(135deg, #ffffff, #f4eb9e); 
}
.team h2 { 
  text-align: center; 
  color: #4C7031; 
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 30px;
  margin-top: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.team h2:first-of-type {
  margin-top: 0;
}
.microscope-icon {
  font-size: 1.4rem;
  display: inline-block;
}
.team-list { 
  list-style: none; 
  max-width: 800px; 
  margin: 30px auto; 
  padding: 0 20px; 
  font-size: 1.2rem; 
  line-height: 2.2; 
  color: #333;
}
.team-list li { 
  display: flex; 
  justify-content: space-between; 
  align-items: center;
  border-bottom: 1px solid #ddd; 
  padding: 8px 0; 
  opacity: 0; 
  transform: translateY(20px); 
  transition: all .6s ease;
}
.team-list li:last-child {
  border-bottom: none;
}
.team-list li.visible { 
  opacity: 1; 
  transform: none; 
}
.badge { 
  background: #f4eb9e; 
  color: #444;
  padding: 4px 12px; 
  border-radius: 999px; 
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* BADGE COLORS */
.badge-presidente { background: #ffe600; }
.badge-vice { background: #c4930e; color: white; }
.badge-segretario { background: #91f473; }
.badge-vice-segretario { background: #4cbb2a; color: white; }
.badge-consigliere { background: #27ae91; color: white; }
.badge-effettivo { background: #73e1fa; }
.badge-supplente { background: #7f8c8d; color: white; }

/* ANIMAZIONI CHI SIAMO */
@keyframes fade-in-up {
    from {opacity: 0; transform: translateY(50px);}
    to {opacity: 1; transform: translateY(0);}
}

@keyframes fade-in-side {
    from {opacity: 0; transform: translateX(-50px);}
    to {opacity: 1; transform: translateX(0);}
}

/* EVENTI (cards) */
.eventi { background: linear-gradient(180deg,#f9f9f9,#f4eb9e); padding:60px 20px; color:#333; }
.eventi h2 { text-align:center; font-size:2.6rem; margin-bottom:24px; color:#4C7031; }
.eventi-container { display:flex; gap:22px; overflow-x:auto; padding:18px 0; scroll-behavior:smooth; }
.evento { background:#fff; border-radius:14px; width:320px; min-height:220px; padding:14px; box-shadow:0 8px 16px rgba(0,0,0,0.08); flex-shrink:0; transition:transform .25s ease; }
.evento h3 { margin-bottom:6px; color:#000; font-size:1.15rem; }
.evento p.data { color:#4C7031; font-weight:700; margin-bottom:8px; }

/* Vedi tutti */
.vedi-tutti { display:block; margin:30px auto 0; background:#FFA500; color:white; padding:12px 26px; border-radius:40px; width:max-content; text-align:center; }

/* =========================
   NEWS SECTION - STILI MODERNI
   ========================= */

/* Container generale */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* HERO SECTION NEWS */
.news-hero {
  height: 50vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  background: linear-gradient(135deg, #4C7031, #6B8A42, #88A654);
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
  color: white;
  padding: 20px;
  overflow: hidden;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.news-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../images/funghi_pattern.png') repeat;
  opacity: 0.05;
  z-index: 1;
}

.news-hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.news-hero__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 15px;
  font-weight: 700;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

.news-hero__subtitle {
  font-family: 'Lora', serif;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  opacity: 0.95;
  line-height: 1.6;
}

/* NEWS SECTION */
.news-section {
  padding: 80px 0;
  background: linear-gradient(180deg, #f9f9f9, #f4eb9e);
  min-height: 100vh;
}

.news-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 40px;
  align-items: start;
}

/* FEATURED ARTICLE */
.featured-article {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-article:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.featured-article__image {
  height: 400px;
  overflow: hidden;
  position: relative;
}

.featured-article__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.featured-article:hover .featured-article__image img {
  transform: scale(1.05);
}

.featured-article__content {
  padding: 40px;
  position: relative;
}

.featured-badge {
  background: #FFA500;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-bottom: 20px;
}

.featured-article__title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 15px;
  color: #2c2c2c;
}

.featured-article__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.featured-article__title a:hover {
  color: #4C7031;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: #666;
}

.article-meta time {
  display: flex;
  align-items: center;
  gap: 8px;
}

.featured-article__excerpt {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #555;
  margin-bottom: 30px;
}

.read-more-btn {
  background: linear-gradient(135deg, #4C7031, #6B8A42);
  color: white;
  padding: 14px 28px;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(76, 112, 49, 0.3);
}

.read-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(76, 112, 49, 0.4);
}

/* NEWS LIST */
.news-list {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  height: fit-content;
  position: sticky;
  top: 20px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #4C7031;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.news-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-card {
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  background: #f8f8f8;
  border: 1px solid #eee;
}

.news-card:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.news-card__image {
  height: 120px;
  position: relative;
  overflow: hidden;
}

.news-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .news-card__image img {
  transform: scale(1.1);
}

.image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.1));
}

.news-card__content {
  padding: 20px;
}

.news-card__meta {
  margin-bottom: 10px;
}

.news-card__meta time {
  color: #4C7031;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
}

.news-card__title a {
  color: #2c2c2c;
  text-decoration: none;
  transition: color 0.3s ease;
}

.news-card__title a:hover {
  color: #4C7031;
}

.news-card__excerpt {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 15px;
}

.news-card__link {
  color: #4C7031;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.news-card__link:hover {
  color: #FFA500;
  text-decoration: underline;
}

.load-more-section {
  text-align: center;
  margin-top: 30px;
}

.load-more-btn {
  background: linear-gradient(135deg, #FFA500, #ff8c00);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 165, 0, 0.3);
}

.load-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 165, 0, 0.4);
}

/* FOOTER */
footer {
    background-color: #4C7031;
    color: white;
    text-align: center;
    padding: 20px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.footer-content .social-icons img {
    width: 32px !important;
    height: 32px !important;
    object-fit: contain;
}

/* ANIMAZIONI GENERALI */
.fade-in { opacity:0; transform: translateY(20px); transition: all .6s ease; }
.fade-in.visible { opacity:1; transform:none; }

.post img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .news-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }
}

@media (max-width: 900px) {
  .navbar ul { gap:18px; }
  .main-logo-big { width: clamp(240px, 60vw, 800px); }
  .hero { height: 60vh; background-attachment: scroll; }
  .hero-chi { height: 60vh; background-attachment: scroll; }
}

@media (max-width: 768px) {
  .menu-toggle { display:block; }
  .navbar {
    position: fixed; top:0; left:-100%; width:100vw; height:100vh; background:rgba(0,0,0,0.95); flex-direction:column; justify-content:center; transition:left .28s ease; z-index:2000; visibility:hidden;
  }
  .navbar.open { left:0; visibility:visible; }
  .navbar ul { flex-direction:column; gap:24px; align-items:center; }
  .navbar a { font-size:1.3rem; color:#fff; }
  .hero__title { font-size:clamp(1.8rem,6vw,2.6rem); }
  .eventi-container { padding-bottom:28px; }
  
  /* CHI SIAMO RESPONSIVE */
  .hero-chi { height: 50vh; }
  .hero-chi .hero__content h1 { font-size: clamp(2.5rem, 8vw, 3.5rem); }
  .hero-chi .hero__content p { font-size: clamp(1rem, 4vw, 1.4rem); }
  .storia { padding: 40px 20px; text-align: center; }
  .storia h2 { font-size: clamp(1.8rem, 5vw, 2.5rem); }
  .storia p { font-size: 1rem; }
  .team h2 { font-size: clamp(1.4rem, 4vw, 1.6rem); }
  .team-list { font-size: 1rem; padding: 0 15px; }
  .team-list li { flex-wrap: wrap; gap: 10px; }
  
  /* NEWS RESPONSIVE */
  .news-hero { height: 40vh; padding: 15px; }
  .news-section { padding: 50px 0; }
  .container { padding: 0 15px; }
  .featured-article__content { padding: 25px; }
  .featured-article__title { font-size: 1.5rem; }
  .news-list { padding: 20px; position: static; }
}

@media (max-width: 480px) {
  .team-list li {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  .badge {
    align-self: center;
  }
}