/* ============================================================
   BASANT JOSHI PORTFOLIO — NEW FEATURES
   features.css — Dark Mode + Timeline + Testimonials + Analytics
   ============================================================ */

/* ── DARK MODE VARIABLES ─────────────────────────────────── */
body.dark-mode {
  --bg-primary:    #0d1117;
  --bg-secondary:  #161b22;
  --bg-card:       #1c2330;
  --accent:        #4da6e8;
  --accent-2:      #2a85c8;
  --accent-3:      #f0b429;
  --text-primary:  #e6edf3;
  --text-secondary:#8b949e;
  --text-muted:    #6e7681;
  --border:        rgba(77, 166, 232, 0.14);
  --border-hover:  rgba(77, 166, 232, 0.40);
  --gradient:      linear-gradient(135deg, #4da6e8, #2a85c8);
  --gradient-2:    linear-gradient(135deg, #2a85c8, #f0b429);
  --shadow-glow:   0 0 40px rgba(77, 166, 232, 0.14);
  --shadow-card:   0 8px 40px rgba(0, 0, 0, 0.40);
}

/* Fix specific elements in dark mode */
body.dark-mode .navbar.scrolled {
  background: rgba(13, 17, 23, 0.96);
}
body.dark-mode .nav-links {
  background: rgba(22, 27, 34, 0.98);
}
body.dark-mode .loader {
  background: var(--bg-primary);
}
body.dark-mode .form-group input,
body.dark-mode .form-group textarea {
  background: #161b22;
  color: var(--text-primary);
}
body.dark-mode .form-group input:focus,
body.dark-mode .form-group textarea:focus {
  background: #1c2330;
}
body.dark-mode #chatbot-box {
  background: #1c2330;
}
body.dark-mode #chatbot-messages {
  background: #161b22;
}
body.dark-mode .msg.bot {
  background: #1c2330;
  border-color: rgba(77, 166, 232, 0.2);
  color: var(--text-primary);
}
body.dark-mode #chatbot-input-area {
  background: #1c2330;
  border-top-color: rgba(77, 166, 232, 0.15);
}
body.dark-mode #chatbot-input {
  background: #161b22;
  border-color: rgba(77, 166, 232, 0.2);
  color: var(--text-primary);
}
body.dark-mode #chatbot-suggestions {
  background: #161b22;
  border-top-color: rgba(77, 166, 232, 0.15);
}
body.dark-mode .suggestion-btn {
  background: #1c2330;
  border-color: rgba(77, 166, 232, 0.2);
  color: var(--text-secondary);
}
body.dark-mode .blog-modal-inner {
  background: var(--bg-card);
  color: var(--text-primary);
}
body.dark-mode .blog-modal-inner * {
  color: var(--text-primary);
}
body.dark-mode .orb1 {
  background: radial-gradient(circle, rgba(77,166,232,0.10) 0%, transparent 70%);
}
body.dark-mode .orb2 {
  background: radial-gradient(circle, rgba(42,133,200,0.08) 0%, transparent 70%);
}

/* ── DARK MODE TOGGLE BUTTON ─────────────────────────────── */
.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--border-hover);
  background: rgba(255, 255, 255, 0.5);
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
  transform: rotate(20deg) scale(1.1);
}
body.dark-mode .theme-toggle {
  background: rgba(255,255,255,0.08);
}

/* ── TIMELINE SECTION ────────────────────────────────────── */
.timeline {
  background: var(--bg-primary);
  padding: 60px 5% 40px;
}
.timeline-track {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  padding: 10px 0;
}
/* Vertical center line */
.timeline-track::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  justify-content: flex-end;
  padding-right: calc(50% + 28px);
  margin-bottom: 24px;
  position: relative;
}
.timeline-item:nth-child(even) {
  justify-content: flex-start;
  padding-right: 0;
  padding-left: calc(50% + 28px);
}

/* Dot on the line */
.timeline-item::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gradient);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--accent), 0 0 10px rgba(42,133,200,0.4);
  z-index: 2;
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  max-width: 320px;
  width: 100%;
  transition: all var(--transition);
  position: relative;
}
.timeline-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}
.timeline-year {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(42, 133, 200, 0.10);
  border: 1px solid rgba(42, 133, 200, 0.25);
  border-radius: 50px;
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.timeline-card h4 {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.timeline-card .timeline-place {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.timeline-card p {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.timeline-icon {
  width: 28px;
  height: 28px;
  background: var(--gradient);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  margin-bottom: 8px;
}

/* Mobile timeline — single column */
@media (max-width: 700px) {
  .timeline-track::before { left: 18px; }
  .timeline-item,
  .timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-left: 52px;
    padding-right: 0;
  }
  .timeline-item::after {
    left: 18px;
  }
  .timeline-card { max-width: 100%; }
}

/* ── TESTIMONIALS SECTION ────────────────────────────────── */
.testimonials {
  background: var(--bg-secondary);
  padding: 60px 5% 50px;
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: stretch;
}
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.testimonial-text {
  flex: 1;
}
.testimonial-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}
/* Big quote mark */
.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 14px;
  right: 22px;
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.10;
  line-height: 1;
}
.testimonial-stars {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}
.testimonial-stars i {
  color: var(--accent-3);
  font-size: 0.85rem;
}
.testimonial-text {
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 24px;
  font-style: italic;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
}
.author-avatar {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(42,133,200,0.30);
}
.author-info {
  min-width: 0;
  flex: 1;
}
.author-info .author-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.author-info .author-role {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* FORCE avatar + name on same row */
.testimonial-author {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 14px !important;
}
.author-avatar {
  display: flex !important;
  flex-direction: row !important;
  align-self: center !important;
}

@media (max-width: 900px) {
  .testimonials-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .testimonials-grid { grid-template-columns: 1fr; }
}

/* ── GOOGLE ANALYTICS notice (invisible to users) ────────── */
/* Analytics tag is injected in <head> — no visual CSS needed */

/* ── SERVICES SECTION ────────────────────────────────────── */
.services {
  background: var(--bg-secondary);
  padding: 60px 5%;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  max-width: 1200px;
  margin: 0 auto;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition);
}
.service-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}
/* Featured/highlighted card */
.service-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-card);
  background: linear-gradient(160deg, var(--bg-card) 80%, rgba(42,133,200,0.04));
}
.service-featured:hover {
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-card), var(--shadow-glow);
}
.service-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 50px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(42,133,200,0.35);
}
.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--svc-color) 15%, #fff), color-mix(in srgb, var(--svc-color) 8%, #fff));
  border: 1px solid color-mix(in srgb, var(--svc-color) 25%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--svc-color);
  margin-bottom: 16px;
  transition: all var(--transition);
}
.service-card:hover .service-icon {
  background: var(--svc-color);
  color: #fff;
  transform: scale(1.08);
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.service-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}
.service-features {
  list-style: none;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}
.service-features li {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.service-features li i {
  color: var(--accent);
  font-size: 0.7rem;
  flex-shrink: 0;
}
.service-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.price-from {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}
.price-amount {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
}
.price-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.service-btn {
  display: block;
  text-align: center;
  padding: 11px 20px;
  background: transparent;
  border: 1.5px solid var(--accent);
  border-radius: 50px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  transition: all var(--transition);
  margin-top: auto;
}
.service-btn:hover,
.service-featured .service-btn {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(42,133,200,0.30);
}
.service-featured .service-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(42,133,200,0.45);
}

@media (max-width: 1100px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .services-grid { grid-template-columns: 1fr; }
}