/* css/style.css */

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body & Typography */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(135deg, #F2F2F7 0%, #E5E5EA 100%);
  color: #1d1d1f;
  line-height: 1.6;
  min-height: 100vh;
  padding: 20px;
}

/* Container */
.container {
  max-width: 800px;
  margin: 80px auto;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

/* Headings */
h1 {
  text-align: center;
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
  color: #1d1d1f;
}
.subtitle {
  text-align: center;
  color: #86868b;
  font-size: 1.2rem;
  margin-bottom: 40px;
}

/* Calculator */
.calculator-container {
  background: #f5f5f7;
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 40px;
  border: 1px solid #e5e5e7;
}
.input-group {
  margin-bottom: 25px;
}

/* Stiliseret stort inputfelt */
.distance-group input[type="number"] {
  width: 100%;
  font-size: 1.4rem;
  padding: 15px 20px;
  border: 2px solid #d2d2d7;
  border-radius: 12px;
  background: white;
  color: #1d1d1f;
  text-align: center;
  -moz-appearance: textfield; /* Firefox: fjern spin-knapper */
}
.distance-group input::-webkit-outer-spin-button,
.distance-group input::-webkit-inner-spin-button {
  -webkit-appearance: none;   /* Chrome/Safari: fjern spin-knapper */
  margin: 0;
}
.distance-group input:focus {
  outline: none;
  border-color: #007aff;
  box-shadow: 0 0 0 4px rgba(0,122,255,0.2);
}
.distance-group label {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 8px;
  display: block;
  color: #1d1d1f;
}


/* Time selectors */
.time-group .time-selectors {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.time-selector {
  flex: 1;
}
.time-selector select {
  width: 100%;
  padding: 10px;
  border: 2px solid #d2d2d7;
  border-radius: 12px;
  font-size: 1rem;
  background: white;
  -webkit-appearance: none;
  appearance: none;
}
.time-selector label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
  color: #1d1d1f;
  font-size: 0.9rem;
}

.calculate-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #007aff, #5856d6);
 	color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer; 
  transition: all 0.3s ease; 
  margin-top: 20px;
}
.calculate-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(0, 122, 255, 0.3);
}
.calculate-btn:active {
  transform: translateY(-1px);
}

/* Results */
.results {
  margin-top: 30px;
  padding: 25px;
  background: white;
  border-radius: 16px;
  border: 2px solid #34c759;
  display: none;
}
.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
	border-bottom: 1px solid #f2f2f7;
  font-size: 1.1rem;
}
.result-item:last-child {
  border-bottom: none;
}
.result-label {
  font-weight: 600;
  color: #1d1d1f;
}
.result-value {
  font-weight: 700;
  color: #007aff;
 	font-size: 1.3rem;
}

/* Estimated Times */
.times-table {
  margin-top: 40px;
  background: white;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  display: none;
}
.times-table h3 {
  color: #1d1d1f;
  margin-bottom: 20px;
 	font-size: 1.5rem;
 	text-align: center;
}
.distance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
 	gap: 15px;
}
.distance-item {
  background: #f5f5f7;
  padding: 15px 20px;
 	border-radius: 12px;
 	display: flex;
 	justify-content: space-between;
  align-items: center;
 	border: 1px solid #e5e5e7;
}
.distance-label {
  font-weight: 600;
  color: #1d1d1f;
}
.distance-time {
  font-weight: 700;
  color: #007aff;
}

/* Training Zones */
.training-zones .zone-grid {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:15px; margin-top:20px;
}
.zone-card { background:#f5f5f7; padding:15px; border-radius:12px; text-align:center; border-left:4px solid; }
.zone-1 { border-left-color:#34C759; } .zone-2 { border-left-color:#007AFF; }
.zone-3 { border-left-color:#FF9500; } .zone-4 { border-left-color:#FF3B30; }
.zone-5 { border-left-color:#AF52DE; }
.zone-pace { display:block; font-size:1.2rem; font-weight:700; color:#007aff; margin:8px 0; }

/* Race Predictions */
.race-predictions .pred-grid {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:15px; margin-top:20px;
}
.pred-card { background:#f5f5f7; padding:15px; border-radius:12px; text-align:center; }
.pred-distance { font-weight:600; color:#1d1d1f; }
.pred-time { font-weight:700; color:#007aff; }

/* Training Advice */
.training-advice h4 { margin-bottom:10px; color:#1d1d1f; }
.training-advice ul { list-style:disc; margin-left:20px; color:#515154; }
.training-advice li { margin-bottom:8px; }

/* Runner Category styling */
.runner-category {
  margin-top: 30px;
  background: #f5f5f7;
  border-left: 6px solid #007aff;
  padding: 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.runner-category h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0;
}

.runner-category strong {
  color: #007aff;
}
/* Runner Category & Table Styling */
.runner-category {
  margin-top: 30px;
  background: #ffffff;
  border-left: 6px solid #007aff;
  padding: 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
}

.runner-category h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0;
}

.runner-category strong {
  color: #007aff;
}

/* Category Table */
.category-table {
  margin-top: 20px;
  overflow-x: auto;
}

.category-table h4 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #1d1d1f;
}

.category-table table {
  width: 100%;
  border-collapse: collapse;
  background: #f5f5f7;
  border-radius: 12px;
  overflow: hidden;
}

.category-table th,
.category-table td {
  padding: 12px 15px;
  text-align: left;
}

.category-table thead {
  background: #007aff;
}

.category-table thead th {
  color: white;
  font-weight: 600;
}

.category-table tbody tr {
  border-bottom: 1px solid #e0e0e0;
}

.category-table tbody tr:last-child {
  border-bottom: none;
}

.category-table tbody tr.highlight {
  background: rgba(0, 122, 255, 0.1);
}

.category-table td {
  color: #1d1d1f;
  font-size: 0.95rem;
}

/* Training Advice Container Adjustment */
.training-advice {
  margin-top: 20px;
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.training-advice h4 {
  font-size: 1.3rem;
  color: #1d1d1f;
  margin-bottom: 10px;
}

.training-advice ul {
  list-style-type: disc;
  margin-left: 20px;
  color: #515154;
}

.training-advice li {
  margin-bottom: 8px;
  font-size: 0.95rem;
}


/* Udvid margins/padding på mobil for mere sidespace */
@media (max-width: 768px) {
  .container {
    padding: 20px;
    margin: 5px; /* øget margin */
  }
  .calculator-container,
  .times-table,
  .info-section {
    margin: 10px auto; /* øget afstand mellem sektioner */
    padding: 10px; /* lidt ekstra indvendig afstand */
  }
  .time-group .time-selectors {
    flex-direction: column; /* stabl dropdowns lodret */
    gap: 15px; /* øget mellemrum */
  }
  .time-selector {
    width: 100%;
  }
  .distance-grid {
    grid-template-columns: 1fr; /* en kolonne */
    gap: 15px;
  }
}
/* style.css (add these rules) */

/* Content Sections */
.content-section {
  margin-bottom: 40px;
}
.content-section h2 {
  font-size: 1.6rem;
  color: #1d1d1f;
  margin-bottom: 15px;
}
.content-section p {
  font-size: 1rem;
  color: #515154;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Highlight Box */
.highlight-box {
  background: #f5f5f7;
  border-left: 4px solid #007aff;
  padding: 15px 20px;
  border-radius: 8px;
  margin: 20px 0;
}
.highlight-box h3 {
  margin-top: 0;
  font-size: 1.2rem;
  color: #1d1d1f;
}
.highlight-box p {
  margin: 0.5rem 0 0;
}

/* Pace Categories */
.pace-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.pace-category {
  background: #ffffff;
  border: 1px solid #e5e5e7;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  text-align: center;
}
.pace-category h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #1d1d1f;
}
.pace-range {
  display: block;
  font-weight: 700;
  color: #007aff;
  margin-bottom: 10px;
}
.pace-category p {
  margin: 0;
  font-size: 0.95rem;
  color: #515154;
}

/* Improvement Tips */
.improvement-tips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.tip {
  background: #ffffff;
  border: 1px solid #e5e5e7;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.tip h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: #1d1d1f;
}
.tip p {
  margin: 0;
  font-size: 0.95rem;
  color: #515154;
}

/* Call to Action Section */
.cta-section {
  text-align: center;
  margin: 40px 0;
}
.cta-section h2 {
  font-size: 1.5rem;
  color: #1d1d1f;
  margin-bottom: 10px;
}
.cta-section p {
  font-size: 1rem;
  color: #515154;
  margin-bottom: 20px;
}
.cta-button {
  display: inline-block;
  background: #007aff;
  color: white;
  padding: 15px 30px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.3s ease;
}
.cta-button:hover {
  background: #005ecb;
  transform: translateY(-2px);
}
.cta-button:active {
  transform: translateY(-1px);
}

/* Links */
a {
  color: #007aff;
}
a:hover {
  text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .pace-categories, .improvement-tips {
    grid-template-columns: 1fr;
  }
  .cta-button {
    width: 100%;
    box-sizing: border-box;
  }
}

