html {
  scroll-behavior: smooth;
}


/*

 div {
  border:1px blue solid;
}

*/

/* general elements attributes */



p {
  margin-bottom: 20px;
}


.oppositebg {
  background: -webkit-linear-gradient(0deg, white 0%, transparent 80%)
}


.bulletpoints li::before {
  content: "\2022";
  color: rgba(59,23,116,0.8);
  font-weight: bold;
  display: inline-block;
  width: 1em;
}



  /* margins */

.margin32 {
  margin-bottom: 32px;
}

.margin64 {
  margin-bottom: 64px;
}

.margin15 {
  margin-bottom: 15vh;
}

.content {
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 5vw, 4rem);
  max-width: 1200px;
}



#top {
    width: 100%;
    height: 10vh;
    background: linear-gradient(180deg, rgba(245, 245, 245, 1) 80%,  rgba(245, 245, 245, 0) 100%);
    position: fixed;
    top:0;
    z-index: 1;
}

#upperbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

#logofull {
  display: flex;
  align-items: center;
}

#logo img{
  width:40px;
  height: 40px;
  margin-top: 8px;
}


#name {
  margin-left: 16px;
  font-size: 14px;
  line-height: 14px;
}

#menu {
  display: flex;
  align-items: center;
  gap:4rem;
}


.menuitem {
  font-family: fontprimary;
  font-size: 24px;
  line-height: 24px;
  font-weight: 200;
  color:#F25B5B;
  margin-top: 8px;

}


.menuitem:hover {
  color:black;
  transition: color 0.5s;
}

.menuitem:hover .superbar{
  width:100%;
  transition: width 0.5s;
}

#presentation {
  margin-top: 30vh;
  height: 80vh;
}

#landing {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#maintitle {
  font-size: 48px;
  font-weight: 700;
  line-height: 60px;
}

#bcn {
  color:#a39594;
  text-decoration: line-through;
  font-weight: 700;
}



#works {
}

.workscontent {
  display:grid;
  grid-template-columns: 1fr 1fr;
  grid-column-gap: 32px;
  align-items: center;
}



.workicons {
  width: 90%;
  height: auto;
  opacity: 60%;
  z-index: -1;
  transform: perspective(200px) rotateX(5deg);
  transition: opacity 0.5s, transform 0.7s;
}

.imgplacing {
  display: flex;
  justify-content: center;
}

.workscontent:hover .imgplacing > .workicons{
  opacity: 100%;
  transform: perspective(300px) rotateX(0deg);
  transition: opacity 0.5s, transform 0.7s;
}


/* Base Button Styles */
.button {
  padding: 8px 16px 4px 16px; /* Reduced padding for a smaller button */
  font-family: fontprimary; /* Material Design font */
  font-size: 16px; /* Smaller font size */
  font-weight: 500; /* Medium weight for emphasis */
  border-radius: 200px; /* Standard Material Design radius */
  color: #FFFFFF; /* White text */
  background-color: #F25B5B; /* Pink background */
  border: none; /* No border needed for Material Design */
  box-shadow: 0 3px 6px rgba(0,0,0,0.2), 0 1px 3px rgba(0,0,0,0.14); /* Slightly smaller shadows */
  cursor: pointer; /* Pointer cursor for clicks */
  transition: background-color 0.3s ease, box-shadow 0.3s ease; /* Smooth transition */
  position: relative; /* Positioning for ripple effect */
  overflow: hidden; /* Clip overflow for ripple effect */
  text-align: center; /* Center text horizontally */
  line-height: 1.8; /* Adjusted line-height for vertical centering */
  display: inline-block; /* Ensure the button size adjusts to content */
  vertical-align: middle; /* Align vertically with adjacent elements if needed */
}

/* Hover State */
.button:hover {
  background-color: #D24A4A; /* Darker pink for hover */
  box-shadow: 0 4px 8px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.24); /* Elevated shadow on hover */
}

/* Active State */
.button:active {
  background-color: #B33B3B; /* Even darker pink for active state */
  box-shadow: 0 3px 6px rgba(0,0,0,0.2), 0 1px 3px rgba(0,0,0,0.14); /* Shadow for pressed effect */
}

/* Ripple Effect */
.button::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3); /* Ripple color */
  transition: width 0.3s, height 0.3s, opacity 0.3s;
  pointer-events: none; /* Ignore pointer events */
  width: 60px; /* Initial size of the ripple */
  height: 60px;
  opacity: 0;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.button:focus::after, .button:active::after {
  width: 200px; /* Ripple expands */
  height: 200px;
  opacity: 1; /* Ripple visible */
  transition: width 0s, height 0s, opacity 0s; /* Instant ripple expansion */
}


.cases {
  margin-top:20px;
}

.appdescr {
  margin-bottom: 32px;
}

.appdescr h2{
  margin-bottom: 8px;
}

#heiho{
  margin-top: 15vh;
}

#about {
  margin-top: 15vh
}

#aboutcontent {
  display:grid;
  grid-template-columns: 1fr 1fr;
  grid-column-gap: 64px;
  margin-bottom: 60px;
  text-align: justify;
}

#contenttext h2{
  margin-bottom: 48px;
}



#tinyme {
  width: 100%;
  height: auto;
  margin-bottom: 48px;
}

#portrait {
  text-align: center;
}

#aboutbuttons {
  display: flex;
  justify-content: center;
}

#aboutbuttons .button{
  margin-left: 16px;
  margin-right: 16px;
  margin-bottom: 20px;
}

#aboutright {
  display: flex;
  flex-direction: column;
}

footer {
}



#contactlist li {
  display: inline;
  margin: 32px;
  vertical-align: middle;
}

#contactlist li::before{
  content:"";
}

#contactlist {
  text-align: center;
}

.icons {
  width:40px;
  height: auto;
}

#caseall {
    margin-top: 15vh;
    height:80vh;
    background: -webkit-linear-gradient(285deg, transparent 25%, #6F2ED6 25.1%);

}

#casestitle {
  margin-top: 8vh;
  height:25vh;
}

#caserightland {
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#casestitle h2 {
  font-size: 48px;
  margin-bottom: 8px;
  font-weight: 400;
  line-height: 1.5em;
}


#casescroll h3 {
  margin-left: 64px;
  margin-bottom: 40px;
}




#casemockup {
  display: flex;
  align-items: center;
}

#casemockup img {
  width: 20vh;
}

#casemockupmira {
  display: flex;
  align-items: center;
}


#casemain {
    padding-top: 8vh;
    padding-bottom: 8vh;
}

.casesrightwindow {
  display:grid;
  grid-template-columns: 2fr 1fr;
  grid-gap: 64px;
}

#square {
  align-self: center;
  width: 100%;
  padding: 32px;
}


#square li {
  margin-bottom: 16px;
}

.supersentence {
  width: 100%;
  padding: 32px;
}



.bitbacksentence {
  font-size: 24px;
  font-weight: 600px;
  line-height: 32px;
}

.twoimages {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}

.twoimages img{
  max-height: 300px;
  max-width: 500px;
  margin:10px;
  height: auto;
  width: auto;
  border-radius: 12px;
}

.bigger img{
  height: 500px;
  width: auto;
}

.imageswithfooter {
  display: flex;
  flex-direction: column;
  align-items: center;
  width:100%;
}

.oneimage {
  width: 80%;
}

.oneimagesmall {
  width: 60%;
}

.oneimagesmall img{
  width: 100%;
}

.oneimage img {
  width: 100%;
}

.footer {
  font-size: 16px;
}

.bulletpoints {
  list-style: none;
  list-style-position: inside;
}

.boscpoints {
  list-style: none;
  list-style-position: inside;
}

.bulletpoints li{
  margin-bottom: 20px;
}

.bulletpoints li:last-child{
  margin-bottom: 0;
}

.boscpoints li{
  margin-bottom: 20px;
}

.boscpoints li:last-child{
  margin-bottom: 0;
}

.holapoints li{
  margin-bottom: 20px;
}

.holapoints li:last-child{
  margin-bottom: 0;
}

.endingline {
  margin-bottom: 0;
}

.lang-badge {
  position: fixed;
  top: 1rem;
  left: 1rem;
  font-family: "fontsecondary", serif;
  color: #39393A;
  cursor: pointer;
  z-index: 999;
  font-size: 12px;
}

.lang-badge .lang-selected {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lang-badge img {
  width: 24px;
  height: auto;
  display: inline-block;
  border-radius: 4px;
}


/* Dropdown ocult per defecte */
.lang-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
  background: var(--color-bg, #fff);
  border: 1px solid #ccc;
  border-radius: 6px;
  display: none;
  min-width: 80px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.lang-dropdown li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
}

.lang-dropdown li:hover {
  background-color: rgba(245, 182, 66, 0.18); /* Golden Amber translúcid */
}

.lang-dropdown img {
  transition: filter 0.25s ease, transform 0.2s ease;
}

.lang-dropdown li:hover img {
  filter: saturate(0.85) brightness(0.95);
  transform: translateY(-1px);
}

/* Mostrar dropdown al hover del badge */
.lang-badge:hover .lang-dropdown {
  display: block;
}

.lang-dropdown::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.08;
  pointer-events: none;
  mix-blend-mode: multiply;
}



/* Responsiveness */

@media screen and (max-width: 1024px) {

  #logofull {
    justify-content: center;
  }


  #presentation{
      grid-template-columns: 1fr;
      margin-top: 96px;
      height: auto;
      margin-left: 24px;
      margin-right: 24px;

  }

  #maintitle{
    margin-bottom: 96px;
  }


  #works {
    grid-template-columns: 1fr;
    margin-left: 24px;
    margin-right: 24px;

  }

  .workscontent {
    grid-template-columns: 1fr;
  }

  #heiho{
    margin-top: 3vh;
  }

  #about {
    display:grid;
    grid-template-columns: 1fr;
    width:auto;
  }

  #aboutcontent {
    grid-template-columns: 1fr;
    width:auto;
    margin-left: 24px;
    margin-right: 24px;
  }

  #contenttext {
    width:auto;
    margin-top: 8vh;
  }

  #aboutbuttons .button {
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 20px;
    width: 120px;
}

#aboutbuttons {
    justify-content: space-between;
}

  #aboutright {
    flex-direction: column-reverse;

  }

  #aboutcontent {
    margin-bottom: 32px;
    }

  footer {
  }

  .content{
  }

  #contactlist li {
    margin: 8px;
  }

  #allcases{
    height: auto;
  }

  #top{
    margin-top: 20px;
    grid-template-columns: 1fr;
    position: relative;
    margin-left: 24px;
    margin-right: 24px;
    width: auto;
    height: auto;
  }

  #logo img {
    width: 60px;
    height: 60px;
}

  #name {
  font-size: 18px;
  }

  #menu {
    width: 100%;
    justify-content: space-between;
    font-size: 20px;
    margin-top: 20px;

}

.menuitem {
}

#upperbar {
  display: block;

  }

#square div {
  margin-left: 24px;
}



#casemockup{
  margin-left: 24px;
  margin-top: 24px;
  margin-right: 24px;
}

#casemockup img{
  width:70%;
}

#casemockup div{
  text-align: center;
}

#caserightland{
  margin:24px;
  text-align: left;
}

#casescroll h3 {
  margin-left: 0px;
  margin-bottom: 0px;
}

#casemain {
    padding-top: 3vh;
    padding-bottom: 3vh;
    grid-template-columns: 1fr;
}

.casesrightwindow {
    display: block;
}


#square {
    padding: 20px 0 20px 0;
}


#square ul{
  margin-left: 24px;
  margin-right: 24px;
}

#text1 {
  padding-bottom: 20px;
  padding-top: 20px;
  margin-left: 24px;
  margin-right: 24px;
}

.supersentence{
  padding: 24;
  margin-left: 24px;
  margin-right: 24px;
  width:auto;
}


.uniquebox{
  margin-left: 24px;
  margin-right: 24px;
}

.twoimages {
  flex-direction: column;
  margin-left: 24px;
  margin-right: 24px;
  text-align: center;
}

.twoimages img{
  max-width:100%;
  max-height:100%;
}

.footer {
    font-size: 14px;
    line-height: 20px;
}

.imageswithfooter iframe{
  width:70%;
  height: 600px;
}

.oppositebg {
    background: none;
  }


  #casestitle {
    margin-left: 24px;

    .lang-badge {
      position: relative; /* dins del flux del main*/
      display: flex;
      justify-content: center; /* centrat horitzontalment*/
      align-items: center;
      gap: 0.4rem;
      padding: 1rem;
      margin-top: 2rem;
      z-index: 1000; /* per sobre del contingut*/
    }

    .lang-badge img {
      width: 44px; /* doble mida respecte desktop*/
      height: auto;
      display: inline-block;
    }

    /* Dropdown inicialment ocult*/
    .lang-badge .lang-dropdown {
      display: none; /* desapareix per defecte*/
      position: absolute;
      top:auto;
      bottom: 100%; /* surt cap a dalt del botó*/
      left: 50%;    /* centrat horitzontalment respecte la badge*/
      transform: translateX(-50%);
      flex-direction: column;
      gap: 0.8rem;
      background: var(--color-bg);
      padding: 0.5rem 1rem;
      border-radius: 8px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.25);
      z-index: 1001; /* per sobre de tot*/
    }

    .lang-badge .lang-dropdown li {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      cursor: pointer;
      padding: 0.3rem 0;
    }

    .lang-badge .lang-dropdown img {
      width: 44px;
      height: auto;
    }

    /* Toggle sense hover: mostrem al tocar*/
    .lang-badge:active .lang-dropdown,
    .lang-badge:focus-within .lang-dropdown {
      display: flex;
    }
  }


}
