/* Navigation dropdown styling */
nav li {
  position: relative;
}

nav li .submenu {
  list-style: none;
}

nav li .submenu li a {
  display: block;
  padding: 0.4rem 1rem;
  white-space: nowrap;
  color: var(--gray-dark);
}

nav li .submenu li a:hover {
  background-color: var(--gray-light);
}
/* Dropdown menu for overflow navigation items (More) */
nav .more-menu {
  position: relative;
}

nav .more-menu > a {
  cursor: pointer;
}

nav .more-menu .submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background-color: var(--white);
  box-shadow: var(--shadow);
  border-radius: var(--border-radius);
  display: none;
  z-index: 1000;
}

nav .more-menu .submenu li {
  white-space: nowrap;
}

nav .more-menu .submenu li a {
  display: block;
  padding: 0.4rem 1rem;
  color: var(--gray-dark);
}

nav .more-menu .submenu li a:hover {
  background-color: var(--gray-light);
}
/*
 * Kneed Website Stylesheet
 *
 * This stylesheet defines the core look and feel for the Kneed
 * platform. It takes inspiration from modern health‑tech products
 * like Waymo, Strava, Flo and Instructure Canvas. The palette
 * revolves around a warm coral tone (#FF7F50) that subtly changes
 * across sections to create depth and visual interest. We employ
 * responsive grid layouts, clean typography, subtle shadows and
 * generous whitespace to convey trust and clarity. Elements are
 * modular so additional pages can be added without disrupting the
 * design system. This file should be included on all pages via
 * `<link rel="stylesheet" href="style.css">`.
 */

/*
 * Import additional typefaces to approximate the character of the brands
 * referenced in our design research. While GT Walsheim, Maison Neue,
 * Proxima Nova and other proprietary typefaces are not freely available,
 * we leverage similar open fonts: Poppins for headlines (echoing the
 * geometric, friendly tone of Waymo’s GT Walsheim and Strava’s Maison Neue),
 * and Lato for body copy (a clean humanist sans similar to Proxima Nova).
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Poppins:wght@400;600;700&family=Lato:wght@400;700&display=swap');

:root {
  --coral: #ff7f50;
  --coral-dark: #e56a3e;
  --coral-light: #ffb292;
  --gray-dark: #2a2a2a;
  --gray: #555;
  --gray-light: #f9fafb;
  --white: #ffffff;
  --border-radius: 8px;
  --transition: all 0.3s ease;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Lato', 'Inter', sans-serif;
}

html, body {
  margin: 0;
  padding: 0;
  /* Use our custom body font for a more polished, friendly feel */
  font-family: var(--font-body);
  color: var(--gray-dark);
  background-color: var(--gray-light);
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* Headings use our headline font reminiscent of the brands we studied */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
}

a {
  color: var(--coral);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--coral-dark);
  text-decoration: underline;
}

/* Navigation Bar */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--white);
  box-shadow: var(--shadow);
}
nav {
  display: flex;
  align-items: center;
  /* Allow navigation items to wrap when there are many links so
     that additional components like the search bar and user
     actions remain visible without horizontal scrolling. */
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.8rem 1.2rem;
}
nav .logo {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--coral);
}
nav ul {
  list-style: none;
  display: flex;
  gap: 1.4rem;
  margin: 0;
  padding: 0;
  /* Wrap navigation items onto multiple lines if necessary */
  flex-wrap: wrap;
}
nav li {
  position: relative;
}
nav li a {
  font-weight: 500;
  color: var(--gray-dark);
  transition: var(--transition);
}
nav li a:hover {
  color: var(--coral);
}
nav .user-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
nav .btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: var(--border-radius);
  background-color: var(--coral);
  color: var(--white);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}
nav .btn:hover {
  background-color: var(--coral-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: var(--white);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.4), rgba(0,0,0,0.6));
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  padding: 0 2rem;
}
.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.hero p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}
.hero .cta-buttons {
  display: flex;
  gap: 1rem;
}
.hero .cta-buttons .btn-secondary {
  background-color: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}
.hero .cta-buttons .btn-secondary:hover {
  background-color: var(--white);
  color: var(--coral);
}

/* Button groups used in the assessment form */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.btn-group .option-btn {
  padding: 0.5rem 0.8rem;
  border-radius: var(--border-radius);
  background-color: var(--coral-light);
  color: var(--coral-dark);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.btn-group .option-btn.active,
.btn-group .option-btn:hover {
  background-color: var(--coral);
  color: var(--white);
}

/* --- Task Page Styles --- */
/* Layout wrapper for the assignments page: two columns on wide screens,
   stacked on small devices */
.tasks-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

/* List of assignment cards */
.assignments-list {
  flex: 2;
  min-width: 300px;
}

/* Individual assignment card. Uses a gentle shadow and rounded corners
   inspired by Canvas's assignment tiles. */
.assignment-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Title row containing the task name and optional icon */
.assignment-card .title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.assignment-card h3 {
  margin: 0;
  font-size: 1.1rem;
  font-family: var(--font-heading);
}

/* Details row containing due date and status */
.assignment-card .details-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--gray);
}

.assignment-card .details-row .due-date {
  font-weight: 600;
  color: var(--gray-dark);
}

.assignment-card .details-row .status {
  background-color: var(--gray-light);
  padding: 0.1rem 0.6rem;
  border-radius: var(--border-radius);
  font-weight: 600;
}

.assignment-card .details-row .status.completed {
  background-color: rgba(0, 180, 95, 0.15);
  color: #007a2a;
}

.assignment-card .details-row .status.overdue {
  background-color: rgba(255, 0, 0, 0.1);
  color: #c00;
}

/* Action button on assignment cards. Mimics a floating button with
   raised effect and grows slightly on hover. */
.assignment-card .action-btn {
  align-self: flex-start;
  background-color: var(--coral);
  color: var(--white);
  padding: 0.4rem 0.8rem;
  border-radius: var(--border-radius);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
  font-weight: 600;
}
.assignment-card .action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  background-color: var(--coral-dark);
}

/* Container for progress gauge and streak summary */
.tasks-stats {
  flex: 1;
  min-width: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  padding: 1rem;
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.progress-label {
  font-weight: 600;
  font-size: 1rem;
  color: var(--gray-dark);
}

.streak-label {
  font-size: 0.9rem;
  color: var(--gray);
}

/* Collapsible content area for the "Why should I care" explanation */
.collapse-content p {
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* Back to top button (positioning is handled in JS) */
.back-to-top {
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.2rem;
}

/* Section Base */
.section {
  padding: 4rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Patterned sections inspired by Waymo’s playful flares
   Add the `.bg-pattern` class to any section to apply a very subtle
   wave background. The pattern uses one of our generated coral
   images with low opacity to evoke motion without overwhelming
   content. */
.section.bg-pattern {
  position: relative;
  overflow: hidden;
}
.section.bg-pattern::before {
  content: '';
  position: absolute;
  top: -50px;
  left: -50px;
  width: 150%;
  height: 150%;
  background-image: url('images/pattern2.png');
  background-size: cover;
  background-repeat: no-repeat;
  /* Slightly increase opacity to make the playful flares more noticeable,
     evoking Waymo’s decorative patterns. */
  opacity: 0.06;
  z-index: -1;
  transform: rotate(5deg);
}
.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  font-weight: 700;
  color: var(--gray-dark);
}

/* Features Grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.feature-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem 1.2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.feature-card i {
  font-size: 2rem;
  color: var(--coral);
  margin-bottom: 1rem;
}
.feature-card h3 {
  margin-bottom: 0.5rem;
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--gray);
}

/* Chart Section */
.chart-container {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

/* Cards (Shared) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.card-content {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.card-content h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  color: var(--coral);
}
.card-content p {
  flex-grow: 1;
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 1rem;
}
.card-content .btn-link {
  align-self: flex-start;
  background-color: var(--coral);
  color: var(--white);
  padding: 0.4rem 0.8rem;
  border-radius: var(--border-radius);
  font-size: 0.8rem;
}
.card-content .btn-link:hover {
  background-color: var(--coral-dark);
}

/* When hovering over the card the content lifts slightly to reveal
   additional detail in a subtle interactive motion. */
.card:hover .card-content {
  transform: translateY(-4px);
}

/*
 * Custom styles to mirror the layout from the provided screenshot.
 * The Our Service section uses a vertical, rotated heading on the left
 * and horizontally arranged service cards on the right. The Who We Help
 * section is simplified into horizontally aligned cards with imagery and
 * arrow links for calls to action.
 */
.our-service-section {
  display: flex;
  position: relative;
  overflow: hidden;
  margin-top: 2rem;
  margin-bottom: 2rem;
}
.our-service-section .vertical-title {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 700;
  color: var(--coral-light);
  white-space: nowrap;
  user-select: none;
}
.our-service-section .service-content {
  display: flex;
  flex: 1;
  justify-content: space-between;
  gap: 2rem;
  margin-left: 5rem;
}
.our-service-section .service-item {
  flex: 1;
  min-width: 200px;
}
.our-service-section .service-item h3 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: var(--gray-dark);
}
.our-service-section .service-item p {
  font-size: 0.95rem;
  color: var(--gray);
}

.who-help-section .help-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}
.who-help-section .help-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--white);
  padding: 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.who-help-section .help-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}
.who-help-section .help-card img {
  width: 100px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--border-radius);
  flex-shrink: 0;
}
.who-help-section .help-card-content h3 {
  margin-top: 0;
  margin-bottom: 0.3rem;
  font-size: 1.4rem;
  font-family: var(--font-heading);
  color: var(--gray-dark);
}
.who-help-section .help-card-content p {
  margin: 0 0 0.4rem 0;
  color: var(--gray);
}
.arrow-link {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  color: var(--coral);
  text-decoration: none;
  transition: color 0.2s ease;
}
.arrow-link::after {
  content: '\2192';
  margin-left: 0.4rem;
  transition: margin-left 0.2s ease;
}
.arrow-link:hover {
  color: var(--coral-dark);
}
.arrow-link:hover::after {
  margin-left: 0.6rem;
}

/* Product filters */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: center;
}
.filter-bar input[type="text"] {
  padding: 0.6rem;
  border-radius: var(--border-radius);
  border: 1px solid #ccc;
  flex-grow: 1;
  min-width: 200px;
}
.filter-btn {
  background-color: var(--coral-light);
  color: var(--coral-dark);
  padding: 0.5rem 0.8rem;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn.active, .filter-btn:hover {
  background-color: var(--coral);
  color: var(--white);
}

/* Tasks Page */
.tasks-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}
.tasks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.progress-bar {
  background-color: var(--gray-light);
  border-radius: var(--border-radius);
  overflow: hidden;
  height: 10px;
  margin-top: 0.5rem;
}
.progress-bar div {
  height: 100%;
  background-color: var(--coral);
  width: 0;
  transition: width 0.4s ease;
}

/* Coach dashboard table styling */
.coach-table {
  width: 100%;
  border-collapse: collapse;
}
.coach-table th, .coach-table td {
  padding: 0.8rem 0.5rem;
  border-bottom: 1px solid #eaeaea;
  vertical-align: middle;
}
.coach-table th {
  background-color: var(--gray-light);
  font-weight: 600;
}
.coach-table form input[type="text"] {
  flex: 1;
  min-width: 100px;
}
.coach-table form input[type="date"] {
  min-width: 140px;
}
.coach-table form .btn {
  padding: 0.4rem 0.6rem;
  font-size: 0.75rem;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 0.8rem;
  text-align: left;
  border-bottom: 1px solid #eaeaea;
}
th {
  background-color: var(--gray-light);
  font-weight: 600;
}
tr:nth-child(even) {
  background-color: #fbfbfb;
}
td.completed {
  text-decoration: line-through;
  color: var(--gray);
}
.award-message {
  margin-top: 1rem;
  padding: 1rem;
  background-color: var(--coral-light);
  border-radius: var(--border-radius);
  color: var(--coral-dark);
  display: none;
  text-align: center;
  font-weight: 600;
}

/* Tracking Page */
/*
 * The tracking page allows athletes to log daily wellness data—
 * things like pain level and activity intensity—similar to how
 * Flo’s period tracker helps users spot patterns over time. It
 * reuses many of the tasks styles for consistency but introduces
 * a distinct container and chart area. Coaches can view a
 * player’s logs but cannot add new entries, so the form is
 * hidden in those cases.
 */
.tracking-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

/* Form inside tracking container */
.tracking-container form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.tracking-container form label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: var(--gray-dark);
}
.tracking-container form input,
.tracking-container form textarea,
.tracking-container form select {
  margin-top: 0.3rem;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  border: 1px solid #ccc;
  font-size: 0.9rem;
  box-sizing: border-box;
}
.tracking-container form button {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 0.6rem 1.2rem;
  background-color: var(--coral);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}
.tracking-container form button:hover {
  background-color: var(--coral-dark);
}

/* -------------------------------------------------------------------------
 * Enhanced calendar view for the tracking page. Inspired by cycle‑tracking
 * apps, the monthly grid highlights days with logged entries and shows
 * an event countdown. A controls bar allows navigation between months
 * and a Today button jumps back to the current date. Below the calendar
 * sit the "daily insights" cards offering quick access to logs, reports
 * and exercise recommendations. Finally the log form adapts to a row
 * layout for improved aesthetics.
 */
.tracking-summary {
  max-width: 800px;
  margin: 0 auto 1rem;
  text-align: center;
}
.tracking-summary .event-countdown {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
}
.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.calendar-controls button {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: var(--border-radius);
}
.calendar-controls button:hover {
  background-color: rgba(255,127,80,0.1);
}
.calendar-controls #calendarTitle {
  font-weight: 600;
  min-width: 120px;
  text-align: center;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid var(--primary-light);
  border-radius: var(--border-radius);
  background: var(--white);
  overflow: hidden;
}
.calendar-day {
  height: 70px;
  border: 1px solid var(--primary-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0.25rem;
  font-size: 0.75rem;
  position: relative;
}
.calendar-day .day-number {
  font-weight: 600;
  margin-bottom: 0.1rem;
}
.calendar-day .log-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 2px;
}
.calendar-day.today {
  background: rgba(255,127,80,0.1);
  border-color: var(--primary);
}
.daily-insights {
  max-width: 800px;
  margin: 1rem auto;
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
  gap: 1rem;
}
.insight-card {
  background: var(--white);
  border: 1px solid var(--primary-light);
  border-radius: var(--border-radius);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.insight-card i {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 0.4rem;
}
.insight-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}
/* Form row layout for the tracking form */
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}
.form-row label {
  flex: 1 1 150px;
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: var(--gray-dark);
}

/* Logs Table */
.logs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
.logs-table th, .logs-table td {
  padding: 0.8rem;
  border-bottom: 1px solid #eaeaea;
  text-align: left;
}
.logs-table th {
  background-color: var(--gray-light);
  font-weight: 600;
}
.logs-table tr:nth-child(even) {
  background-color: #fbfbfb;
}

/* Logs Chart */
.logs-chart {
  width: 100%;
  max-width: 700px;
  margin: 0 auto 2rem auto;
}

/* Explore Page */
.masonry {
  column-count: 3;
  column-gap: 1rem;
}
.masonry-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.masonry-item img {
  width: 100%;
  display: block;
}
.like-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.like-btn i {
  color: var(--coral-dark);
}
.like-btn.liked i {
  color: var(--coral);
}
.like-btn:hover {
  transform: scale(1.1);
}

/* Forms */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
form input, form textarea, form select {
  padding: 0.6rem;
  border-radius: var(--border-radius);
  border: 1px solid #ccc;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}
form button {
  align-self: flex-start;
  padding: 0.6rem 1.2rem;
  background-color: var(--coral);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}
form button:hover {
  background-color: var(--coral-dark);
}

/* Footer */
footer {
  background-color: var(--coral);
  color: var(--white);
  padding: 2rem 1rem;
  text-align: center;
}
footer .social-icons {
  margin-bottom: 1rem;
}
footer .social-icons a {
  color: var(--white);
  margin: 0 0.5rem;
  font-size: 1.2rem;
  transition: var(--transition);
}
footer .social-icons a:hover {
  color: var(--coral-light);
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .masonry {
    column-count: 2;
  }
}

@media (max-width: 480px) {
  nav ul {
    display: none;
  }
  nav .mobile-toggle {
    display: block;
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--gray-dark);
  }
  .masonry {
    column-count: 1;
  }
}

/* Search bar styling for the navigation */
nav .search-form {
  margin-left: auto;
  display: flex;
  align-items: center;
}

nav .search-form input[type="search"] {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--gray-light);
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  width: 180px;
  background-color: var(--white);
  color: var(--gray-dark);
}

nav .search-form input[type="search"]:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 127, 80, 0.4);
}
nav .search-form {
  display: flex;
  align-items: center;
  margin-left: 1rem;
}

nav .search-form input[type="search"] {
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--grey-light);
  border-radius: 4px;
  font-size: 0.9rem;
  min-width: 160px;
  background-color: #fff;
  color: var(--gray-dark);
  transition: border-color var(--transition), box-shadow var(--transition);
}

nav .search-form input[type="search"]:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 127, 80, 0.3);
  border-color: var(--coral);
}

/* ---- KneeEd Profile Enhancements ---- */
/* Hero collage displayed at the top of the profile page */
.profile-hero {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.profile-hero div {
  width: 100%;
  padding-bottom: 60%;
  background-size: cover;
  background-position: center;
  border-radius: var(--border-radius);
}
/* Header section showing avatar and metrics */
.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.profile-header .avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
}
.metrics {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.metric-box {
  background-color: var(--white);
  box-shadow: var(--shadow);
  padding: 0.8rem 1rem;
  border-radius: var(--border-radius);
  text-align: center;
  min-width: 100px;
}
.metric-box strong {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}
/* Main body two‑column layout */
.profile-body {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}
.profile-left {
  flex: 1 1 55%;
}
.profile-right {
  flex: 1 1 40%;
}
/* Cards used on the profile page */
.activity-card,
.tasks-card,
.posts-card {
  background-color: var(--white);
  box-shadow: var(--shadow);
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}
.activity-card h5,
.tasks-card h5,
.posts-card h5 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}
.tasks-list {
  list-style: none;
  padding-left: 0;
}
.tasks-list li {
  margin-bottom: 0.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}
.achievements-container {
  background-color: var(--white);
  box-shadow: var(--shadow);
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}
.achievements-container .achievement {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.achievements-container .achievement i {
  font-size: 1.4rem;
  color: var(--primary);
}
.rank-card {
  background-color: var(--white);
  box-shadow: var(--shadow);
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}
.chart-card {
  background-color: var(--white);
  box-shadow: var(--shadow);
  padding: 1rem;
  border-radius: var(--border-radius);
}

/* Outline button used in suggestions and other secondary actions */
.btn-outline {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--primary);
  border-radius: var(--border-radius);
  background: transparent;
  color: var(--primary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

/* Help center layout inspired by Flo’s help hub */
.help-section .help-intro {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.help-wrapper {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}
.help-nav {
  flex: 0 0 220px;
}
.help-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid var(--primary-light);
}
.help-nav li {
  padding: 0.8rem 1rem;
  cursor: pointer;
  border-left: 4px solid transparent;
  transition: background-color 0.2s, border-color 0.2s;
}
.help-nav li:hover {
  background-color: var(--primary-light);
}
.help-nav li.active {
  border-left-color: var(--primary);
  font-weight: 600;
  background-color: var(--primary-light);
}
.help-article {
  flex: 1 1 auto;
}
.article {
  display: none;
}
.article.active {
  display: block;
}
.help-article h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}
.help-image {
  max-width: 100%;
  margin-top: 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}



/* -------------------------------------------------------------------------
 * Profile feed styles
 * These classes create a social‑feed like list within the profile page.
 */
.feed-item {
  border-top: 1px solid var(--primary-light);
  padding: 0.6rem 0;
}
.feed-item:first-child {
  border-top: none;
}
.feed-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}
.feed-avatar {
  background-color: var(--coral);
  color: var(--white);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}
.feed-content p {
  margin: 0.2rem 0;
  font-size: 0.85rem;
}
.feed-actions {
  margin-top: 0.3rem;
  font-size: 0.9rem;
  color: var(--gray-dark);
}
.feed-actions i {
  margin-right: 0.6rem;
  cursor: pointer;
}
.feed-actions i:hover {
  color: var(--primary);
}

/* Pros page styles */
.pros-container {
  max-width: 1000px;
  margin: 2rem auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.pros-card {
  background: var(--white);
  border: 1px solid var(--primary-light);
  border-radius: var(--border-radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: box-shadow 0.2s;
}
.pros-card:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}
.pros-card img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.5rem;
}
.pros-card h3 {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.1rem;
  color: var(--primary-dark);
}
.pros-card p {
  margin: 0.1rem 0;
  font-size: 0.85rem;
  color: var(--gray-dark);
}
.pros-card .btn-follow {
  margin-top: 0.5rem;
  padding: 0.3rem 0.8rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 0.85rem;
}
.pros-card .btn-follow:hover {
  background: var(--primary-dark);
}

/* Global button style for a more inviting, floating appearance */
button,
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background-color: var(--coral);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-weight: 600;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

button:hover,
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  background-color: var(--coral-dark);
  color: var(--white);
}

/* Secondary buttons maintain the floating feel but with a transparent
   background and coloured outline */
.btn-secondary {
  background-color: transparent;
  color: var(--coral);
  border: 2px solid var(--coral);
  box-shadow: none;
}

.btn-secondary:hover {
  background-color: var(--coral);
  color: var(--white);
  border-color: var(--coral-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}