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

:root {
  --bg: #f5f0eb;
  --card: #ffffff;
  --text: #2c2c2c;
  --text-light: #6b6b6b;
  --border: #e0d8cf;
  --primary: #4a7c59;
  --primary-hover: #3d6a4b;
  --accent: #c2855a;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --radius: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

header {
  background: #2c2c2c;
  color: white;
  padding: 2rem 2rem 1.5rem;
  text-align: center;
}

.header-content h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.subtitle {
  color: #bbb;
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
}

.intro {
  text-align: center;
  padding: 2rem 1rem;
}

.intro h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.intro p {
  color: var(--text-light);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.section {
  margin-bottom: 2.5rem;
}

.section h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

/* Apartments grid */
.apartments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.apt-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary);
}

.apt-card h4 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.apt-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.apt-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-light);
}

.apt-price {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9rem;
}

/* Calendar */
.calendar-legend {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-light);
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.calendar-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.calendar-controls h3 {
  font-size: 1.15rem;
  min-width: 180px;
  text-align: center;
}

.btn-icon {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

.btn-icon:hover { background: var(--border); }

.btn-small {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  font-size: 0.8rem;
  margin-left: auto;
}

.btn-small:hover { background: var(--border); }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.calendar-day-header {
  background: #363636;
  color: white;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
}

.calendar-day {
  background: var(--card);
  min-height: 70px;
  padding: 0.35rem;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}

.calendar-day:hover { background: #f0ede8; }

.calendar-day.other-month {
  background: #f0ece7;
  color: #bbb;
}

.calendar-day.today {
  background: #eef5f0;
}

.calendar-day.blocked {
  background: #f5e6e6;
}

.day-number {
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.calendar-day.today .day-number {
  background: var(--primary);
  color: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.booking-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 2px;
}

.booking-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.calendar-hint {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.75rem;
  text-align: center;
}

/* Form */
.form-intro {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.hidden-field {
  display: none !important;
}

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

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

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 0.3rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--card);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(74,124,89,0.15);
}

.price-estimate {
  background: #f0f7f2;
  border: 1px solid #c5dece;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.availability-warning {
  background: #fff8e1;
  border: 1px solid #f0d68a;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #8a6d00;
  margin-bottom: 1rem;
}

.availability-ok {
  background: #f0f7f2 !important;
  border: 1px solid #c5dece !important;
  color: var(--primary) !important;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
  width: 100%;
}

.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled {
  background: #aaa;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover { background: var(--bg); }

/* Success */
.success-message {
  text-align: center;
  padding: 2.5rem 1rem;
}

.success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #e6f4ea;
  color: var(--primary);
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.success-message h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.success-message p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* Contact */
.contact-section {
  text-align: center;
}

.contact-section p {
  color: var(--text-light);
  margin-bottom: 0.3rem;
}

.contact-section a {
  color: var(--primary);
  text-decoration: none;
}

.contact-section a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  header { padding: 1.5rem 1rem; }
  main { padding: 1rem; }
  .form-row { grid-template-columns: 1fr; }
  .calendar-day { min-height: 55px; }
  .booking-dot { width: 8px; height: 8px; }
  .apartments-grid { grid-template-columns: 1fr; }
}
