/* 
================================================================
  CodecFactory - Custom Subpages CSS Stylesheet
  Contains specific layout helpers for:
  - Timeline (About & Case Studies)
  - Estimate Form & Sticky Sidebar (Service Details)
  - Traditional vs AI Business Comparison Table (AI Solutions)
  - Live AI Dashboard Mockup (AI Solutions)
  - Reading Progress & Sticky TOC (Blog Details)
  - Contact / Office Hours Details
  - Portfolio Category Tabs & Details Hover
  - General futuristic glows, custom cards & animations
================================================================
*/

/* Core CSS Variables for Gradients and Accents */
:root {
  --glow-purple: rgba(99, 102, 241, 0.15);
  --glow-cyan: rgba(6, 182, 212, 0.15);
  --glow-fuchsia: rgba(217, 70, 239, 0.15);
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(226, 232, 240, 0.8);
}

/* --- Interactive Timeline Component --- */
.timeline-container {
  position: relative;
  padding: 40px 0;
}
.timeline-container::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-purple), var(--accent-cyan), var(--accent-fuchsia));
  transform: translateX(-50%);
}
.timeline-item {
  position: relative;
  margin-bottom: 60px;
  width: 50%;
}
.timeline-item:nth-child(odd) {
  left: 0;
  padding-right: 40px;
  text-align: right;
}
.timeline-item:nth-child(even) {
  left: 50%;
  padding-left: 40px;
  text-align: left;
}
.timeline-badge {
  position: absolute;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-white);
  border: 4px solid var(--accent-purple);
  z-index: 10;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.timeline-item:nth-child(odd) .timeline-badge {
  right: -12px;
}
.timeline-item:nth-child(even) .timeline-badge {
  left: -12px;
}
.timeline-item:hover .timeline-badge {
  transform: scale(1.3);
  border-color: var(--accent-fuchsia);
}
.timeline-content {
  background: var(--bg-white);
  padding: 30px;
  border-radius: var(--border-radius-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.timeline-item:hover .timeline-content {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99, 102, 241, 0.3);
}
.timeline-date {
  font-weight: 800;
  font-size: 14px;
  color: var(--accent-purple);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

@media (max-width: 768px) {
  .timeline-container::before {
    left: 20px;
  }
  .timeline-item {
    width: 100% !important;
    left: 0 !important;
    padding-left: 50px !important;
    padding-right: 0 !important;
    text-align: left !important;
  }
  .timeline-badge {
    left: 8px !important;
  }
}

/* --- Sticky Sidebar & Estimate Form --- */
.sticky-sidebar {
  position: sticky;
  top: 100px;
  z-index: 10;
}
.estimate-form-card {
  background: var(--bg-white);
  border-radius: var(--border-radius-card);
  border: 1px solid var(--border-color);
  padding: 30px;
  box-shadow: var(--shadow-lg);
}
.estimate-form-card .form-control, 
.estimate-form-card .form-select {
  border-radius: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  font-family: "Inter Tight", sans-serif;
  background-color: var(--bg-primary);
  font-size: 14px;
  transition: all 0.3s ease;
}
.estimate-form-card .form-control:focus, 
.estimate-form-card .form-select:focus {
  background-color: var(--bg-white);
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* --- Traditional vs AI Business Comparison --- */
.comparison-table-wrapper {
  overflow-x: auto;
  border-radius: 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-white);
  font-family: "Inter Tight", sans-serif;
}
.comparison-table th {
  background: var(--bg-dark);
  color: var(--bg-white);
  padding: 20px 24px;
  font-weight: 700;
  text-align: left;
  font-size: 16px;
}
.comparison-table td {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}
.comparison-table tr:last-child td {
  border-bottom: none;
}
.comparison-table tr:hover {
  background-color: rgba(99, 102, 241, 0.02);
}
.comparison-traditional {
  color: var(--text-muted);
}
.comparison-ai {
  font-weight: 600;
  color: var(--accent-purple);
  background-color: rgba(6, 182, 212, 0.03);
}

/* --- Live AI Dashboard Mockup --- */
.dashboard-mockup-wrapper {
  background: var(--bg-dark);
  border-radius: 32px;
  padding: 12px;
  box-shadow: 0 30px 60px rgba(11, 15, 25, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}
.dashboard-mockup-wrapper::before {
  content: '';
  position: absolute;
  top: -150px;
  right: -150px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--glow-cyan) 0%, transparent 70%);
  z-index: 1;
  pointer-events: none;
}
.dashboard-window {
  background: #0f172a;
  border-radius: 24px;
  overflow: hidden;
  z-index: 2;
  position: relative;
}
.dashboard-header {
  background: #1e293b;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.dashboard-dots {
  display: flex;
  gap: 8px;
}
.dashboard-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dashboard-dot.red { background-color: #ef4444; }
.dashboard-dot.yellow { background-color: #eab308; }
.dashboard-dot.green { background-color: #22c55e; }

.dashboard-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  height: 480px;
}
@media (max-width: 992px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
}
.dashboard-sidebar {
  background: #0f172a;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  padding: 24px 16px;
}
.dashboard-sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}
.dashboard-sidebar-item {
  padding: 10px 16px;
  border-radius: 8px;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  margin-bottom: 4px;
  transition: all 0.25s ease;
}
.dashboard-sidebar-item.active, .dashboard-sidebar-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--bg-white);
}
.dashboard-main {
  background: #090d16;
  padding: 24px;
  overflow-y: auto;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
.dashboard-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 20px;
  color: var(--bg-white);
}
.dashboard-card-title {
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}
.dashboard-card-value {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}
.dashboard-card-value.cyan { color: var(--accent-cyan); }
.dashboard-card-value.purple { color: var(--accent-purple); }
.dashboard-card-value.green { color: #22c55e; }

.dashboard-chart-mock {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 24px;
  height: 220px;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.dashboard-chart-line {
  position: absolute;
  top: 40px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
}
.dashboard-chart-line.line-mid {
  top: 110px;
}
.dashboard-chart-line.line-low {
  top: 180px;
}
.dashboard-chart-bar {
  width: 14%;
  background: linear-gradient(to top, var(--accent-purple), var(--accent-fuchsia));
  border-radius: 6px;
  height: 50%;
  position: relative;
  animation: heightGrow 1s ease-out;
}
.dashboard-chart-bar:nth-child(3) { height: 75%; background: linear-gradient(to top, var(--accent-cyan), var(--accent-purple)); }
.dashboard-chart-bar:nth-child(4) { height: 40%; }
.dashboard-chart-bar:nth-child(5) { height: 90%; background: linear-gradient(to top, var(--accent-cyan), #22c55e); }
.dashboard-chart-bar:nth-child(6) { height: 60%; }

@keyframes heightGrow {
  from { height: 0%; }
}

/* --- Reading Progress Bar & TOC (Blog details) --- */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(to right, var(--accent-purple), var(--accent-fuchsia));
  width: 0%;
  z-index: 1100;
  transition: width 0.1s ease;
}
.blog-toc-card {
  position: sticky;
  top: 100px;
  background: var(--bg-white);
  border-radius: var(--border-radius-card);
  border: 1px solid var(--border-color);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.blog-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.blog-toc-item a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-secondary);
  font-family: "Inter Tight", sans-serif;
  transition: color 0.25s ease, padding-left 0.25s ease;
}
.blog-toc-item a:hover {
  color: var(--accent-purple);
  padding-left: 4px;
}
.blog-toc-item.active a {
  color: var(--accent-purple);
  font-weight: 600;
  border-left: 2px solid var(--accent-purple);
  padding-left: 10px;
}

/* --- Generic Gradient Glows and Modern Utilities --- */
.bg-mesh-glow {
  background: radial-gradient(circle at 10% 10%, rgba(99, 102, 241, 0.04) 0%, transparent 40%),
              radial-gradient(circle at 90% 90%, rgba(6, 182, 212, 0.04) 0%, transparent 40%);
}
.text-gradient-purple-cyan {
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.text-gradient-fuchsia-purple {
  background: linear-gradient(135deg, var(--accent-fuchsia) 0%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-card);
  transition: all 0.3s ease;
}
.glass-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: var(--shadow-lg);
}

/* Tech Grid Badge Styling */
.tech-grid-icon-box {
  width: 70px;
  height: 70px;
  background: var(--bg-primary);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  transition: all 0.35s ease;
  border: 1px solid var(--border-color);
}
.tech-grid-card:hover .tech-grid-icon-box {
  background: var(--text-dark);
  color: var(--bg-white);
  transform: scale(1.08) rotate(5deg);
}

/* Portfolio Hover Details */
.portfolio-grid-item {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
}
.portfolio-hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(11, 15, 25, 0.95), rgba(11, 15, 25, 0.4));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 5;
}
.portfolio-grid-item:hover .portfolio-hover-overlay {
  opacity: 1;
  visibility: visible;
}
.portfolio-hover-overlay .project-title {
  color: var(--bg-white);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}
.portfolio-hover-overlay .project-client {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

/* Category Filter Tabs Styling */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.filter-tab-btn {
  padding: 10px 24px;
  border-radius: 100px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  cursor: pointer;
}
.filter-tab-btn.active, .filter-tab-btn:hover {
  background: var(--text-dark);
  color: var(--bg-white);
  border-color: var(--text-dark);
}

/* --- Countdown Grid --- */
.countdown-container {
  display: flex;
  justify-content: center;
  gap: 20px;
}
.countdown-box {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 90px;
  height: 95px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}
.countdown-val {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1;
}
.countdown-lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 4px;
  font-weight: 600;
}
