@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* === RESET === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: white;
  color: #111;
  line-height: 1.6;
  padding-top: 15px;
  overflow-x: hidden;
}

/* === HEADER === */
header.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #C40018;
  color: white;
  z-index: 999;
  height: 70px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  width: 100%;
  margin: auto;
  height: 100%;
  padding: 0 20px;
  position: relative;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
}

.hamburger-btn {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

.subscribe-top {
  background-color: #f0b429;
  color: #0b4fb5;
  font-size: 1.2rem;
  padding: 3px 6px;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 4px;
  font-weight: bold;
  text-decoration: none;
}

/* === SCROLLING NOTIZIE === */
.breaking-news-ticker {
  position: fixed;
  top: 122px;
  width: 100%;
  background-color: #000;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  z-index: 998;
  height: 32px;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: bold;
}

.breaking-news-ticker .ticker-wrapper {
  display: inline-block;
  padding-left: 100%;
  animation: ticker-scroll 40s linear infinite;
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

.ticker-item {
  display: inline-block;
  padding: 0 40px;
}

.ticker-up {
  color: #00c853;
}

.ticker-down {
  color: #ff5252;
}

/* === MENU LATERALE === */
.side-menu {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100%;
  background-color: #C40018;
  color: white;
  padding: 20px;
  transition: left 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.side-menu.open {
  left: 0;
}

.close-btn {
  align-self: flex-end;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

/* === BARRA DI RICERCA NEL MENU === */
.menu-search {
  padding: 8px;
  border: none;
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  width: 100%;
  background-color: white;
  color: #333;
}

.menu-search:focus {
  outline: none;
  background-color: #f0f0f0;
}

.menu-search::placeholder {
  color: #888;
}

/* === LISTA MENU === */
.menu-list {
  list-style: none;
  font-size: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.menu-list li a {
  color: white;
  text-decoration: none;
  padding: 8px 12px;
  display: block;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.menu-list li a:hover {
  background-color: #f0b429;
  color: #ffffff;
  font-weight: bold;
}

/* === MENU SUPERIORE === */
.top-nav {
  position: fixed;
  top: 70px;
  width: 100%;
  background-color: #C40018;
  z-index: 998;
  border-top: 2px solid white;
}

.top-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  margin: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.top-nav ul li {
  flex: 0 0 auto;
}

.top-nav ul li a {
  display: inline-block;
  padding: 6px 12px;
  font-size: 0.95rem;
  font-weight: bold;
  background-color: #c40018;
  color: white;
  border-radius: 20px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.top-nav ul li a:hover {
  background-color: #f0b429;
}

/* === LAYOUT GENERALE === */
.news-layout {
  display: grid;
  grid-template-columns: 260px 1fr 260px;
  gap: 24px;
  padding: 20px 24px;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start; /* Allinea gli elementi dall'alto della riga */
}

/* === SEZIONI GENERICHE === */
.section-container {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.section-header {
  width: 100%;
  background: #fff;
  color: #a3081a;
  font-weight: bold;
  font-size: 1.1rem;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  box-sizing: border-box;
  text-align: center;
}

/* === MAIN ARTICLES === */
.main-articles {
  display: flex;
  flex-direction: column;
  gap: 50px;
  padding: 10px;
  border: 1px solid #ccc;
  background-color: #fff;
  box-sizing: border-box;
}

.hero-article {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-box {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: center;
}

.hero-box img {
  display: inline-block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.hero-box h2 {
  font-size: 1.3rem;
  color: #0b4fb5;
  margin-top: 5px;
}

.hero-article p {
  margin-top: 10px;
  margin-bottom: 4px;
  font-size: 0.95rem;
  color: #333;
}

.hero-article p strong {
  color: #0b4fb5;
}

.author {
  font-size: 0.55rem;
  color: #888;
  font-style: italic;
  opacity: 0.7;
  text-align: left;
}

.article-divider {
  border: none;
  border-top: 1px solid #ccc;
  margin: 5px 0;
}

/* === FLASH NEWS === */
.flashnews-container,
.reportage-container {
  width: 100%;
  position: sticky;
  top: 160px;
  height: fit-content;
}

.side-news {
  height: 650px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid #ccc;
  border-top: none;
  background: #ffffff;
}

.side-news ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
}

.side-news li {
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
}

.side-news li strong {
  color: #0b4fb5;
}

/* === REPORTAGE === */
.left-column {
  padding: 10px;
  background-color: #ffffff;
  border: 1px solid #ccc;
  border-top: none;
}

.report {
  margin-bottom: 25px;
  text-align: center;
  transition: transform 0.2s ease;
}

.report img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.report h3 {
  font-size: 1rem;
  margin-bottom: 5px;
  color: #0b4fb5;
}

.report:hover {
  transform: translateY(-3px);
}

/* === METEO BOX === */
#weather .section-header {
  margin-top: 80px;
}

.weather-box {
  margin-top: 0;
  padding: 15px;
  background-color: #ffffff;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 6px 6px;
  font-size: 0.95rem;
  color: #333;
}

.weather-today {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.weather-icon img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  display: block;
}

.weather-details .weather-temp {
  font-size: 2rem;
  font-weight: bold;
}

.weather-details .weather-desc {
  font-size: 1rem;
  color: #0b4fb5;
}

.weather-week {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.weather-week .day {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #eee;
  padding: 8px 0;
  gap: 10px;
}

.weather-week .day-name {
  width: 80px;
  text-align: left;
  font-weight: 600;
}

.weather-week .day img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.weather-week .temp {
  width: 60px;
  text-align: right;
}

/* === FOOTER === */
footer {
  background-color: #b30000;
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
}

.big-footer {
  background-color: #c40018;
  color: #f8f8f8;
  font-size: 0.9rem;
  margin-top: 50px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  padding: 30px 10px;
  border-top: 2px solid #a3081a;
  border-bottom: 2px solid #a3081a;
}

.footer-section {
  flex: 1 1 220px;
  margin: 10px;
}

.footer-section h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: #ffffff;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section ul li a {
  text-decoration: none;
  color: #f0f0f0;
  font-size: 0.9rem;
}

.footer-section ul li a:hover {
  color: #f0b429;
}

.newspaper-thumbnail {
  text-align: center;
}

.newspaper-thumbnail img {
  width: 120px;
  height: auto;
  margin-bottom: 10px;
}

.newspaper-info h4 {
  margin-bottom: 5px;
  font-size: 1rem;
  color: white;
}

.read-issue {
  display: inline-block;
  margin-top: 5px;
  padding: 5px 10px;
  border: 1px solid #f8f8f8;
  color: #f8f8f8;
  text-decoration: none;
  font-size: 0.8rem;
}

.read-issue:hover {
  background-color: #f0b429;
}

.social-icons a {
  display: inline-block;
  width: 30px;
  height: 30px;
  margin-right: 5px;
  background-color: #f0f0f0;
  color: #c40018;
  font-weight: bold;
  text-align: center;
  line-height: 30px;
  border-radius: 3px;
  text-decoration: none;
}

.social-icons a:hover {
  background-color: #f0b429;
}

.footer-bottom {
  text-align: center;
  padding: 15px 5px;
  background-color: #8d0505;
}

.footer-bottom ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.footer-bottom ul li a {
  color: #f8f8f8;
  text-decoration: none;
  font-size: 0.8rem;
}

.footer-bottom ul li a:hover {
  color: #f0b429;
}

/* === BANNER ISCRIZIONE === */
.subscribe-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 300px;
  background-color: #ffffff;
  border: 1px solid #ccc;
  padding: 15px 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #000000;
  box-sizing: border-box;
}

.subscribe-banner p {
  margin-bottom: 10px;
}

.banner-buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.banner-btn {
  background-color: #b30000;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: bold;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.3s ease;
}

.highlighted {
  color: #0b4fb5;
}

.banner-btn:hover {
  background-color: #f0b429;
}

.close-banner {
  position: absolute;
  top: 5px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: #888;
}

.close-banner:hover {
  color: #000;
}

.hidden {
  display: none;
}

/* === RESPONSIVE === */
@media (max-width: 1023px) {
  .news-layout {
    display: block;
    padding: 15px;
  }

  .hamburger-btn {
    display: block;
  }

  .flashnews-container,
  .reportage-container,
  .left-column,
  .side-news,
  .subscribe-top,
  .stock-ticker,
  .top-nav ul li a[href="#flashnews"],
  .top-nav ul li a[href="#reportage"],
  .top-nav ul li a[href="#weather"] {
    display: none !important;
  }

  .main-articles {
    width: 100%;
    padding: 10px;
  }

  .section-header {
    font-size: 1rem;
    padding: 6px 10px;
    text-align: center;
  }

  .hero-box h2 {
    font-size: 1.1rem;
  }

  .hero-article p {
    font-size: 0.9rem;
  }

  .hero-box img {
    width: 100%;
    height: auto;
  }

  footer .footer-top {
    display: none !important;
  }

  footer .footer-bottom {
    display: block;
    padding: 10px 5px;
  }

  footer .footer-bottom .footer-section {
    display: block;
    margin-bottom: 10px;
  }

  .social-icons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
  }

  .footer-bottom ul {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }
}

@media (min-width: 1024px) {
  .news-layout {
    display: grid;
    grid-template-columns: 260px 1fr 260px;
    gap: 24px;
    padding: 20px 24px;
    align-items: start; /* Allineamento al top costante */
  }

  .flashnews-container,
  .reportage-container,
  .left-column,
  .side-news,
  .stock-ticker,
  .subscribe-top,
  .top-nav ul li a[href="#flashnews"],
  .top-nav ul li a[href="#reportage"],
  .top-nav ul li a[href="#weather"] {
    display: block !important;
  }

  footer .footer-top {
    display: flex !important;
  }

  .footer-section {
    margin-bottom: 0;
  }
}