/* === .fw-bold Bootstrap Utility Fix === */
.fw-bold {
  font-weight: 700 !important;
}
/* Color variables */
:root {
  --main-blue: #3B82FC;
}

body {
  font-family: 'Inter', 'GT Walsheim Trial', sans-serif;
  font-size: 16px;
  color: #333;
  background-color: #fafafa;
  cursor: url('../assets/cursor.svg'), auto;
}
/* Custom hand cursor on hover for interactive elements */
a,
a:hover,
a:active,
a:focus,
button,
button:hover,
button:active,
button:focus,
.navbar-toggler,
.navbar-toggler:hover,
.navbar-toggler:active,
.navbar-toggler:focus,
.nav-link,
.nav-link:hover,
.nav-link:active,
.nav-link:focus,
.navbar-brand,
.navbar-brand:hover,
.navbar-brand:active,
.navbar-brand:focus,
.what-else-btn,
.what-else-btn:hover,
.what-else-btn:active,
.what-else-btn:focus,
.project-card,
.project-card:hover,
.project-card:active,
.project-card:focus,
.contact-icon,
.contact-icon:hover,
.contact-icon:active,
.contact-icon:focus,
[role="button"],
[role="button"]:hover,
[role="button"]:active,
[role="button"]:focus,
input[type="button"],
input[type="button"]:hover,
input[type="button"]:active,
input[type="button"]:focus,
input[type="submit"],
input[type="submit"]:hover,
input[type="submit"]:active,
input[type="submit"]:focus,
input[type="reset"],
input[type="reset"]:hover,
input[type="reset"]:active,
input[type="reset"]:focus {
  cursor: url('../assets/hand.svg'), pointer;
}



p {
  font-family: 'Inter', sans-serif;
  font-weight: 350;

}

h1 {
  font-family: 'GT Walsheim Trial', 'Inter', sans-serif;
  font-weight: bold;
  font-size: 50px;
}


@media (max-width: 576px) {
  h1 {
    font-size: 28px;
  }
}

.navbar-brand {
  font-size: 1.5rem;
}

.nav-link {
  font-size: 1.1rem;
  margin-left: 1rem;
}

/* Navbar hover effects */
.navbar-brand:hover,
.nav-link:hover {
  color: var(--main-blue);
}

.hero {
  background: url('../assets/background.svg') no-repeat center center;
  background-size: cover;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.intro-text {
  font-size: 20px;
  color: #6c757d;
  margin-bottom: 1.5rem;
}

.badge {
  font-size: 15px;
  padding: 0.5em 0.9em;
}

footer {
  background-color: #f1f1f1;
  color: #666;
  text-align: center;
  padding: 2rem 0;
}




.floating-icon {
  position: absolute;
  width: 90px;
  height: auto;
  z-index: 1;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

@keyframes float1 {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(5px, -10px) rotate(3deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float2 {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-8px, 6px) rotate(-2deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float3 {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(10px, -5px) rotate(4deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float4 {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-5px, -8px) rotate(-3deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes free-float1 {
  0%   { transform: translate(0px, 0px) rotate(0deg); }
  25%  { transform: translate(20px, -10px) rotate(5deg); }
  50%  { transform: translate(-10px, 20px) rotate(-5deg); }
  75%  { transform: translate(15px, 10px) rotate(3deg); }
  100% { transform: translate(0px, 0px) rotate(0deg); }
}

@keyframes free-float2 {
  0%   { transform: translate(0px, 0px) rotate(0deg); }
  25%  { transform: translate(-15px, 10px) rotate(-3deg); }
  50%  { transform: translate(10px, -20px) rotate(4deg); }
  75%  { transform: translate(-10px, 15px) rotate(-2deg); }
  100% { transform: translate(0px, 0px) rotate(0deg); }
}

@media (max-width: 768px) {
  .hero .row {
    margin: 0;
  }
  .hero .col-8 {
    width: 100%;
    margin: 0 auto;
  }
}

/* === Desktop floating icons positioning === */
/* You can adjust these values for the desktop version here */
.design-icon {
  top: 20%;
  left: 30%;
  animation: free-float1 10s ease-in-out infinite;
}

.me-icon {
  top: 25%;
  right: 30%;
  animation: free-float2 12s ease-in-out infinite;
}

.search-icon {
  bottom: 15%;
  right: 15%;
  animation: free-float1 11s ease-in-out infinite reverse;
}

.smile-icon {
  bottom: 10%;
  left: 15%;
  animation: free-float2 9s ease-in-out infinite reverse;
}
/* === End of Desktop floating icons positioning === */


@media (max-width: 768px) {
  h1 {
    font-size: 32px;
  }
  .floating-icon {
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
  }
  .design-icon {
    top: 15%;
    left: 5%;
    animation: free-float1 10s ease-in-out infinite;
  }
  
  .me-icon {
    top: 10%;
    right: 1%;
    animation: free-float2 12s ease-in-out infinite;
  }
  
  .search-icon {
    bottom: 0%;
    right: 8%;
    animation: free-float1 11s ease-in-out infinite reverse;
  }
  
  .smile-icon {
    bottom: 0%;
    left: 8%;
    animation: free-float2 9s ease-in-out infinite reverse;
  }
  /* New mobile-only side floating animation */
  @keyframes float-small-side {
    0% { transform: translate(0px, 0px); }
    50% { transform: translate(5px, 0px); }
    100% { transform: translate(0px, 0px); }
  }
}

.project-card {
  background-color: #ffffff;
  border: 1px solid transparent;
  border-radius: 16px;
  transition: all 0.3s ease;
  padding: 22px 17px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.02);
  height: 100%;
  width: 100%;
}

/* Hover effect: blue border */
.project-card:hover {
  border: 2px solid;
  border-color: hsla(218, 97%, 61%, 0.498);
  box-shadow: 0 4px 4px rgba(111, 159, 244, 0.2);
}

/* Pressed effect: semi-transparent */
.project-card:active {
  opacity: 0.7;
}

.heart-icon {
  position: absolute;
  width: 70px;
  height: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: heart-float 8s ease-in-out infinite;
  z-index: 1;
}

/* Heart floating animation */
@keyframes heart-float {
  0% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-48%, -52%) scale(1.1); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* Contact and What Else Section */
.contact-icon {
  background-color: #FAFAFA;
  border: 1px solid #E6F7FF;
  border-radius: 50%;
  padding: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.contact-icon .material-symbols-outlined,
.contact-icon img {
  color: #3B82FC;
  font-size: 24px;
}

/* What else buttons */
.what-else-btn {
  background-color: #ffffff;
  border: 1px solid #3b82fc4c;
  border-radius: 30px;
  padding: 8px 16px;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #333;
  text-decoration: none;
  transition: background 0.3s ease;
  font-weight: 400;
  width: fit-content;
  max-width: 100%;
}

.what-else-btn:hover {
  background-color: #E6F7FF;
}

.small-icon {
  font-size: 20px;
  color: #3B82FC;
}

/* Heart floating effect */
.floating-heart {
  width: 80px;
  animation: heart-float 8s ease-in-out infinite;
}

@keyframes heart-float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}


#canvas-container {
  width: 100%;
  padding: 2rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fafafa;
  box-sizing: border-box;
}

#canvas-container canvas {
  max-width: 100%;
  height: auto;
  display: block;
  border: 1px solid #eee;
  border-radius: 8px;
}

#tool-buttons {
  position: absolute;
  top: 60px;         /* same as icon area start */
  left: 10px;        /* align with icon center ~33px wide */
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#tool-buttons .btn {
  width: 66px;
  height: 43px;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-separator {
  /* padding-top: 30px; */
  padding-bottom: 80px;
}
.contact-section {
  background-color: white;
  width: 100%;
}


body.project-page {
  background-color: white;
}
td {
  font-family: 'Inter', sans-serif;
  font-weight: 350;
  font-size: 16px;
  color: #333;
  background-color: #fafafa;
}

.video-responsive {
  width: 100%;
  height: auto;
  max-height: 104px;
  display: block;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .video-responsive {
    max-height: 50px; /* Shrinks nicely on mobile */
  }
}

/* Added styles for the inserted line block */
.line {
  position: relative;
  width: 100%;
  max-width: 664px;
  height: 585px;
  margin: 0 auto;
}

.line .overlap {
  position: absolute;
  width: 598px;
  height: 391px;
  top: 193px;
  left: -10px;
  background-color: #f7f7f7;
  border-radius: 9.53px;
}

.line .img, .line .img-2, .line .img-3, .line .img-4,
.line .img-5, .line .img-6, .line .img-7 {
  position: absolute;
}

.line .img {
  width: 6px;
  height: 17px;
  top: 299px;
  left: 209px;
}

.line .img-2 {
  width: 17px;
  height: 6px;
  top: 232px;
  left: 146px;
}

.line .img-3 {
  width: 6px;
  height: 17px;
  top: 299px;
  left: 440px;
}

.line .img-4 {
  width: 17px;
  height: 6px;
  top: 95px;
  left: 146px;
}

.line .group {
  position: absolute;
  width: 547px;
  height: 354px;
  top: 22px;
  left: 37px;
}

.line .overlap-group {
  position: absolute;
  width: 441px;
  height: 303px;
  top: -1px;
  left: 99px;
}

.line .img-5 {
  width: 18px;
  height: 296px;
  top: 0;
  left: 0;
}

.line .img-6 {
  width: 432px;
  height: 18px;
  top: 286px;
  left: 9px;
}

.line .text-wrapper, .line .div {
  position: absolute;
  color: #272727;
  font-size: 28.6px;
  line-height: 38.1px;
  white-space: nowrap;
}

.line .text-wrapper {
  left: 391px;
  top: 315px;
  font-family: "Rubik-Bold", Helvetica;
  font-weight: 700;
}

.line .div {
  left: 166px;
  top: 315px;
  font-family: "Rubik-Regular", Helvetica;
  font-weight: 400;
}

.line .element-million,
.line .element-billion {
  position: absolute;
  width: 83px;
  text-align: right;
  color: #272727;
  font-size: 23.8px;
  line-height: normal;
}

.line .element-million {
  top: 199px;
  left: 0;
  font-family: "Rubik-Regular", Helvetica;
  font-weight: 400;
}

.line .element-billion {
  top: 46px;
  left: 0;
  font-family: "Rubik-Bold", Helvetica;
  font-weight: 700;
}

.line .ellipse {
  position: absolute;
  width: 92px;
  height: 92px;
  top: 186px;
  left: 190px;
  background-color: #59d19f;
  border-radius: 45.84px;
}

.line .text-wrapper-2 {
  position: absolute;
  top: 212px;
  left: 217px;
  font-family: "Rubik-Bold", Helvetica;
  font-weight: 700;
  color: #000;
  font-size: 35.7px;
  line-height: 38.1px;
  white-space: nowrap;
}

.line .ellipse-2 {
  position: absolute;
  width: 6px;
  height: 6px;
  top: 189px;
  left: 174px;
  background-color: #000;
  border-radius: 3px;
}

.line .text-wrapper-3 {
  position: absolute;
  width: 316px;
  top: 5px;
  left: 349px;
  font-family: "Rubik-Bold", Helvetica;
  font-weight: 700;
  color: #000;
  font-size: 41.7px;
}

.line .overlap-2 {
  position: absolute;
  width: 331px;
  height: 115px;
  top: -1px;
  left: 0;
}

.line .p {
  position: absolute;
  width: 193px;
  top: 0;
  left: 0;
  font-family: "Rubik-Regular", Helvetica;
  font-weight: 400;
  color: #272727;
  font-size: 28.6px;
  line-height: 38.1px;
}

.line .img-7 {
  position: absolute;
  width: 174px;
  height: 32px;
  top: 26px;
  left: 157px;
}

/* Generic responsive video class */
.responsive-video {
  width: 100%;
  height: auto;
  max-width: 300px;
  max-height: 520px;
  border-radius: 16px;
  object-fit: cover;
  clip-path: inset(1px 0 1px 0); /* crop 1px from top and bottom */
}

/* Make sure images scale responsively */
img.img-fluid {
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .responsive-video {
    max-width: 100%;
    max-height: 320px;
  }
}


@media (max-width: 576px) {
  img.img-fluid,
  video.responsive-video {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  .col-md-5, .col-md-4, .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .text-center {
    text-align: center;
  }

  @media (min-width: 768px) {
    .text-md-left {
      text-align: left !important;
    }
  }

  .line {
    height: auto;
    max-height: 100%;
  }

  .line .overlap {
    position: relative;
    width: 100%;
    height: auto;
    left: 0;
  }

  /* Add spacing for stacked columns on mobile */
  .col-md-6.mb-4 img {
    margin-bottom: 1rem;
  }

  .row.align-items-center.mb-4 {
    gap: 2rem;
  }

  /* Milano Design Week logo in .ripples-page - shrink on mobile */
  .ripples-page img[alt="milano design week"] {
    max-width: 30px;
  }

  .milano-logo {

    height: 40% !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
  }
}




body.ripples-page table.project-info-table {
  background-color: #fafafa !important;
}

body.ripples-page td {
  background-color: #fafafa !important;
}

body.ripples-page th {
  background-color: #fafafa !important;
}



.highlight-orange {
  background-color: #FF8845;
  color: #fff;
  padding: 0 6px;
  border-radius: 4px;
}


.video-feedback {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 16px;
}

.ecg-box {
  background-color: #f5f5f5;
  border-top-left-radius: 24px;
  border-bottom-left-radius: 24px;
}



@media (max-width: 576px) {
  .row.align-items-stretch.g-4 > .col-12 {
    margin-bottom: 2rem;
  }

  .row.text-center.text-md-start.g-4 > .col-12 {
    margin-bottom: 2rem;
  }

  .row .col-md-4,
  .row .col-md-3,
  .row .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  h5.fw-bold {
    text-align: left !important;
  }

  p {
    text-align: left !important;
  }
}

/* Responsive override for ECG images */
.responsive-img {
  max-height: 500px;
  object-fit: cover;
}

@media (max-width: 576px) {
  .responsive-img {
    max-height: 240px;
    width: 100%;
    object-fit: contain;
  }
}


.caption {
  font-size: 14px;
  font-weight: 400;
  font-style: italic;
  color: #a3a3a3;
  caption-side: bottom; /* or 'top' */
  padding: 0.5rem 0;
}


@media (max-width: 576px) {
  .sign-img {
    width: 50% !important;
    height: auto !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
    padding-top: 6rem; 
    padding-left: 8rem; 
    padding-right: 8rem; 
  }
}
@media (max-width: 576px) {
.eye-img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  padding: 4rem;
}
}


  .auto-scroll-gallery {
    display: flex;
    overflow: hidden;
    gap: 2rem;
    animation: scroll-left 60s linear infinite;
    width: max-content;
  }

  @keyframes scroll-left {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(-50%);
    }
  }

.scroll-container {
  height: 350px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

  .gallery-item {
    display: inline-block;
    text-align: center;
  }

  .gallery-item img {
    height: 300px;
    display: block;
    margin: 0 auto;
  }

  .gallery-caption {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.5rem;
  }

body.unity-page table.project-info-table,
body.unity-page td,
body.unity-page th {
  background-color: #FFFDF9 !important;
}

.custom-cursor {
  cursor: url('../assets/me.cursor.png')24 24, auto;
}

.pen-cursor {
  cursor: url('../assets/pen.cursor.png')24 24, auto;
}

@keyframes fadeIn {
  0%   { opacity: 0; }
  40%  { opacity: 0; }
  50%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes fadeOut {
  0%   { opacity: 1; }
  40%  { opacity: 1; }
  50%  { opacity: 0; }
  90%  { opacity: 0; }
  100% { opacity: 1; }
}

.fade-wrapper {
  position: relative;
}

.fade-wrapper img {
  transition: opacity 1s ease-in-out;
  pointer-events: none;
}

/* Added floating flags for bento section */

.floating-flags {
  position: relative;
  width: 100%;
  height: 0;
  z-index: 0;
}

.floating-flag {
  position: absolute;
  width: 70px;
  animation: floatRandom 5s ease-in-out infinite alternate;
}

.flag-china {
  top: -80px;
  left: 5%;
}

.flag-italy {
  top: -250px;
  left: 75%;
}

.floating-drawing {
  position: fixed;
  width: 260px;          /* smaller, only the drawing area */
  height: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;  /* don’t block clicks on content behind */
  animation-name: floatDrawing;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  mix-blend-mode: multiply;
}

/* Random-ish wandering around the viewport */
@keyframes floatDrawing {
  0% {
    transform: translate(-50%, -50%) translate(0, 0) rotate(0deg) scale(0.9);
    opacity: 0;
  }
  15% {
    transform: translate(-50%, -50%) translate(5vw, -5vh) rotate(3deg) scale(1);
    opacity: 1;
  }
  35% {
    transform: translate(-50%, -50%) translate(-10vw, 10vh) rotate(-4deg) scale(1.02);
  }
  55% {
    transform: translate(-50%, -50%) translate(8vw, 18vh) rotate(2deg) scale(0.98);
  }
  75% {
    transform: translate(-50%, -50%) translate(-6vw, -12vh) rotate(-3deg) scale(1.01);
  }
  100% {
    transform: translate(-50%, -50%) translate(0, 5vh) rotate(1deg) scale(1);
    opacity: 1;
  }
}




@keyframes floatRandom {
  0% {
    transform: translate(0, 20px);
  }
  50% {
    transform: translate(10px, -15px);
  }
  100% {
    transform: translate(-10px, 50px);
  }
}

.system-tab {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
}

.system-tab img {
  height: 65px;              /* regola se vuoi più grande/piccolo */
  transition: opacity 0.2s ease, transform 0.2s ease;
}



.system-tab:not(.active) img {
  opacity: 0.3;              /* icona “spenta” */
}

.system-tab.active img {
  opacity: 1;
  transform: translateY(-2px);  /* leggero “salto” */
}

.system-tab.active span {
  font-weight: 600;
}

.system-panel {
  display: none;
  margin: 0 auto;
  text-align: left;
}

.system-panel.active {
  display: block;
}

.layer-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: #0b3960; /* soft grey */
  margin-top: 0.25rem;
}

.layer-arrow {
  font-size: 20px;
  animation: layer-arrow-bounce 1.2s infinite ease-in-out;
}

@keyframes layer-arrow-bounce {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  50% {
    transform: translateY(4px);
    opacity: 1;
  }
}