/* assets/css/main.css */
:root {
  --blue: #63ADF2;
  --dark: #545E75;
  --light-blue: #A7CCED;
  --white: #ffffff;
  --bg: #f5f7fa;
  --text: #2d3142;
  --text-light: #6b7280;
  --border: #e0e6ef;
  --green: #28a745;
  --orange: #ffc107;
  --red: #dc3545;
  --shadow: 0 2px 12px rgba(84,94,117,0.10);
  --radius: 10px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header { background: var(--white); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 14px 20px; }
.header-logo { width: 52px; height: 52px; background: var(--dark); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.header-logo img { width: 100%; height: 100%; object-fit: cover; }
.header-logo-placeholder { font-size: 24px; color: var(--white); }
.header-info { flex: 1; }
.header-info h1 { font-size: 18px; color: var(--dark); font-weight: 700; line-height: 1.2; }
.header-info .schedule { font-size: 13px; color: var(--text-light); margin-top: 2px; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; margin-top: 4px; }
.status-badge .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-badge.open { background: #d4edda; color: #155724; }
.status-badge.open .dot { background: #28a745; }
.status-badge.closed { background: #f8d7da; color: #721c24; }
.status-badge.closed .dot { background: #dc3545; }
.header-contact { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 13px; }
.header-contact a { color: var(--dark); font-weight: 600; }

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

/* Calendar card */
.calendar-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 10px; }
.calendar-title { font-size: 17px; font-weight: 700; color: var(--dark); }
.view-switcher { display: flex; gap: 4px; background: var(--bg); border-radius: 8px; padding: 4px; }
.view-btn { border: none; background: transparent; padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--text-light); transition: all .2s; }
.view-btn.active { background: var(--blue); color: var(--white); font-weight: 600; }
.nav-controls { display: flex; align-items: center; gap: 8px; }
.nav-btn { border: 1px solid var(--border); background: var(--white); padding: 6px 14px; border-radius: 6px; cursor: pointer; color: var(--dark); font-size: 13px; transition: background .2s; }
.nav-btn:hover { background: var(--bg); }

/* Month view */
.month-grid { padding: 0; }
.month-header { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--border); }
.month-header-cell { padding: 10px; text-align: center; font-size: 12px; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: .5px; }
.month-body { display: grid; grid-template-columns: repeat(7, 1fr); }
.month-day { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); min-height: 100px; padding: 6px; cursor: default; transition: background .15s; }
.month-day:nth-child(7n) { border-right: none; }
.month-day.other-month { background: #fafafa; }
.month-day.today { background: #f0f7ff; }
.month-day.today .day-number { color: var(--blue); font-weight: 700; }
.month-day.has-slots:hover { background: #f0f7ff; cursor: pointer; }
.day-number { font-size: 13px; font-weight: 600; color: var(--text-light); margin-bottom: 4px; }
.slot-pill { display: block; padding: 3px 6px; border-radius: 4px; font-size: 11px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; transition: opacity .15s; }
.slot-pill:hover { opacity: .85; }
.slot-pill.status-pending { background: #fff3cd; color: #856404; border-left: 3px solid #ffc107; }
.slot-pill.status-confirmed { background: #d4edda; color: #155724; border-left: 3px solid #28a745; }
.slot-pill.status-full { background: #e2e3e5; color: #6c757d; border-left: 3px solid #adb5bd; cursor: not-allowed; }
.slot-pill.status-cancelled { background: #f8d7da; color: #721c24; border-left: 3px solid #dc3545; cursor: not-allowed; text-decoration: line-through; }
.more-slots { font-size: 11px; color: var(--blue); cursor: pointer; }

/* Week view */
.week-grid { padding: 0; overflow-x: auto; }
.week-header { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--border); min-width: 560px; }
.week-header-cell { padding: 12px 8px; text-align: center; font-size: 13px; font-weight: 600; color: var(--text-light); }
.week-header-cell .wday-num { display: block; font-size: 20px; font-weight: 700; color: var(--dark); line-height: 1; }
.week-header-cell.today .wday-num { color: var(--blue); }
.week-body { display: grid; grid-template-columns: repeat(7, 1fr); min-width: 560px; }
.week-day-col { border-right: 1px solid var(--border); min-height: 180px; padding: 8px 6px; }
.week-day-col:last-child { border-right: none; }

/* Day view */
.day-view { padding: 20px; }
.day-slot-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; transition: box-shadow .2s; cursor: pointer; }
.day-slot-card:hover { box-shadow: var(--shadow); }
.day-slot-card.status-full, .day-slot-card.status-cancelled { opacity: .6; cursor: default; }
.day-slot-info { flex: 1; }
.day-slot-time { font-size: 16px; font-weight: 700; color: var(--dark); }
.day-slot-route { font-size: 14px; color: var(--text-light); margin-top: 2px; }
.day-slot-meta { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.badge-pending { background: #fff3cd; color: #856404; }
.badge-confirmed { background: #d4edda; color: #155724; }
.badge-full { background: #e2e3e5; color: #6c757d; }
.badge-cancelled { background: #f8d7da; color: #721c24; }
.seats-info { font-size: 13px; color: var(--text-light); }
.btn-book { background: var(--blue); color: var(--white); border: none; padding: 9px 20px; border-radius: 7px; cursor: pointer; font-size: 14px; font-weight: 600; transition: background .2s; white-space: nowrap; }
.btn-book:hover { background: #4a9de0; }
.btn-book:disabled { background: #ccc; cursor: not-allowed; }

/* Legend */
.legend { display: flex; gap: 16px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-light); }
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

/* Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.active { display: flex; }
.modal { background: var(--white); border-radius: var(--radius); max-width: 540px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); animation: modalIn .2s ease; }
@keyframes modalIn { from { transform: scale(.95) translateY(10px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.modal-header { background: linear-gradient(135deg, var(--blue), var(--dark)); color: var(--white); padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; }
.modal-header h2 { font-size: 17px; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--white); font-size: 22px; cursor: pointer; line-height: 1; opacity: .8; }
.modal-close:hover { opacity: 1; }
.modal-body { padding: 24px; }

/* Form */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--dark); margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 7px; font-size: 14px; color: var(--text); transition: border-color .2s; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(99,173,242,0.15); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.payment-options { display: flex; flex-direction: column; gap: 10px; }
.payment-option { border: 2px solid var(--border); border-radius: 8px; padding: 12px 16px; cursor: pointer; display: flex; align-items: center; gap: 12px; transition: all .2s; }
.payment-option:hover, .payment-option.selected { border-color: var(--blue); background: #f0f7ff; }
.payment-option input[type="radio"] { accent-color: var(--blue); width: 18px; height: 18px; }
.payment-option-label { font-size: 14px; font-weight: 600; }
.payment-option-sub { font-size: 12px; color: var(--text-light); }
.alert-threshold { background: #fff3cd; border: 1px solid #ffc107; border-radius: 7px; padding: 12px 16px; font-size: 13px; color: #856404; margin-bottom: 16px; }
.slot-summary { background: #f0f7ff; border-radius: 8px; padding: 14px; margin-bottom: 18px; font-size: 14px; }
.slot-summary strong { color: var(--dark); }
.btn-primary { width: 100%; padding: 13px; background: var(--blue); color: var(--white); border: none; border-radius: 8px; font-size: 15px; font-weight: 700; cursor: pointer; transition: background .2s; margin-top: 8px; }
.btn-primary:hover { background: #4a9de0; }
.btn-primary:disabled { background: #ccc; cursor: not-allowed; }

/* Footer */
.site-footer { background: var(--dark); color: #ccc; padding: 36px 20px; margin-top: 50px; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px; }
.footer-section h3 { color: var(--white); font-size: 14px; font-weight: 700; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .5px; }
.footer-section p, .footer-section a { font-size: 13px; color: #a0a8b8; line-height: 2; display: block; }
.footer-hours-row { display: flex; justify-content: space-between; font-size: 13px; color: #a0a8b8; padding: 2px 0; }
.footer-hours-row.closed span:last-child { color: #dc3545; }
.footer-bottom { text-align: center; margin-top: 28px; padding-top: 20px; border-top: 1px solid #3a4255; font-size: 12px; color: #666; }

/* Loader / Empty */
.loader { display: flex; justify-content: center; padding: 40px; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-light); }

/* Responsive */
@media (max-width: 768px) {
  .header-info h1 { font-size: 15px; }
  .header-contact { display: none; }
  .calendar-toolbar { flex-direction: column; align-items: flex-start; }
  .month-header-cell { font-size: 10px; padding: 6px 2px; }
  .month-day { min-height: 60px; padding: 4px; }
  .slot-pill { font-size: 9px; padding: 2px 4px; }
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .view-btn { flex: 1; text-align: center; }
  .month-day { min-height: 48px; }
  .day-slot-card { flex-direction: column; align-items: flex-start; }
  .btn-book { width: 100%; }
}

/* ── Flaticon icon alignment ─────────────────────────────── */
.fi { vertical-align: middle; line-height: 1; }
.header-info .fi { margin-right: 4px; }
.footer-section .fi { margin-right: 6px; color: var(--light-blue); }
.day-slot-info .fi { margin-right: 3px; color: var(--blue); }
.slot-summary .fi { margin-right: 4px; color: var(--blue); }
.alert-threshold .fi { margin-right: 4px; }

/* ── SEO Section ──────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.seo-section {
  background: #f8faff;
  border-top: 1px solid #e8edf5;
  padding: 48px 20px;
}
.seo-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}
.seo-block h2 {
  font-size: 17px;
  font-weight: 700;
  color: #545E75;
  margin-bottom: 10px;
  border-left: 3px solid #63ADF2;
  padding-left: 10px;
}
.seo-block p {
  font-size: 14px;
  color: #5a6270;
  line-height: 1.7;
}
.seo-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.seo-list li {
  font-size: 14px;
  color: #545E75;
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
}
.seo-list li i { color: #63ADF2; font-size: 13px; }
