/* =======================
   HEADER BASE STYLES
======================= */
header {
  background-color: #fff4e3;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 10px 0;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo img {
  height: 160px;
  width: auto;
}

header::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background-color: #630e04;
  position: absolute;
  bottom: 0;
  left: 0;
}

/* NAV siempre en fila */
nav ul {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  list-style: none;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0;
}

nav ul li a {
  text-decoration: none;
  color: #ffffff;
  font-weight: 600;
  font-size: 1.2rem;
  padding: 12px 20px;
  border-radius: 8px;
  background-color: #630e04;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  display: inline-block;
  white-space: nowrap;
  position: relative;
}

nav ul li a:hover {
  color: #fff;
  background-color: #c46d5e;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

nav ul li a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background-color: #fff;
  transition: width 0.3s ease;
}

nav ul li a:hover::after {
  width: 80%;
}

body {
  padding-top: 160px;
}

/* Redes sociales */
.header-social {
  display: flex;
  gap: 15px;
  align-items: center;
}

.header-social .social-link {
  color: #333;
  font-size: 2rem;
  transition: color 0.3s, transform 0.3s;
}

.header-social .social-link:hover {
  transform: scale(1.3);
}

.header-social .social-link:nth-child(1):hover { color: #25d366; } /* WhatsApp */
.header-social .social-link:nth-child(2):hover { color: #e1306c; } /* Instagram */
.header-social .social-link:nth-child(3):hover { color: #d44638; } /* Email */

/* =======================
   HEADER RESPONSIVE CORREGIDO
======================= */

/* Extra Small Devices: 0px – 479px */
@media (max-width: 479px) {
  .header-container {
    flex-direction: row;
    flex-wrap: wrap;       
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
  }

  .logo img { height: 80px; }

  .header-social {
    display: flex;
    gap: 15px; /* más espacio entre iconos */
    align-items: center;
  }

  .header-social .social-link { font-size: 2rem; } /* iconos más grandes */

  nav {
    width: 100%;
    order: 2;             
    margin-top: 5px;
  }

  nav ul {
    justify-content: space-between;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  nav ul li a {
    font-size: 0.8rem;
    padding: 5px 8px;
  }

  body { padding-top: 120px; }
}

/* Small Devices: 480px – 767px */
@media (min-width: 480px) and (max-width: 767px) {
  .header-container {
    flex-direction: row;
    flex-wrap: wrap;       
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
  }

  .logo img { height: 100px; }
  .header-social {
    gap: 18px; 
  }
  .header-social .social-link { font-size: 2.2rem; } /* iconos más grandes */

  nav {
    width: 100%;
    order: 2;
    margin-top: 5px;
  }

  nav ul {
    justify-content: space-between;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  nav ul li a {
    font-size: 0.9rem;
    padding: 6px 10px;
  }

  body { padding-top: 140px; }
}

/* Medium Devices: 768px – 1023px */
@media (min-width: 768px) and (max-width: 1023px) {
  .header-container {
    flex-direction: row;
    flex-wrap: wrap;   
    justify-content: space-between;
    align-items: center;
  }

  .logo img { height: 120px; }
  .header-social {
    gap: 20px;
  }
  .header-social .social-link { font-size: 2.4rem; } /* iconos más grandes */

  nav {
    width: 100%;
    order: 2;
    margin-top: 8px;
  }

  nav ul {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  nav ul li a {
    font-size: 1rem;
    padding: 8px 12px;
  }

  body { padding-top: 150px; }
}
