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

html { scroll-behavior: smooth; }

body { 
  font-family: 'Helvetica Neue', Arial, sans-serif; 
  line-height:1.6; 
  color:#333; 
  background: linear-gradient(180deg,#fbfbfb 0%, #f2f4f3 100%);
  padding:0;
  display:flex;
  flex-direction:column;
  min-height:100vh;
}

.container { 
  max-width:1200px; 
  margin:0 auto; 
  padding:0 1rem;
  width: 100%;
}

@media (min-width: 768px) {
  .container { padding: 0 2rem; }
}

/* ==================== HEADER ==================== */
header { 
  background:#2d3e50; 
  color:#fff; 
  padding: 0.5rem 0;
  display:flex; 
  align-items:center; 
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-inner { 
  width:100%; 
  display:flex; 
  align-items:center; 
  justify-content:space-between;
  padding: 0.5rem 1rem;
}

@media (min-width: 1100px) {
  .header-inner { padding: 0.5rem 20%; }
}

header .logo { 
  height:50px;
  width: auto;
  flex: 0 0 auto;
}

@media (max-width: 600px) {
  header .logo { 
    height: 40px;
  }
}

header nav { 
  display:flex; 
  gap:1rem; 
  align-items:center;
  flex-wrap: wrap;
}

header nav a { 
  color:#fff; 
  text-decoration:none; 
  font-weight:600; 
  padding:0.35rem 0.5rem;
  font-size: 0.95rem;
  white-space: nowrap;
}

header nav a:hover {
  opacity: 0.8;
  transition: opacity 0.2s;
}

@media (max-width: 600px) {
  header nav { gap: 0.5rem; }
  header nav a { 
    padding: 0.25rem 0.4rem;
    font-size: 0.85rem;
  }
}

/* ==================== HERO ==================== */
.hero { 
  background:#c8d5c5; 
  text-align:center; 
  padding: 3rem 1rem;
}

@media (min-width: 768px) {
  .hero { padding: 4.5rem 1.5rem; }
}

.hero h1 { 
  font-size: 1.8rem;
  margin-bottom:0.75rem; 
  letter-spacing: -0.5px; 
  font-weight:700;
}

@media (min-width: 768px) {
  .hero h1 { font-size: 2.6rem; }
}

.hero p { 
  max-width:780px; 
  margin:0.5rem auto 1.25rem auto; 
  color:#2f3a36; 
  font-size: 1rem;
}

@media (min-width: 768px) {
  .hero p { font-size: 1.05rem; }
}

/* ==================== SERVICES ==================== */
.service-grid { 
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 600px) {
  .service-grid { 
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 900px) {
  .service-grid { 
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.service-grid > div { 
  background:#fff; 
  padding: 1.5rem;
  border-radius:12px; 
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

@media (min-width: 768px) {
  .service-grid > div { padding: 1.75rem; }
}

.service-grid h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.service-grid p {
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ==================== BUTTONS & CTA ==================== */
.cta { 
  display: inline-block; 
  padding: 0.75rem 1.1rem; 
  border-radius: 8px; 
  background: #2d3e50; 
  color: #fff; 
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
  font-size: 1rem;
}

.primary-btn { 
  padding: 0.75rem 1.5rem;
  border: none; 
  border-radius: 8px; 
  background: #2d3e50; 
  color: #fff; 
  cursor: pointer; 
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.3s, transform 0.1s;
  width: 100%;
}

@media (min-width: 600px) {
  .primary-btn { width: auto; }
}

.primary-btn:hover, .cta:hover { 
  background: #1f2a38;
}

.primary-btn:active {
  transform: scale(0.98);
}

/* ==================== DAY PILLS ==================== */
.day-pills { 
  display: flex; 
  gap: 0.5rem; 
  justify-content: center; 
  flex-wrap: nowrap; 
  margin: 1rem 0 0.75rem 0; 
  overflow-x: auto; 
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0;
}

.day-pill { 
  background: #fff; 
  border-radius: 8px; 
  padding: 0.5rem; 
  border: 1px solid #e6e6e6; 
  cursor: pointer; 
  width: 56px; 
  min-width: 56px;
  height: 56px; 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  transition: all 0.2s;
}

.day-pill:active {
  transform: scale(0.95);
}

.day-pill .d-day { 
  font-size: 0.7rem; 
  color: #6b6b6b;
}

.day-pill .d-date { 
  font-weight: 700; 
  margin-top: 4px; 
  font-size: 0.95rem;
}

.day-pill.active { 
  background: #2d3e50; 
  color: #fff; 
  border-color: #203042;
}

.day-pill.disabled { 
  opacity: 0.45; 
  cursor: not-allowed;
}

@media (max-width: 600px) {
  .day-pill { 
    width: 60px;
    min-width: 60px;
    height: 60px;
    padding: 0.4rem;
  }
}

/* ==================== TIME SLOTS ==================== */
.time-slots { 
  margin-top: 1rem; 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 0.5rem;
  width: 100%;
}

.slots-heading { 
  font-weight: 700; 
  color: #273033;
}

.slots-list { 
  display: flex; 
  gap: 0.5rem; 
  flex-wrap: wrap; 
  justify-content: center; 
  margin-top: 0.5rem;
}

.time-btn { 
  background: #eee; 
  border: 1px solid #ddd; 
  padding: 0.5rem 0.9rem; 
  border-radius: 8px; 
  cursor: pointer; 
  box-shadow: 0 2px 6px rgba(0,0,0,0.04); 
  color: #3a3a3a;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.time-btn:active {
  transform: scale(0.95);
}

.time-btn.selected { 
  background: #2d3e50; 
  color: #fff; 
  border-color: #1f2a38;
}

@media (max-width: 600px) {
  .time-btn { 
    padding: 0.45rem 0.7rem;
    font-size: 0.9rem;
  }
}

.loader { 
  color: #666; 
  padding: 0.5rem 0;
}

.no-slots { 
  color: #777; 
  padding: 0.75rem 0;
}

/* ==================== SCHEDULER ==================== */
.scheduler { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 0.75rem;
  width: 100%;
  padding: 2rem 1rem;
}

@media (min-width: 768px) {
  .scheduler { padding: 2rem 0; }
}

@media (min-width: 900px) {
  .scheduler { 
    max-width: 560px; 
    margin: 0 auto;
  }
  .scheduler h2 { text-align: center; }
}

.scheduler h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #2d3e50;
}

@media (min-width: 768px) {
  .scheduler h2 { font-size: 1.8rem; }
}

.scheduler > * { 
  width: 100%; 
  max-width: 100%;
}

@media (min-width: 900px) {
  .scheduler > * { max-width: 560px; }
}

.scheduler select, 
.scheduler input, 
.scheduler .primary-btn, 
.scheduler button { 
  width: 100%;
}

@media (min-width: 600px) {
  .scheduler select, 
  .scheduler input, 
  .scheduler .primary-btn, 
  .scheduler button { 
    max-width: 360px;
  }
}

@media (min-width: 900px) {
  .scheduler select, 
  .scheduler input, 
  .scheduler .primary-btn, 
  .scheduler button { 
    max-width: 100%;
  }
}

.status-text, .availability-text { 
  text-align: center; 
  width: 100%;
  font-size: 0.95rem;
}

/* ==================== MODAL ==================== */
.modal { 
  display: none; 
  position: fixed; 
  inset: 0; 
  background: rgba(0,0,0,0.6); 
  z-index: 1000; 
  overflow-y: auto; 
  -webkit-overflow-scrolling: touch;
  padding: 1rem 0;
}

.modal-content { 
  background: #fff; 
  max-width: 520px; 
  margin: 2% auto; 
  padding: 1.5rem;
  border-radius: 18px; 
  min-height: auto;
}

@media (min-width: 600px) {
  .modal-content { 
    padding: 2rem;
    margin: 5% auto;
  }
}

.modal-content .close {
  float: right;
  font-size: 1.5rem;
  font-weight: bold;
  color: #999;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  width: auto;
  margin-bottom: 1rem;
}

@media (max-width: 600px) {
  .modal-content .close {
    font-size: 1.8rem;
    padding: 0.5rem;
  }
}

.modal-content .close:hover {
  color: #333;
}

.modal.open, .modal.open .modal-content { 
  animation: pop 180ms ease both;
}

@keyframes pop { 
  from { transform: translateY(6px) scale(.99); opacity: 0; } 
  to { transform: none; opacity: 1; } 
}

/* ==================== FORM ELEMENTS ==================== */
fieldset { 
  border: none; 
  margin: 0 0 1rem 0; 
  padding: 0;
}

legend { 
  font-weight: 700; 
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

label { 
  display: block; 
  margin: 0.75rem 0 0.3rem 0;
  font-weight: 500;
}

label input[type="checkbox"] { 
  margin-right: 0.5rem; 
  vertical-align: middle;
  cursor: pointer;
}

input[type=text], 
input[type=email], 
input[type=tel], 
input[type=datetime-local], 
textarea, 
select { 
  width: 100%; 
  padding: 0.75rem; 
  margin-top: 0.3rem; 
  margin-bottom: 1rem; 
  border-radius: 6px; 
  border: 1px solid #ccc; 
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

input[type=text]:focus, 
input[type=email]:focus, 
input[type=tel]:focus, 
input[type=datetime-local]:focus, 
textarea:focus, 
select:focus {
  outline: none;
  border-color: #2d3e50;
  box-shadow: 0 0 0 3px rgba(45, 62, 80, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

select {
  cursor: pointer;
  background-color: #fff;
}

.required {
  color: #d9534f;
  font-weight: bold;
}

/* ==================== APPOINTMENT CONFIRMATION ==================== */
.appointment-confirmation {
  background: #e8f4f8;
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  border-left: 4px solid #2d3e50;
}

.appointment-confirmation h3 {
  color: #2d3e50;
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
}

.appointment-confirmation .selected-time {
  font-size: 1rem;
  margin: 0.5rem 0;
  color: #1f2a38;
  font-weight: 600;
}

.appointment-confirmation .greeting-message {
  color: #4a5568;
  margin-top: 0.75rem;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* ==================== FOOTER ==================== */
footer { 
  background: #2d3e50; 
  color: #fff; 
  text-align: center; 
  padding: 1.5rem 1rem;
  margin-top: auto;
  flex-shrink: 0;
}

footer p {
  font-size: 0.95rem;
}

/* ==================== MAIN BODY ==================== */
.main-body { 
  flex: 1 0 auto;
  width: 90%;
  margin: 0 auto;
  max-width: 1200px;
  padding: 1rem 0;
}

@media (min-width: 600px) {
  .main-body { width: 92%; }
}

@media (min-width: 1000px) {
  .main-body { width: 80%; }
}

/* ==================== SECTIONS ==================== */
section { 
  padding: 1.5rem 0;
}

@media (min-width: 768px) {
  section { padding: 2rem 0; }
}

section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #2d3e50;
  text-align: center;
}

@media (min-width: 768px) {
  section h2 { font-size: 1.8rem; }
}

/* ==================== NOTIFICATION ==================== */
.notification {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background: #2d3e50;
  color: #c8d5c5;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  display: none;
  z-index: 2000;
  max-width: calc(100% - 2rem);
}

@media (max-width: 600px) {
  .notification {
    left: 1rem;
    right: 1rem;
    max-width: calc(100% - 2rem);
  }
}

.notification.show { 
  display: block; 
  animation: fadein 0.5s, fadeout 0.5s 4s;
}

@keyframes fadein { 
  from { opacity: 0; transform: translateY(10px); } 
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeout { 
  from { opacity: 1; } 
  to { opacity: 0; }
}
