/* =============================================
   AbruzzoTradizioni — Stylesheet
   Ispirato alla palette teal/grigio del sito originale
   ============================================= */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Open Sans', sans-serif;
  font-weight: 300;
  color: #2c2c2c;
  background-color: #e8eae8;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

ul {
  list-style: none;
}

.hero-image-grid img {
  display: block;
  max-width: 100%;
}

/* --- CSS Variables --- */
:root {
  --teal-dark:    #2d6060;
  --teal-mid:     #3d7878;
  --teal-light:   #5f9ea0;
  --teal-pale:    #a8c8c8;
  --teal-faint:   #d4e8e8;
  --grey-dark:    #3a3a3a;
  --grey-mid:     #666666;
  --grey-light:   #cccccc;
  --cream:        #f5f3ee;
  --white:        #ffffff;
  --sidebar-w:    260px;
  --header-h:     64px;
  --shadow-soft:  0 2px 12px rgba(0,0,0,0.12);
  --shadow-deep:  0 4px 24px rgba(0,0,0,0.2);
}

/* =============================================
   LOGO TYPOGRAPHY
   ============================================= */
.logo-abruzzo {
  font-family: 'Open Sans', sans-serif;
  font-weight: 300;
  letter-spacing: 0.03em;
  color: inherit;
}

.logo-tradizioni {
  font-family: 'Crimson Text', serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: inherit;
}


/* =============================================
   OVERLAY (mobile)
   ============================================= */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  transition: opacity 0.3s ease;
}

.overlay.active {
  display: block;
}


/* =============================================
   SIDEBAR (mobile drawer)
   ============================================= */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100%;
  background: var(--teal-dark);
  color: var(--white);
  z-index: 200;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: 1.5rem 0 2rem;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--teal-pale);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.sidebar-close:hover {
  color: var(--white);
}

.sidebar-logo {
  padding: 0.5rem 1.5rem 1.5rem;
  font-size: 1.3rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  margin-bottom: 1rem;
}

.sidebar-logo .logo-abruzzo,
.sidebar-logo .logo-tradizioni {
  color: var(--white);
}

.sidebar-nav > li > a {
  display: block;
  padding: 0.7rem 1.5rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.88);
  border-left: 3px solid transparent;
  transition: background 0.2s, border-color 0.2s;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.sidebar-nav > li > a:hover,
.sidebar-nav > li > a:focus {
  background: rgba(255,255,255,0.1);
  border-left-color: var(--teal-pale);
  color: var(--white);
}
.sidebar-nav > li > .sidebar-navCustom {
  background: rgba(255,255,255,0.1);
  border-left-color: var(--teal-pale);
  color: var(--white);
  padding: 0.7rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.sidebar-nav .sub-menu {
  background: rgba(0,0,0,0.15);
  padding: 0.3rem 0;
}

.sidebar-nav .sub-menu li a {
  display: block;
  padding: 0.5rem 1.5rem 0.5rem 2.5rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  transition: color 0.2s;
}

.sidebar-nav .sub-menu li a:hover {
  color: var(--white);
}
.sidebar-nav .sub-menu li .customSub {
  color: var(--white);
  padding: 0.5rem 1.5rem 0.5rem 2.5rem;
  font-size: 0.82rem;
  background: rgba(0,0,0,0.18);
}


/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: relative;
  background: var(--white);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: var(--header-h);
  background: var(--teal-dark);
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Brand / Logo */
.brand-link {
  font-size: 1.4rem;
  color: var(--white);
  white-space: nowrap;
}

.brand-link .logo-abruzzo {
  color: rgba(255,255,255,0.8);
}

.brand-link .logo-tradizioni {
  color: var(--white);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 19px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: opacity 0.2s;
}

.hamburger:hover span {
  opacity: 0.75;
}

/* Desktop Nav */
.desktop-nav ul {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.desktop-nav > ul > li {
  position: relative;
}

.desktop-nav > ul > li > a {
  display: block;
  padding: 1.3rem 0.9rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 400;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.desktop-nav > ul > li > a:hover,
.desktop-nav > ul > li > a:focus {
  color: var(--white);
  border-bottom-color: var(--teal-pale);
}
.desktop-nav > ul > li > .customActiveDesktop {
  color: var(--white);
  border-bottom-color: var(--teal-pale);
  text-transform: uppercase;
  padding: 1.3rem 0.9rem;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  font-weight: 400;
  border-bottom: 2px solid #fff;
}

/* Dropdown */
.desktop-nav .dropdown {
  display: none;
  position: absolute;
  top: calc(100% + -2px);
  left: 0;
  background: var(--teal-mid);
  min-width: 220px;
  box-shadow: var(--shadow-deep);
  border-top: 2px solid var(--teal-pale);
  z-index: 99;
}

.desktop-nav .has-sub:hover .dropdown,
.desktop-nav .has-sub:focus-within .dropdown {
  display: block;
}

.desktop-nav .dropdown li a {
  display: block;
  padding: 0.65rem 1.1rem;
  font-size: 0.81rem;
  color: rgba(255,255,255,0.85);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background 0.2s, color 0.2s;
}

.desktop-nav .dropdown li a:hover {
  background: var(--teal-dark);
  color: var(--white);
}
.desktop-nav .dropdown li .customActive {
  background: var(--teal-dark);
  color: var(--white);
  font-size: 0.81rem;
  padding: 0.65rem 1.1rem;
}


/* =============================================
   HERO BANNER
   ============================================= */
.hero-banner {
  position: relative;
  /*background: var(--teal-dark);*/
  background: #FFF;
  overflow: hidden;
  height: 280px;
}

.hero-image-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
  height: 100%;
  gap: 3px;
}

.hero-img {
  background-color: var(--teal-mid);
  background-size: cover;
  background-position: center;
  ilter: grayscale(20%) sepia(10%);
  transition: filter 0.4s;
}

.hero-img:hover {
  filter: grayscale(60%) sepia(20%);
}

/* Placeholders con sfumature teal per simulare le foto storiche */
.hero-img--landscape {
  background: linear-gradient(160deg, #1a4040 0%, #2d6060 40%, #4a8080 70%, #3d6868 100%);
}
.hero-img--portrait {
  background: linear-gradient(180deg, #3a5050 0%, #2a4040 50%, #1e3535 100%);
}
.hero-img--child {
  background: linear-gradient(160deg, #2a4545 0%, #3d6060 60%, #507070 100%);
}
.hero-img--artifact {
  background: linear-gradient(140deg, #4a6868 0%, #2a4848 60%, #1a3838 100%);
}
.hero-img--village {
  background: linear-gradient(170deg, #355555 0%, #4a7272 50%, #2d5858 100%);
}
.hero-img--baroque {
  background: linear-gradient(150deg, #3d6565 0%, #285050 55%, #1e4040 100%);
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 2rem;
  background: linear-gradient(to top, rgba(10,30,30,0.75) 0%, transparent 100%);
  color: var(--white);
}

.hero-overlay h1 {
  font-family: 'Open Sans', sans-serif;
  font-weight: 300;
  font-size: 2rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.hero-overlay h1 strong {
  font-family: 'Crimson Text', serif;
  font-weight: 600;
}

.hero-overlay p {
  font-size: 0.85rem;
  color: var(--teal-pale);
  margin-top: 0.25rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}


/* =============================================
   DECORATIVE GREEN STRIP
   ============================================= */
.green-strip {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
  height: 20px;
  width: 100%;
  gap: 3px;
  border-top: solid 2px #fff
}

.strip-box {
  min-width: 0;
}

.strip-box-1 { background: #1a4d3a; }
.strip-box-2 { background: #2d6856; }
.strip-box-3 { background: #3d7872; }
.strip-box-4 { background: #4a8578; }
.strip-box-5 { background: #5a9684; }
.strip-box-6 { background: #357060; }


/* =============================================
   MAIN CONTENT AREA
   ============================================= */
.site-main {
  background: var(--cream);
  min-height: 60vh;
}

.content-wrapper {
  max-width: 1150px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 0;
  padding: 2.5rem 1.5rem;
}

/* --- Content Sidebar --- */
.content-sidebar {
  padding-right: 1.5rem;
  border-right: 1px solid var(--teal-pale);
}

.section-nav h2 {
  font-family: 'Crimson Text', serif;
  font-size: 1.10rem;
  color: #163D2D;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--teal-light);
}

.section-nav ul li {
  margin-bottom: 0.6rem;
}

.section-nav ul li a {
  font-size: 1rem;
  color: var(--teal-mid);
  font-weight: 600;
  line-height: 1.4;
  display: block;
  padding: 0.2rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.5rem;
  transition: color 0.2s, border-color 0.2s;
}

.section-nav ul li a:hover {
  color: var(--teal-dark);
  border-left-color: var(--teal-light);
}
/* --- Article Content --- */
.content-article {
  padding-left: 2rem;
}

.content-article h1 {
  font-family: 'Crimson Text', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: #163D2D;
  line-height: 1.35;
  margin-bottom: 1rem;
}

.content-article h2 {
  font-family: 'Crimson Text', serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: #163D2D;
  line-height: 1.35;
  margin-bottom: 0.8rem;
}

.divider {
  height: 2px;
  background: var(--teal-light);
  margin-bottom: 1.5rem;
  width: 100%;
}

.content-article p {
  font-size: 1.10rem;
  line-height: 1.8;
  color: #3a3a3a;
  margin-bottom: 1.1rem;
  text-align: justify;
}

.content-article em {
  color: var(--teal-dark);
  font-style: italic;
}

.content-article strong {
  font-weight: 600;
  color: var(--grey-dark);
}

/* --- Info Cards --- */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 2.5rem;
}

.card {
  background: var(--white);
  border-top: 3px solid var(--teal-light);
  padding: 1.2rem;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-deep);
  transform: translateY(-2px);
}

.card h3 {
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  color: var(--teal-dark);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.card p {
  font-size: 0.82rem;
  color: var(--grey-mid);
  line-height: 1.65;
}


/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--teal-dark);
  color: rgba(255,255,255,0.8);
}

.footer-inner {
  max-width: 1150px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2rem;
  padding: 3rem 1.5rem 2rem;
}

.footer-brand {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  color: var(--white);
}

.footer-brand .logo-abruzzo {
  color: rgba(255,255,255,0.75);
}

.footer-desc {
  font-size: 0.8rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
}

.footer-col h4 {
  font-family: 'Open Sans', sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal-pale);
  margin-bottom: 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.footer-col ul li {
  margin-bottom: 0.4rem;
}

.footer-col ul li a {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--white);
}

.footer-email {
  display: inline-block;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  margin-top: 0.4rem;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.footer-email:hover {
  border-bottom-color: var(--teal-pale);
  color: #ffffff;
}

.footer-credits {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin-top: 0.5rem;
}

.footer-col p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 0.2rem;
}

.footer-bar {
  border-top: 1px solid rgba(255,255,255,0.12);
  text-align: center;
  padding: 1rem 1.5rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.03em;
}

/* =============================================
   BACK TO TOP BUTTON
   ============================================= */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--teal-mid);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--shadow-deep);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.2s ease;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--teal-dark);
  transform: translateY(-3px);
}

.back-to-top:active {
  transform: translateY(-1px);
}

.back-to-top span {
  line-height: 1;
  display: block;
}

@media (max-width: 620px) {
  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 1.5rem;
    right: 1.5rem;
    font-size: 1.3rem;
  }
}

/* =============================================
   RESPONSIVE — TABLET ( < 900px )
   ============================================= */
@media (max-width: 900px) {
  .content-wrapper {
    grid-template-columns: 1fr;
    padding: 1.5rem 1.2rem;
  }

  .content-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--teal-pale);
    padding-right: 0;
    padding-bottom: 1.2rem;
    margin-bottom: 1.5rem;
  }

  .section-nav ul {
    /*display: flex;
    flex-wrap: wrap;*/
    gap: 0.5rem;
  }

  .section-nav ul li a {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding-left: 0;
    /*padding-bottom: 0.1rem;*/
    margin-bottom: -10px;
	font-size: 0.85rem
  }

  .section-nav ul li a:hover {
    border-left-color: transparent;
    border-bottom-color: var(--teal-light);
  }

  .content-article {
    padding-left: 0;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .hero-banner {
    height: 220px;
  }

  .hero-image-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }

  .hero-image-grid .hero-img:nth-child(5),
  .hero-image-grid .hero-img:nth-child(6) {
    display: none;
  }
  
  .green-strip {
    grid-template-columns: 2fr 1fr 1fr 1fr;
	border-top: solid 2px #fff
  }
  
  .green-strip .strip-box:nth-child(5),
  .green-strip .strip-box:nth-child(6) {
    display: none;
  }
}


/* =============================================
   RESPONSIVE — MOBILE ( < 620px )
   ============================================= */
@media (max-width: 620px) {
  :root {
    --header-h: 56px;
  }

  /* Show hamburger, hide desktop nav */
  .hamburger {
    display: flex;
  }

  .desktop-nav {
    display: none;
  }

  .brand-link {
    font-size: 1.1rem;
  }
  
  .header-top {
    padding: 0 1rem;
  }

  /* Hero */
  .hero-banner {
    height: 200px;
  }

  .hero-image-grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2px;
  }

  .hero-image-grid .hero-img:nth-child(4),
  .hero-image-grid .hero-img:nth-child(5),
  .hero-image-grid .hero-img:nth-child(6) {
    display: none;
  }

  .hero-img--landscape {
    grid-column: span 1;
  }
  
  .green-strip {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2px;
    height: 20px;
  }
  
  .green-strip .strip-box:nth-child(4),
  .green-strip .strip-box:nth-child(5),
  .green-strip .strip-box:nth-child(6) {
    display: none;
  }

  .hero-overlay {
    padding: 1rem;
  }

  .hero-overlay h1 {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .hero-overlay p {
    font-size: 0.7rem;
    letter-spacing: 0.03em;
  }

  /* Content */
  .content-wrapper {
    padding: 1.2rem 1rem;
  }
  
  .content-article h2 {
    font-size: 1.1rem;
    line-height: 1.4;
  }
  
  .content-article p {
    font-size: 0.85rem;
    text-align: left;
  }

  .info-cards {
    grid-template-columns: 1fr;
  }
  
  .card {
    padding: 1rem;
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem 1rem 1.5rem;
  }
}
