body {
  font-family: 'Public Sans', sans-serif;
  margin: 0;
  background-color: #fafafa;
  color: #333;
}

.navbar {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 15px 50px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo img {
  width: 55px;
  height: 55px;
}

.nav-logo span {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a4b2a;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 25px;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

.nav-links a.active {
  color: #2e6b3d;
  border-bottom: 2px solid #2e6b3d;
}

.btn {
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 600;
  text-decoration: none;
}

.btn-outline {
  border: 2px solid #2e6b3d;
  color: #2e6b3d;
}

.btn-filled {
  background: #2e6b3d;
  color: white;
  border: 2px solid #2e6b3d;
}

/* ===== ESTILO DE TARJETAS DE TERRENOS ===== */

.terrenos-section {
  background: #f9faf9;
  padding: 40px 0;
}

.terrenos-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: center;
}

.terreno-card {
  display: flex;
  align-items: stretch;
  width: 90%;
  max-width: 1200px;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.terreno-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* ==== IMAGEN ==== */
.terreno-card img {
  width: 45%;
  height: 280px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.terreno-card img:hover {
  transform: scale(1.03);
}

/* ==== DETALLES ==== */
.terreno-details {
  flex: 1;
  padding: 25px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-header h3 {
  color: #1a4b2a;
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.card-header .precio {
  color: #1a4b2a;
  font-weight: 600;
  font-size: 1.1rem;
  white-space: nowrap;
}

.terreno-details p {
  color: #555;
  font-size: 0.95rem;
  margin: 4px 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.acciones {
  display: flex;
  gap: 18px;
  margin-top: 15px;
}

.acciones button {
  background: none;
  border: none;
  color: #1a4b2a;
  font-size: 1.4rem;
  cursor: pointer;
  transition: transform 0.2s, color 0.3s;
}

.acciones button:hover {
  transform: scale(1.15);
  color: #2f7b47;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 900px) {
  .terreno-card {
    flex-direction: column;
  }

  .terreno-card img {
    width: 100%;
    height: 240px;
  }

  .terreno-details {
    padding: 20px;
  }

  .card-header h3 {
    font-size: 1.1rem;
  }
}

/* ===== MODAL MEJORADO ===== */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease-in-out;
}

.modal {
  background: #ffffff;
  border-radius: 16px;
  padding: 30px 25px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transform: scale(0.95);
  opacity: 0;
  animation: popIn 0.3s forwards;
}

.close-modal {
  background: none;
  border: none;
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 1.6rem;
  color: #1a4b2a;
  cursor: pointer;
  transition: color 0.2s;
}

.close-modal:hover {
  color: #387b49;
}

.modal-header img {
  width: 70px;
  margin-bottom: 10px;
}

.modal-header h2 {
  color: #1a4b2a;
  font-weight: 700;
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.modal h3 {
  color: #24663b;
  font-size: 1.1rem;
  margin-top: 8px;
}

.modal p {
  color: #555;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.divider {
  height: 1px;
  background: #e4e4e4;
  margin: 25px 0;
}

.register-text {
  font-size: 0.9rem;
  color: #444;
}

.register-link {
  color: #1a4b2a;
  font-weight: 600;
  text-decoration: none;
}

.register-link:hover {
  text-decoration: underline;
}

/* === Animaciones === */
@keyframes fadeIn {
  from { background: rgba(0, 0, 0, 0); }
  to { background: rgba(0, 0, 0, 0.5); }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* ==== ONLOADER ==== */
#onloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
  transition: opacity 0.8s ease;
}

#onloader .spinner {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #1e7e34;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

#onloader p {
  font-size: 16px;
  color: #333;
  font-weight: bold;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
