/* ===================================================================================== */
/* RESET + BASE                                                                           */
/* ===================================================================================== */

:root {
  --bg: #0a0a0a;
  --bg-elevated: #121212;
  --surface: rgba(255, 255, 255, 0.04);
  --cream: #f5f0e6;
  --text-muted: rgba(245, 240, 230, 0.62);
  --accent: #f5c518;
  --accent-hover: #ffda45;
  --accent-deep: #c9a012;
  --accent-ink: #7a6512;
  --accent-ink-strong: #4a3a00;
  --border-subtle: rgba(245, 240, 230, 0.12);
  --font-display: "Syne", "Poppins", sans-serif;
  --font-body: "DM Sans", "Poppins", sans-serif;
  /* portfolio carousel */
  --gap: 1.25rem;
  --speed: 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --closed: 5rem;
  --open: 30rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  height: 100%;
  min-height: 100vh;
  margin: 0;
  padding-top: 100px; /* spazio sotto navbar */

  background: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(245, 197, 24, 0.08), transparent 55%),
    linear-gradient(180deg, #0a0a0a 0%, #050505 100%);
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;

  font-family: var(--font-body);
  font-size: 12px;
  color: var(--cream);

  display: flex;
  flex-direction: column;
}

/* Mantieni Montserrat solo per button e input */
button,
input {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  letter-spacing: 1.4px;
}

.hero p {
  font-size: 16px;
  line-height: 1.6;
}


/* ===================================================================================== */
/* NAVBAR                                                                                */
/* ===================================================================================== */

.custom-navbar {
  background: transparent;
  padding: 12px 16px;
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
  transition: padding 0.35s ease;
}

.custom-navbar.is-scrolled {
  padding-top: 8px;
  padding-bottom: 8px;
}

.nav-pill-inner {
  position: relative;
  isolation: isolate;
  max-width: 960px;
  margin: 12px auto 0;
  padding: 10px 20px;
  border-radius: 999px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    background 0.35s ease;
}

.custom-navbar.is-scrolled .nav-pill-inner {
  transform: scale(0.985);
}

/* Liquid glass */
.glass-panel {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.04) 42%,
    rgba(255, 255, 255, 0.08) 100%
  );
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.glass-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 80% at 10% 0%, rgba(245, 197, 24, 0.12), transparent 55%);
  pointer-events: none;
  z-index: -1;
}

.glass-panel::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 40%);
  pointer-events: none;
  z-index: -1;
}

.custom-navbar .navbar-brand {
  color: var(--cream) !important;
  font-size: clamp(0.75rem, 1.5vw, 0.95rem);
  letter-spacing: 0.04em;
}

.custom-navbar .navbar-toggler {
  border-color: var(--border-subtle);
}

.custom-navbar .navbar-toggler-icon {
  filter: invert(1);
}

.navbar .nav-link {
  color: var(--text-muted);
  margin: 0 15px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--accent);
}

.custom-navbar .navbar-brand {
  font-size: clamp(0.8rem, 1.5vw, 1rem);
}



/* BOTTONE "CONTATTI"*/

.btn-purple {
  position: relative;
  display: inline-block;
  color: #0a0a0a;
  font-weight: 700;
  padding: 0.8rem 1.8rem;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(245, 197, 24, 0.25);
  text-decoration: none;
}

.btn-purple::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
  opacity: 0.6;
  transition: opacity 0.3s ease;
  border-radius: 50px;
}

.btn-purple:hover::before {
  opacity: 1;
}

.btn-purple:hover {
  transform: translateY(-2px) scale(1.03);
  color: #0a0a0a;
  box-shadow: 0 12px 32px rgba(245, 197, 24, 0.35);
}

.custom-navbar .btn-purple {
  font-size: clamp(0.7rem, 1.2vw, 0.9rem);
  padding: clamp(0.4rem, 1vw, 0.8rem) clamp(0.8rem, 2vw, 1.8rem);
}


/* ===================================================================================== */
/* HERO                                                                                  */
/* ===================================================================================== */

.hero {
  min-height: 100vh;
  padding-top: 10%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
}


/* ===================================================================================== */
/* FOOTER                                                                                */
/* ===================================================================================== */

.custom-footer {
  margin-top: auto;
  width: 100%;
}

.glass-footer {
  background: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0.2) 0%,
    rgba(10, 10, 10, 0.88) 35%
  );
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.footer-link {
  color: var(--text-muted);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--accent);
}


/* ===================================================================================== */
/* CONTATTI (stile "screen")                                                             */
/* ===================================================================================== */

.background {
  display: flex;
  min-height: auto;
}

.container {
  flex: 0 1 700px;
  margin: auto;
  padding: 10px;
}

.screen {
  position: relative;
  background: #3e3e3e;
  border-radius: 15px;
}

.screen:after {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  bottom: 0;
  border-radius: 15px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .4);
  z-index: -1;
}

.screen-header {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  background: #4d4d4f;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

.screen-header-left {
  margin-right: auto;
}

.screen-header-button {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 3px;
  border-radius: 8px;
  background: rgb(255, 0, 0);
}

.screen-header-button.maximize {
  background: #e8e925;
}

.screen-header-button.minimize {
  background: #74c54f;
}

.screen-header-right {
  display: flex;
}

.screen-header-ellipsis {
  width: 3px;
  height: 3px;
  margin-left: 2px;
  border-radius: 8px;
  background: #999;
}

.screen-body {
  display: flex;
}

.screen-body-item {
  flex: 1;
  padding: 50px;
}

.screen-body-item.left {
  display: flex;
  flex-direction: column;
}

.app-title {
  display: flex;
  flex-direction: column;
  position: relative;
  color: var(--accent);
  font-size: 26px;
}

.app-title:after {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 25px;
  height: 4px;
  background: var(--accent);
}

.app-form-group {
  margin-bottom: 15px;
}

@media screen and (max-width: 520px) {
  .screen-body {
    flex-direction: column;
  }

  .screen-body-item.left {
    margin-bottom: 10px;
  }

  .app-title {
    flex-direction: row;
  }

  .app-title span {
    margin-right: 12px;
  }

  .app-title:after {
    display: none;
  }
}

@media screen and (max-width: 600px) {
  .screen-body {
    padding: 40px;
  }

  .screen-body-item {
    padding: 0;
  }
}


/* ===================================================================================== */
/* RESPONSIVE NAVBAR + VARIE                                                             */
/* ===================================================================================== */

@media (max-width: 768px) {
  .custom-navbar {
    padding: 8px 12px;
  }

  .nav-pill-inner {
    margin-top: 8px;
    border-radius: 1rem;
  }

  .hero {
    padding-top: 80px;
    text-align: center;
  }

  .custom-navbar .navbar-brand img {
    width: 32px;
    height: 32px;
  }

  .custom-navbar .navbar-brand {
    font-size: 0.8rem;
    margin-right: auto;
  }

  .custom-navbar .btn-purple {
    padding: 0.45rem 1.1rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 600px) {
  .screen-body {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .screen-body-item {
    padding: 15px;
  }
}

@media (min-width: 1200px) {
  body {
    font-size: 14px;
  }
}


/* ===================================================================================== */
/* PORTFOLIO - CAROSELLO PROGETTI (custom)                                                */
/* ===================================================================================== */

.head {
  max-width: 1400px;
  margin: auto;
  padding: 70px 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
}

.head h2 {
  font: 400 1.5rem/1.2 var(--font-display), sans-serif;
  color: var(--cream);
  font-weight: bolder;
}

@media (min-width: 1024px) {
  .head h2 {
    font-size: 2.25rem;
    font-weight: bolder;
  }
}

.nav-btn {
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s;
}

.nav-btn:hover {
  background: var(--accent);
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.slider {
  max-width: 1400px;
  margin: auto;
  overflow: hidden;
}

.controls {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
}

.slider .track {
  display: flex;
  gap: var(--gap);
  align-items: flex-start;
  justify-content: center;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding-bottom: 40px;
}

.slider .track::-webkit-scrollbar {
  display: none;
}


.project-card {
  position: relative;
  flex: 0 0 var(--closed);
  height: 26rem;
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  transition: flex-basis var(--speed), transform var(--speed);
}

.project-card[active] {
  flex-basis: var(--open);
  transform: translateY(-6px);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.45);
}

.project-card__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.75) saturate(75%);
  transition: filter 0.3s, transform var(--speed);
}

.project-card:hover .project-card__bg {
  filter: brightness(0.9) saturate(100%);
  transform: scale(1.06);
}

.project-card__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.7rem;
  padding: 0;
  background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.85) 100%);
  z-index: 2;
}

.project-card__title {
  color: #fff;
  font-weight: 700;
  font-size: 1.35rem;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.project-card__thumb,
.project-card__desc,
.project-card__btn {
  display: none;
}

.project-card[active] .project-card__content {
  flex-direction: row;
  align-items: center;
  padding: 1.2rem 2rem;
  gap: 1.1rem;
}

.project-card[active] .project-card__title {
  writing-mode: horizontal-tb;
  transform: none;
  font-size: 2.4rem;
}

.project-card[active] .project-card__thumb,
.project-card[active] .project-card__desc,
.project-card[active] .project-card__btn {
  display: block;
}

.project-card__thumb {
  width: 133px;
  height: 269px;
  border-radius: 0.45rem;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.project-card__desc {
  color: #ddd;
  font-size: 1.5rem;
  line-height: 1.4;
  max-width: 16rem;
}

.project-card__btn {
  padding: 0.55rem 1.3rem;
  border: none;
  border-radius: 9999px;
  background: var(--accent);
  color: #0a0a0a;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.project-card__btn:hover {
  background: var(--accent-deep);
}

.dots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  padding: 20px 0;
}

.dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: 0.3s;
}

.dot.active {
  background: var(--accent);
  transform: scale(1.2);
}

@media (max-width: 767px) {
  :root {
    --closed: 4rem;
    --open: 22rem;
  }

  .head {
    padding: 50px 20px 30px;
  }

  .slider .track {
    flex-direction: column;
    scroll-snap-type: y mandatory;
    align-items: center;
    justify-content: flex-start;
    padding-bottom: 0;
  }

  .project-card {
    height: 20rem;
  }

  .project-card__title {
    font-size: 1.1rem;
    writing-mode: horizontal-tb;
    transform: none;
    text-align: center;
    padding-inline: 0.3rem;
  }

  .nav-btn {
    width: 2rem;
    height: 2rem;
    font-size: 1.2rem;
  }
}

@media (max-width: 767px) {
  :root {
    --closed: 100%;
    --open: 100%;
    --gap: 0.8rem;
  }

  .head {
    padding: 30px 15px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .slider {
    padding: 0 15px;
  }

  .slider .track {
    flex-direction: column;
    scroll-snap-type: y mandatory;
    gap: 0.8rem;
    padding-bottom: 20px;
  }

  .project-card {
    height: auto;
    min-height: 80px;
    flex: 0 0 auto;
    width: 100%;
    scroll-snap-align: start;
  }

  .project-card[active] {
    min-height: 300px;
    transform: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  }

  .project-card__content {
    flex-direction: row;
    justify-content: flex-start;
    padding: 1rem;
    align-items: center;
    gap: 1rem;
  }

  .project-card__title {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 1.2rem;
    margin-right: auto;
  }

  .project-card__thumb,
  .project-card__desc,
  .project-card__btn {
    display: none;
  }

  .project-card[active] .project-card__content {
    align-items: flex-start;
    padding: 1.5rem;
  }

  .project-card[active] .project-card__title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
  }

  .project-card[active] .project-card__thumb {
    width: 200px;
    height: 267px;
    border-radius: 0.35rem;
    margin-bottom: 1rem;
  }

  .project-card[active] .project-card__desc {
    font-size: 0.95rem;
    max-width: 100%;
    margin-bottom: 1rem;
  }

  .project-card[active] .project-card__btn {
    align-self: center;
    width: 100%;
    text-align: center;
    padding: 0.7rem;
  }

  .dots {
    display: none;
  }

  .controls {
    width: 100%;
    justify-content: space-between;
    padding: 0 15px 20px;
  }

  .nav-btn {
    position: static;
    transform: none;
  }
}


/* ===================================================================================== */
/* INDEX - SKILLS/CERTIFICATI (MARQUEE)                                                    */
/* ===================================================================================== */

.page {
  min-height: auto;
  display: grid;
  place-items: center;
  padding: 10px 32px;
}

/* Variabili SOLO per marquee (evita conflitti con il carosello progetti) */
.marquee {
  --card-bg: rgba(245, 240, 230, 0.92);
  --card-border: rgba(245, 240, 230, 0.35);
  --radius: 20px;
  --gap: 24px;
  --blur: 7.5px;
  --shadow: 0 1px 0 rgba(0, 0, 0, .02), 0 10px 30px rgba(0, 0, 0, .08);
  --duration: 15s;

  width: 100%;
  overflow: hidden;
  padding: 8px 0;
  position: relative;
}

.marquee .track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.skills-marquee-track {
  animation: skills-marquee-scroll var(--duration, 28s) linear infinite;
}

.marquee:hover .skills-marquee-track {
  animation-play-state: paused;
}

.marquee-set {
  display: flex;
  flex-shrink: 0;
  gap: var(--gap);
  padding-right: var(--gap);
}

.marquee-half {
  display: flex;
  flex-shrink: 0;
  gap: 0;
}

@keyframes skills-marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* legacy keyframes name kept for other pages if any */
@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 67px;
  width: clamp(260px, 28vw, 390px);
  height: 340px;
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow);
}

.logo {
  color: #000;
  line-height: 0;
}

.stat .percent {
  font-weight: 800;
  letter-spacing: .5px;
  font-size: clamp(20px, 3vw, 20px);
}

.stat .desc {
  margin: 10px 0 0;
  line-height: 1.35;
  color: rgba(0, 0, 0, .75);
  font-size: clamp(10px, 2vw, 10px);
}

.author {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.name {
  font-weight: 700;
  font-size: 16px;
}

@media (max-width: 900px) {
  .page {
    padding: 20px;
  }

  .marquee .track {
    gap: 18px;
  }

  .card {
    gap: 48px;
    padding: 28px;
  }
}

@media (max-width: 520px) {
  .card {
    width: clamp(240px, 80vw, 360px);
    padding: 24px;
    gap: 36px;
  }

  .stat .desc {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee .track {
    animation-duration: 0.001s;
  }
}


/* ===================================================================================== */
/* PAGINE PROGETTO - HERO + GALLERY                                                      */
/* ===================================================================================== */

.project-hero {
  padding: 80px 0;
}

.project-hero .row {
  align-items: center;
}

.project-hero-text {
  padding-right: 40px;
}

.project-hero h1 {
  font-size: 2.2rem;
  margin-bottom: 15px;
}

.project-hero h2 {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 20px;
}

.project-hero p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.project-hero-image {
  display: flex;
  justify-content: center;
}

.project-hero-image img {
  max-width: 480px;
  width: 100%;
  border-radius: 12px;
  display: block;
}

@media (max-width: 992px) {
  .project-hero {
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .project-hero-text {
    padding-right: 0;
    text-align: center;
    margin-bottom: 30px;
  }

  .project-hero-image img {
    max-width: 340px;
  }
}

.project-gallery .carousel-inner {
  max-width: 700px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
}

.project-gallery .carousel-item img {
  height: 600px;
  object-fit: contain;
  background: #00000020;
}

@media (max-width: 768px) {
  .project-gallery .carousel-item img {
    height: 260px;
  }
}


/* ===================================================================================== */
/* DARK MODE + TOGGLE                                                                    */
/* ===================================================================================== */

body.dark-mode {
  background: radial-gradient(ellipse 100% 60% at 50% 0%, rgba(245, 197, 24, 0.05), transparent 50%),
    linear-gradient(180deg, #050505 0%, #000 100%);
  color: var(--cream);
}

body.dark-mode .custom-navbar {
  background: transparent;
}

body.dark-mode .nav-pill-inner {
  background: rgba(0, 0, 0, 0.75);
}

body.dark-mode .custom-footer {
  background: rgba(0, 0, 0, 0.9);
}

body.dark-mode .card {
  background: rgba(245, 240, 230, 0.08);
  color: var(--cream);
}

.theme-toggle-wrapper {
  position: fixed;
  top: 28px;
  right: 60px;
  z-index: 9999;
}

@media (max-width: 768px) {
  .theme-toggle-wrapper {
    top: auto;
    bottom: 16px;
    right: 16px;
    transform: scale(0.9);
  }

  .marquee {
    width: 100%;
  }

  .page {
    padding-inline: 0;
  }
}

.theme-toggle-btn {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: none;
  background: #f5f5f5;
  color: #111;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.theme-toggle-btn:hover {
  filter: brightness(0.95);
}

body.dark-mode .theme-toggle-btn {
  background: #111;
  color: #f5f5f5;
}



/* ===================================================================================== */
/* HOME - PADDING TESTI SU MOBILE                                                        */
/* ===================================================================================== */

@media (max-width: 992px) {
  .hero .container {
    padding-left: 35px;
    padding-right: 35px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero h2 {
    font-size: 1.2rem;
  }

  .hero p {
    font-size: 0.95rem;
    text-align: justify;
  }
  
}

/* ===================================================================================== */
/* CONTATTI — stessa altezza card + mappa, centratura pagina                              */
/* ===================================================================================== */

body.contatti-page .contatti-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1.25rem clamp(1rem, 3vw, 2rem) 2.5rem;
}

body.contatti-page .contatti-main > .container {
  flex: none;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
}

body.contatti-page .contatti-main .row {
  justify-content: center;
  align-items: stretch;
}

body.contatti-page .contatti-col {
  display: flex;
}

body.contatti-page .contatti-col .background {
  flex: 1;
  width: 100%;
  display: flex;
}

body.contatti-page .contatti-col .screen {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}

body.contatti-page .screen-body {
  flex: 1;
  min-height: 0;
}

body.contatti-page .screen-body--map .screen-body-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px;
  min-height: 0;
}

body.contatti-page .screen-body--map iframe {
  flex: 1;
  width: 100% !important;
  height: 100% !important;
  min-height: 0;
  display: block;
  border: 0;
  border-radius: 12px;
}

@media (max-width: 991.98px) {
  body.contatti-page .contatti-main {
    align-items: flex-start;
    padding-top: 1.5rem;
  }

  body.contatti-page .screen-body--map iframe {
    min-height: clamp(220px, 40vw, 320px);
  }
}

body.contatti-page .contatti-form-row {
  margin-top: 0;
}

body.contatti-page .screen-body--form {
  align-items: flex-start;
}

body.contatti-page .screen-body--form .screen-body-item.left {
  max-width: 280px;
}

body.contatti-page .contatti-form-intro {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(245, 240, 230, 0.78);
}

body.contatti-page .contatti-form-intro strong {
  color: var(--accent);
  font-weight: 600;
}

body.contatti-page .contatti-form-success {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(245, 197, 24, 0.45);
  background: rgba(245, 197, 24, 0.12);
  color: var(--cream);
  font-size: 0.92rem;
}

body.contatti-page .contatti-form-honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

body.contatti-page .contatti-mail-form {
  width: 100%;
}

body.contatti-page .contatti-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.15rem;
  margin-bottom: 1.35rem;
}

body.contatti-page .contatti-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

body.contatti-page .contatti-form-field--full {
  grid-column: 1 / -1;
}

body.contatti-page .contatti-mail-form label {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(245, 240, 230, 0.65);
  font-weight: 600;
}

body.contatti-page .contatti-mail-form input,
body.contatti-page .contatti-mail-form select,
body.contatti-page .contatti-mail-form textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.contatti-page .contatti-mail-form input::placeholder,
body.contatti-page .contatti-mail-form textarea::placeholder {
  color: rgba(245, 240, 230, 0.4);
}

body.contatti-page .contatti-mail-form select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23f5c518' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2rem;
}

body.contatti-page .contatti-mail-form select option {
  background: #2a2a2a;
  color: var(--cream);
}

body.contatti-page .contatti-mail-form input:focus,
body.contatti-page .contatti-mail-form select:focus,
body.contatti-page .contatti-mail-form textarea:focus {
  outline: none;
  border-color: rgba(245, 197, 24, 0.55);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.15);
}

body.contatti-page .contatti-mail-form textarea {
  resize: vertical;
  min-height: 120px;
}

body.contatti-page .contatti-form-submit {
  font-size: 0.85rem;
}

@media (max-width: 767.98px) {
  body.contatti-page .contatti-form-grid {
    grid-template-columns: 1fr;
  }

  body.contatti-page .screen-body--form {
    flex-direction: column;
  }

  body.contatti-page .screen-body--form .screen-body-item.left {
    max-width: none;
    margin-bottom: 0.5rem;
  }

  body.contatti-page .screen-body--form .screen-body-item {
    padding-top: 0;
  }
}

/* ===================================================================================== */
/* PAGINE PROGETTO - TESTI RESPONSIVE (MOBILE)                                           */
/* ===================================================================================== */

@media (max-width: 992px) {

  /* più margine ai lati del testo */
  .project-hero-text {
    padding-left: 35px;
    padding-right: 35px;
  }

  /* testo giustificato e leggibile */
  .project-hero-text p {
    text-align: justify;
    hyphens: auto;
    font-size: 0.95rem;
    line-height: 1.6;
  }
}


/* ===================================================================================== */
/* HOME - SEZIONE "BENVENUTO NEL MIO MONDO" MOBILE                                        */
/* ===================================================================================== */

@media (max-width: 576px) {

  /* spinge la sezione più in basso rispetto alla foto sopra */
  .content-section {
    margin-top: 100px;
  }

  /* spazio interno più arioso */
  .content-section .container {
    padding-left: 24px;
    padding-right: 24px;
  }

  /* testo ben leggibile */
  .content-section h2 {
    margin-bottom: 12px;
  }
}


/* ===================================================================================== */
/* HOME - "BENVENUTO NEL MIO MONDO" SOTTO LA FOTO (MOBILE)                                */
/* ===================================================================================== */

@media (max-width: 576px) {

  /* crea spazio dopo la foto, prima della sezione "Benvenuto..." */
  .hero {
    padding-bottom: 40px;
    min-height: auto; /* evita che occupi tutta la viewport e "tiri su" la sezione dopo */
  }

  /* spinge la sezione in basso (e le dà respiro laterale) */
  .content-section {
    margin-top: 24px;
    padding-top: 0 !important;  /* annulla il py-5 su mobile, così non si attacca in modo strano */
  }

  .content-section .container {
    padding-left: 24px;
    padding-right: 24px;
  }
}



/* ===================================================================================== */
/* PRIVACY POLICY PAGE - CENTRATA E LEGIBILE                                           */
/* ===================================================================================== */

.text-muted-custom {
  color: var(--text-muted);
}

@media (max-width: 991px) {
  .custom-navbar .navbar-collapse {
    margin-top: 0.75rem;
    padding: 0.75rem 0.25rem 0.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .custom-navbar .btn-purple {
    margin-top: 0.65rem;
    width: 100%;
    text-align: center;
  }
}

/* ===================================================================================== */
/* PRIVACY POLICY PAGE - GRADIENTE UNICO                                                */
/* ===================================================================================== */

body.privacy-page {
  background: var(--bg);
  color: var(--cream);
  padding-top: 120px;
  min-height: 100vh;
}

/* Contenitore principale trasparente */
body.privacy-page .privacy-content {
  max-width: 900px; 
  margin: auto;
  background: transparent; /* <--- rimuove blocchi separati */
  line-height: 1.7;
  padding-bottom: 60px;
}

/* Assicurati che eventuali altri elementi non blocchino il gradiente */
body.privacy-page main,
body.privacy-page section {
  background: transparent !important;
}


body.privacy-page .privacy-content {
  max-width: 900px; /* larghezza massima leggibile */
  margin: auto;
  color: #ffffff;
  line-height: 1.7;
}

body.privacy-page h1,
body.privacy-page h2,
body.privacy-page h3 {
  color: #ffffff;
}

body.privacy-page p,
body.privacy-page li {
  color: #ddd;
  font-size: 1rem;
}

body.privacy-page ul,
body.privacy-page ol {
  padding-left: 1.8rem;
  margin-bottom: 1rem;
}

body.privacy-page .last-updated {
  color: #aaa;
  font-size: 0.9rem;
}




/* COOKIE BANNER */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 340px;
  background: #111;
  color: #fff;
  padding: 16px;
  border-radius: 20px;
  z-index: 9999;
  font-size: 14px;
}

.cookie-banner a {
  color: #fff;
  text-decoration: underline;
}

.cookie-buttons {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.cookie-banner button {
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
}

.cookie-banner button:first-child {
  background: #fff;
  color: #000;
}

.cookie-banner button:last-child {
  background: transparent;
  color: #fff;
  border: 1px solid #fff;
}

.hidden {
  display: none;
}



/* ===================================================================================== */
/* COOKIE BANNER - MOBILE FIX                                                            */
/* ===================================================================================== */

@media (max-width: 768px) {

  .cookie-banner {
    left: 0;
    right: 0;
    bottom: 0;

    max-width: none;
    width: 100%;

    border-radius: 20px 20px 0 0;
    padding: 20px;

    z-index: 100000; /* più alto di qualsiasi cursore/blob */
  }

  .cookie-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .cookie-banner button {
    width: 100%;
    padding: 10px;
    font-size: 14px;
  }
}


@media (max-width: 768px) {
  .cookie-banner {
    pointer-events: auto;
  }
}

/* ===================================================================================== */
/* BLOB CURSOR - MOBILE FIX                                                            */
/* ===================================================================================== */
@media (max-width: 768px) {
  .cursor,
  .blob-cursor {
    pointer-events: none;
  }
}