* {
  box-sizing: border-box;
  font-family: 'Segoe UI', 'Roboto', sans-serif;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
}

/* HERO SECTION (Removed from layout, adjusting main container instead) */
.mentorshipform-hero {
  display: none;
}

/* MAIN CONTENT */
.overlay {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: clamp(100px, 14vw, 140px);
  padding-bottom: clamp(60px, 10vw, 120px);
  background: #ffffff;
}

.mentorship-card {
  width: clamp(350px, 95%, 900px);
  max-width: 95%;
  background: #ffffff;
  padding: clamp(20px, 4vw, 40px) clamp(20px, 4vw, 50px);
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 50px rgba(0, 0, 0, 0.02);
}

/* Card Header */
.card-header {
  text-align: center;
  margin-bottom: clamp(35px, 6vw, 50px);
}

.card-header h2 {
  font-family: var(--font-secondary, 'Forum', serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  color: #1a1a1a;
  margin: 0 0 10px 0;
}

.header-subtitle {
  font-family: var(--font-primary, 'Outfit', sans-serif);
  font-size: clamp(0.9rem, 2vw, 15px);
  color: #4b5563;
  margin: 0;
}

/* Form Layout */
.mentorship-form {
  display: flex;
  gap: clamp(20px, 4vw, 40px);
}

.left,
.right {
  flex: 1;
}

/* Field Group */
.field-group {
  margin-bottom: 20px;
}

.field {
  flex: 1;
}

.field label {
  font-family: var(--font-primary, 'Outfit', sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  display: block;
  margin-bottom: 8px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  font-family: var(--font-primary, 'Outfit', sans-serif);
  font-size: 15px;
  color: #1a1a1a;
  transition: all 0.2s ease;
  background: #ffffff;
}

/* Let intl-tel-input handle its own padding */
.field .iti input.iti__tel-input {
  padding-left: 110px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: #1a1a1a;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #9ca3af;
}

textarea {
  height: clamp(100px, 15vw, 120px);
  resize: vertical;
  line-height: 1.5;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  color: #1a1a1a;
  /* Enforce selected color */
}

/* Calendar */
.calendar-box {
  margin-bottom: 20px;
}

.calendar-box .field-group {
  margin-bottom: 8px;
}

.calendar {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  background: #ffffff;
}

.cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.month-display {
  font-family: var(--font-primary, 'Outfit', sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.nav-btn {
  border: none;
  background: transparent;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  color: #1a1a1a;
}

.days,
.dates {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.days span {
  font-family: var(--font-primary, 'Outfit', sans-serif);
  font-size: 11px;
  font-weight: 500;
  color: #9ca3af;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.dates span {
  width: 32px;
  height: 32px;
  line-height: 32px;
  margin: 0 auto;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-primary, 'Outfit', sans-serif);
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
  /* Dark color for available dates */
  transition: all 0.2s ease;
}

.dates span:hover:not(.disabled) {
  background: #f3f4f6;
  color: #1a1a1a;
}

.dates span.active,
.dates span.selected {
  background: transparent;
  color: #1a1a1a;
  font-weight: 700;
}

.dates span.disabled {
  color: #d1d5db;
  /* Very light for past dates */
  cursor: not-allowed;
}

/* Time */
.time-box .field-group {
  margin-bottom: 8px;
}

.time-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}

.no-slots {
  font-family: var(--font-primary, 'Outfit', sans-serif);
  font-size: 13px;
  color: #9ca3af;
  text-align: center;
}

.time-slots button {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  font-family: var(--font-primary, 'Outfit', sans-serif);
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
  transition: all 0.2s ease;
}

.time-slots button:hover {
  border-color: #1a1a1a;
}

.time-slots button.active,
.time-slots button.selected {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #ffffff;
}

/* Payment Section */
.payment-section {
  margin-top: 40px;
}

.payment-section h3 {
  font-family: var(--font-primary, 'Outfit', sans-serif);
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 15px 0;
}

.payment-option {
  cursor: pointer;
  display: block;
}

.payment-option input[type="radio"] {
  display: none;
}

.payment-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.payment-option:hover .payment-card {
  border-color: #1a1a1a;
  background: #fcfcfc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.payment-option input[type="radio"]:checked+.payment-card {
  border-color: #1a1a1a;
  background: #f8fafc;
  border-width: 2px;
}

.payment-text {
  font-family: var(--font-primary, 'Outfit', sans-serif);
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Agree Section */
.agree-section {
  margin-top: 20px;
}

.agree-card {
  background: #f3f4f6;
  border-radius: 8px;
  padding: 24px;
  border: none;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.agree-card input[type="checkbox"] {
  margin-top: 3px;
  min-width: 18px;
  min-height: 18px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #1c323a;
  flex-shrink: 0;
}

.agree-text {
  font-family: var(--font-primary, 'Outfit', sans-serif);
  font-size: 13px;
  line-height: 1.5;
  color: #1a1a1a;
  margin: 0;
  display: block;
}

.agree-text b {
  font-weight: 600;
}

.agree-text .highlight {
  color: #1a1a1a;
  font-weight: inherit;
}

/* Book Button */
.book-btn {
  cursor: pointer;
  margin: 40px auto 10px;
  padding: 16px 40px;
  background: #1c323a;
  /* Dark navy */
  border: none;
  border-radius: 8px;
  color: #ffffff;
  font-family: var(--font-primary, 'Outfit', sans-serif);
  font-size: 14px;
  font-weight: 500;
  display: block;
  transition: background 0.2s ease;
}

.book-btn:hover {
  background: #102a43;
}

/* RESPONSIVE STYLES */

/* Tablet (769px - 992px) */
@media (max-width: 992px) {
  .mentorshipform-hero {
    padding: clamp(50px, 6vw, 80px) 5% clamp(40px, 5vw, 60px);
  }

  .overlay {
    padding-top: 110px;
    padding-bottom: clamp(25px, 4vw, 40px);
  }

  .mentorship-card {
    padding: clamp(20px, 3vw, 30px);
  }

  .mentorship-form {
    gap: 20px;
  }

  .time-slots {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
}

/* Mobile Navigation (up to 768px) */
@media (max-width: 768px) {
  .mentorshipform-hero {
    margin-top: 70px;
    padding: clamp(40px, 6vw, 60px) 5% clamp(30px, 4vw, 40px);
  }

  .mentorshipform-hero h1 {
    font-size: clamp(1.6rem, 5vw, 2.2rem);
  }

  .overlay {
    padding-top: 100px;
    padding-bottom: clamp(20px, 4vw, 30px);
    padding-left: 15px;
    padding-right: 15px;
  }

  .mentorship-card {
    padding: clamp(18px, 3vw, 25px) clamp(16px, 3vw, 22px);
    border-radius: 20px;
  }

  .card-header {
    margin-bottom: clamp(18px, 3vw, 25px);
    padding-bottom: clamp(12px, 2.5vw, 20px);
  }

  .mentorship-form {
    flex-direction: column;
    gap: clamp(18px, 3vw, 25px);
  }

  .left,
  .right {
    width: 100%;
  }

  .field-group {
    flex-direction: column;
    gap: 8px;
  }

  .field label {
    font-size: clamp(12px, 2.5vw, 14px);
    margin-bottom: 6px;
  }

  .field input,
  .field select,
  .field textarea {
    padding: clamp(10px, 2vw, 12px) clamp(10px, 2vw, 14px);
    font-size: clamp(13px, 2.5vw, 14px);
  }

  textarea {
    height: clamp(90px, 12vw, 110px);
  }

  .calendar {
    padding: clamp(10px, 2vw, 15px);
  }

  .dates span {
    width: clamp(28px, 5vw, 36px);
    height: clamp(28px, 5vw, 36px);
    line-height: clamp(28px, 5vw, 36px);
    font-size: clamp(11px, 2.5vw, 13px);
  }

  .time-slots {
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(6px, 1.5vw, 8px);
  }

  .time-slots button {
    padding: clamp(8px, 2vw, 10px) clamp(4px, 1.5vw, 6px);
    font-size: clamp(11px, 2.5vw, 12px);
  }

  .payment-section {
    margin-top: clamp(18px, 3vw, 25px);
  }

  .payment-options {
    flex-direction: column;
    gap: clamp(8px, 2vw, 12px);
  }

  .payment-option {
    width: 100%;
  }

  .payment-card {
    flex-direction: row;
    justify-content: flex-start;
    padding: clamp(12px, 2.5vw, 16px) clamp(14px, 2.5vw, 20px);
    gap: clamp(10px, 2.5vw, 15px);
  }

  .agree-card {
    padding: clamp(12px, 2.5vw, 16px) clamp(14px, 2.5vw, 18px);
  }

  .agree-text {
    font-size: clamp(12px, 2.5vw, 13px);
    line-height: 1.6;
  }

  .book-btn {
    margin-top: clamp(18px, 3vw, 25px);
    padding: clamp(12px, 2.5vw, 16px) clamp(14px, 2.5vw, 20px);
    font-size: clamp(13px, 2.5vw, 15px);
  }
}

/* Small Mobile (up to 480px) */
@media (max-width: 480px) {
  .mentorshipform-hero {
    margin-top: 60px;
    padding: clamp(35px, 5vw, 50px) 4% clamp(25px, 4vw, 30px);
  }

  .mentorshipform-hero h1 {
    font-size: clamp(1.4rem, 5vw, 1.7rem);
  }

  .mentorshipform-hero p {
    font-size: clamp(0.85rem, 2vw, 0.95rem);
  }

  .overlay {
    padding-top: 80px;
    padding-bottom: clamp(15px, 3vw, 20px);
    padding-left: 10px;
    padding-right: 10px;
  }

  .mentorship-card {
    padding: clamp(14px, 3vw, 20px) clamp(12px, 3vw, 18px);
    border-radius: 16px;
  }

  .header-subtitle {
    font-size: clamp(0.75rem, 2vw, 13px);
  }

  .field input,
  .field select,
  .field textarea {
    padding: clamp(9px, 2vw, 11px) clamp(9px, 2vw, 12px);
    font-size: clamp(12px, 2.5vw, 14px);
  }

  textarea {
    height: clamp(80px, 12vw, 100px);
  }

  .calendar {
    padding: clamp(8px, 2vw, 12px);
  }

  .cal-header {
    margin-bottom: clamp(8px, 2vw, 12px);
  }

  .nav-btn {
    width: clamp(24px, 5vw, 32px);
    height: clamp(24px, 5vw, 32px);
    font-size: clamp(14px, 3vw, 18px);
  }

  .days span {
    font-size: clamp(9px, 2vw, 11px);
  }

  .dates span {
    width: clamp(24px, 5vw, 32px);
    height: clamp(24px, 5vw, 32px);
    line-height: clamp(24px, 5vw, 32px);
    font-size: clamp(10px, 2.5vw, 12px);
  }

  .time-slots {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(5px, 1.5vw, 8px);
  }

  .time-slots button {
    padding: clamp(8px, 2vw, 10px) clamp(4px, 1.5vw, 8px);
    font-size: clamp(10px, 2.5vw, 12px);
    border-radius: 10px;
  }

  .payment-card {
    padding: clamp(10px, 2.5vw, 14px) clamp(12px, 2.5vw, 16px);
  }

  .payment-text {
    font-size: clamp(12px, 2.5vw, 14px);
  }

  .agree-text {
    font-size: clamp(11px, 2vw, 12px);
  }

  .book-btn {
    margin-top: clamp(15px, 3vw, 20px);
    padding: clamp(12px, 2.5vw, 14px) clamp(12px, 2.5vw, 16px);
    font-size: clamp(12px, 2.5vw, 14px);
    border-radius: 12px;
  }
}

/* Booking Success Modal */
.booking-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.booking-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.booking-modal-content {
  background-color: #ffffff;
  border-radius: 16px;
  width: 95%;
  max-width: 550px;
  padding: 0px 20px 10px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  transform: translateY(30px) scale(0.95);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
  overflow: hidden;
  position: relative;
  max-height: 95vh;
  overflow-y: auto;
}

.invoice-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  opacity: 0;
  pointer-events: none;
  z-index: 99; /* Move to the Very Top */
  display: block;
  transition: opacity 0.3s ease;
}

.invoice-watermark img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Ensure content is above watermark and has solid backgrounds where needed */
.booking-modal-header, 
.booking-modal-body,
.booking-modal-footer {
  position: relative;
  z-index: 2;
}

.booking-modal-overlay.active .booking-modal-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.booking-modal-header {
  text-align: center;
  margin-top: 0;
  margin-bottom: 5px;
}

.close-modal-x {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
  padding: 5px;
  border-radius: 50%;
  transition: color 0.2s, background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  z-index: 10;
}

.close-modal-x:hover {
  color: #0f172a;
  background-color: #f1f5f9;
}

.invoice-logo-ratio {
  width: 140px;
  height: auto;
  margin: 0 auto 5px auto;
  animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  animation-delay: 0.2s;
  opacity: 0;
  transform: scale(0.5);
  text-align: center;
}

.invoice-logo-ratio img {
  width: 100%;
  height: 100%;
}

.booking-modal-header h3 {
  font-family: var(--font-secondary, 'Forum', serif);
  font-size: 1.8rem;
  color: #1a1a1a;
  margin: 0;
}

.booking-modal-desc {
  font-family: var(--font-primary, 'Outfit', sans-serif);
  font-size: 0.95rem;
  color: #4b5563;
  text-align: center;
  margin: 0 0 20px 0;
  line-height: 1.5;
}

.booking-details-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 15px;
  margin-bottom: 10px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dotted #e2e8f0;
}

.detail-row:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.detail-label {
  font-family: var(--font-primary, 'Outfit', sans-serif);
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.detail-value {
  font-family: var(--font-primary, 'Outfit', sans-serif);
  font-size: 0.9rem;
  color: #0f172a;
  font-weight: 600;
  text-align: right;
  max-width: 60%;
  word-break: break-all;
}

.booking-modal-footer {
  text-align: center;
}

.done-btn {
  background: #1c323a;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-family: var(--font-primary, 'Outfit', sans-serif);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  width: 100%;
}

.done-btn:hover {
  background: #102a43;
}

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

@keyframes scaleIn {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.invoice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.invoice-grid-3-col {
  grid-template-columns: 1fr;
}

@media (max-width: 550px) {
  .invoice-grid, .invoice-grid-3-col {
    grid-template-columns: 1fr;
  }
}

.invoice-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.invoice-item .detail-label {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-bottom: 2px;
}

.invoice-item .detail-value {
  font-size: 0.85rem;
  color: #0f1f22;
  text-align: left;
  max-width: 100%;
}

.strikethrough {
  text-decoration: line-through;
  color: #94a3b8 !important;
}

.invoice-section {
  position: relative;
}

.invoice-split-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 600px) {
  .invoice-split-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}



@page {
  size: A4;
  margin: 0;
}

@media print {
  
  body {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    background: white !important;
  }

  /* Completely hide everything else to avoid extra pages and layout shifts */
  header, footer, section, main > *:not(.overlay), .cta-container, #dev-preview-popup {
    display: none !important;
  }

  body > *:not(#booking-success-modal) {
    display: none !important;
  }

  html, body {
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
  }

  #booking-success-modal {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    width: 100% !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    background: white !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding-top: 15mm !important;
    padding-bottom: 0mm !important;
  }

  .booking-modal-overlay {
    background: white !important;
    backdrop-filter: none !important;
    padding: 0 !important;
  }

  .booking-modal-content {
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    max-width: 180mm !important;
    margin: 0 auto !important;
    padding: 20px !important;
    transform: none !important;
    display: block !important;
  }

  .booking-modal-footer, 
  .close-modal-x {
    display: none !important;
  }

  .booking-modal-header {
    margin-bottom: 50px !important;
  }

  .booking-details-card {
    border: none !important;
    background: transparent !important;
    margin: 50px auto !important;
    padding: 30px !important;
  }

  .invoice-logo-ratio {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    display: block !important;
    width: 250px !important;
    margin-bottom: 20px !important;
  }

  .invoice-watermark {
    opacity: 0.1 !important;
    display: block !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
  }

  /* Matches PDF font scaling for print */
  h3 { font-size: 2rem !important; }
  .booking-modal-header p { font-size: 1.15rem !important; margin-bottom: 25px !important; }
  .detail-label { font-size: 1.15rem !important; }
  .detail-value { font-size: 1.25rem !important; }
  div[style*="font-size: 0.85rem"] { font-size: 1.2rem !important; }
  .invoice-section h4 { font-size: 1rem !important; }
  .detail-row { padding-top: 10px !important; padding-bottom: 10px !important; }
  #modal-discount-percent { font-size: 1em !important; }
}

/* PDF Export Mode Overrides (html2pdf download only) */
.pdf-export-mode h3 {
  font-size: 2rem !important;
}

.pdf-export-mode .booking-modal-header p {
  font-size: 1.15rem !important;
  margin-bottom: 25px !important;
}

.pdf-export-mode .detail-label {
  font-size: 1.15rem !important;
}

.pdf-export-mode .detail-value {
  font-size: 1.25rem !important;
}

.pdf-export-mode .invoice-logo-ratio {
  margin-bottom: 30px !important;
}

.pdf-export-mode div[style*="font-size: 0.85rem"] {
  font-size: 1.2rem !important;
}

.pdf-export-mode .invoice-section h4 {
  font-size: 1rem !important;
}

.pdf-export-mode .detail-row {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

.pdf-export-mode #modal-discount-percent {
  font-size: 1em !important;
}