:root {
    --rosso-mattone: #B42A1D;     /* rosso mattone */

    --herbal-linen: #8DAA7B;      /* verde lino morbido */
    --olive-velvet: #5C784E;      /* oliva vellutato */
    --airy-peony: #E7A8C2;        /* peonia ariosa */
    --pressed-petal: #D7AAA5;     /* petalo pressato */

    --panel-bg: rgba(48, 65, 50, 0.08);
    --panel-border: 2px solid #B42A1D;
    --panel-shadow: 0 0 20px #90281B;

    --radius: 16px;
    --gap-global: 10px;
}

/* ===========================
   SFONDO
=========================== */
body {
  background-image: url('sfondo1.jpg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  font-family: 'Nunito', sans-serif;
}

/* ===========================
   SCANLINES
=========================== */
.scanlines {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        rgba(255,255,255,0.03) 0px,
        rgba(255,255,255,0.03) 2px,
        transparent 3px,
        transparent 4px
    );
    pointer-events: none;
    z-index: 999;
}

/* ===========================
   HEADER
=========================== */
.cyber-header {
    background: linear-gradient(90deg, var(--herbal-linen), var(--olive-velvet));
    padding: 25px;
    border-bottom: 3px solid var(--olive-velvet);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 32px;
    color: var(--pressed-petal);
    text-shadow: 0 0 10px var(--olive-velvet);
    font-weight: 700;
}

.header-sub {
    font-size: 14px;
    opacity: 0.9;
}

.header-glow-orb {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, var(--rosso-mattone), transparent);
    border-radius: 50%;
    filter: blur(10px);
}

.header-glow-orb.small {
    width: 35px;
    height: 35px;
    background: radial-gradient(circle, #90281B, transparent);
    margin-left: -20px;
}

.header-status {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    color: var(--olive-velvet);
    background: var(--pressed-petal);
    padding: 6px 12px;
    border-radius: var(--radius);
}

/* ===========================
   LAYOUT A 3 COLONNE
=========================== */
.layout-grid {
    padding: 20px;
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    gap: 20px;
    align-items: start;
}

/* ===========================
   SIDEBAR SINISTRA
=========================== */
.left-sidebar {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: var(--gap-global);
}

/* ===========================
   SIDEBAR DESTRA
=========================== */
.right-sidebar {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: var(--gap-global);
}

/* ===========================
   CONTENUTO CENTRALE
=========================== */
.main-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: var(--gap-global);
}

/* ===========================
   MENU LATERALE
=========================== */
.ls-panel {
    background: var(--herbal-linen);
    background-size: cover;
    background-position: center;
    border: 4px solid var(--olive-velvet);
    padding: 20px;
    border-radius: 0;
    color: var(--olive-velvet);
}

.ls-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    color: var(--olive-velvet);
    margin-bottom: 10px;
}

.ls-list p {
    color: var(--olive-velvet);
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
}

/* ===========================
   NAVBAR
=========================== */
.nav-bar {
    background: rgba(0, 0, 0, 0.4);
    border-radius: var(--radius);
    padding: 12px;
    text-align: center;
}

.nav-btn {
    color: var(--herbal-linen);
    font-weight: 900;
    padding: 6px 10px;
}

.nav-btn.active {
    color: var(--pressed-petal);
    text-shadow: 0 0 10px var(--rosso-mattone);
}

/* ===========================
   PANEL GENERICO
=========================== */
.window-panel {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--pressed-petal);
  border: 4px solid var(--rosso-mattone);
  border-radius: 0px;
  overflow: hidden;
  margin: 30px auto;
  position: relative;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.window-panel .wp-header {
  background: var(--rosso-mattone);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--pressed-petal);
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
}

.window-panel .wp-buttons { display: flex; gap: 4px; }

.window-panel .wp-btn {
  width: 18px;
  height: 18px;
  background: var(--herbal-linen);
  border: 2px solid #fff;
  border-right-color: var(--olive-velvet);
  border-bottom-color: var(--olive-velvet);
  box-sizing: border-box;
  font-size: 12px;
  font-weight: bold;
  color: var(--olive-velvet);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  cursor: pointer;
}

.window-panel .wp-btn:active {
  border: 2px solid var(--olive-velvet);
  border-right-color: #fff;
  border-bottom-color: #fff;
}

.wp-btn:hover { transform: scale(1.2); }

.window-panel a {
  color: var(--pressed-petal);
  text-decoration: none;
}

.window-panel .wp-body {
  padding: 16px;
  font-family: 'Nunito', sans-serif;
  color: var(--olive-velvet);
}

/* ===========================
   CAROUSEL
=========================== */
.carousel {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.carousel-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  width: max-content;
  animation: scroll 50s linear infinite;
}

.carousel-track img {
  width: 300px;
  max-width: 100%;
  height: auto;
  flex: 0 0 auto;
}

@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ===========================
   PANEL
=========================== */
.panel {
    background: var(--pressed-petal);
    background-size: cover;
    background-position: center;
    border: 4px solid #ab1f3c;
    padding: 20px;
    border-radius: 0;
    color: #ab1f3c;
}

.panel-header {
    border-bottom: 2px dashed #ab1f3c;
    padding-bottom: 8px;
    margin-bottom: 12px;
    font-family: 'Orbitron', sans-serif;
    color: #ab1f3c;
}

.panel-title {
    font-family: 'Orbitron', sans-serif;
    color: #ab1f3c;
}

/* ===========================
   BANNER SOFT PINK
=========================== */
.pink-soft-banner {
    background: var(--pressed-petal);
    border-radius: 18px;
    padding: 26px 30px;
    box-shadow: 6px 6px 0 var(--olive-velvet);
    position: relative;
}

.banner-content {
    font-size: 16px;
    color: var(--olive-velvet);
}

.sparkle {
    position: absolute;
    font-size: 22px;
    color: #FF6B38;
    text-shadow: 0 0 6px rgba(255,107,56,0.6);
}

.sparkle.tl { top: 6px; left: 6px; }
.sparkle.br { bottom: 6px; right: 6px; }

/* ===========================
   KAWAII BANNER
=========================== */
.kawaii-banner {
    background: #FF885F;
    border: 4px solid var(--herbal-linen);
    border-radius: 28px 0px 28px 0px;
    padding: 30px 24px 26px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    position: relative;
}

.kawaii-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
    color: var(--olive-velvet);
}

.kawaii-title a {
    color: var(--olive-velvet);
    text-decoration: none;
}

.kawaii-title a:hover {
    text-decoration: underline;
}

.kawaii-content {
    font-size: 16px;
    color: var(--rosso-mattone);
    text-align: center;
}

.star {
    position: absolute;
    font-size: 22px;
    color: var(--rosso-mattone);
    text-shadow: 0 0 6px rgba(180,42,29,0.4);
}

.star.left { left: -14px; top: 50%; transform: translateY(-50%); }
.star.right { right: -14px; top: 50%; transform: translateY(-50%); }

/* ===========================
   SOFT WINDOW
=========================== */
.soft-window {
    background: var(--herbal-linen);
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
    position: relative;
}

.soft-header {
    background: var(--olive-velvet);
    padding: 10px 10px;
    display: flex;
    gap: 4px;
}

.soft-title {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 0px;
    text-align: center;
    color: var(--pressed-petal);
}

.soft-title a {
    color: var(--pressed-petal);
    text-decoration: underline;
}

.soft-title a:hover {
    text-decoration: underline;
}

.soft-body {
    padding: 20px;
    text-align: justify;
    font-size: 16px;
    color: var(--olive-velvet);
    margin-top: 0;
    margin-bottom: 0;
}

.indent {
  padding-left: 32px;
  padding-right: 32px;
}

.soft-body.with-image {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.soft-body.with-image .text {
    flex: 1;
    display: flex;
    flex-direction: column; 
    gap: 0px;
}

.soft-body.with-image .soft-img {
    width: 90px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    margin-top: 20px;
    flex-shrink: 0; 
}


.soft-img-wrap {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 16px;

}
.soft-text-block {
    flex: 1; 
    display: flex;
    flex-direction: column; 
    gap: 0px; 
}

.soft-side-img {
    width: 300px;      /* puoi cambiare la misura */
    height: auto;
    margin-top: 20px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0; 
}

.sparkle-tl { top: 6px; left: 6px; }
.sparkle-br { bottom: 6px; right: 6px; }

/* ===========================
   SOFT BUBBLE
=========================== */
.soft-bubble {
    background: var(--pressed-petal);
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
    position: relative;
}

.bubble-header {
    background: var(--rosso-mattone);
    padding: 10px 10px;
    display: flex;
    gap: 4px;
}

.bubble-title {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 0px;
    text-align: center;
    color: var(--pressed-petal);
}

.bubble-title a {
    color: var(--pressed-petal);
    text-decoration: underline;
}

.bubble-title a:hover {
    text-decoration: underline;
}

.bubble-body {
    padding: 20px;
    text-align: justify;
    font-size: 16px;
    color: var(--rosso-mattone);
    margin-top: 0;
    margin-bottom: 0;
}

.bubble-body.with-image {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.bubble-body.with-image .text {
    flex: 1;
    display: flex;
    flex-direction: column; 
    gap: 0px;
}

.bubble-body.with-image .bubble-img {
    width: 90px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    margin-top: 20px;
    flex-shrink: 0;
}

.bubble-body.with-image1 {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.bubble-body.with-image1 .text {
    flex: 1;
    display: flex;
    flex-direction: column; 
    gap: 0px;
}

.bubble-body.with-image .bubble-img1 {
    width: 90px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    margin-top: 20px;
    flex-shrink: 0;
}

.bubble-img-wrap {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.bubble-text-block {
    flex: 1;
    display: flex;
    flex-direction: column; 
    gap: 0px; 
}

.bubble-side-img {
    width: 300px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    margin-top: 20px;
    flex-shrink: 0;
}

.bottom-wrap {
    display: block;
    width: 100%;
    margin-bottom: 20px;
}

.bottom-text-block {
    display: block;
    width: 100%;
}

.bottom-img {
    display: block;
    width: 100%;
    max-width: 480px;      /* limite elegante su desktop */
    height: auto;
    margin: 20px auto;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sparkle.left { top: 6px; left: 6px; }
.sparkle.right { bottom: 6px; right: 6px; }

/* ===========================
   FOOTER
=========================== */
.cyber-footer {
    background: linear-gradient(90deg, var(--herbal-linen), #90281B);
    padding: 20px;
    text-align: center;
    margin-top: 40px;
}

/* ===========================
   MOBILE
=========================== */
@media (max-width: 900px) {
    .layout-grid {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 10px;
    }
    .main-content,
    .left-sidebar,
    .right-sidebar {
        width: 100%;
    }

    .left-sidebar { order: 1; }
    .main-content { order: 2; }
    .right-sidebar { order: 3; }

    .nav-bar {
        font-size: 14px;
        padding: 10px;
        overflow-x: auto;
        white-space: nowrap;
    }

    .mg-img {
        width: 32%;
    }

    .soft-side-img,
    .bubble-side-img,
    .bubble-img,
    .soft-img {
        width: 40%;
        margin-top: 20px;
    }
    .bottom-img {  
        width: 100%;
    }
}