:root {
  --bg: #081321;
  --panel: #101f30;
  --panel2: #15283c;
  --text: #edf5ff;
  --muted: #91a5ba;
  --blue: #39a9ef;
  --border: #23384e;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

.topbar {
  height: 82px;
  padding: 0 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0c1a29;
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 14px; }

.brand-icon {
  width: 43px;
  height: 43px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 27px;
}

.brand h1 { font-size: 17px; margin: 0; letter-spacing: 1.5px; }
.brand span { font-size: 10px; color: var(--muted); letter-spacing: 2px; }

.live { color: #a9c2d8; font-size: 11px; letter-spacing: 1px; }
.live span {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #35d69a;
  border-radius: 50%;
  margin-right: 7px;
}

.hero {
  min-height: 340px;
  display: flex;
  align-items: center;
  padding: 55px 8%;
  background:
    linear-gradient(90deg, rgba(5,15,28,.98), rgba(5,15,28,.7), rgba(5,15,28,.2)),
    url('https://images.unsplash.com/photo-1534796636912-3b95b3ab5986?auto=format&fit=crop&w=1800&q=85') center/cover;
  border-bottom: 1px solid var(--border);
}

.hero-content { max-width: 650px; }

.eyebrow {
  color: var(--blue);
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: bold;
}

.hero h2 { font-size: clamp(38px, 5vw, 65px); line-height: 1.06; margin: 17px 0; }
.hero h2 strong { color: var(--blue); }
.hero p { color: #b7c8d8; line-height: 1.7; max-width: 480px; }

.hero-button {
  display: inline-block;
  margin-top: 20px;
  padding: 15px 23px;
  background: var(--blue);
  color: #061525;
  text-decoration: none;
  font-weight: bold;
  font-size: 11px;
  letter-spacing: 1px;
}

.container { max-width: 1450px; margin: auto; padding: 35px 5%; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 65px;
}

.stat {
  padding: 23px;
  background: var(--panel);
  border: 1px solid var(--border);
}

.stat span { display: block; color: var(--muted); font-size: 10px; letter-spacing: 1px; }
.stat strong { display: block; font-size: 29px; margin-top: 12px; }

.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 25px; }
.section-heading h2 { font-size: 29px; margin: 9px 0 0; }
.counter { color: var(--muted); font-size: 12px; }

.filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 12px;
  margin-bottom: 25px;
}

input, select, button {
  min-width: 0;
  padding: 14px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 12px;
}

button { cursor: pointer; }
button:hover { border-color: var(--blue); }

#status { color: var(--muted); font-size: 13px; margin: 20px 0; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform .2s, border-color .2s;
}

.card:hover { transform: translateY(-4px); border-color: var(--blue); }

.card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: #101f30;
  display: block;
}

.card-info { padding: 16px; }
.card-info h3 { font-size: 13px; margin: 0 0 12px; }
.card-info p { color: var(--muted); font-size: 11px; margin: 5px 0; }

.tag {
  display: inline-block;
  color: #65c0fa;
  background: #12344c;
  padding: 6px 9px;
  font-size: 10px;
  margin-bottom: 10px;
}

footer {
  padding: 35px 6%;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
}

.viewer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0,0,0,.96);
  padding: 65px 20px 30px;
  overflow: auto;
}

.viewer.active { display: flex; align-items: center; justify-content: center; }
.viewer-content { text-align: center; max-width: 1200px; width: 100%; }
.viewer img { max-width: 100%; max-height: 72vh; object-fit: contain; }
#caption { color: white; margin: 15px; font-size: 13px; }

#download {
  display: inline-block;
  color: var(--blue);
  text-decoration: none;
  margin-top: 12px;
  font-size: 12px;
}

.close {
  position: fixed;
  top: 15px;
  right: 25px;
  font-size: 35px;
  border: 0;
  background: none;
}

@media(max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .filters { grid-template-columns: 1fr 1fr; }
}

@media(max-width: 550px) {
  .gallery { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .hero { min-height: 300px; padding: 35px 7%; }
  .filters { grid-template-columns: 1fr; }
  .section-heading { align-items: start; gap: 10px; }
  .brand h1 { font-size: 13px; }
  footer { flex-direction: column; }
}

/* Archivio cronologico */
.filters {
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
}

.archive-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 28px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 11px;
}

#auto-status {
  color: #43d5a0;
  font-size: 10px;
  letter-spacing: .8px;
}

.day-section {
  margin-bottom: 42px;
}

.day-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.day-heading h3 {
  margin: 0;
  font-size: 18px;
  color: var(--text);
}

.day-heading span {
  color: var(--blue);
  font-size: 11px;
}

.day-section .gallery {
  margin-top: 0;
}

@media(max-width: 900px) {
  .filters {
    grid-template-columns: 1fr 1fr;
  }
}

@media(max-width: 550px) {
  .archive-status {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Satellite Pass Viewer */
#passes {
  margin-bottom: 65px;
}

.passes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.pass-card {
  background: var(--panel);
  border: 1px solid var(--border);
  cursor: pointer;
  overflow: hidden;
  transition: .2s;
}

.pass-card:hover {
  border-color: var(--blue);
  transform: translateY(-3px);
}

.pass-card > img {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--panel2);
}

.pass-card-info {
  padding: 17px;
}

.pass-card-info h3 {
  font-size: 17px;
  margin: 10px 0;
}

.pass-card-info p,
.pass-image-card p {
  color: var(--muted);
  font-size: 11px;
  margin: 7px 0;
}

.pass-action {
  display: block;
  color: var(--blue);
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  margin-top: 17px;
}

.pass-viewer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 15;
  background: #081321;
  padding: 35px 5%;
  overflow-y: auto;
}

.pass-viewer.active {
  display: block;
}

.pass-viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
  margin-bottom: 25px;
}

.pass-viewer-header h2 {
  margin: 10px 0;
}

.pass-viewer-header p {
  color: var(--muted);
  font-size: 12px;
}

.pass-images {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.pass-image-card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding-bottom: 12px;
  cursor: pointer;
}

.pass-image-card:hover {
  border-color: var(--blue);
}

.pass-image-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: contain;
  background: #050c14;
  display: block;
}

.pass-image-card h3,
.pass-image-card p {
  margin-left: 13px;
  margin-right: 13px;
}

.pass-image-card h3 {
  font-size: 13px;
}

@media(max-width: 900px) {
  .passes-grid,
  .pass-images {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media(max-width: 550px) {
  .passes-grid,
  .pass-images {
    grid-template-columns: 1fr;
  }

  .pass-viewer {
    padding: 25px 4%;
  }
}

/* ==================================================
   SATELLITE WEATHER GALLERY
   VISUAL IDENTITY 1.3 - OBSERVATORY
   ================================================== */

:root {
  --bg: #101820;
  --panel: #192630;
  --panel2: #24343e;
  --text: #e6e9e7;
  --muted: #a4afb2;
  --blue: #83a7b2;
  --border: #34444c;
}

/* Pagina */
body {
  background: #101820;
  color: #e6e9e7;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

/* Intestazione */
.topbar {
  height: 68px;
  padding: 0 5%;
  background: #192630;
  border-bottom: 1px solid #3b4a50;
}

.brand-icon {
  width: 35px;
  height: 35px;
  border-color: #83a7b2;
  color: #83a7b2;
}

.brand h1 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1.2px;
}

.brand span {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #aab5b7;
}

.live {
  color: #b6c0c2;
  font-size: 10px;
}

/* Testata fotografica */
.hero {
  min-height: 270px;
  padding: 40px 8%;
  background-color: #17242c;
  background-image:
    linear-gradient(90deg, rgba(8,19,33,.94), rgba(8,19,33,.65)),
    linear-gradient(#24343e, #101820);
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid #34444c;
}

.hero h2 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 600;
  line-height: 1.12;
  margin: 12px 0;
}

.hero h2 strong {
  color: #a5c1c7;
}

.hero p {
  color: #d0d7d7;
  font-size: 13px;
  max-width: 430px;
}

.hero .eyebrow {
  color: #a5c1c7;
  font-size: 10px;
  letter-spacing: 1.4px;
}

.hero-button {
  background: #d2dcda;
  color: #192630;
  padding: 13px 19px;
  font-size: 10px;
  letter-spacing: .8px;
  transition: background .2s;
}

.hero-button:hover {
  background: #ffffff;
}

/* Area contenuti */
.container {
  max-width: 1400px;
  padding: 32px 5%;
}

/* Indicatori */
.stats {
  gap: 0;
  margin-bottom: 48px;
  border: 1px solid var(--border);
  background: var(--panel);
}

.stat {
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  padding: 19px 22px;
}

.stat:last-child {
  border-right: 0;
}

.stat span {
  color: #aeb9ba;
  font-size: 10px;
  letter-spacing: .7px;
}

.stat strong {
  font-size: 25px;
  font-weight: 500;
  margin-top: 9px;
}

/* Titoli sezione */
.section-heading {
  margin-bottom: 20px;
}

.section-heading h2 {
  font-size: 25px;
  font-weight: 500;
  margin-top: 7px;
}

.eyebrow {
  color: #a5c1c7;
  font-size: 10px;
  letter-spacing: 1.2px;
}

.counter {
  color: #aeb9ba;
}

/* Filtri */
.filters {
  gap: 9px;
  margin-bottom: 18px;
}

input, select, button {
  background: #192630;
  color: #e6e9e7;
  border: 1px solid #43535a;
  border-radius: 2px;
  font-family: inherit;
  font-size: 12px;
}

input:focus, select:focus {
  outline: 1px solid #83a7b2;
  border-color: #83a7b2;
}

button {
  transition: background .2s;
}

button:hover {
  background: #30434d;
  border-color: #83a7b2;
}

/* Archivio cronologico */
.day-section {
  margin-bottom: 35px;
}

.day-heading {
  border-bottom: 1px solid #43535a;
  padding: 11px 0;
  margin-bottom: 15px;
}

.day-heading h3 {
  font-size: 16px;
  font-weight: 500;
}

.day-heading span {
  color: #b0c1c3;
}

/* Fotografie */
.gallery {
  gap: 17px;
}

.card {
  background: #192630;
  border: 1px solid #35454d;
  border-radius: 2px;
  transition: border-color .2s;
}

.card:hover {
  transform: none;
  border-color: #9ab6bc;
}

.card img {
  aspect-ratio: 16/10;
  object-fit: cover;
}

.card-info {
  padding: 14px;
}

.card-info h3 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 9px;
}

.card-info p {
  font-size: 11px;
  color: #aeb9ba;
}

.tag {
  color: #d0dcda;
  background: #30434b;
  font-size: 9px;
  padding: 5px 7px;
  letter-spacing: .3px;
}

/* Passaggi satellitari */
.passes-grid {
  gap: 17px;
}

.pass-card {
  background: #192630;
  border: 1px solid #35454d;
  border-radius: 2px;
}

.pass-card:hover {
  transform: none;
  border-color: #9ab6bc;
}

.pass-card-info h3 {
  font-size: 16px;
  font-weight: 500;
}

.pass-card-info p {
  color: #aeb9ba;
}

.pass-action {
  color: #b2c9cc;
  letter-spacing: .5px;
}

.pass-image-card {
  background: #192630;
  border-color: #35454d;
}

.pass-image-card h3 {
  font-weight: 500;
}

/* Stato aggiornamento */
#auto-status {
  color: #a5c1b2;
  letter-spacing: .4px;
}

/* Visualizzatore immagini */
.viewer,
.pass-viewer {
  background: rgba(10,17,22,.98);
}

.close {
  color: #e6e9e7;
}

#download {
  color: #b2c9cc;
}

/* Footer */
footer {
  background: #192630;
  border-top: 1px solid #34444c;
  color: #aeb9ba;
  padding: 27px 5%;
}

/* Mobile */
@media(max-width: 900px) {
  .stat {
    padding: 16px;
  }
}

@media(max-width: 550px) {
  .topbar {
    height: 62px;
    padding: 0 4%;
  }

  .hero {
    min-height: 245px;
    padding: 30px 6%;
  }

  .hero h2 {
    font-size: 34px;
  }

  .container {
    padding: 25px 4%;
  }

  .stats {
    display: grid;
    grid-template-columns: 1fr;
  }

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .stat:last-child {
    border-bottom: 0;
  }
}

/* Intestazione personalizzata */

.brand {
    min-width: 0;
    gap: 12px;
}

.brand h1 {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .5px;
    white-space: nowrap;
    color: #e6e9e7;
}

.brand span {
    display: block;
    margin-top: 5px;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: .5px;
    text-transform: none;
    color: #a5c1c7;
}

.hero h2 {
    font-size: clamp(36px, 4.5vw, 54px);
    letter-spacing: -.8px;
}

@media(max-width: 700px) {
    .brand h1 {
        font-size: 9px;
        white-space: normal;
        line-height: 1.4;
    }
}

/* Intestazione personalizzata */

.brand {
    min-width: 0;
    gap: 12px;
}

.brand h1 {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .5px;
    white-space: nowrap;
    color: #e6e9e7;
}

.brand span {
    display: block;
    margin-top: 5px;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: .5px;
    text-transform: none;
    color: #a5c1c7;
}

.hero h2 {
    font-size: clamp(36px, 4.5vw, 54px);
    letter-spacing: -.8px;
}

@media(max-width: 700px) {
    .brand h1 {
        font-size: 9px;
        white-space: normal;
        line-height: 1.4;
    }
}
/* =================================
   CONTATORI SUPERIORI COMPATTI
   ================================= */

.stats {
    gap: 8px;
    margin-bottom: 35px;
}

.stat {
    padding: 10px 14px;
    border-radius: 7px;
}

.stat span {
    font-size: 9px;
    letter-spacing: 0.7px;
}

.stat strong {
    font-size: 17px;
    margin-top: 4px;
    line-height: 1.2;
}

/* Ottimizzazione smartphone */

@media (max-width: 700px) {
    .container {
        padding-top: 18px;
    }

    .stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        margin-bottom: 28px;
    }

    .stat {
        padding: 9px 5px;
        text-align: center;
        min-width: 0;
    }

    .stat span {
        font-size: 8px;
        letter-spacing: 0;
        line-height: 1.3;
    }

    .stat strong {
        font-size: 15px;
        margin-top: 4px;
        overflow-wrap: anywhere;
    }
}
.footer-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 8px 17px;
    border: 1px solid #087bcb;
    border-radius: 6px;
    color: #ffffff;
    background: #0b2747;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    text-decoration: none;
    transition: background .2s ease;
}

.footer-contact:hover {
    background: #e50918;
    border-color: #e50918;
}

.footer-mail-icon {
    font-size: 19px;
}

/* WXSAT - Logo ufficiale */
.topbar {
    min-height: 82px;
    height: auto;
    padding: 8px 4%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #0b142b;
}

.brand {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
}

.brand-logo {
    display: block;
    width: auto;
    height: 64px;
    max-width: min(440px, calc(100vw - 150px));
    object-fit: contain;
}

.live {
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 550px) {
    .topbar {
        min-height: 62px;
        padding: 6px 12px;
        gap: 8px;
    }

    .brand-logo {
        height: 46px;
        max-width: calc(100vw - 125px);
    }

    .live {
        font-size: 9px;
    }
}
