/* General container */
.pregnancy-calendar {
  font-family: "Segoe UI", Arial, sans-serif;
  margin: 20px auto;
  max-width: 1000px;
  background: #fffafc;
  padding: 20px;
  border-radius: 10px;
  border: 2px solid #f8cce0;
}

/* Headings */
.pregnancy-calendar h3 {
  color: #444;
  text-align: center;
  margin-bottom: 20px;
}

.pregnancy-calendar h4 {
  color: #333;
  margin: 15px 0;
}

/* Form styles */
.date-form {
  background: #f0f8ff;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #b3d9ff;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.date-form label {
  font-weight: bold;
  color: #333;
}

.date-form input[type="date"],
.date-form input[type="submit"] {
  margin: 8px;
  padding: 10px 14px;
  border-radius: 4px;
  border: 1px solid #b3d9ff;
  font-size: 14px;
}

.date-form input[type="submit"] {
  background: #f8cce0;
  border: 1px solid #f5a6c9;
  cursor: pointer;
}

.date-form input[type="submit"]:hover {
  background: #f5a6c9;
  color: #fff;
}

/* Progress bar with trimester divisions */
.trimester-progress {
  margin: 20px 0;
}

.trimester-progress p {
  font-weight: bold;
  color: #444;
}

.progress-bar {
  background: #eee;
  width: 100%;
  height: 20px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  background: linear-gradient(90deg, #f8cce0, #b3d9ff);
  height: 100%;
}

.progress-bar::before,
.progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  background: #999;
}

.progress-bar::before { left: 33.3%; }
.progress-bar::after { left: 66.6%; }

.progress-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 12px;
  color: #666;
}

/* Grid layout for weeks */
.week-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin: 15px 0;
}

.week-box {
  background: #f0f8ff;
  border: 2px solid #b3d9ff;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.week-box:hover {
  background: #d6ecff;
  transform: scale(1.05);
}

.week-box.current-week {
  background: #f8cce0;
  border: 2px solid #f5a6c9;
  box-shadow: 0 0 10px rgba(245, 166, 201, 0.6);
}

/* Popup modal */
.week-popup {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
}

.popup-content {
  background: #fffafc;
  margin: 5% auto;
  padding: 20px;
  border: 2px solid #f8cce0;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
}

.popup-content h4 {
  margin-top: 0;
  color: #333;
}

.close {
  float: right;
  font-size: 24px;
  cursor: pointer;
  color: #f5a6c9;
}

/* Responsive design */
@media (max-width: 900px) {
  .week-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .week-grid { grid-template-columns: 1fr; } /* jedan po redu na telefonu */
  .week-box {
    width: 100%;
    font-size: 16px;
    padding: 16px;
  }
}