/* ==========================================================================
   Working Hours Page Styles
   Brand: DIT (NUI Driving Instructor Training)
   Primary: #508916 (green)
   Mobile-first responsive design
   ========================================================================== */

/* ---------- Shared ---------- */
.hours-page {
  --hours-green: #508916;
  --hours-green-light: #e8f5d6;
  --hours-green-dark: #3a6610;
  --hours-text: #242427;
  --hours-text-muted: #6c6d74;
  --hours-border: #e5e5e7;
  --hours-bg-alt: #f7f7f7;
  --hours-radius: 8px;
}

.hours-page .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.hours-page section {
  padding: 3rem 0;
}

.hours-page section:nth-child(even):not(.hours-hero):not(.lead-capture) {
  background: var(--hours-bg-alt);
}

.hours-page h2 {
  font-family: var(--font-display, 'Montserrat', sans-serif);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  color: var(--hours-text);
  margin: 0 0 0.5rem;
}

.hours-page h2 em {
  font-style: normal;
  color: var(--hours-green);
}

.hours-page .section-intro {
  color: var(--hours-text-muted);
  font-size: 1.02rem;
  line-height: 1.7;
  margin: 0 0 2rem;
  max-width: 750px;
}

/* ---------- Hero ---------- */
.hours-page .hours-hero {
  background: linear-gradient(135deg, var(--hours-green-dark) 0%, var(--hours-green) 100%) !important;
  color: #fff;
  padding: 2rem 0 3rem;
}

.hours-hero .breadcrumb {
  margin-bottom: 1.5rem;
}

.hours-hero .breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
}

.hours-hero .breadcrumb li::after {
  content: '>';
  margin: 0 0.5rem;
  opacity: 0.7;
}

.hours-hero .breadcrumb li:last-child::after {
  content: '';
  margin: 0;
}

.hours-hero .breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.hours-hero .breadcrumb a:hover {
  color: #fff;
  text-decoration: underline;
}

.hours-hero h1 {
  font-family: var(--font-display, 'Montserrat', sans-serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  margin: 0 0 1rem;
  line-height: 1.2;
}

.hours-hero .hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 750px;
  opacity: 0.95;
}

/* ---------- TLDR ---------- */
.hours-tldr {
  background: var(--hours-green-light);
  border-left: 4px solid var(--hours-green);
  padding: 1.5rem;
  border-radius: var(--hours-radius);
  margin-bottom: 1rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--hours-text);
}

.hours-tldr p {
  margin: 0;
}

.hours-tldr a {
  color: var(--hours-green-dark);
  font-weight: 500;
}

/* ---------- Overview Cards ---------- */
.hours-overview-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hours-overview-card {
  background: #fff;
  border: 1px solid var(--hours-border);
  border-radius: var(--hours-radius);
  padding: 1.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hours-overview-card:hover {
  border-color: var(--hours-green);
  box-shadow: 0 4px 16px rgba(80, 137, 22, 0.1);
}

.hours-overview-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.hours-overview-card__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--hours-green-light);
  color: var(--hours-green);
  border-radius: 50%;
  font-size: 1.1rem;
}

.hours-overview-card h3 {
  font-family: var(--font-display, 'Montserrat', sans-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--hours-text);
  margin: 0;
}

.hours-overview-card__body p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--hours-text-muted);
  margin: 0 0 0.75rem;
}

.hours-overview-card__body p:last-child {
  margin-bottom: 0;
}

.hours-overview-card__body a {
  color: var(--hours-green-dark);
  font-weight: 500;
}

/* ---------- Schedule Builder ---------- */
.schedule-builder {
  max-width: 700px;
}

.schedule-grid {
  border: 1px solid var(--hours-border);
  border-radius: var(--hours-radius);
  overflow: hidden;
  background: #fff;
}

.schedule-grid__header {
  display: grid;
  grid-template-columns: 90px repeat(6, 1fr);
  background: var(--hours-green);
  color: #fff;
}

.schedule-grid__corner {
  padding: 0.6rem 0.4rem;
}

.schedule-grid__day-label {
  padding: 0.6rem 0.25rem;
  text-align: center;
  font-family: var(--font-display, 'Montserrat', sans-serif);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.schedule-grid__row {
  display: grid;
  grid-template-columns: 90px repeat(6, 1fr);
  border-top: 1px solid var(--hours-border);
}

.schedule-grid__slot-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.5rem 0.5rem;
  background: var(--hours-bg-alt);
  border-right: 1px solid var(--hours-border);
}

.schedule-grid__slot-name {
  font-family: var(--font-display, 'Montserrat', sans-serif);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--hours-text);
  line-height: 1.2;
}

.schedule-grid__slot-time {
  font-size: 0.65rem;
  color: var(--hours-text-muted);
  line-height: 1.3;
}

.schedule-grid__cell {
  position: relative;
  min-height: 52px;
  border: none;
  border-right: 1px solid var(--hours-border);
  background: #fff;
  cursor: pointer;
  transition: background-color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.schedule-grid__cell:last-child {
  border-right: none;
}

.schedule-grid__cell:hover {
  background: var(--hours-green-light);
}

.schedule-grid__cell[aria-pressed="true"] {
  background: var(--hours-green);
}

.schedule-grid__cell[aria-pressed="true"]:hover {
  background: var(--hours-green-dark);
}

/* Peak demand dot */
.schedule-grid__peak-dot {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f0ad4e;
  position: absolute;
  top: 6px;
  right: 6px;
}

.schedule-grid__cell[aria-pressed="true"] .schedule-grid__peak-dot {
  background: rgba(255, 255, 255, 0.7);
}

/* Legend */
.schedule-legend {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--hours-text-muted);
}

.schedule-legend__item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.schedule-legend__swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid var(--hours-border);
}

.schedule-legend__swatch--selected {
  background: var(--hours-green);
  border-color: var(--hours-green);
}

.schedule-legend__swatch--peak {
  background: #fff;
  position: relative;
}

.schedule-legend__swatch--peak::after {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f0ad4e;
  position: absolute;
  top: 2px;
  right: 2px;
}

/* Reset button */
.schedule-reset {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--hours-text-muted);
  background: none;
  border: 1px solid var(--hours-border);
  border-radius: var(--hours-radius);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.schedule-reset:hover {
  border-color: var(--hours-green);
  color: var(--hours-green);
}

/* Summary */
.schedule-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--hours-green-light);
  border-radius: var(--hours-radius);
  border: 1px solid var(--hours-green);
}

@media (min-width: 500px) {
  .schedule-summary {
    grid-template-columns: repeat(3, 1fr);
  }
}

.schedule-summary__stat {
  text-align: center;
}

.schedule-summary__value {
  display: block;
  font-family: var(--font-display, 'Montserrat', sans-serif);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 800;
  color: var(--hours-green-dark);
  line-height: 1.2;
}

.schedule-summary__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--hours-text-muted);
  margin-top: 0.2rem;
}

.schedule-disclaimer {
  font-size: 0.75rem;
  color: var(--hours-text-muted);
  font-style: italic;
  margin-top: 0.75rem;
  line-height: 1.5;
}

/* Mobile schedule grid */
@media (max-width: 479px) {
  .schedule-grid__header {
    grid-template-columns: 70px repeat(6, 1fr);
  }

  .schedule-grid__row {
    grid-template-columns: 70px repeat(6, 1fr);
  }

  .schedule-grid__day-label {
    font-size: 0.7rem;
    padding: 0.5rem 0.15rem;
  }

  .schedule-grid__slot-label {
    padding: 0.4rem 0.3rem;
  }

  .schedule-grid__slot-name {
    font-size: 0.65rem;
  }

  .schedule-grid__slot-time {
    font-size: 0.58rem;
  }

  .schedule-grid__cell {
    min-height: 44px;
  }
}

/* ---------- Stat Counters ---------- */
.hours-stat-counters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (min-width: 600px) {
  .hours-stat-counters {
    grid-template-columns: repeat(3, 1fr);
  }
}

.hours-stat-counter {
  text-align: center;
  background: #fff;
  border: 1px solid var(--hours-border);
  border-radius: var(--hours-radius);
  padding: 1.5rem 1rem;
}

.hours-stat-counter__value {
  display: block;
  font-family: var(--font-display, 'Montserrat', sans-serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--hours-green);
  margin-bottom: 0.25rem;
}

.hours-stat-counter__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--hours-text);
  margin-bottom: 0.25rem;
}

.hours-stat-counter__source {
  display: block;
  font-size: 0.72rem;
  color: var(--hours-text-muted);
  font-style: italic;
}

/* ---------- Data Callout ---------- */
.hours-data-callout {
  background: var(--hours-green-light);
  border-left: 4px solid var(--hours-green);
  border-radius: var(--hours-radius);
  padding: 1.5rem;
}

.hours-data-callout p {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--hours-text);
  margin: 0;
}

/* ---------- Schedule Tips ---------- */
.hours-tips-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hours-tip {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--hours-border);
  border-radius: var(--hours-radius);
  padding: 1.25rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hours-tip:hover {
  border-color: var(--hours-green);
  box-shadow: 0 4px 16px rgba(80, 137, 22, 0.1);
}

.hours-tip__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--hours-green-light);
  color: var(--hours-green);
  border-radius: 50%;
  font-size: 1.1rem;
}

.hours-tip h3 {
  font-family: var(--font-display, 'Montserrat', sans-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--hours-text);
  margin: 0 0 0.35rem;
}

.hours-tip p {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--hours-text-muted);
  margin: 0;
}

.hours-tip a {
  color: var(--hours-green-dark);
  font-weight: 500;
}

/* ---------- FAQ Accordion ---------- */
.hours-page .faq-accordion {
  max-width: 1100px;
}

.hours-page .faq-accordion__item {
  border: 1px solid var(--hours-border);
  border-radius: var(--hours-radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: #fff;
}

.hours-page .faq-accordion__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.15rem 1.25rem;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-display, 'Montserrat', sans-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--hours-text);
  text-align: left;
  line-height: 1.4;
  gap: 1rem;
}

.hours-page .faq-accordion__question:hover {
  color: var(--hours-green);
}

.hours-page .faq-accordion__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  position: relative;
}

.hours-page .faq-accordion__icon::before,
.hours-page .faq-accordion__icon::after {
  content: '';
  position: absolute;
  background: var(--hours-green);
  border-radius: 2px;
  transition: transform 0.25s ease;
}

.hours-page .faq-accordion__icon::before {
  width: 20px;
  height: 2px;
  top: 9px;
  left: 0;
}

.hours-page .faq-accordion__icon::after {
  width: 2px;
  height: 20px;
  top: 0;
  left: 9px;
}

.hours-page .faq-accordion__item[data-open="true"] .faq-accordion__icon::after {
  transform: rotate(90deg);
}

.hours-page .faq-accordion__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.hours-page .faq-accordion__item[data-open="true"] .faq-accordion__answer {
  max-height: 500px;
}

.hours-page .faq-accordion__answer-inner {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--hours-text-muted);
}

.hours-page .faq-accordion__answer-inner p {
  margin: 0;
}

.hours-page .faq-accordion__answer-inner a {
  color: var(--hours-green-dark);
  font-weight: 500;
}

