/* ==========================================================================
   SECTIONS — Hero, Nosotros, Productos, Testimonios, CTA, Contacto
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. HERO
   -------------------------------------------------------------------------- */
#home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 5rem;
  /* Imagen con overlay oscuro para contraste de texto */
  background:
    linear-gradient(rgba(0, 0, 0, 0.44), rgba(0, 0, 0, 0.44)),
    url('../img/hero-bg.jpg') center / cover no-repeat;
  /* Color de fallback mientras carga la imagen */
  background-color: #9e8b7a;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 300;
  text-transform: uppercase;
  font-size: clamp(3rem, 7vw, 6.5rem);
  letter-spacing: 0.04em;
  line-height: 1.08;
  color: var(--white);
  max-width: 920px;
  margin-bottom: 3.5rem;
}


/* --------------------------------------------------------------------------
   2. NOSOTROS
   -------------------------------------------------------------------------- */
#nosotros {
  background:
    linear-gradient(rgba(245, 232, 224, 0.87), rgba(245, 232, 224, 0.87)),
    url('../img/hero-bg.jpg') center / cover no-repeat;
  background-color: var(--pink-bg);
  padding-bottom: var(--space-xxl);
}

/* Línea divisoria decorativa entre el nav y la sección */
.divider {
  width: 100%;
  height: 1px;
  background: rgba(44, 37, 32, 0.22);
  margin-bottom: 5rem;
}

/* Layout de dos columnas: imagen izquierda, texto derecha */
.nosotros-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

/* Contenedor de imagen con aspect ratio preservado */
.nosotros-img {
  background: #e8d5cc;
  min-height: 500px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nosotros-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

/* Placeholder visual cuando no hay imagen disponible */
.img-placeholder {
  width: 100%;
  height: 500px;
  background: #e2cdc3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: #9e8070;
  text-transform: uppercase;
}

/* Bloque de texto "¿Quién soy?" */
.nosotros-text h2 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 400;
  margin-bottom: 2rem;
}

/* Párrafo destacado / lead */
.nosotros-text .lead {
  font-size: 0.88rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.85;
  margin-bottom: 1.6rem;
  color: var(--dark);
}

/* Párrafos regulares */
.nosotros-text p {
  font-size: 0.88rem;
  line-height: 1.9;
  color: var(--text-body);
  margin-bottom: 1.1rem;
}


/* --------------------------------------------------------------------------
   3. PRODUCTOS
   -------------------------------------------------------------------------- */
#productos {
  padding: var(--space-xxl) var(--space-xl);
  background:
    linear-gradient(rgba(240, 238, 235, 0.92), rgba(240, 238, 235, 0.92)),
    url('../img/hero-bg.jpg') center / cover no-repeat;
  background-color: var(--gray-bg);
}

/* Grid de 4 columnas en desktop */
.products-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* Tarjeta de producto */
.product-card {
  background: var(--white);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-sm);
  overflow: hidden;
  /* Transición sutil de elevación al hover */
  transition: box-shadow var(--transition-normal);
}

.product-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Área de imagen del producto */
.product-img {
  height: 220px;
  background: #ece8e4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b0a090;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  overflow: hidden;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-img img {
  transform: scale(1.03);
}

/* Información del producto */
.product-info {
  padding: 1.4rem 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  text-align: center;
}

.product-name {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
}

.product-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}


/* --------------------------------------------------------------------------
   4. TESTIMONIOS
   -------------------------------------------------------------------------- */
#testimonios {
  padding: var(--space-xxl) var(--space-xl);
  background:
    linear-gradient(rgba(243, 238, 233, 0.88), rgba(243, 238, 233, 0.88)),
    url('../img/hero-bg.jpg') center / cover no-repeat;
  background-color: var(--testimonios-bg);
}

/* Cabecera alineada a la derecha — contraste visual con el grid centrado */
.testimonios-header {
  max-width: 1200px;
  margin: 0 auto 4rem;
  text-align: right;
}

.testimonios-header h2 {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.1;
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  color: var(--dark);
}

/* Grid de 2 columnas con offset para el avatar */
.testimonios-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

/* Wrapper que genera el espacio superior para que el avatar sobresalga */
.testimonio-wrap {
  padding-top: 44px;
}

/* Tarjeta de testimonio */
.testimonio-card {
  background: rgba(255, 255, 255, 0.93);
  border-radius: var(--radius-md);
  padding: 1rem 2rem 2rem;
  text-align: center;
  position: relative;
}

/* Avatar circular flotante sobre la tarjeta */
.testimonio-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #d4b8ac;
  border: 3px solid var(--white);
  overflow: hidden;
  position: absolute;
  top: -44px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.testimonio-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder de avatar con inicial del cliente */
.avatar-placeholder {
  width: 100%;
  height: 100%;
  background: #c9a898;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--white);
  font-family: var(--serif);
  /* El aria-hidden se aplica en el HTML; esto es decorativo */
  user-select: none;
}

/* Estrellas de valoración */
.stars {
  color: var(--brown);
  font-size: 1rem;
  letter-spacing: 0.25em;
  margin: 2.4rem 0 1.1rem;
  /* aria-hidden en el HTML, la valoración debe tener texto alternativo */
}

/* Cita del testimonio */
.testimonio-card p {
  font-size: 0.84rem;
  line-height: 1.8;
  color: var(--text-body);
  font-style: italic;
}


/* --------------------------------------------------------------------------
   5. CTA (Call To Action)
   -------------------------------------------------------------------------- */
#cta {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xxl) 2rem;
  background:
    linear-gradient(rgba(0, 0, 0, 0.30), rgba(0, 0, 0, 0.30)),
    url('../img/hero-bg.jpg') center center / cover no-repeat;
  background-color: #b0a090;
}

.cta-title {
  font-family: var(--serif);
  font-weight: 300;
  text-transform: uppercase;
  font-size: clamp(2.8rem, 6.5vw, 5.5rem);
  letter-spacing: 0.05em;
  line-height: 1.12;
  color: var(--white);
  max-width: 900px;
}


/* --------------------------------------------------------------------------
   6. CONTACTO
   -------------------------------------------------------------------------- */
#contacto {
  padding: var(--space-xxl) var(--space-xl);
  background: var(--white);
}

/* Columna central estrecha para el formulario */
.contacto-inner {
  max-width: 580px;
  margin: 0 auto;
  text-align: center;
}

.contacto-inner h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  margin-bottom: 0.5rem;
}

/* Subtítulo descriptivo bajo el título */
.contacto-inner .sub {
  font-size: 0.82rem;
  color: var(--text-subtle);
  letter-spacing: 0.06em;
  margin-bottom: 2.5rem;
}

/* Formulario de contacto */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border: 1px solid #ddd;
  background: var(--gray-bg);
  font-family: var(--sans);
  font-size: 0.84rem;
  color: var(--dark);
  outline: none;
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast);
  /* Accesibilidad: cambio de borde en foco evita depender solo del outline */
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--brown);
  /* Sombra sutil de foco para mayor visibilidad */
  box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.12);
}

.contact-form textarea {
  resize: vertical;
  min-height: 130px;
}

/* Botón de envío */
.btn-submit {
  align-self: center;
  background: var(--dark);
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 1rem 2.8rem;
  border: none;
  cursor: pointer;
  transition: background var(--transition-normal);
  margin-top: 0.5rem;
  border-radius: var(--radius-sm);
  /* Área de toque accesible */
  min-height: 44px;
}

.btn-submit:hover,
.btn-submit:focus-visible {
  background: var(--brown);
}
