/* =====================================================
   Bosques del Indio - Sitio Moderno
   Compatible con PHP 8.4 / HTML5 / CSS moderno
   ===================================================== */

:root {
  --color-ocean: #0a4d68;
  --color-ocean-dark: #063347;
  --color-teal: #088395;
  --color-sand: #f5f0e6;
  --color-sand-dark: #e8dfd0;
  --color-white: #ffffff;
  --color-text: #2c3e50;
  --color-text-light: #5a6a7a;
  --color-accent: #00a884; /* WhatsApp green */
  --shadow: 0 10px 40px rgba(10, 77, 104, 0.12);
  --shadow-lg: 0 20px 60px rgba(10, 77, 104, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-sand);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

ul { list-style: none; }

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-ocean-dark);
}

h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); }

.lead {
  font-size: 1.15rem;
  color: var(--color-text-light);
  max-width: 640px;
}

/* ========== LAYOUT ========== */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 4.5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title h2 {
  margin-bottom: 0.5rem;
}

.section-title p {
  color: var(--color-text-light);
}

/* ========== HEADER / NAV ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(10, 77, 104, 0.08);
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--color-ocean);
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--color-teal);
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-teal);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-ocean);
  margin: 5px 0;
  transition: var(--transition);
}

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-top: 70px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(6, 51, 71, 0.55), rgba(6, 51, 71, 0.75));
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem 1.25rem;
  max-width: 800px;
}

.hero h1 {
  color: white;
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.95;
  margin-bottom: 2rem;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(255,255,255,0.25);
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--color-teal);
  color: white;
}

.btn-primary:hover {
  background: var(--color-ocean);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.7);
}

.btn-outline:hover {
  background: white;
  color: var(--color-ocean);
  border-color: white;
}

.btn-whatsapp {
  background: var(--color-accent);
  color: white;
}

.btn-whatsapp:hover {
  background: #008f6f;
  transform: translateY(-2px);
}

/* ========== PROPERTY CARDS (HOME) ========== */
.properties {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.property-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.property-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.property-card-img {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.property-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.property-card:hover .property-card-img img {
  transform: scale(1.06);
}

.property-card-body {
  padding: 1.75rem;
}

.property-card-body h3 {
  margin-bottom: 0.35rem;
}

.property-card-location {
  color: var(--color-teal);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.property-card-body p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.property-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.property-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--color-sand);
  padding: 0.3rem 0.7rem;
  border-radius: 50px;
}

/* ========== GALLERY ========== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.gallery a {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4/3;
  position: relative;
}

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

.gallery a:hover img {
  transform: scale(1.08);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  color: white;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.8;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  color: white;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--transition);
}

.lightbox-nav:hover {
  background: rgba(255,255,255,0.3);
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* ========== SERVICES ========== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.service-item {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.04);
  transition: var(--transition);
}

.service-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.service-item .icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.85rem;
  background: var(--color-sand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.service-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
}

/* ========== MAP / LOCATION ========== */
.map-section {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.map-embed {
  width: 100%;
  height: 380px;
  border: none;
}

.map-info {
  padding: 1.75rem;
}

.map-info h3 {
  margin-bottom: 0.75rem;
}

.map-info p {
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn-map {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.2rem;
  background: var(--color-ocean);
  color: white;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
}

.btn-map:hover {
  background: var(--color-teal);
}

.btn-map.secondary {
  background: var(--color-sand-dark);
  color: var(--color-ocean-dark);
}

.btn-map.secondary:hover {
  background: var(--color-sand);
}

/* ========== CONTACT / RESERVAS ========== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.contact-card {
  background: white;
  padding: 1.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-card h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--color-teal);
}

.contact-card p {
  font-size: 0.95rem;
  color: var(--color-text-light);
  margin-bottom: 0.4rem;
}

.contact-card a {
  color: var(--color-ocean);
  font-weight: 500;
}

.contact-card a:hover {
  color: var(--color-teal);
}

/* ========== DISTANCES TABLE ========== */
.distances-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.distances-table th,
.distances-table td {
  padding: 0.9rem 1.25rem;
  text-align: left;
}

.distances-table th {
  background: var(--color-ocean);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
}

.distances-table tr:nth-child(even) {
  background: var(--color-sand);
}

.distances-table td {
  font-size: 0.95rem;
  color: var(--color-text);
}

/* ========== FOOTER ========== */
.footer {
  background: var(--color-ocean-dark);
  color: rgba(255,255,255,0.85);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer h4 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer p, .footer a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.4rem;
}

.footer a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* ========== FLOATING WHATSAPP ========== */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  width: 60px;
  height: 60px;
  background: var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 25px rgba(0, 168, 132, 0.45);
  transition: var(--transition);
  animation: pulse-wa 2.5s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(0, 168, 132, 0.6);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: white;
}

@keyframes pulse-wa {
  0% { box-shadow: 0 0 0 0 rgba(0, 168, 132, 0.5); }
  70% { box-shadow: 0 0 0 14px rgba(0, 168, 132, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 168, 132, 0); }
}

/* Tooltip for WA */
.whatsapp-float::before {
  content: 'Consultá por WhatsApp';
  position: absolute;
  right: 70px;
  background: var(--color-ocean-dark);
  color: white;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.whatsapp-float:hover::before {
  opacity: 1;
}

/* ========== HOW TO ARRIVE ========== */
.howto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.howto-card {
  background: white;
  padding: 1.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.howto-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--color-teal);
}

.howto-card p {
  font-size: 0.95rem;
  color: var(--color-text-light);
  margin-bottom: 0.6rem;
}

.coords {
  background: var(--color-sand);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
  font-family: monospace;
  font-size: 0.95rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    min-height: 70vh;
  }

  .section {
    padding: 3rem 0;
  }

  .map-embed {
    height: 280px;
  }

  .whatsapp-float {
    width: 56px;
    height: 56px;
    bottom: 1.25rem;
    right: 1.25rem;
  }

  .whatsapp-float::before {
    display: none;
  }
}

/* Utility */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.flex-center {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ========== CONTACT FORM ========== */
.form-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 640px;
  margin: 0 auto 2rem;
}

.form-card h3 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--color-ocean);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-ocean-dark);
  margin-bottom: 0.35rem;
}

.form-group label .req {
  color: #e74c3c;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--color-sand-dark);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-sand);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-teal);
  background: white;
  box-shadow: 0 0 0 3px rgba(8, 131, 149, 0.15);
}

.form-group input.error,
.form-group select.error {
  border-color: #e74c3c;
}

.form-error {
  color: #e74c3c;
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: none;
}

.form-group.has-error .form-error {
  display: block;
}

.phone-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.5rem;
}

.nights-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--color-ocean);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.guests-box {
  background: var(--color-sand);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
}

.guests-box h4 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  color: var(--color-ocean-dark);
}

.guest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.guest-row label {
  font-weight: 500;
  font-size: 0.9rem;
}

.guest-row select {
  width: 90px;
  padding: 0.5rem;
  border: 1.5px solid var(--color-sand-dark);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  background: white;
}

.child-ages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.child-ages .form-group {
  margin-bottom: 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.form-actions .btn {
  min-width: 180px;
  justify-content: center;
}

.form-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-top: 1rem;
}

.form-success {
  display: none;
  text-align: center;
  padding: 1.5rem;
  background: #e8f8f0;
  border-radius: var(--radius-sm);
  color: #0a6b4a;
  margin-bottom: 1rem;
}

.form-success.visible {
  display: block;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  .phone-row {
    grid-template-columns: 100px 1fr;
  }
  .form-card {
    padding: 1.25rem;
  }
}
