/* xl - DESKTOP STYLES */ 
/* VARIABLES */
:root {
  --brown-dark:   #5C3D28;
  --brown-corp:   #8B6245;
  --brown-light:  #A67C5B;
  --brown-pale:   #C4A882;
  --sand:         #DDD0BC;
  --parchment:    #EDE4D5;
  --cream:        #F7F2EA;
  --warm-white:   #FBF8F3;
  --charcoal:     #1E1A17;
}

/* BASE */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--warm-white);
  color: var(--charcoal);
  overflow-x: hidden;
}

/* NAV */
#nav-principal {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 0 48px;
  height: 96px;
  background: rgba(92, 61, 40, 0.96);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(196, 168, 130, 0.18);
}

.nav-logo img {
  height: 96px;
  width: auto;
  display: block;
}

/* NAV LINKS */
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  list-style: none;
  margin: 0; padding: 0;
}

.nav-links li {
  list-style: none;
}

.nav-links a {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--sand);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s;
}

.nav-links a:hover { color: var(--sand); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* IDIOMES */
.nav-idiomes {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.lang-btn {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(196,168,130,0.45);
  text-decoration: none;
  padding: 4px 8px;
  border: 1px solid rgba(196,168,130,0.2);
  transition: all 0.2s;
}

.lang-btn:hover,
.lang-btn.active {
  color: var(--sand);
  border-color: var(--sand);
}

/* HAMBURGUESA - ocult a desktop */
.nav-toggle { display: none; }

/* TABLET I MÒBIL */
@media (max-width: 1370px) {
  #nav-principal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    position: fixed;
  }

  /* Menú desplegable */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: -24px;
    right: -24px;
    min-height: calc(100vh - 80px); 
    background: rgba(46, 28, 14, 0.98);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 16px 0 40px;
    gap: 0;
    z-index: 99;
    overflow-y: auto;
    border-top: 1px solid rgba(196,168,130,0.12);
  }

  #nav-principal {
    overflow: visible;
  }

  #nav-principal.nav-open .nav-links {
    display: flex;
	padding:25px;
	height:auto;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 16px 32px;
    width: 100%;
    font-size: 12px;
    letter-spacing: 3px;
    border-bottom: 1px solid rgba(196,168,130,0.07);
    color: #fff;
  }

  .nav-links a:hover {
    color: var(--sand);
    background: rgba(196,168,130,0.05);
  }

  .nav-links a::after { display: none; }

  /* Idiomes: ocults al nav, visibles al fons del dropdown */
  .nav-idiomes { display: none; }

  #nav-principal.nav-open .nav-idiomes {
    display: flex;
    position: absolute;
    top: calc(100vh - 70px);
    left: -24px;
    right: -24px;
    padding: 18px 32px;
    background: rgba(36, 22, 10, 0.99);
    border-top: 1px solid rgba(196,168,130,0.15);
    z-index: 100;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
	justify-content: center;
  }

  #nav-principal.nav-open .nav-links {
    padding-bottom: 80px;
  }

  /* Botó hamburguesa */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 4px;
    z-index: 101;
  }

  .nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--sand);
    transition: transform 0.3s ease, opacity 0.2s ease;
    transform-origin: center;
  }

  /* Animació X quan obert */
  #nav-principal.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }
  #nav-principal.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  #nav-principal.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }
}

