/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #F7F7F7;
  color: #2D2D2D;
}

/* ===== Header ===== */
header {
  position: relative;
  display: flex;
  z-index: 1000;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 70px;
  background-color: white;
  border-bottom: 2px solid #00BCD4;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 50%;
  overflow: hidden;
  flex-shrink: 1;
}

.brand-text {
  min-width: 0;
  overflow: hidden;
}

.brand-text h1 {
  font-size: clamp(0.9em, 2vw, 1.3em);
  font-weight: 700;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text .slogan {
  font-size: 0.75em;
  color: #777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo {
  height: 48px;
  width: auto;
  object-fit: contain;
}

/* ===== Nav desktop ===== */
nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

nav a {
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.88em;
  font-weight: 600;
  color: #555;
  transition: background 0.2s ease, color 0.2s ease;
}

nav a:hover {
  background-color: #e6f7f9;
  color: #00BCD4;
}

nav a.active {
  background-color: #e6f7f9;
  color: #007B9E;
  border-bottom: 2px solid #00BCD4;
  border-radius: 8px 8px 0 0;
}

nav a.btn-login {
  background-color: #00BCD4;
  color: white;
  padding: 8px 18px;
  border-radius: 8px;
  margin-left: 8px;
  font-weight: 600;
  transition: background 0.2s ease;
}

nav a.btn-login:hover {
  background-color: #009fb3;
  color: white;
}

/* ===== Hamburguesa ===== */
.hamburguesa {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 1100;
}

.hamburguesa span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #00BCD4;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.hamburguesa.activo span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburguesa.activo span:nth-child(2) {
  opacity: 0;
}
.hamburguesa.activo span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ===== Hero (index) ===== */
.hero {
  background-color: #00BCD4;
  overflow: hidden;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 50px 40px 40px;
}

.hero-texto {
  flex: 1;
  max-width: 540px;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.78em;
  font-weight: 600;
  margin-bottom: 14px;
}

.hero-texto h2 {
  font-size: 1.9em;
  font-weight: 700;
  color: white;
  line-height: 1.2;
  margin-bottom: 12px;
}

.hero-texto p {
  color: rgba(255,255,255,0.88);
  font-size: 0.95em;
  line-height: 1.6;
  margin-bottom: 24px;
}

.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-btn-primary {
  background: white;
  color: #007B9E;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9em;
  text-decoration: none;
  transition: background 0.2s;
}

.hero-btn-primary:hover { background: #e6f7f9; }

.hero-btn-secondary {
  background: transparent;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9em;
  text-decoration: none;
  border: 2px solid rgba(255,255,255,0.6);
  transition: all 0.2s;
}

.hero-btn-secondary:hover {
  border-color: white;
  background: rgba(255,255,255,0.1);
}

.hero-visual {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.hero-card {
  background: white;
  border-radius: 12px;
  padding: 14px;
  width: 130px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.hero-card-destacada {
  transform: scale(1.07);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.hero-card-ico {
  font-size: 2em;
  margin-bottom: 6px;
}

.hero-card p {
  font-size: 0.72em;
  font-weight: 600;
  color: #2D2D2D;
  margin-bottom: 6px;
}

.hero-chip {
  background: #e6f7f9;
  color: #007B9E;
  font-size: 0.65em;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}

.hero-arrow {
  font-size: 1.6em;
  color: rgba(255,255,255,0.8);
}

.hero-bottom {
  background-color: #3D6B4F;
  display: flex;
  gap: 0;
  padding: 14px 40px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  color: white;
  padding-right: 32px;
  margin-right: 32px;
  border-right: 1px solid rgba(255,255,255,0.2);
}

.hero-stat:last-child {
  border-right: none;
  padding-right: 0;
  margin-right: 0;
}

.hero-stat strong {
  font-size: 1.5em;
  font-weight: 700;
  line-height: 1;
}

.hero-stat span {
  font-size: 0.75em;
  color: rgba(255,255,255,0.75);
  margin-top: 2px;
}

/* ===== Objetos recientes (index) ===== */
.objetos-recientes {
  padding: 40px 20px 120px; /* espacio extra al fondo por el footer */
  max-width: 1200px;
  margin: auto;
}

.objetos-recientes h3 {
  margin-bottom: 20px;
  color: #00BCD4;
}

/* ===== Galería index (flex) ===== */
.objetos-recientes .galeria {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

/* ===== Tarjeta objeto ===== */
.tarjeta-objeto {
  background: white;
  padding: 15px;
  border-radius: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  width: 250px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tarjeta-objeto:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.tarjeta-objeto img {
  width: 100%;
  border-radius: 10px;
  height: 180px;
  object-fit: cover;
}

.tarjeta-objeto h3,
.tarjeta-objeto h4 {
  margin: 10px 0;
  font-size: 1.1em;
}

.tarjeta-objeto p {
  font-size: 0.9em;
  color: #666;
}

.tarjeta-objeto button {
  margin-top: 10px;
  background-color: #00BCD4;
  border: none;
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s ease;
}

.tarjeta-objeto button:hover {
  background-color: #009fb3;
}

/* ===== Footer ===== */
/* FIX: position sticky en lugar de fixed para no tapar contenido */
.footer {
  position: sticky;
  bottom: 0;
  width: 100%;
  z-index: 1000;
  background-color: #ffffff;
  text-align: center;
  padding: 15px;
  border-top: 1px solid #e0e0e0;
  color: #555;
  font-size: 0.9em;
}

/* ===== About Us ===== */
.hero-about_us {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 80px);
  background-image: url('imagenes/fondo-nosotros.jpg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gift-background {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
}

.gift-background img {
  width: auto;
  height: auto;
}

.hero-content {
  position: relative;
  z-index: 1;
  background-color: rgba(255, 255, 255, 0.85);
  padding: 40px;
  border-radius: 10px;
  text-align: center;
  max-width: 700px;
}

.hero-content h2 {
  margin-bottom: 15px;
  font-size: 1.8em;
  color: #2D2D2D;
}

.hero-content p {
  margin-bottom: 12px;
  color: #444;
  font-size: 1em;
}

.botonExplora {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background-color: rgb(236, 3, 231);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.botonExplora:hover {
  background-color: rgb(190, 2, 185);
}

/* ===== Explorar ===== */
.explorar {
  padding: 40px 20px 100px;
  max-width: 1200px;
  margin: 0 auto;
}

.search-filter {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
}

.search-input {
  width: 300px;
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1em;
}

.filter-select {
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1em;
  background-color: white;
  cursor: pointer;
}

/* FIX: galería de explorar con su propia clase de contexto */
.explorar .galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  justify-items: center;
}

/* ===== Publicar / Ofrecer / Editar Perfil ===== */
.publicar {
  padding: 40px 20px 100px;
  max-width: 600px;
  margin: 0 auto;
}

.form-section h2 {
  margin-bottom: 30px;
  color: #00BCD4;
  text-align: center;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.form-input,
.form-textarea,
.form-select,
.file-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1em;
  font-family: inherit;
}

.form-textarea {
  resize: vertical;
}

.file-input {
  padding: 6px;
}

.form-button {
  display: block;
  width: 100%;
  padding: 12px 0;
  background-color: #00BCD4;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s ease;
}

.form-button:hover {
  background-color: #009fb3;
}

/* Contexto del objeto en ofrecer.html */
.objeto-destino {
  background-color: #e6f7f9;
  border-left: 4px solid #00BCD4;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 0.95em;
  color: #333;
}

/* ===== Mi Perfil ===== */
.perfil {
  padding: 40px 20px 100px;
  max-width: 1200px;
  margin: 0 auto;
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 30px;
  background-color: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #00BCD4;
}

.profile-info .info h2 {
  margin-bottom: 8px;
}

.profile-info .info p {
  margin-bottom: 6px;
  color: #555;
}

.edit-profile {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 16px;
  background-color: #00BCD4;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.edit-profile:hover {
  background-color: #009fb3;
}

.profile-stats {
  display: flex;
  justify-content: space-between;
  margin: 30px 0;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2em;
  color: #00BCD4;
  font-weight: bold;
}

.stat-label {
  color: #555;
}

.mis-objetos h2 {
  margin-bottom: 20px;
  color: #00BCD4;
}

.mis-objetos .galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

/* ===== RESPONSIVE / MENÚ HAMBURGUESA ===== */

/* ===== Tablet (max 900px) ===== */
@media (max-width: 900px) {
  .brand-text .slogan {
    display: none;
  }

  nav a {
    padding: 8px 8px;
    font-size: 0.82em;
  }

  nav a.btn-login {
    padding: 8px 12px;
  }
}



/* ===== Móvil (max 680px) ===== */
@media (max-width: 680px) {
  header {
    flex-wrap: wrap;
    padding: 15px;
    position: relative;
  }

  .brand {
    flex: 1;
  }

  .logo {
    height: 45px;
  }

  .brand-text h1 {
    font-size: 1em;
  }

  .brand-text .slogan {
    display: none;
  }

  .logo {
    height: 36px;
  }

  /* Mostrar botón hamburguesa */
  .hamburguesa {
    display: flex;
  }

  /* Nav se convierte en menú desplegable */
  nav {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: white;
    border-top: 1px solid #e0e0e0;
    padding: 10px 0;
    margin-top: 10px;
  }

  nav.abierto {
    display: flex;
  }

  nav a {
    margin: 0;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1em;
    color: #2D2D2D;
  }

  nav a:last-child {
    border-bottom: none;
  }

  nav a.active {
    border-bottom: 1px solid #f0f0f0;
    border-left: 4px solid #00BCD4;
    color: #007B9E;
  }

  nav a.btn-login {
    margin: 10px 20px;
    text-align: center;
    border-radius: 8px;
    border-bottom: none;
  }

  /* Hero responsive */
  .hero-top {
    flex-direction: column;
    padding: 30px 20px 24px;
    text-align: center;
  }

  .hero-btns {
    justify-content: center;
  }

  .hero-visual {
    justify-content: center;
  }

  .hero-bottom {
    padding: 14px 20px;
    justify-content: space-around;
  }

  .hero-stat {
    padding-right: 0;
    margin-right: 0;
    border-right: none;
    text-align: center;
  }

  .hero-texto h2 {
    font-size: 1.4em;
  }

  /* Tarjetas full width en móvil */
  .tarjeta-objeto {
    width: 100%;
    max-width: 340px;
  }

  /* Search filter en columna */
  .search-filter {
    flex-direction: column;
    align-items: center;
  }

  .search-input {
    width: 100%;
    max-width: 340px;
  }

  /* Perfil en columna */
  .profile-info {
    flex-direction: column;
    text-align: center;
  }

  .profile-stats {
    gap: 10px;
  }

  /* Hero about us */
  .hero-content {
    padding: 24px;
    margin: 20px;
  }

  .hero-content h2 {
    font-size: 1.3em;
  }
}
