/* FONTS */
@font-face {
    font-family: 'fonttitle';
    src: url('fonts/amarante-regular-webfont.woff2') format('woff2'),
         url('fonts/amarante-regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'fontsecondary';
    src: url('fonts/notosans-light-webfont.woff2') format('woff2'),
         url('fonts/notosans-light-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'fontprimary';
    src: url('fonts/notoserif-medium-webfont.woff2') format('woff2'),
         url('fonts/notoserif-medium-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}

/* COLORS */

:root {
--color-bg: #1C2238;
--color-highlight: #F2A6A6;
--color-text: #F6F4EF;
--color-neutral:#B8B9B5;
}

/* COSES MAIN */

html {
  scroll-behavior: smooth;
}


body {
color: var(--color-text);
font-family: "fontsecondary";
margin: 0;
padding: 0;
position: relative; /* IMPORTANT: permet que absolute funcioni bé */
min-height: 100%; 
overflow-x: hidden;
}

#main-landing {
  transition: background-color 0.5s ease; /* suau transició */
  background-color: var(--color-bg);
}

/* TOP BAR AND MENU */



#topbar {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 4rem;
  flex-direction: column;
  
}

header a{
  text-decoration: none ;
}

.logo {
  font-family: "fonttitle";
  font-size: 3rem;
  letter-spacing: 0.2em;
  margin-top: 1rem;
  color:var(--color-highlight);
}

#writerline {
  margin-top: 1rem;
  margin-bottom: 1rem;
  border-top: #F2A6A6 solid 1px;
  width: 50%;
}

.hero-menu {
display: flex;
justify-content: space-between;
font-size: 2rem;
font-weight: 500;
color: var(--color-highlight);
width:60%;
font-family: "bely-display", serif;
font-size: 1.5rem;
}


.hero-menu a {
text-decoration: none;
color: var(--color-highlight);
}

.hero-menu a:hover {
    color:#FFD4D4;
    transform: translateY(-2px);
    background: rgba(245, 182, 66, 0.2);
    box-shadow: 0 0 18px rgba(242, 166, 166, 0.45);
}

/* SECCIONS GENERALS */

.writersection {
  position: relative;
    padding: 2rem;
    margin-left: 4rem;
    margin-right: 4rem;
    margin-bottom: 4rem;
    z-index: 3;
    text-align: justify;
}

/* SECCIÓ opening landing */

#writeropening {
  margin-top: 8rem;
}


#frasellibre {
  font-family: "fontprimary", serif;
  color: var(--color-text);
  margin-bottom: 2rem;
  font-size: 1.5rem;
  text-align: justify;
  line-height: 3rem;

}
#firmafrase {
  text-align: right;
}

  /* Secció presentació */
  
   .valla-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-top: 4rem;
  }
  
  
  .valla-text {
    flex: 2;
    
  }


  /* Imatge */
  .valla-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;

  }

  .valla-image img {
    width: 600px;
    border-radius: 12px;
    display: block;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  }


  .btn-presave {
      display: inline-block;
      background-color: var(--color-highlight);
      color: var(--color-bg);
      font-size: 1.5rem;      /* més gran */
      padding: 1rem 2rem;     /* més gran */
      border-radius: 10px;
      font-family: "fontprimary";
      text-decoration: none;
      transition:
          transform 0.15s ease,
          background-color 0.15s ease,
          box-shadow 0.15s ease;
      margin-top: 0.5rem;
      width: 160px;
      text-align: center;
  }

  .btn-presave:hover {
      background-color: #FFD4D4;
      transform: translateY(-2px);
      box-shadow: 0 0 18px rgba(242, 166, 166, 0.45);
  }


h2 {
  font-family: "fontprimary", serif;
  color: var(--color-text);
  margin-bottom: 2rem;
  font-size: 3rem;
}

h3 {
  font-family: "fontprimary", serif;
  color: var(--color-text);
  margin-bottom: 2rem;
  font-size: 1.5rem;
  text-align: left;
  line-height: 1.6;
}

p {
line-height: 2;
font-size: 20px;
margin-bottom: 2rem;
text-indent: 4rem;
}

.ultimparagraf {
  margin-bottom: 0;
}

.noindent {
  text-indent: 0;
}

footer {
  
  background: #171C2F;
  border-top: 1px solid rgba(242,166,166,.18);
  }

.peu {
  display: flex;
  padding: 0.5rem 1rem;
  flex-direction: row;
  gap:3rem;
  padding: 2rem;
  margin-left: 4rem;
  margin-right: 4rem;
  justify-content: space-between;
  line-height: 1.6;
  }

footer p {
    color: var(--color-highlight);
    margin-bottom: 0;
    text-indent: 0;

}

footer a {
  text-decoration: none;
  color:#FFD4D4;
    transform: translateY(-2px);
}

.linksfoot {
    color:#FFD4D4;
    transform: translateY(-2px);
}

.lang-badge {
  position: fixed;
  top: 1rem;
  left: 1rem;
  font-family: "fontprimary", serif;
  color: var(--color-text);
  cursor: pointer;
  z-index: 999;
}

.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;
}

/* works */


.obres {
    display: flex;
    align-items:center;
    justify-content: flex-start;
    gap: 8rem;
    flex-direction: row; 
}

.textobres {
  width: 100%;
}


.llan-list {
    margin-top: 6rem;
    margin-bottom: 6rem;
    display: flex;
    justify-content:space-between;
    flex-direction: column;
    gap: 6rem;
}

.works-image img {
      max-width: 250px;
      height: auto;
      border-radius: 12px;
      transition: opacity 0.2s ease, transform 0.2s ease;
    }

.llan-image img {
      width:100% ;
      height: auto;
      border-radius: 12px;
      transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .llan-image img:hover {
      opacity: 1;
      transform: scale(1.1);
      border-radius: 10px;
      box-shadow: 0 0 18px rgba(242, 166, 166, 0.45);
      }


/* PRESS */

.press-list {
    margin-top: 6rem;
    margin-bottom: 6rem;
    display: flex;
    justify-content:flex-start;
    flex-direction:row;
    gap: 6rem;
}

.press {
    display: flex;
    justify-content:flex-start;
    flex-direction: column;
    text-align: center;
    width: 25%;
}

.textpress {
  width: 100%;
  text-align: justify;
}

.textpress h3{
  margin-top: 1rem;
  text-align: justify;
}


/* BIO */

.bio-writer-content {
    display: flex;
    justify-content: center;
    gap: 6rem;
    margin-top: 4rem;
  }


/* ===== RESPONSIVE: max-width 1280px ===== */
@media (max-width: 1280px) {

  main{
    display: flex;
    flex-direction:column;

  }



  .hero-menu {
  justify-content: center;
  gap:2rem;
  font-size: 1.5rem;
  }


  .valla-content{
    flex-direction: column;
  }

  .obres {
    flex-direction: column;
  }


  .llan-list > *:not(:last-child) {
    border-bottom: 1px solid #F6F4EF;
    padding-bottom: 6rem;

  }


  .btn-presave {
    display: block;
    margin: 1rem auto 0 auto; /* centra el botó*/
    text-align: center;
  }

  .press-list{
    flex-direction: column;
  }


  .press{
    width: 100%;
  }

  .bio-writer-content{
    flex-direction: column;
  }

  /* Bio*/
  .bio-section {
    margin-top: 4rem;
    width: 90%;
    max-width: 600px;
    text-align: justify;
    margin-left: auto;
    margin-right: auto;
  }

  .bio-content{
    flex-direction: column;
  }

  .valla-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;

  }

  .bio-image {
    justify-content: center;
}

  /* Footer*/
  footer {
    padding: 1rem;
    text-align: center;
  }

  footer p {
    color: var(--color-neutral);
    text-align: center;
  }


  .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;
    margin-bottom: 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;
  }

  .peu {
    flex-direction: column;
  }

}

/* Mòbil */
@media (max-width: 550px) {
    
  .writersection {
    margin-right: 0;
    margin-left: 0;
  }

  .logo{
    text-align: center;
  }

  .hero-menu{
    flex-direction: column;
    text-align: center;
  }

  .peu {
    margin-right: 0;
    margin-left: 0;
  }

  .valla-image img{
    width: 100%;
  }

}
