:root {
  --brown-dark: #454b4f;
  --brown: #757b7f;
  --brown-light: #c4c9cc;
  --cream: #f5f6f6;
  --cream-alt: #e9ebeb;
  --green: #5a7247;
  --green-dark: #3f5233;
  --orange: #e07a2c;
  --orange-dark: #b8611e;
  --red: #b6493d;
  --text: #2b2e30;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  color: var(--text);
  line-height: 1.5;
  background: var(--cream) url('/img/exteriorpiscinadia.jpg') center top / cover no-repeat fixed;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 { color: var(--brown-dark); margin-top: 0; }
.section > .container > h2,
.gallery-group h3 {
  color: white;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

a { color: var(--green-dark); }

/* Header */
.site-header {
  background: var(--brown-dark);
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.2rem; color: white; }
.brand-icon {
  width: 38px;
  height: 38px;
  background: var(--cream);
  border-radius: 50%;
  padding: 4px;
  object-fit: contain;
}
.header-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.header-nav a { color: #f1e6d3; text-decoration: none; font-size: 0.95rem; }
.header-nav a:hover { color: white; text-decoration: underline; }
.admin-link { opacity: 0.75; font-size: 0.85rem !important; }

/* Hero */
.hero {
  background: linear-gradient(rgba(30, 36, 30, 0.28), rgba(30, 36, 30, 0.42));
  color: white;
  padding: 130px 0;
  text-align: center;
}
.hero h1 { color: white; font-size: 2rem; max-width: 700px; margin: 0 auto 16px; }
.hero p { max-width: 640px; margin: 0 auto 28px; color: #f1e6d3; }

/* Buttons */
.btn {
  display: inline-block;
  border: none;
  border-radius: var(--radius);
  padding: 10px 18px;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
}
.btn-primary { background: var(--orange); color: white; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-primary:disabled { background: #e0c1a2; cursor: not-allowed; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-secondary { background: var(--cream-alt); color: var(--brown-dark); }
.btn-danger { background: var(--red); color: white; }

/* Sections */
.section { padding: 60px 0; background: rgba(245, 246, 246, 0.5); }
.section-alt { background: rgba(233, 235, 235, 0.5); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 24px; }
.card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
}
.card-highlight { border: 2px solid var(--green); }
.card-download-btn { display: inline-block; margin-top: 14px; padding: 8px 16px; font-size: 0.85rem; }
.card-icon { font-size: 2.2rem; margin-bottom: 8px; }
.card-price { font-size: 1.1rem; }
.card-meta { color: var(--brown); font-size: 0.9rem; }
.card-meta-special { color: var(--orange-dark); font-weight: 600; }

/* Tabs */
.resource-tabs { display: flex; gap: 10px; margin: 24px 0; flex-wrap: wrap; }
.tab {
  background: white;
  border: 2px solid var(--brown-light);
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 600;
  color: var(--brown-dark);
}
.tab.active { background: var(--green); border-color: var(--green); color: white; }

/* Modalidad de arriendo de la cabaña */
.cabin-modality-field {
  background: white;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.modality-label { display: block; font-weight: 600; color: var(--brown-dark); margin-bottom: 10px; }
.modality-options { display: flex; gap: 18px; flex-wrap: wrap; }
.modality-option { display: flex; align-items: center; gap: 6px; font-weight: 500; color: var(--text); cursor: pointer; }
.modality-option input { width: auto; margin: 0; }
.cabin-modality-note {
  background: var(--cream-alt);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 24px;
  font-size: 0.88rem;
  color: var(--brown-dark);
}

/* Booking grid */
.booking-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .booking-grid { grid-template-columns: 1fr; } }

.panel { background: white; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }

form label { display: block; margin-bottom: 14px; font-size: 0.9rem; font-weight: 600; color: var(--brown-dark); }
form input, form select, form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid #d8c8b0;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
}
.hidden { display: none !important; }

.phone-input-group { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.phone-input-group select { width: auto; flex: 1 1 150px; min-width: 150px; margin-top: 0; }
.phone-input-group input { flex: 2 1 140px; margin-top: 0; }
#guestPhoneCustomCode { margin-top: 8px; }

.date-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.date-inputs label { margin-bottom: 0; }

/* Calendar */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: 700;
}
.calendar-header button {
  background: var(--cream-alt);
  border: none;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1.1rem;
}
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  background: #eef3ea;
}
.cal-cell.empty { background: transparent; cursor: default; }
.cal-cell.past { background: #f0ebe3; color: #b8ab98; cursor: not-allowed; }
.cal-cell.busy { background: #e6b3ac; color: #7a2c22; cursor: not-allowed; }
.cal-cell.selected { background: var(--green); color: white; }
.cal-cell.in-range { background: #cfe0c4; }
.cal-cell.weekday-label { background: transparent; font-weight: 700; cursor: default; color: var(--brown); }
.calendar-legend { display: flex; gap: 16px; margin-top: 10px; font-size: 0.8rem; flex-wrap: wrap; color: var(--brown); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.dot-free { background: #eef3ea; border: 1px solid #cfe0c4; }
.dot-busy { background: #e6b3ac; }
.dot-selected { background: var(--green); }

/* Quote box */
.quote-box {
  background: var(--cream-alt);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.quote-placeholder { margin: 0; color: var(--brown); }
.quote-row { display: flex; justify-content: space-between; padding: 2px 0; }
.quote-row.total { font-weight: 700; border-top: 1px solid #d8c8b0; margin-top: 6px; padding-top: 8px; }
.quote-row.deposit { color: var(--green-dark); font-weight: 700; }
.quote-row.quote-subrow { padding-left: 12px; font-size: 0.82rem; color: var(--brown); }

.form-error { color: var(--red); font-weight: 600; min-height: 1.2em; }

.quote-pdf-hint { font-size: 0.85rem; color: var(--brown); margin: 0 0 8px; }
#quoteRequestBtn { width: 100%; margin-bottom: 18px; }

/* Cabaña + espacio con fechas/personas distintas para el evento */
.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 500;
  font-size: 0.85rem;
  margin-bottom: 14px;
}
.checkbox-field input {
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  margin: 2px 0 0;
  flex-shrink: 0;
}
.event-dates-fields { margin-bottom: 14px; }
.event-dates-fields .hint { font-size: 0.8rem; color: var(--brown); margin: 0 0 8px; }
.event-dates-fields .date-inputs { margin-bottom: 0; }
.event-day-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 10px;
}
.event-day-row label { margin-bottom: 0; }
.event-day-remove {
  height: 38px;
  padding: 0 12px;
  align-self: end;
}
#addEventDayBtn { margin-top: 2px; }

/* Confirmation modal */
.confirmation-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.confirmation-content {
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.bank-info { list-style: none; padding: 0; background: var(--cream-alt); border-radius: 8px; padding: 14px; }
.bank-info li { margin-bottom: 6px; }
.confirmation-balance { color: var(--brown); }

.confirmation-email-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  background: #fff8e1;
  border: 1px solid #f2d98a;
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--brown-dark);
}

.receipt-actions { margin: 18px 0; padding: 14px; background: var(--cream-alt); border-radius: 8px; }
.receipt-actions-label { margin: 0 0 10px; font-size: 0.88rem; color: var(--brown-dark); font-weight: 600; }
.receipt-btn { margin: 0 8px 8px 0; }
.btn-whatsapp { background: #25d366; color: white; }
.btn-whatsapp:hover { background: #1eb857; }

.whatsapp-confirm-block { margin: 14px 0 18px; padding: 14px; background: #e9f9ef; border: 1px solid #bfe9cc; border-radius: 8px; }
.whatsapp-confirm-label { margin: 0 0 10px; font-size: 0.88rem; color: var(--brown-dark); font-weight: 600; }

/* Galería */
.gallery-group { margin-bottom: 36px; }
.gallery-group h3 { margin-bottom: 14px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.gallery-grid img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: block;
  transition: transform 0.15s ease;
}
.gallery-grid img:hover { transform: scale(1.03); }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 200;
}
.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 24px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  font-size: 1.6rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
}

/* Footer */
.site-footer { background: var(--brown-dark); color: #f1e6d3; text-align: center; padding: 24px 0; font-size: 0.85rem; }
.footer-legal { opacity: 0.7; font-size: 0.78rem; margin-top: 4px; }
.footer-links { margin-top: 8px; font-size: 0.8rem; }
.footer-links a { color: #f1e6d3; text-decoration: underline; }

/* Reglamento interno */
.reglamento-panel { max-width: 800px; margin: 0 auto; line-height: 1.65; }
.reglamento-title { font-size: 1.8rem; margin-bottom: 4px; }
.reglamento-subtitle { color: var(--brown); font-style: italic; margin-top: 0; }
.reglamento-legal {
  background: var(--cream-alt);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--brown-dark);
  margin: 18px 0 28px;
}
.reglamento-panel h2 { margin-top: 32px; font-size: 1.25rem; }
.reglamento-panel h3 { margin-top: 18px; font-size: 1.02rem; }
.reglamento-panel ul { padding-left: 22px; }
.reglamento-panel li { margin-bottom: 8px; }
.reglamento-contact { margin-top: 32px; color: var(--brown); font-size: 0.9rem; }

/* Casilla de aceptación del reglamento */
.accept-terms-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 500;
  font-size: 0.85rem;
  margin-bottom: 14px;
}
.accept-terms-field input {
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  margin: 2px 0 0;
  flex-shrink: 0;
}
.accept-terms-field a { color: var(--green-dark); font-weight: 600; }
