:root {
 --earth-900: #3b2619;      
  --earth-700: #5a3a29;      
  --earth-500: #9c5f44;      
  --terracotta: #c0724f;      
  --earth-300: #c89a7a;     
  --sand-100: #f5e6d8; 
}

body {
  font-family: 'Inter', sans-serif;
  color: #2f2a25;
  background-color: #6b442d;
  scroll-behavior: smooth;
}

h1,
h2,
h3,
.navbar-brand {
  font-family: 'Playfair Display', serif;
}

.section-space {
  padding: 5rem 0;
}

.rustic-navbar {
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
  background: linear-gradient(90deg, rgba(45, 34, 24, 0.9), rgba(93, 67, 48, 0.88));
}

.rustic-navbar.scrolled {
  background: rgba(45, 34, 24, 0.97);
  box-shadow: 0 6px 20px rgba(20, 14, 10, 0.3);
}

.hero-section {
  min-height: 100vh;
  padding-top: 6rem;
  color: #fff;
  background: linear-gradient(120deg, rgba(33, 26, 18, 0.9), #634835c7),
    url('../assets/images/f1.jpg') center/cover no-repeat;
}

.hero-image-wrap {
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

.hero-image {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
}

.btn-terracota {
  background-color: var(--earth-500);
  border-color: var(--earth-500);
  color: #181010;
}

.btn-terracota:hover,
.btn-terracota:focus {
  background-color: var(--earth-700);
  border-color: var(--earth-700);
  color: #fff;
}

.rustic-quote {
  border-left: 4px solid var(--earth-300);
  padding-left: 1rem;
  color: #4b4037;
}

.rustic-card {
  border-radius: 1rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.rustic-card img {
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rustic-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 25px rgba(45, 34, 24, 0.12) !important;
}

.rustic-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem;
}

.rustic-card .card-text {
  text-align: justify;
  flex: 1;
}

.preview-trigger {
  width: 100%;
  height: 300px;
  overflow: hidden;
  position: relative;
  display: block;
}

.footer-rustic {
  background-color: var(--earth-900);
}

.form-control:focus {
  border-color: var(--earth-500);
  box-shadow: 0 0 0 0.25rem rgba(140, 101, 71, 0.2);
}

@media (max-width: 767px) {
  .section-space {
    padding: 3.6rem 0;
  }

  .hero-section {
    min-height: auto;
    padding-top: 6.8rem;
    padding-bottom: 3rem;
  }
}

/* ================================================================
   MEJORAS VISUALES Y FUNCIONALES - NUEVAS
   ================================================================ */

/* MARCA DE AGUA EN SECCIÓN SOBRE */
.about-section-watermark {
  position: relative;
  overflow: hidden;
}

.about-section-watermark::before {
  content: '';
  position: absolute;
  inset: 0; /* reemplaza top, left, right, bottom */
  
  background-image: url('../assets/images/f8.webp');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;

  opacity: 0.4; /* 🔥 CLAVE: baja opacidad */
  
  filter: grayscale(100%); /* opcional elegante */
  
  pointer-events: none;
  z-index: 0;
}

.about-section-watermark .container {
  position: relative;
  z-index: 1;
}

/* ESTILOS DEL MODAL DE BIOGRAFÍA */
.bio-modal-content {
  background-color: #7d6354ec;
  border: 1px solid rgba(181, 95, 65, 0.2);
  border-radius: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  animation: modalFadeIn 0.4s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.author-modal-image {
  max-width: 300px;
  margin: 0 auto;
  transition: transform 0.3s ease;
}

.author-modal-image:hover {
  transform: scale(1.02);
}

.bio-modal-content-text {
  max-height: 500px;
  overflow-y: auto;
  padding-right: 10px;
}

.bio-modal-content-text::-webkit-scrollbar {
  width: 6px;
}

.bio-modal-content-text::-webkit-scrollbar-track {
  background: #b55f41;
  border-radius: 10px;
}

.bio-modal-content-text::-webkit-scrollbar-thumb {
  background: #b55f41;
  border-radius: 10px;
}

.bio-modal-content-text::-webkit-scrollbar-thumb:hover {
  background: #8b4533;
}

.custom-close-btn {
  font-size: 1.5rem;
  color: #3f281b;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.custom-close-btn:hover {
  opacity: 1;
}

.modal-backdrop.show {
  animation: backdropFadeIn 0.3s ease-out;
}

@keyframes backdropFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.5;
  }
}

/* MEJORAS EN NAVBAR CON TRANSICIONES SUAVES */
.navbar-nav .nav-link {
  position: relative;
  transition: color 0.3s ease-in-out;
  font-weight: 500;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--terracotta);
  transition: all 0.3s ease-in-out;
  transform: translateX(-50%);
}

.navbar-nav .nav-link:hover {
  color: var(--terracotta) !important;
}

.navbar-nav .nav-link:hover::after {
  width: 100%;
}

.navbar-nav .nav-link.active {
  color: var(--terracotta) !important;
}

.navbar-nav .nav-link.active::after {
  width: 100%;
}

/* EFECTO DE SOMBRA EN NAVBAR AL HACER SCROLL */
.rustic-navbar {
  transition: all 0.3s ease-in-out;
  box-shadow: none;
}

.rustic-navbar.shadow-on-scroll {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* MEJORAS EN FORMULARIO DE CONTACTO */
.form-control {
  transition: all 0.3s ease-in-out;
  border: 1px solid #a0a4a9;
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

.form-control:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 0.2rem rgba(181, 95, 65, 0.15);
  transform: translateY(-2px);
}

.form-label {
  font-weight: 600;
  color: #3f281b;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.form-control:focus + .form-label,
.form-control:focus ~ .form-label {
  color: var(--terracotta);
}

.form-control.is-invalid {
  border-color: #dc3545;
}

.form-control.is-invalid:focus {
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

/* ANIMACIÓN DE ENVÍO EN BOTÓN */
.btn-terracota {
  transition: all 0.3s ease-in-out;
  position: relative;
  overflow: hidden;
}

.btn-terracota::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: hsla(0, 77%, 15%, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-terracota:active::before {
  width: 300px;
  height: 300px;
}

/* VALIDACIÓN VISUAL DE CAMPOS */
.form-control.is-valid {
  border-color: #a67e66;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
  padding-right: calc(1.5em + 0.75rem);
}

.form-control.is-valid:focus {
  border-color: #9fa7a1;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
}

/* RESPONSIVE MEJORADO */
@media (max-width: 992px) {
  .navbar-nav .nav-link::after {
    display: none;
  }
  
  .navbar-nav .nav-link:hover {
    padding-left: 1rem;
  }
  
  .author-modal-image {
    max-width: 250px;
  }
}

@media (max-width: 576px) {
  .bio-modal-content-text {
    max-height: 400px;
    font-size: 0.95rem;
  }
  
  .modal-dialog {
    margin: 0.5rem;
  }
  
  .form-control {
    padding: 0.6rem 0.8rem;
    font-size: 16px;
  }
}

/* Botón Comprar - Estilo Terracota Suave */

.card .btn {
  background-color: #C46A4A;
  border: none;
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 10px 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

/* Hover elegante */
.card .btn:hover {
  background-color: #A95539; /* terracota más oscuro */
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Click efecto suave */
.card .btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Para que ocupe todo el ancho sin romper diseño */
.card .btn {
  width: 100%;
}
#contacto {
  background-color: #625041 !important;
}

.preview-trigger img:hover {
  transform: scale(1.03);
  transition: 0.3s ease;
}

.hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(60, 40, 30, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.preview-trigger:hover .hover-overlay {
  opacity: 1;
}

.preview-text-content {
  font-family: 'Playfair Display', serif;
  line-height: 1.8;
  white-space: pre-line;
}
