/* pages.css - Shared styles for internal pages (Booking, Chat, Blog, Services) */
.page-section { padding: 140px 28px 80px; min-height: 100vh; position: relative; z-index: 1; }
.page-title { font-size: clamp(40px, 8vw, 80px); font-weight: 800; line-height: 1; margin-bottom: 20px; text-align: center; text-transform: uppercase; letter-spacing: -1px; }
.page-subtitle { text-align: center; font-size: clamp(16px, 2vw, 18px); color: var(--text-color); opacity: 0.7; margin-bottom: 60px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* =========================================
   BOOKING PAGE
========================================= */
.booking-container { max-width: 800px; margin: 0 auto; background: #fdfaf6; border-radius: 24px; padding: 40px; box-shadow: 0 20px 40px rgba(0,0,0,0.05); border: 1px solid rgba(0,0,0,0.05); position: relative; overflow: hidden; }
.step-indicator { display: flex; gap: 12px; margin-bottom: 40px; justify-content: center; }
.step-dot { width: 12px; height: 12px; border-radius: 50%; background: #e8d9ce; transition: 0.3s ease; position: relative; }
.step-dot.active { background: var(--red); transform: scale(1.3); }

.booking-step { display: none; animation: fadeInRight 0.5s ease forwards; }
.booking-step.active { display: block; }

.service-select-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.svc-card { background: #fff; padding: 24px 20px; border-radius: 16px; cursor: pointer; text-align: center; border: 2px solid transparent; transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 10px 20px rgba(0,0,0,0.03); }
.svc-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.08); }
.svc-card.selected { border-color: var(--red); background: #fff5f4; }
.svc-icon { font-size: 40px; margin-bottom: 15px; display: block; }
.svc-name { font-weight: 600; font-size: 16px; }

.form-group { margin-bottom: 24px; text-align: left; position: relative; }
.form-group label { display: block; font-weight: 600; margin-bottom: 10px; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; opacity: 0.8; }
.form-control { width: 100%; padding: 18px; border-radius: 12px; border: 1px solid #d8cfc3; background: #fff; font-family: inherit; font-size: 16px; transition: 0.3s; }
.form-control:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(232,57,42,0.1); }

/* Form Grid */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; gap: 0; } }

/* Floating Labels */
.form-group.floating label {
  position: absolute;
  top: 18px;
  left: 18px;
  font-size: 16px;
  color: #64748b;
  text-transform: none;
  letter-spacing: normal;
  pointer-events: none;
  transition: 0.2s ease all;
  opacity: 1;
  background: transparent;
  padding: 0 4px;
}
.form-group.floating .form-control { padding: 24px 18px 12px; }
.form-group.floating .form-control:focus ~ label,
.form-group.floating .form-control:not(:placeholder-shown) ~ label {
  top: -8px;
  left: 14px;
  font-size: 12px;
  color: var(--red);
  background: #fff;
  font-weight: 600;
}
.form-group.floating select.form-control:invalid ~ label,
.form-group.floating select.form-control[value=""] ~ label {
  top: 18px; left: 18px; font-size: 16px; color: #64748b; font-weight: 400;
}
.form-group.floating select.form-control:focus ~ label,
.form-group.floating select.form-control:not([value=""]) ~ label {
  top: -8px; left: 14px; font-size: 12px; color: var(--red); font-weight: 600; background: #fff;
}
textarea.form-control { resize: vertical; min-height: 100px; }

/* Validation & Counters */
.req { color: var(--red); }
.opt { color: #94a3b8; font-size: 12px; font-weight: normal; margin-left: 4px; }
.error-msg { display: none; color: var(--red); font-size: 12px; margin-top: 6px; font-weight: 500; }
.form-group.invalid .form-control { border-color: var(--red); background: #fff5f5; }
.form-group.invalid .error-msg { display: block; animation: shake 0.4s ease; }
.char-counter { font-size: 12px; color: #94a3b8; text-align: right; margin-top: 6px; font-variant-numeric: tabular-nums; }
.char-counter.limit { color: var(--red); font-weight: bold; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Spinner */
.spinner { width: 20px; height: 20px; border: 3px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: #fff; animation: spin 1s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Success Modal */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); z-index: 99999; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: 0.3s ease; padding: 20px; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { background: #fff; border-radius: 24px; padding: 40px; width: 100%; max-width: 480px; text-align: center; transform: scale(0.9) translateY(20px); transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }
.modal-overlay.active .modal-content { transform: scale(1) translateY(0); }
.modal-title { font-size: 24px; font-weight: 800; color: #111; margin-bottom: 12px; line-height: 1.3; }
.modal-desc { color: #64748b; font-size: 16px; margin-bottom: 30px; line-height: 1.6; }
.modal-actions { display: flex; flex-direction: column; gap: 12px; }
.btn-primary { background: var(--red); color: #fff; border: none; padding: 16px 24px; border-radius: 50px; font-weight: 700; font-size: 16px; width: 100%; cursor: pointer; transition: 0.3s; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 10px 20px rgba(232,57,42,0.2); text-transform: uppercase; letter-spacing: 1px; overflow: hidden; position: relative; }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 15px 30px rgba(232,57,42,0.3); background: #c2271a; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-secondary { background: #f1f5f9; color: #334155; border: none; padding: 16px 24px; border-radius: 50px; font-weight: 700; font-size: 16px; width: 100%; cursor: pointer; transition: 0.3s; position: relative; overflow: hidden; }
.btn-secondary:hover { background: #e2e8f0; color: #0f172a; }

/* Success checkmark animation */
.success-icon-anim { width: 80px; height: 80px; margin: 0 auto 24px; }
.checkmark { width: 100%; height: 100%; border-radius: 50%; display: block; stroke-width: 3; stroke: #4ade80; stroke-miterlimit: 10; box-shadow: inset 0px 0px 0px #4ade80; animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both; }
.checkmark__circle { stroke-dasharray: 166; stroke-dashoffset: 166; stroke-width: 3; stroke-miterlimit: 10; stroke: #4ade80; fill: none; animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards; }
.checkmark__check { transform-origin: 50% 50%; stroke-dasharray: 48; stroke-dashoffset: 48; animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards; }
@keyframes stroke { 100% { stroke-dashoffset: 0; } }
@keyframes scale { 0%, 100% { transform: none; } 50% { transform: scale3d(1.1, 1.1, 1); } }
@keyframes fill { 100% { box-shadow: inset 0px 0px 0px 40px rgba(74,222,128,0.1); } }

.btn-next { background: var(--red); color: #fff; border: none; padding: 18px 32px; border-radius: 50px; font-weight: 700; cursor: pointer; width: 100%; font-size: 16px; transition: 0.3s; margin-top: 20px; display: flex; justify-content: center; align-items: center; gap: 10px; box-shadow: 0 10px 20px rgba(232,57,42,0.2); text-transform: uppercase; letter-spacing: 1px; }
.btn-next:hover { background: #c2271a; transform: translateY(-3px); box-shadow: 0 15px 30px rgba(232,57,42,0.3); }
.btn-back { background: transparent; color: var(--text-color); border: none; padding: 10px; font-weight: 600; cursor: pointer; margin-bottom: 20px; display: inline-flex; align-items: center; gap: 5px; opacity: 0.6; transition: 0.3s; }
.btn-back:hover { opacity: 1; }

.success-message { text-align: center; padding: 40px 0; }
.success-icon { width: 80px; height: 80px; background: #4CAF50; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 40px; margin: 0 auto 20px; animation: scaleUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

/* =========================================
   AI CHAT PAGE
========================================= */
.chat-container { max-width: 900px; margin: 0 auto; height: 75vh; background: #fff; border-radius: 24px; display: flex; flex-direction: column; box-shadow: 0 30px 60px rgba(0,0,0,0.08); overflow: hidden; border: 1px solid rgba(0,0,0,0.05); }
.chat-header { padding: 20px 24px; background: #fdfaf6; border-bottom: 1px solid #e8d9ce; display: flex; align-items: center; gap: 15px; }
.chat-header-avatar { width: 44px; height: 44px; background: var(--red); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: bold; box-shadow: 0 4px 10px rgba(232,57,42,0.3); }
.chat-title { font-weight: 700; font-size: 18px; }
.chat-status { font-size: 12px; color: #4CAF50; display: flex; align-items: center; gap: 5px; font-weight: 500; }
.chat-status::before { content: ''; width: 8px; height: 8px; background: #4CAF50; border-radius: 50%; display: inline-block; }

.chat-body { flex: 1; overflow-y: auto; padding: 30px; display: flex; flex-direction: column; gap: 20px; background: #fdfaf6; scroll-behavior: smooth; }
.msg { max-width: 80%; padding: 16px 20px; border-radius: 20px; font-size: 15px; line-height: 1.5; animation: msgPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.msg-ai { background: #fff; color: var(--text-color); align-self: flex-start; border-bottom-left-radius: 4px; box-shadow: 0 5px 15px rgba(0,0,0,0.03); border: 1px solid #f0e8e0; }
.msg-user { background: var(--text-color); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }

.quick-chips { display: flex; gap: 10px; padding: 10px 24px; overflow-x: auto; background: #fff; scrollbar-width: none; border-top: 1px solid #f0e8e0; }
.quick-chips::-webkit-scrollbar { display: none; }
.quick-chip { background: #fdfaf6; border: 1px solid #e8d9ce; color: var(--text-color); padding: 10px 18px; border-radius: 50px; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: 0.3s; }
.quick-chip:hover { background: var(--red); color: #fff; border-color: var(--red); }

.chat-footer { padding: 20px 24px; background: #fff; }
.chat-input-wrapper { display: flex; gap: 10px; background: #fdfaf6; padding: 8px; border-radius: 50px; border: 1px solid #e8d9ce; transition: 0.3s; }
.chat-input-wrapper:focus-within { border-color: var(--text-color); }
.chat-input { flex: 1; background: transparent; border: none; padding: 10px 20px; font-family: inherit; font-size: 15px; }
.chat-input:focus { outline: none; }
.chat-send { background: var(--red); color: #fff; border: none; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.3s; box-shadow: 0 8px 16px rgba(232,57,42,0.25); }
.chat-send:hover { background: #c2271a; transform: scale(1.08); box-shadow: 0 12px 24px rgba(232,57,42,0.35); }
.chat-send:disabled { background: #d8cfc3; box-shadow: none; cursor: not-allowed; transform: none; }

.typing-indicator { display: flex; gap: 4px; padding: 8px 12px; align-items: center; }
.typing-dot { width: 6px; height: 6px; background: #d8cfc3; border-radius: 50%; animation: typing 1.4s infinite ease-in-out both; }
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

/* =========================================
   ANIMATIONS
========================================= */
@keyframes fadeInRight {
  0% { opacity: 0; transform: translateX(20px); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes scaleUp {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes msgPop {
  0% { opacity: 0; transform: translateY(15px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes typing {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .page-section { padding: 120px 18px 40px; }
  .booking-container { padding: 24px; }
  .chat-container { height: 80vh; border-radius: 16px; }
  .msg { max-width: 90%; }
}
