/* ========================================================================
   ACIB.CSS – Tema BMW Corporate (COMPLETO)
   Governa:
   - Header + logo + slogan
   - Menù orizzontale con dropdown + hamburger
   - Layout wrapper + colonna news
   - Footer
   - Pagine contenuto (storia, statuto, privacy, collabora, insuperabili…)
   - Card grid
   - Tabelle
   - Banner cookie
   - Ticker orizzontale “glass panel BMW i7”
   ======================================================================== */


/* ========================================================================
   0) VARIABILI DI TEMA
   ======================================================================== */
:root {
  --accent: #1C69D4;         /* Blu BMW principale */
  --accent-dark: #185C9F;    /* Blu scuro */
  --accent-soft: #EAF2FB;    /* Sfondo soft */
  --text-main: #333333;
  --text-muted: #666666;
  --header-bg: #4A4A4A;
  --border-soft: #e1e1e1;
  --bg-light: #f7f7f7;
}


/* ========================================================================
   1) RESET & BASE
   ======================================================================== */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #ffffff;
  color: var(--text-main);
  line-height: 1.6;
}

img { max-width: 100%; height: auto; border: 0; }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }


/* ========================================================================
   2) TIPOGRAFIA GENERALE
   ======================================================================== */
h1 {
  font-size: 1.8rem;
  color: var(--accent);
  margin: 20px 0 12px 0;
  font-weight: bold;
  letter-spacing: 0.03em;
}

h2 {
  font-size: 1.4rem;
  color: var(--accent-dark);
  margin: 18px 0 10px 0;
  font-weight: bold;
}

h3 {
  font-size: 1.1rem;
  color: #444;
  font-weight: bold;
  margin: 16px 0 8px 0;
}

p { margin: 10px 0; }
ul, ol { margin: 10px 0 10px 25px; }


/* ========================================================================
   3) HEADER – LOGHI E SLOGAN
   ======================================================================== */

.header-wrapper {
  width: 100%;
  background: var(--header-bg);
  padding: 15px 25px 20px 25px;
  color: #fff;
}

.header-row1 {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.header-left img,
.header-right img {
  height: 70px;
}

.header-slogan {
  margin-top: 6px;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.header-center {
  text-align: center;
  flex: 1;
}

.main-title {
  font-size: 1.6rem;
  font-weight: bold;
  letter-spacing: 0.15em;
}

.sub-title {
  margin-top: 4px;
  font-size: 0.85rem;
  letter-spacing: 0.10em;
}


/* ========================================================================
   4) MENU ORIZZONTALE (TOP NAV)
   ======================================================================== */

.top-nav {
  width: 100%;
  background: var(--header-bg);
  color: #fff;
  height: 48px;
  border-top: 1px solid #d6d6d6;
}

.top-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
}

/* Hamburger */
.menu-toggle {
  background: none;
  border: none;
  display: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  background: #fff;
}

/* MENU DESKTOP */
.nav-menu {
  list-style: none;
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  height: 48px;
  margin: 0;
  padding: 0;
}

.nav-menu > li > a {
  color: #fff;
  text-decoration: none;
  font-size: 0.88rem;
  height: 48px;
  line-height: 48px;
  padding: 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.nav-menu > li > a:hover {
  background: var(--accent);
  color: #fff;
}

.nav-menu li { position: relative; }

/* Freccia di sottomenù */
.nav-menu li.has-sub > a::after {
  content: " ▾";
  font-size: 0.7rem;
  margin-left: 4px;
}

/* Dropdown */
.sub-menu {
  display: none;
  position: absolute;
  top: 48px;
  left: 0;
  background: #2F2F2F;
  min-width: 220px;
  list-style: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  padding: 4px 0;
  border-radius: 0 0 4px 4px;
  z-index: 999;
  margin: 0;
}

.sub-menu li a {
  padding: 10px 14px;
  color: #fff !important;
  text-decoration: none !important;
  display: block;
  font-size: 0.85rem;
  white-space: nowrap;
  background: #2F2F2F;
}

.sub-menu li a:hover {
  background: var(--accent);
  color: #fff !important;
}

/* Mostra sottomenù */
.nav-menu > li:hover > .sub-menu {
  display: block;
}


/* ========================================================================
   5) LAYOUT GENERALE
   ======================================================================== */

/* Homepage: wrapper con colonna news */
.wrapper {
  max-width: 1280px;
  margin: 20px auto;
  padding: 20px;
  display: flex;
  gap: 20px;
  
    /* LA CHIAVE CHE RISOLVE IL PROBLEMA */
    align-items: flex-start;
}

/* Pagine interne: full width */
.wrapper-full {
  max-width: 1280px;
  margin: 20px auto;
  padding: 20px;
}

/* Contenuto iframe */
.main-content {
  flex: 1;
  min-width: 0;
}

/* Colonna News */
.news-column {
  width: 300px;
  border-left: 4px solid var(--accent-dark);
  padding-left: 15px;
}

.news-column h2 {
  font-size: 1rem;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 10px;
}

.news-list {
  max-height: 500px;
  overflow-y: auto;
  padding-right: 6px;
}

.news-item {
  border-bottom: 1px solid #ddd;
  margin-bottom: 10px;
  padding-bottom: 8px;
}

.news-date {
  font-weight: bold;
  color: var(--accent-dark);
}


/* ========================================================================
   6) NEWS TICKER ORIZZONTALE – BMW i7 GLASS PANEL
   ======================================================================== */

.news-ticker-bar {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;

  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  border-top: 1px solid rgba(255,255,255,0.25);
  border-bottom: 1px solid rgba(255,255,255,0.25);

  box-shadow:
      0 4px 18px rgba(0,0,0,0.20),
      inset 0 1px 0 rgba(255,255,255,0.25);

  padding: 10px 0;
}

.news-ticker-track {
  display: inline-block;
  padding-left: 100%;
  animation: ticker-scroll var(--ticker-speed, 60s) linear infinite;
}

.news-ticker-track span {
  display: inline-block;
  margin-right: 50px;
  font-size: 0.95rem;
  letter-spacing: .03em;
  color: #0b2d64;
  font-weight: 600;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

@media(max-width:700px){
  .news-ticker-track span {
    font-size: 0.85rem;
    margin-right: 30px;
  }
}

/* Quando si apre il menù su mobile, il ticker si nasconde */
@media (max-width: 900px) {
  .top-nav.open + .news-ticker-bar {
    display: none;
  }
}


/* ========================================================================
   7) FOOTER
   ======================================================================== */

.footer {
  margin-top: 40px;
  background: #f3f3f3;
  border-top: 1px solid #ddd;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 15px;
  text-align: center;
  font-size: 0.85rem;
  color: #555;
}


/* ========================================================================
   8) CONTENUTI INTERNI
   ======================================================================== */

.acib-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 15px;
}

.content-section { padding: 20px 10px; }
.container-narrow {
  max-width: 860px;
  margin: 0 auto;
}

.content-title {
  font-size: 1.6rem;
  margin-bottom: 20px;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.content-subtitle {
  margin-top: 25px;
  margin-bottom: 10px;
  font-size: 1.2rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  color: var(--accent-dark);
}

.content-text {
  font-size: 1rem;
  line-height: 1.55;
  margin-bottom: 16px;
  color: var(--text-main);
}

.content-box {
  padding: 15px 20px;
  background: var(--bg-light);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  margin-bottom: 20px;
}

.content-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.content-row .content-box {
  flex: 1 1 260px;
}


/* ========================================================================
   9) CARD GRID
   ======================================================================== */

.acib-card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 15px;
}

.acib-card {
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 16px 18px;
  width: calc(50% - 10px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: box-shadow .2s ease, transform .2s ease;
}

.acib-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

.acib-card-title {
  font-size: 1rem;
  font-weight: bold;
  color: var(--accent);
  margin-bottom: 6px;
}

.acib-card-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.acib-card a {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--accent-dark);
}


/* ========================================================================
   10) TABELLE
   ======================================================================== */

table {
  border-collapse: collapse;
  width: 100%;
  margin: 20px 0;
  font-size: 0.95rem;
}

table th {
  background: var(--accent);
  color: #fff;
  padding: 10px;
  text-align: left;
  font-weight: bold;
}

table td {
  padding: 8px 10px;
  border-bottom: 1px solid #ddd;
}

table tr:nth-child(even) {
  background: #f5f5f5;
}

table a {
  color: var(--accent-dark);
  font-weight: bold;
}


/* ========================================================================
   11) BOX INFORMATTIVI
   ======================================================================== */

.info-box {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 15px 20px;
  margin: 20px 0;
}

.warning-box {
  background: #FFF4D6;
  border-left: 4px solid #E3A000;
  padding: 15px 20px;
  margin: 20px 0;
}

.error-box {
  background: #FBEAEA;
  border-left: 4px solid #D63939;
  padding: 15px 20px;
  margin: 20px 0;
}


/* ========================================================================
   12) FORM
   ======================================================================== */

input, select, textarea {
  font-size: 0.95rem;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
}

button {
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
}

button:hover {
  background: var(--accent-dark);
}


/* ========================================================================
   13) UTILITIES
   ======================================================================== */

.text-center { text-align: center; }
.text-right  { text-align: right; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

.separator {
  border-bottom: 1px solid #dcdcdc;
  margin: 25px 0;
}


/* ========================================================================
   14) RESPONSIVE
   ======================================================================== */

@media (max-width: 900px) {

  .header-row1 {
    flex-direction: row;
    gap: 10px;
  }

  .header-left img,
  .header-right img {
    height: 50px;
  }

  .menu-toggle { display: block; }

  .nav-menu {
    position: fixed;
    top: 80px;
    right: 0;
    width: 260px;
    height: calc(100% - 80px);
    background: #333;
    flex-direction: column;
    padding-top: 10px;
    transform: translateX(100%);
    transition: transform .3s ease;
  }

  .top-nav.open .nav-menu {
    transform: translateX(0);
  }

  .sub-menu {
    position: static;
    background: #444;
    box-shadow: none;
  }

  .nav-menu li.open-sub .sub-menu { display: block; }

  .wrapper, .wrapper-full {
    flex-direction: column;
    padding: 15px;
  }

  .news-column {
    width: 100%;
    border-left: none;
    border-top: 4px solid var(--accent-dark);
    padding-left: 0;
    padding-top: 10px;
  }

  .acib-card { width: 100%; }
}


/* ========================================================================
   15) COOKIE BANNER – BMW i7 GLASS PANEL
   ======================================================================== */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 22px 30px;

  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);

  color: #fff;
  font-size: 15px;
  letter-spacing: .02em;
  border-top: 1px solid rgba(255,255,255,0.35);
  box-shadow:
      0 -4px 20px rgba(0,0,0,0.25),
      inset 0 1px 0 rgba(255,255,255,0.3);

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;

  opacity: 0;
  transform: translateY(100%);
  transition: all .4s ease;
  z-index: 9999;
}

.cookie-banner.show {
  opacity: 1;
  transform: translateY(0);
}

.cookie-banner p {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: #0b2d64;
  max-width: 80%;
}

.cookie-banner a {
  color: #0b2d64;
  text-decoration: underline;
}

.cookie-banner a:hover {
  color: #ffffff;
}

.cookie-banner button {
  background: rgba(255,255,255,0.25);
  border: 1px solid rgba(255,255,255,0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);

  padding: 10px 24px;
  border-radius: 50px;
  cursor: pointer;

  color: white;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: bold;

  transition: all .25s ease;
}

.cookie-banner button:hover {
  background: rgba(255,255,255,0.40);
  border-color: rgba(255,255,255,0.7);
}

@media(max-width:700px){
  .cookie-banner {
    flex-direction: column;
    text-align: center;
    padding: 22px 20px;
  }

  .cookie-banner p {
    max-width: 100%;
  }
}
