/* =========================================================
   First Aid Kerry - Reusable Components
   File: assets/css/components.css
   ========================================================= */

/* Header / Navigation */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1200;
  background: rgba(48, 98, 51, 0.93);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--color-white);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-image {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.primary-nav ul {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
}

.nav-link {
  color: var(--color-white);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.2rem;
  position: relative;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: var(--color-white);
}

.nav-dropdown {
  position: relative;
}

.mega-menu {
  position: absolute;
  top: calc(100% + 0.7rem);
  left: 50%;
  transform: translateX(-50%);
  width: min(930px, 92vw);
  background: #ffffff;
  color: var(--color-navy);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 1.2rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.nav-dropdown.open > .mega-menu,
.nav-dropdown:focus-within > .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.mega-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.mega-col h3 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.mega-col a {
  color: var(--color-navy-soft);
  display: block;
  padding: 0.3rem 0;
}

/* Hero */
.hero-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.2rem 0;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.3);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.1rem;
}

.phecc-hero-badge {
  display: inline-flex;
  align-items: center;
  margin: 0.85rem 0 0.3rem;
  border-radius: 0.7rem;
  padding: 0.35rem 0.5rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.14);
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.2);
  transition: transform var(--ease), box-shadow var(--ease), background-color var(--ease), border-color var(--ease);
}

.phecc-logo {
  display: block;
  width: auto;
  height: auto;
}

.phecc-logo-top {
  max-width: 260px;
  max-height: 95px;
}

.phecc-hero-badge:hover,
.phecc-hero-badge:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.28);
  border-color: rgba(12, 74, 110, 0.38);
  background: #ffffff;
}

/* Course cards */
.course-card {
  position: relative;
  border: 1px solid #dbe5f3;
  border-top: 6px solid #306233;
  border-radius: 0.9rem;
  box-shadow: 0 12px 24px rgba(31, 45, 102, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  overflow: hidden;
  min-height: 100%;
}

.course-card::before {
  content: "Course";
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: #306233;
  color: #ffffff;
  border-radius: 999px;
  padding: 0.24rem 0.62rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.course-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.2rem;
  height: 100%;
}

.course-card h3 {
  margin-bottom: 0.15rem;
  padding-right: 4.2rem;
}

.course-card p {
  color: #334155;
}

.course-card .btn {
  margin-top: auto;
  width: 100%;
}

.course-card .card-media {
  overflow: hidden;
}

.course-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.course-meta span {
  font-size: 0.78rem;
  background: #f1f5f9;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  color: var(--color-slate);
}

/* Process */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.process-step {
  text-align: center;
  padding: 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-white);
}

.step-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 0.8rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e1f0e3;
  color: var(--color-red-dark);
  font-size: 1.2rem;
  transition: transform var(--ease);
}

/* Testimonials */
.testimonial-card {
  padding: 1.25rem;
  border-radius: var(--radius-md);
  background: #1f2d66;
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.testimonial-author {
  font-weight: 700;
  color: var(--color-white);
}

/* Homepage long-copy readability */
.intro-block {
  align-items: start;
  gap: clamp(1rem, 2.2vw, 2rem);
}

.intro-copy {
  max-width: 70ch;
  min-width: 0;
}

.intro-block .placeholder-image {
  width: min(100%, 650px);
  max-height: 920px;
  height: auto;
  object-fit: contain;
  display: block;
  margin-inline: auto;
}

.intro-copy h2 {
  text-wrap: balance;
}

.intro-copy p {
  font-size: clamp(1rem, 1.1vw, 1.08rem);
  line-height: 1.82;
  margin-bottom: 1rem;
  overflow-wrap: anywhere;
  hyphens: auto;
}

section[aria-labelledby="icon-box-heading"] .section-head,
section[aria-labelledby="courses-heading"] .section-head,
section[aria-labelledby="proof-heading"] .section-head,
section[aria-labelledby="process-heading"] .section-head,
section[aria-labelledby="industry-heading"] .section-head,
section[aria-labelledby="areas-heading"] .section-head,
section[aria-labelledby="pathway-heading"] .section-head,
section[aria-labelledby="testimonials-heading"] .section-head,
section[aria-labelledby="cta-grid-heading"] .section-head,
section[aria-labelledby="about-locations"] .section-head,
section[aria-labelledby="schedule-heading"] .section-head {
  text-align: center;
  margin-inline: auto;
}

section[aria-labelledby="process-heading"] > .container > p[style],
section[aria-labelledby="areas-heading"] > .container > p[style],
section[aria-labelledby="cta-final"] .text-center p,
section[aria-labelledby="booking-next-step"] .text-center p,
section[aria-labelledby="about-cta"] .text-center p,
section[aria-labelledby="about-locations"] .section-head p {
  text-align: center;
  margin-inline: auto;
  max-width: 78ch;
}

section[aria-labelledby="faq-home"] > .container > h2 {
  text-align: center;
}

section[aria-labelledby="proof-heading"] {
  background: #306233;
}

section[aria-labelledby="proof-heading"],
section[aria-labelledby="proof-heading"] h2,
section[aria-labelledby="proof-heading"] p,
section[aria-labelledby="proof-heading"] .stat-value {
  color: #ffffff;
}

/* Homepage interactive modules */
.pathway-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.pathway-tab {
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-navy);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font-weight: 700;
}

.pathway-tab.is-active {
  background: var(--color-navy);
  color: var(--color-white);
  border-color: var(--color-navy);
}

.pathway-panels {
  position: relative;
}

.pathway-panel {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  padding: 1rem;
}

.testimonial-slider {
  position: relative;
  max-width: 920px;
  margin-inline: auto;
}

.testimonial-slide {
  transition: opacity var(--ease), transform var(--ease);
}

.testimonial-card {
  position: relative;
  background: #ffffff;
  color: #1f2d66;
  border: 1px solid #dbe5f3;
  border-left: 6px solid #306233;
  border-radius: 0.9rem;
  box-shadow: 0 12px 26px rgba(31, 45, 102, 0.12);
  padding: 1.25rem 1.25rem 1.15rem;
}

.testimonial-card::before {
  content: "♥ ♥ ♥ ♥ ♥";
  display: block;
  margin-bottom: 0.65rem;
  color: #306233;
  font-size: 0.95rem;
  letter-spacing: 0.14rem;
  font-weight: 800;
}

.testimonial-card p,
.testimonial-card {
  font-size: 1.03rem;
  line-height: 1.7;
}

.testimonial-card footer {
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
}

.testimonial-author {
  font-weight: 800;
  color: #27367a;
  font-size: 0.95rem;
}

.testimonial-controls {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

.testimonial-nav {
  min-width: 52px;
  border-color: #1e285c;
  color: #ffffff;
  background: #27367a;
}

section[aria-labelledby="cta-grid-heading"] .grid {
  align-items: stretch;
}

.cta-card {
  position: relative;
  border: 1px solid #dbe5f3;
  border-top: 6px solid #306233;
  border-radius: 0.85rem;
  box-shadow: 0 10px 22px rgba(31, 45, 102, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  overflow: hidden;
}

.cta-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  height: 100%;
}

.cta-card h3 {
  margin-bottom: 0.25rem;
}

.cta-card p {
  color: #334155;
}

.cta-card .btn {
  margin-top: auto;
  width: 100%;
}

.cta-card:nth-child(1) {
  border-top-color: #306233;
}

.cta-card:nth-child(2) {
  border-top-color: #27367a;
}

.cta-card:nth-child(3) {
  border-top-color: #1e285c;
}

@media (max-width: 768px) {
  .intro-copy {
    max-width: 100%;
  }

  .intro-copy p {
    font-size: 0.98rem;
    line-height: 1.74;
  }
}

@media (max-width: 430px) {
  .intro-copy p {
    font-size: 0.95rem;
    line-height: 1.68;
    margin-bottom: 0.85rem;
  }
}

/* Blog cards */
.blog-card .card-media {
  overflow: hidden;
}

.blog-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* Area coverage links */
.coverage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.coverage-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border: 1px solid #1e285c;
  border-radius: 0.7rem;
  color: #ffffff;
  background: #27367a;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  min-height: 52px;
  transition: transform var(--ease), box-shadow var(--ease), background-color var(--ease), border-color var(--ease);
}

.coverage-link .arrow {
  opacity: 0.72;
  transform: translateX(0);
  transition: transform var(--ease), opacity var(--ease);
}

/* FAQ accordion */
.faq-accordion {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  overflow: hidden;
}

.faq-button {
  width: 100%;
  text-align: left;
  padding: 0.9rem 1rem;
  border: 0;
  background: #f8fafc;
  font-weight: 700;
  color: var(--color-navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-content {
  display: none;
  padding: 0 1rem 1rem;
}

.faq-item.open .faq-content {
  display: block;
}

/* Contact form */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.form-row-full {
  grid-column: 1 / -1;
}

label {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: var(--color-navy);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.75rem;
  font: inherit;
  color: var(--color-navy-soft);
  background: var(--color-white);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.gdpr-wrap {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.gdpr-wrap input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
}

/* Footer */
.site-footer {
  background: #306233;
  color: #ffffff;
  padding: 3rem 0 1.4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 1.35rem;
}

.footer-grid > div:first-child {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
}

.footer-grid > div:first-child p {
  margin: 0;
  max-width: 36ch;
  line-height: 1.6;
}

.footer-title {
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.footer-grid > div:first-child .footer-title {
  margin-bottom: 0;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.footer-links a {
  color: #ffffff;
}

.footer-base {
  margin-top: 1.7rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  display: grid;
  gap: 0.95rem;
  font-size: 0.94rem;
  color: #ffffff;
}

.footer-base-row {
  display: block;
  width: 100%;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-base-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.footer-base-row:first-child {
  padding-top: 0;
}

.footer-base-row-contact {
  display: grid;
  gap: 0.6rem;
}

.footer-base-row-legal .footer-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-base-row-contact .footer-line:first-child {
  max-width: 80ch;
}

.footer-policies {
  display: inline-flex;
}

.footer-line {
  margin: 0;
  line-height: 1.7;
}

.footer-designed-by {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  white-space: nowrap;
}

.footer-grid > div:first-child .phecc-footer-badge {
  margin-top: 0;
}

.site-footer a,
.site-footer a:hover,
.site-footer a:focus-visible,
.footer-base a,
.footer-base a:hover,
.footer-base a:focus-visible {
  color: #ffffff;
}

.phecc-footer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.55rem;
  padding: 0.2rem 0.34rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 6px 14px rgba(2, 6, 23, 0.24);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease), background-color var(--ease);
}

.phecc-logo-footer {
  max-width: 120px;
  max-height: 44px;
}

.phecc-footer-badge:hover,
.phecc-footer-badge:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(2, 6, 23, 0.3);
  border-color: rgba(255, 255, 255, 0.7);
  background: #ffffff;
}

.social-links {
  display: inline-flex;
  gap: 0.55rem;
}

.social-link {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
}

/* Utility controls */
.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--color-red);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  z-index: 1100;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.cookie-bar {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  background: #1f2d66;
  color: #e2e8f0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: var(--shadow-lg);
  padding: 0.9rem;
  z-index: 1200;
  display: none;
}

.cookie-bar.show {
  display: block;
}

.cookie-actions {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.8rem;
}

/* =========================================================
   Course Schedule Calendar
   ========================================================= */

.course-schedule {
  padding: var(--section-padding) 0;
}

.schedule-intro {
  text-align: center;
  margin-bottom: 1.75rem;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.schedule-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.filter-btn {
  background: var(--color-white);
  color: var(--color-navy);
  border: 2px solid var(--color-navy);
  border-radius: var(--radius-full);
  padding: 0.45rem 1.2rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
}

.filter-btn:hover,
.filter-btn:focus-visible {
  background: var(--color-navy);
  color: var(--color-white);
  outline: none;
  box-shadow: var(--shadow-md);
}

.filter-btn.active {
  background: var(--color-navy);
  color: var(--color-white);
}

.filter-btn.active.far    { background: #2E7D32; border-color: #2E7D32; }
.filter-btn.active.farr   { background: #1565C0; border-color: #1565C0; }
.filter-btn.active.basic  { background: #6A1B9A; border-color: #6A1B9A; }
.filter-btn.active.cork   { background: #8D6E63; border-color: #8D6E63; }
.filter-btn.active.kerry  { background: #2E7D32; border-color: #2E7D32; }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 0;
}

.calendar-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 2px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
}

.calendar-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.calendar-card.far   { border-color: #2E7D32; }
.calendar-card.farr  { border-color: #1565C0; }
.calendar-card.basic { border-color: #6A1B9A; }

.card-header-bar {
  padding: 0.75rem 1rem;
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.calendar-card.far   .card-header-bar { background: #2E7D32; }
.calendar-card.farr  .card-header-bar { background: #1565C0; }
.calendar-card.basic .card-header-bar { background: #6A1B9A; }

.card-course-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
}

.card-location-badge {
  font-size: 0.72rem;
  background: rgba(255,255,255,0.2);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  font-weight: 600;
}

.card-body {
  padding: 0.9rem 1rem;
}

.card-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.date-chip {
  background: var(--color-gray-100);
  border: 1px solid #d1d5db;
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-navy);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.card-duration {
  font-size: 0.82rem;
  color: var(--color-text);
  font-weight: 600;
}

.card-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-navy);
}

.card-day-label {
  font-size: 0.75rem;
  color: var(--color-text-light);
  font-weight: 500;
  margin-top: 0.1rem;
}

/* Calendar month view */
.calendar-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 0.5rem;
}

.calendar-month-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-navy);
}

.cal-nav-btn {
  background: var(--color-white);
  border: 2px solid var(--color-navy);
  color: var(--color-navy);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.cal-nav-btn:hover {
  background: var(--color-navy);
  color: var(--color-white);
}

.calendar-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem;
  color: var(--color-text-light);
  font-size: 1rem;
}

/* Legend */
.schedule-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-dot.far   { background: #2E7D32; }
.legend-dot.farr  { background: #1565C0; }
.legend-dot.basic { background: #6A1B9A; }

/* Very small / folded phones (Samsung Z Fold outer ~280px, old flip phones < 360px) */
@media (max-width: 359px) {
  .schedule-filters {
    gap: 0.35rem;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.35rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .schedule-filters::-webkit-scrollbar { display: none; }

  .filter-btn {
    padding: 0.28rem 0.65rem;
    font-size: 0.68rem;
    border-radius: var(--radius-full);
    flex-shrink: 0;
  }

  .calendar-month-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
  }

  .calendar-month-title {
    font-size: 0.88rem;
    width: 100%;
    text-align: center;
    order: -1;
  }

  .cal-nav-btn {
    padding: 0.3rem 0.65rem;
    font-size: 0.78rem;
  }

  .calendar-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .calendar-card {
    border-radius: var(--radius-md);
  }

  .card-header-bar {
    padding: 0.55rem 0.7rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .card-course-name {
    font-size: 0.8rem;
  }

  .card-body {
    padding: 0.7rem 0.7rem;
  }

  .date-chip {
    font-size: 0.7rem;
    padding: 0.16rem 0.4rem;
  }

  .card-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .card-price {
    font-size: 0.88rem;
  }

  .schedule-legend {
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
  }

  .legend-item {
    font-size: 0.72rem;
  }
}

/* Small phones / Z Flip (~360–480px) */
@media (min-width: 360px) and (max-width: 480px) {
  .schedule-filters {
    gap: 0.4rem;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.3rem;
    scrollbar-width: none;
  }
  .schedule-filters::-webkit-scrollbar { display: none; }

  .filter-btn {
    padding: 0.32rem 0.8rem;
    font-size: 0.78rem;
    flex-shrink: 0;
  }

  .calendar-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .calendar-month-title {
    font-size: 0.98rem;
  }

  .card-header-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .schedule-legend {
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
  }
}

/* Standard phones / large phones (481px – 640px) */
@media (min-width: 481px) and (max-width: 640px) {
  .schedule-filters {
    gap: 0.45rem;
  }

  .filter-btn {
    padding: 0.35rem 0.9rem;
    font-size: 0.82rem;
  }

  .calendar-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .calendar-month-title {
    font-size: 1rem;
  }
}

/* Tablets portrait (641px – 900px) */
@media (min-width: 641px) and (max-width: 900px) {
  .calendar-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .filter-btn {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
  }
}

/* Tablets landscape / small laptops (901px – 1024px) */
@media (min-width: 901px) and (max-width: 1024px) {
  .calendar-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

/* Standard desktop (1025px+) */
@media (min-width: 1025px) {
  .calendar-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}
