/* 
   ==========================================================================
   Resilience & Recovery - Warm Minimalist Design System
   ========================================================================== 
*/

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* CSS Variables */
:root {
  /* Color Palette */
  --bg-primary: #fdfbf7;      /* Warm linen/cream */
  --bg-secondary: #f4f0ea;    /* Soft warm beige for cards/sections */
  --text-main: #2d2d2d;       /* Soft charcoal for high readability */
  --text-muted: #666059;      /* Warm muted grey for subtitles/meta */
  
  --primary: #b3541e;         /* Muted terracotta orange */
  --primary-hover: #964214;
  --secondary: #3a5043;       /* Muted sage green (sports/health connection) */
  --secondary-hover: #2d3f34;
  
  --border-color: #e5dfd5;    /* Soft warm border */
  --white: #ffffff;
  
  /* Typography */
  --font-serif: 'Lora', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Layout */
  --max-width: 960px;
  --header-height: 80px;
  
  /* Animations */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --shadow-sm: 0 2px 4px rgba(45, 45, 45, 0.05);
  --shadow-md: 0 4px 12px rgba(45, 45, 45, 0.08);
}

/* Dark Mode Overrides (Optional Toggle support) */
[data-theme="dark"] {
  --bg-primary: #121210;
  --bg-secondary: #1a1a17;
  --text-main: #f0ede6;
  --text-muted: #a0998f;
  --primary: #df7036;
  --primary-hover: #f18d59;
  --secondary: #5a7b66;
  --border-color: #2e2c28;
  --white: #1c1c19;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography elements */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5em;
  color: var(--text-main);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; margin-top: 1.5em; }
h3 { font-size: 1.35rem; margin-top: 1.2em; }

p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Header & Navigation custom tags (Web Components) */
site-header {
  display: block;
  width: 100%;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-main);
  text-decoration: none !important;
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 28px;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
  padding: 4px 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-main);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
}

/* Burger menu for Mobile */
.burger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
}
.burger div {
  width: 24px;
  height: 2px;
  background-color: var(--text-main);
  margin: 5px;
  transition: all var(--transition-fast);
}

/* Footer custom tag (Web Components) */
site-footer {
  display: block;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  padding: 48px 0;
  margin-top: 64px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.footer-disclaimer {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.5;
  border-left: 2px solid var(--primary);
  padding-left: 12px;
}

.footer-socials {
  display: flex;
  gap: 20px;
  margin-top: 8px;
}

.social-icon {
  color: var(--text-muted);
  font-size: 1.2rem;
}
.social-icon:hover {
  color: var(--primary);
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Home Page Hero Section */
.hero {
  padding: 64px 0 40px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-text h1 {
  font-size: 2.85rem;
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 24px;
}

.hero-description {
  margin-bottom: 32px;
  color: var(--text-main);
  font-size: 1.1rem;
}

.hero-image-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-img {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--bg-secondary);
  box-shadow: var(--shadow-md);
}

/* CTA Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none !important;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white) !important;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-secondary);
  color: var(--text-main) !important;
  border: 1px solid var(--border-color);
  margin-left: 12px;
}

.btn-secondary:hover {
  background-color: var(--border-color);
}

/* Section Header styling */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin: 48px 0 24px;
}

.section-header h2 {
  margin: 0;
}

.section-header a {
  font-size: 0.95rem;
  font-weight: 600;
}

/* Grid Layouts */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* Cards (Blog Teasers & YouTube videos) */
.card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background-color: var(--bg-secondary);
}

.card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  gap: 12px;
}

.card-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  font-family: var(--font-serif);
}

.card-title a {
  color: var(--text-main);
  text-decoration: none;
}
.card-title a:hover {
  color: var(--primary);
}

.card-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex-grow: 1;
}

.card-link {
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Responsive YouTube Embed Component */
.youtube-player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  background-color: #000;
}

.youtube-player-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* My Story / Reading view layout */
.reading-layout {
  max-width: 680px;
  margin: 40px auto;
}

.reading-layout h1 {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.reading-meta {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.reading-content p {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: var(--text-main);
}

.reading-content img {
  width: 100%;
  border-radius: 8px;
  margin: 32px 0;
}

.reading-content blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  border-left: 3px solid var(--primary);
  padding-left: 20px;
  margin: 32px 0;
  color: var(--text-muted);
}

/* Workouts Timeline */
.workout-timeline {
  position: relative;
  padding-left: 32px;
  margin: 32px 0;
}

.workout-timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background-color: var(--border-color);
}

.workout-item {
  position: relative;
  margin-bottom: 40px;
}

.workout-item::before {
  content: '';
  position: absolute;
  left: -27px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--primary);
  border: 3px solid var(--bg-primary);
}

.workout-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.workout-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.workout-date {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.workout-type {
  font-size: 1.2rem;
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--primary);
}

.workout-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.stat-box {
  background-color: var(--bg-secondary);
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.9rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.stat-value {
  font-weight: 600;
  color: var(--text-main);
}

.workout-notes {
  font-size: 1rem;
  color: var(--text-main);
  font-style: italic;
}

/* Contact Form Styling */
.contact-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  padding: 40px 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-group input,
.form-group textarea {
  padding: 12px;
  border: 1px solid var(--border-color);
  background-color: var(--white);
  color: var(--text-main);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.info-item h4 {
  margin-bottom: 4px;
  color: var(--primary);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
    padding: 32px 0;
  }
  .hero-image-wrapper {
    order: -1;
  }
  
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    gap: 16px;
    box-shadow: var(--shadow-md);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .burger {
    display: block;
  }
  
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.5rem; }
}

/* Roadmap / Curvy Timeline Styling */
.roadmap-container {
  position: relative;
  max-width: 800px;
  margin: 60px auto;
  padding: 40px 0;
}

/* The curved pathway line in the center */
.roadmap-line {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 3px;
  z-index: 1;
}

.roadmap-nodes {
  position: relative;
  z-index: 2;
}

.roadmap-node {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
  width: 100%;
  position: relative;
}

.roadmap-node:nth-child(odd) {
  flex-direction: row-reverse;
}

.roadmap-content {
  width: 45%;
  padding: 20px 24px;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
}

/* Alternating visual borders for a curved flow feel */
.roadmap-node:nth-child(even) .roadmap-content {
  border-left: 4px solid var(--primary);
  border-radius: 0 12px 12px 0;
}

.roadmap-node:nth-child(odd) .roadmap-content {
  border-right: 4px solid var(--secondary);
  border-radius: 12px 0 0 12px;
  text-align: right;
}

.roadmap-content:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background-color: var(--bg-secondary);
}

.roadmap-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  border: 4px solid var(--primary);
  z-index: 3;
  transition: all var(--transition-fast);
}

.roadmap-node:nth-child(odd) .roadmap-dot {
  border-color: var(--secondary);
}

.roadmap-node:hover .roadmap-dot {
  transform: translateX(-50%) scale(1.3);
  background: var(--primary);
}

.roadmap-node:nth-child(odd):hover .roadmap-dot {
  background: var(--secondary);
}

.roadmap-year {
  display: inline-block;
  background-color: var(--primary);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 10px;
  font-family: var(--font-sans);
  letter-spacing: 0.5px;
}

.roadmap-node:nth-child(odd) .roadmap-year {
  background-color: var(--secondary);
}

.roadmap-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.6;
}

.roadmap-subtext {
  margin-top: 14px;
  padding: 8px 12px;
  background-color: var(--bg-secondary);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-muted);
  display: inline-block;
  border-left: 3px solid var(--primary);
  text-align: left;
}

.roadmap-node:nth-child(odd) .roadmap-subtext {
  border-left: none;
  border-right: 3px solid var(--secondary);
  text-align: right;
}

/* Desktop Connectors */
@media (min-width: 769px) {
  .roadmap-node::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 5%;
    height: 2px;
    background: var(--border-color);
    z-index: 1;
  }
  .roadmap-node:nth-child(even)::after {
    left: 45%;
  }
  .roadmap-node:nth-child(odd)::after {
    right: 45%;
  }
}

/* Mobile responsive styles for the curvy roadmap */
@media (max-width: 768px) {
  .roadmap-line {
    left: 20px;
    transform: none;
  }
  .roadmap-node {
    flex-direction: row !important;
    justify-content: flex-start;
    padding-left: 45px;
    margin-bottom: 32px;
  }
  .roadmap-content {
    width: 100%;
    text-align: left !important;
    border-radius: 0 12px 12px 0 !important;
    border-left: 4px solid var(--primary) !important;
    border-right: none !important;
    padding: 16px 20px;
  }
  .roadmap-dot {
    left: 20px;
    transform: translateX(-50%);
  }
  .roadmap-node:hover .roadmap-dot {
    transform: translateX(-50%) scale(1.2);
  }
}

/* About Page Columns & Medical Sidebar */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: start;
  margin-top: 40px;
}

.about-main {
  width: 100%;
}

.medical-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 100px; /* Stays fixed as you scroll through the timeline */
  padding-bottom: 40px;
}

.medical-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.medical-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.medical-card h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
  color: var(--primary); /* Heart - Terracotta Orange */
}

/* Lung card - Sage Green accent */
.medical-card:nth-child(2) h3 {
  color: var(--secondary);
}

/* Bone card - Muted Gold/Brown accent */
.medical-card:nth-child(3) h3 {
  color: #a37628;
}

.medical-section {
  margin-bottom: 12px;
}

.medical-section:last-child {
  margin-bottom: 0;
}

.medical-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.medical-value {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.5;
}

/* Responsive adjustment for About columns */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .medical-sidebar {
    position: static;
    padding-bottom: 0;
  }
}

/* 
   ==========================================================================
   Intervals.icu Completed Training Calendar Integration Styles
   ========================================================================== 
*/

/* Button Styles */
.btn {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
}
.btn-primary {
  background-color: var(--primary);
  color: var(--white);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
}
.btn-secondary {
  background-color: var(--bg-secondary);
  color: var(--text-main);
  border-color: var(--border-color);
}
.btn-secondary:hover {
  background-color: var(--border-color);
}
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 1.1rem;
}

/* Calendar Section & Controls */
.intervals-section {
  margin-top: 48px;
}
.section-divider {
  border: 0;
  height: 1px;
  background-color: var(--border-color);
  margin-bottom: 40px;
}
.calendar-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}
.control-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.calendar-current-month {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-main);
  min-width: 180px;
  text-align: center;
}

/* Calendar Stats Dashboard */
.calendar-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}
.stat-num {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--primary);
}
.stat-lbl {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Calendar Grid Layout */
.intervals-calendar-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 24px;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background-color: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  gap: 1px; /* Divider line effect */
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  width: 100%;
  min-width: 680px;
}
.grid-header {
  background-color: var(--bg-secondary);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  padding: 12px 6px;
}
.grid-cell {
  background-color: var(--white);
  min-height: 80px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  transition: background-color var(--transition-fast);
}
.grid-cell.cell-padded {
  background-color: var(--bg-secondary);
  color: var(--text-muted);
  opacity: 0.5;
}
.grid-cell.cell-today {
  background-color: #fffdf7;
}
[data-theme="dark"] .grid-cell.cell-today {
  background-color: #221d15;
}
.cell-day-num {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  align-self: flex-start;
}
.grid-cell.cell-today .cell-day-num {
  color: var(--primary);
  font-weight: 700;
}
.cell-activities-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
}

/* Activity Badges */
.calendar-workout-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  text-align: left;
  border: 1px solid;
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1.3;
  width: 100%;
  font-family: var(--font-sans);
}
.calendar-workout-badge:hover {
  filter: brightness(0.96) saturate(1.1);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.badge-icon {
  margin-right: 3px;
  font-size: 0.85rem;
}
.badge-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
.badge-meta {
  font-size: 0.65rem;
  opacity: 0.85;
  margin-top: 2px;
}

/* Demo Banner */
.demo-banner {
  background-color: #fffdf7;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 0.88rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--primary);
}
[data-theme="dark"] .demo-banner {
  background-color: #1a1611;
  color: #df7036;
  border-left-color: #df7036;
}

/* Loading indicator class */
.calendar-loading-active {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}
.calendar-loading-active::after {
  content: 'Syncing Training Data...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  border: 1px solid var(--border-color);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  color: var(--text-main);
  z-index: 10;
}

/* Modals */
.intervals-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(45, 45, 45, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}
.intervals-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.intervals-modal-box {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px;
  max-width: 480px;
  width: 90%;
  box-shadow: var(--shadow-md);
  position: relative;
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}
.intervals-modal-overlay.active .intervals-modal-box {
  transform: translateY(0);
}
.modal-box-large {
  max-width: 600px;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 0;
}
.modal-close:hover {
  color: var(--text-main);
}
.modal-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: var(--text-main);
}
.modal-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.45;
}

/* Forms styling */
.form-group {
  margin-bottom: 16px;
  text-align: left;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}
.form-group input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast);
}
.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}
.form-help {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* Detail Modal styling */
.detail-modal-header {
  padding-bottom: 16px;
  margin-bottom: 20px;
  text-align: left;
}
.detail-sport-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}
.detail-workout-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--text-main);
  margin-bottom: 4px;
}
.detail-workout-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.detail-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.detail-stat-box {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  text-align: left;
}
.detail-stat-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.detail-stat-val {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
}
.detail-notes-section {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  text-align: left;
}
.notes-header {
  font-family: var(--font-serif);
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--text-main);
}
.notes-body {
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.5;
}

/* Toast Notifications */
.intervals-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 24px;
  border-radius: 6px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 3000;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
  opacity: 0;
  pointer-events: none;
}
.intervals-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast-info { background-color: var(--secondary); }
.toast-success { background-color: #2e7d32; }
.toast-warning { background-color: #ef6c00; }
.toast-error { background-color: #c62828; }

/* Responsive adjustments for Calendar */
@media (max-width: 768px) {
  .calendar-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .calendar-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .control-left {
    justify-content: space-between;
  }
  .grid-header {
    font-size: 0.7rem;
    padding: 8px 2px;
  }
  .grid-cell {
    min-height: 70px;
    padding: 4px;
  }
  .calendar-workout-badge {
    padding: 4px;
    border-radius: 4px;
    border: none;
  }
  .badge-name {
    display: none; /* Hide text name to prevent clipping */
  }
  .badge-meta {
    font-size: 0.6rem;
    display: block;
    text-align: center;
    width: 100%;
    margin-top: 0;
  }
  .badge-icon {
    font-size: 0.9rem;
    margin: 0 auto;
    display: block;
    text-align: center;
  }
}

/* Subscribe Box Styling */
.subscribe-card {
  max-width: 600px;
  width: 100%;
  margin: 48px auto;
  padding: 32px 28px;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: box-shadow 0.3s ease;
}
.subscribe-card:hover {
  box-shadow: var(--shadow-md);
}
.subscribe-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.4;
}
.subscribe-help {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
  margin-bottom: 0;
}
.subscribe-form {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: center;
}
.subscribe-input {
  flex: 1;
  max-width: 320px;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  background-color: var(--white);
  color: var(--text-main);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.subscribe-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(198, 11, 30, 0.15); /* Light primary hue glow */
}
.subscribe-button {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  background-color: var(--primary);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color var(--transition-fast), transform 0.1s ease;
}
.subscribe-button:hover {
  background-color: var(--primary-dark);
}
.subscribe-button:active {
  transform: scale(0.98);
}
.subscribe-button:disabled {
  background-color: var(--border-color);
  color: var(--text-muted);
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .subscribe-form {
    flex-direction: column;
    align-items: stretch;
  }
  .subscribe-input {
    max-width: 100%;
  }
}


