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

body {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  color: #111;
  background: #ffffff;
}

/* CONTAINER */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================
   HEADER (STICKY + BLUR)
========================= */
header {
  position: sticky;
  top: 0;
  z-index: 1000;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 16px 24px;

  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);

  transition: all 0.3s ease;
}

/* при scroll */
header.scrolled {
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  background: rgba(255, 255, 255, 0.85);
}

/* NAV */
nav a {
  margin-left: 20px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

/* LOGO */
.logo {
  height: 70px;
}

/* =========================
   HERO
========================= */
.hero {
  background: #2f3e5c;
  color: white;
  text-align: center;
  padding: 120px 20px;
}

.hero h1 {
  font-size: 34px;
  margin-bottom: 16px;
}

.hero p {
  opacity: 0.9;
}

/* =========================
   BUTTON
========================= */
.button {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 22px;
  background: #2563eb;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  transition: 0.2s;
}

.button:hover {
  background: #1e4ed8;
}

/* =========================
   SECTIONS (🔥 MAIN FIX)
========================= */
.section {
  padding: 100px 20px;
  position: relative;
}

/* alternating background */
.section:nth-child(even) {
  background: #f8fafc;
}

/* divider */
.section::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 1px;
  background: #e5e7eb;
}

/* headings */
.section h2 {
  font-size: 28px;
  margin-bottom: 30px;
}

/* =========================
   GRID + CARDS
========================= */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  transition: 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.card-icon {
  font-size: 22px;
  margin-bottom: 10px;
}

.muted {
  color: #666;
}

/* =========================
   CTA
========================= */
.cta {
  text-align: center;
  padding: 80px 20px;
}

/* =========================
   FOOTER
========================= */
footer {
  text-align: center;
  padding: 30px;
  color: #666;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

/* PRIMARY (Book Free Call) */
.modal-button {
  width: 100%;
  padding: 12px 16px;

  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;

  border: none;
  border-radius: 10px;

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

.modal-button:active {
  transform: scale(0.98);
}

.modal-button-secondary {
  flex: 1;

  padding: 12px 16px;

  background: #f9fafb;
  color: #111;

  border: 1px solid #e5e7eb;
  border-radius: 10px;

  font-size: 14px;
  font-weight: 500;

  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-input,
.modal-textarea {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  font-family: inherit;
  font-size: 14px;
}

.modal-input {
  margin-bottom: 12px;
}

.modal-textarea {
  min-height: 100px;
  resize: vertical;
}

.modal-input:focus,
.modal-textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* MODAL */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  display: none;
  align-items: center;
  justify-content: center;

  background: rgba(0,0,0,0.4);
  z-index: 1000;
}

.modal-body {
  background: white;
  padding: 30px;
  border-radius: 16px;
  width: 420px;

  display: flex;
  flex-direction: column;
  gap: 16px;

  max-height: 80vh;
  overflow-y: auto;
}


/* BOOKING UI */

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 30px;
}

/* back */
.back-link {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;

  border-radius: 8px;
  background: transparent;
  border: none;

  cursor: pointer;
  color: #6b7280;

  transition: all 0.2s ease;
}

.back-link:hover {
  background: #f3f4f6;
  color: #111;
}

.back-link .icon {
  width: 18px;
  height: 18px;
}

/* title centered visually */
.modal-header h2 {
  margin: 0;
  flex: 1;
  text-align: center;
}

/* close */
.close-btn {
  width: 36px;
  height: 36px;

  border: none;
  background: transparent;
  border-radius: 8px;

  cursor: pointer;
  font-size: 18px;
}

.close-btn:hover {
  background: #f3f4f6;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 20px;
}

.calendar button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
}

.calendar button:hover {
  color: #3b82f6;
}

.day {
    padding: 10px;
    background: #eee;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
}

/* TODAY (current date) */
.day.today {
  border: 2px solid #2563eb;
  border-radius: 8px;
  font-weight: 600;
}

/* ако е и selected */
.day.today.selected {
  background: #2563eb;
  color: white;
}

.error-text {
  color: #dc2626;
  font-size: 13px;
  margin-top: 6px;
}

.input-error {
  border-color: #dc2626 !important;
}

/* малка точка отдолу */
.day.today::after {
  content: "";
  display: block;
  margin: 4px auto 0;
  width: 4px;
  height: 4px;
  background: #2563eb;
  border-radius: 50%;
}

.day:hover {
    background: #3b82f6;
    color: white;
}

.slots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.slot {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
}

.slot:hover {
    background: #3b82f6;
    color: white;
}

input {
    width: 100%;
    padding: 10px;
    margin-top: 15px;
}
/* =========================
   BOOKING UX IMPROVEMENTS
========================= */

/* disabled slot */
.slot.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
  background: #f3f4f6;
  color: #9ca3af;
}

/* selected slot */
.slot.selected {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* loading text */
#bookingLoading {
  text-align: center;
  margin-top: 20px;
}

/* error text */
#bookingError {
  text-align: center;
  margin-top: 20px;
  color: #dc2626;
}

/* slots grid (new UI container) */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 20px;
}

/* =========================
   LOADING / PROCESSING STATE
========================= */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.modal-button.loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

.spinner {
  border: 3px solid rgba(0,0,0,0.1);
  border-left-color: #2563eb;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* optional loading text */
.loading-overlay p {
  margin-top: 12px;
  font-size: 14px;
  color: #374151;
  text-align: center;
}

/* =========================
   MEETING PROVIDER SELECTOR
========================= */

.meeting-provider {
  margin-top: 15px;
}

.provider-options {
  display: flex;
  gap: 12px;
  flex-direction: column;
  margin-top: 12px;
}

.provider-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  width: 100%;
  text-align: left;

  border: 1px solid #e5e7eb;
  border-radius: 8px;

  background: #fff;
  color: #111;

  font-size: 14px;
  font-weight: 500;

  cursor: pointer;
  transition: all 0.2s ease;
}

.provider-btn strong {
  display: block;
}

.provider-btn .muted {
  color: #6b7280;
}

.provider-btn.active .muted {
  color: rgba(255,255,255,0.7);
}

.provider-btn:hover {
  background: #f9fafb;
}

.provider-btn.active {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* Ensure provider selector is visible */
.meeting-provider {
  display: block;
}

.provider-btn {
  display: flex;
  align-items: center;
  gap: 8px;
}

.provider-text {
  display: flex;
  flex-direction: column;
}