/* ================================================================
   SurgSync Website — Custom Styles
   Extends Bulma CSS Framework (bulma.min.css)
   ================================================================ */

/* ----------------------------------------------------------------
   FONT SIZE CONFIGURATION
   Adjust these values to scale the entire site up or down.
   Bulma's default base is 1rem = 16px.
   We override the html root to 20px so all rem-based sizes scale
   proportionally — change this single value to resize everything.
   ---------------------------------------------------------------- */
html {
  font-size: 20px; /* base: Bulma default is 16px; increase for larger text */
  /* Offset anchor scroll targets so they aren't hidden behind the sticky navbar */
  scroll-padding-top: 4rem;
  /* Prevent iOS Safari from inflating text size in landscape mode */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ---- Base Typography ---- */
body {
  font-family: 'Noto Sans', sans-serif;
  font-size: 1rem;   /* inherits html base above */
  line-height: 1.7;  /* slightly more generous line spacing for readability */
}

/* ---- Navigation ---- */

/* Sticky navbar stays visible while scrolling — users can always access nav.
   Uses position:sticky for progressive enhancement (older browsers fall back to static). */
.navbar {
  position: sticky;
  top: 0;
  z-index: 30;   /* above section content but below modals */
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.footer .icon-link {
  font-size: 25px;
  color: #000;
}

.link-block a {
  margin-top: 5px;
  margin-bottom: 5px;
}

/* ---- Publication Header ---- */
.publication-title {
  font-family: 'Google Sans', sans-serif;
  font-size: 2.8rem !important;  /* increase this value to make the title larger */
  line-height: 1.25;
}

.publication-authors {
  font-family: 'Google Sans', sans-serif;
}

/* Clickable author names styled in blue */
.publication-authors a {
  color: hsl(204, 86%, 53%) !important;
}

.publication-authors a:hover {
  text-decoration: underline;
}

/* Each author block stays inline so wrapping looks natural */
.author-block {
  display: inline-block;
}

/* Venue badge (e.g., "ICRA 2026") */
.publication-venue {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.1rem !important;
  font-weight: bold;
  padding: 0.4em 1.2em;
  border-radius: 20px;
}

/* ---- Coming Soon Buttons ----
   Applied to link-block spans whose content is not yet available.
   Shows a "Coming Soon" tooltip on hover and greys out the button.
   To activate a link: remove class="coming-soon-link" from the <span>
   and add href="..." + class="external-link" back to the <a> tag. */
.coming-soon-link {
  position: relative;  /* anchor for the tooltip pseudo-element */
  cursor: not-allowed;
}

.coming-soon-link a[disabled] {
  pointer-events: none;  /* block all clicks */
  opacity: 0.55;         /* visually greyed out */
}

/* Inline "(coming soon)" label inside the button */
.coming-soon-badge {
  font-size: 0.65em;
  font-style: italic;
  opacity: 0.85;
  margin-left: 0.35em;
}

/* ---- Badge Row Break ----
   Forces a new line between the two rows of link badges in the hero.
   Works because the parent .publication-links uses flex-wrap: wrap. */
.badge-row-break {
  flex-basis: 100%;   /* takes the full row width, pushing next items to new line */
  height: 0.4rem;     /* small vertical gap between the two rows */
}

/* Make publication-links a flex container so badge-row-break works */
.publication-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  align-items: center;
}

/* ---- Coming Soon Section Placeholder ----
   Used in the Paper and Video sections while content is pending. */
.coming-soon-notice {
  background: #f9f9f9;
  border: 2px dashed #d0d0d0;
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
}

.coming-soon-icon {
  margin-bottom: 0.75rem;
}

/* ---- SurgSync Brand Name Styling ---- */
/* Usage: <span class="surgsync">SurgSync</span> */
.surgsync {
  font-variant: small-caps;
  font-weight: bold;
  color: #1565c0;
}

/* ---- Teaser / Hero Section ---- */
.teaser .hero-body {
  padding-top: 0;
  padding-bottom: 3rem;
}

.teaser {
  font-family: 'Google Sans', sans-serif;
}

/* ---- Responsive 16:9 Video Embed ---- */
/* Works for both YouTube iframes and local <video> */
.publication-video {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  border-radius: 10px !important;
}

.publication-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ================================================================
   AUTHORS SECTION
   Three fixed rows: 4 / 3 / 3 authors, square photos with initials fallback.
   ================================================================ */

/* Each row is a centered flex line; rows stack vertically with a gap */
.author-row {
  display: flex;
  justify-content: center;
  gap: 2rem 2.75rem;       /* row-gap column-gap — generous spacing for larger photos */
  margin-top: 1.75rem;
}

/* Individual author card — width accommodates the larger photo + name text */
.author-profile {
  text-align: center;
  width: 170px;
  flex-shrink: 0;
}

/* Square author photo — sized for face recognition at desktop viewing distance.
   HCI guideline: portraits need ≥ 120px for reliable face identification;
   150px provides comfortable recognition with room for detail. */
.author-photo {
  width: 150px;
  height: 150px;
  border-radius: 10px;     /* square with softened corners */
  object-fit: cover;       /* crops to square without distortion */
  border: 2px solid #e0e0e0;
  margin: 0 auto 0.7rem;
  display: block;
}

/* Fallback: colored square tile with initials when photo is not available.
   Each author sets a unique background color inline (e.g., style="background:#1565c0;"). */
.author-initials {
  width: 150px;
  height: 150px;
  border-radius: 10px;     /* matches the square photo shape */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  font-weight: 700;
  color: white;
  margin: 0 auto 0.7rem;
  letter-spacing: 0.05em;
  font-family: 'Google Sans', sans-serif;
}

/* Author name — primary label on the card, must be clearly readable.
   At 20px base, 1.05rem = 21px — comfortably above the 16px WCAG minimum
   and visually prominent as the key identifier for each person. */
.author-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.25rem;
  line-height: 1.35;
  font-family: 'Google Sans', sans-serif;
}

/* Clickable author names */
.author-name a {
  color: hsl(204, 86%, 53%) !important;
  text-decoration: none;
}

.author-name a:hover {
  text-decoration: underline;
}

/* Affiliation text under the name — secondary label, slightly smaller than name
   but still comfortably readable (0.88rem = 17.6px at 20px base). */
.author-affiliation {
  font-size: 0.88rem;
  color: #777;
  line-height: 1.3;
}

/* ================================================================
   DATASET TABLE
   Two-row header showing Online / Offline split per skill level.
   ================================================================ */

.dataset-table {
  font-size: 0.85rem;
}

/* Task name column header */
.dataset-th-task {
  vertical-align: middle !important;
  background-color: #f5f5f5 !important;
}

/* Skill-level group header cells */
.dataset-th-novice      { background-color: #e8f5e9 !important; color: #2e7d32; }
.dataset-th-experienced { background-color: #e3f2fd !important; color: #1565c0; }
.dataset-th-professional{ background-color: #fce4ec !important; color: #ad1457; }

/* Online / Offline sub-header cells */
.dataset-th-online  { background-color: #e1f5fe !important; color: #0277bd; font-weight: 600; }
.dataset-th-offline { background-color: #f3e5f5 !important; color: #6a1b9a; font-weight: 600; }

/* Total column header */
.dataset-th-total {
  vertical-align: middle !important;
  background-color: #f5f5f5 !important;
}

/* Data cells: subtle background tint to distinguish modes */
.dataset-online  { background-color: #f0f9ff !important; }
.dataset-offline { background-color: #fdf6ff !important; }

/* Footer totals row */
.dataset-total-row td {
  background-color: #fafafa !important;
  border-top: 2px solid #ccc !important;
}

/* Color legend below the table */
.dataset-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: #666;
}

.legend-online  { color: #0277bd; font-weight: 600; }
.legend-offline { color: #6a1b9a; font-weight: 600; }
.legend-note    { color: #999; }

/* ================================================================
   POST-COLLECTION TOOLBOX SECTION
   Two-column layout with video pairs per subsection.
   ================================================================ */

/* Individual subsection block */
.toolbox-subsection {
  margin-bottom: 2.5rem;
}

.toolbox-subsection:last-child {
  margin-bottom: 0;
}

/* Subsection title with icon */
.toolbox-subsection-title {
  margin-bottom: 0.75rem !important;
}

.toolbox-icon {
  color: #1565c0;
  margin-right: 0.4rem;
}

/* Short description under the subsection title */
.toolbox-subsection-desc {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Small badge indicating pre-rendered video speed, shown next to subsection titles */
.speed-badge {
  display: inline-block;
  font-size: 0.55em;       /* relative to the h3 — stays visually small */
  font-weight: 600;
  color: #fff;
  background: #e65100;     /* orange — draws the eye without clashing with icons */
  border-radius: 4px;
  padding: 0.15em 0.5em;
  vertical-align: middle;
  letter-spacing: 0.03em;
  margin-left: 0.5em;
  white-space: nowrap;
}

/* Column label (e.g., "Original Video", "Kinematic Reprojection") */
.toolbox-col-label {
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
  color: #555;
  margin-bottom: 0.5rem;
  font-family: 'Google Sans', sans-serif;
}

/* Wrapper for the two-column video layout — adds a little breathing room */
.toolbox-columns {
  margin-top: 0.5rem;
}

/* Figure wrapper for each video slot */
.toolbox-video-figure {
  margin: 0;  /* reset browser figure defaults */
}

/* Video element: full-width, rounded corners.
   No background colour — JS hides the element until data loads,
   so there is no black-box flash while the browser awaits a 404. */
.toolbox-video-figure video {
  width: 100%;
  display: block;
  border-radius: 8px;
}

/* Figcaption under each video (hidden visually — used by JS for placeholder labels) */
.toolbox-video-figure figcaption {
  font-size: 0.8rem;
  color: #888;
  text-align: center;
  margin-top: 0.4rem;
}

/* Stack PSM1 / PSM2 videos vertically in the kinematic-reprojection right column */
.stacked-videos {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Horizontal rule divider between toolbox subsections */
.toolbox-divider {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 2rem 0;
}

/* ---- Feature Cards ---- */
/* Used in the "Key Contributions" section */
.feature-card {
  height: 100%;
  border-radius: 10px !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14) !important;
}

.feature-card .card-content {
  padding: 1.75rem;
}

.feature-icon {
  margin-bottom: 1rem;
}

/* ---- Placeholder Figures ---- */
/* Shown in place of images/videos that haven't been added yet.
   The onerror attribute in <img> tags switches to these divs.
   JS does the same for failed <video> elements. */
.placeholder-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f0f4f8;
  border: 2px dashed #b0bec5;
  border-radius: 8px;
  padding: 2rem;
  min-height: 200px;
  color: #546e7a;
  font-size: 1rem;
  text-align: center;
}

/* ---- Tables ---- */
.table thead th {
  background-color: #f5f5f5;
}

/* ---- Results / Media Carousel ---- */
.results-carousel {
  overflow: hidden;
}

.results-carousel .item {
  margin: 5px;
  overflow: hidden;
  border: 1px solid #bbb;
  border-radius: 10px;
  padding: 0;
  font-size: 0; /* removes whitespace gap under inline images/videos */
}

.results-carousel video {
  margin: 0;
}

/* ---- Section Backgrounds ---- */
/* Alternating white / light-grey backgrounds help visually separate sections */
.section-alt {
  background-color: #f9f9f9;
}

/* ---- Figure Captions ---- */
.figure-caption {
  font-size: 0.85rem;  /* slightly smaller than body, but scales with html base */
  color: #555;
  text-align: center;
  margin-top: 0.6rem;
}


/* ================================================================
   RESPONSIVE DESIGN — Media Queries
   Follows mobile-first progressive enhancement.
   Breakpoints aligned with Bulma:
     - Mobile:    ≤ 768px   (phones — portrait & landscape)
     - Tablet:    769–1023px (iPad portrait, small tablets)
     - Desktop:   1024–1215px (iPad landscape, small laptops)
     - Widescreen: ≥ 1216px (standard desktops and up)

   HCI Principles applied:
     - Fitts's Law: touch targets ≥ 44px on mobile
     - Visual hierarchy preserved across all sizes
     - Readable typography at every viewport width
     - Sufficient whitespace to prevent cramped layouts
     - Consistent visual language across breakpoints
   ================================================================ */

/* ----------------------------------------------------------------
   MOBILE — max-width: 768px
   Primary phone breakpoint. Stacks all columns, shrinks type,
   reduces spacing, and enlarges touch targets.
   ---------------------------------------------------------------- */
@media screen and (max-width: 768px) {

  /* ---- Base Typography ----
     20px base is too large on a ~375px viewport.
     Scale down to 16px (Bulma default) for comfortable reading.
     All rem-based sizes cascade from this change. */
  html {
    font-size: 16px;
  }

  body {
    line-height: 1.6;  /* slightly tighter line height on small screens */
  }

  /* ---- Hero / Title ----
     The 2.8rem title at 20px = 56px — far too large for mobile.
     Scale to a comfortable headline size that wraps gracefully. */
  .publication-title {
    font-size: 1.6rem !important;
    line-height: 1.3;
    padding: 0 0.5rem;
  }

  /* Venue badge — slightly smaller on mobile */
  .publication-venue {
    font-size: 0.9rem !important;
    padding: 0.3em 0.9em;
  }

  /* Affiliations line in hero — tighter on mobile */
  .hero-body .is-size-6 {
    font-size: 0.8rem !important;
    line-height: 1.4;
  }

  /* ---- Badge Buttons ----
     Ensure touch targets meet 44px minimum (Fitts's Law).
     Stack badges vertically for better thumb reachability. */
  .publication-links {
    gap: 0.4rem;
  }

  .publication-links .button {
    font-size: 0.8rem;
    min-height: 44px;     /* minimum touch target height */
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Reduce hero section padding on mobile */
  .hero .hero-body {
    padding: 2rem 1rem 1rem;
  }

  /* ---- Teaser ---- */
  .teaser .hero-body {
    padding-bottom: 1.5rem;
  }

  .teaser .subtitle {
    font-size: 0.9rem !important;
    line-height: 1.5;
    padding: 0 0.25rem;
  }

  /* ---- Section Titles ---- */
  .title.is-3 {
    font-size: 1.4rem !important;
  }

  .title.is-4 {
    font-size: 1.15rem !important;
  }

  .title.is-5 {
    font-size: 1rem !important;
  }

  /* ---- Section Padding ----
     Reduce horizontal and vertical padding on mobile to reclaim space. */
  .section {
    padding: 2rem 1rem;
  }

  /* ---- Authors Section ----
     On mobile, show 2 authors per row instead of 3–4.
     Photos sized for face recognition on small screens (≥115px).
     Names at 0.92rem = 14.7px — above WCAG minimum for legibility. */
  .author-row {
    flex-wrap: wrap;
    gap: 1.25rem 1.25rem;
    margin-top: 1.25rem;
  }

  .author-profile {
    width: 140px;
  }

  .author-photo {
    width: 120px;
    height: 120px;
  }

  .author-initials {
    width: 120px;
    height: 120px;
    font-size: 1.6rem;
  }

  .author-name {
    font-size: 0.92rem;
  }

  .author-affiliation {
    font-size: 0.8rem;
  }

  /* ---- Abstract ----
     Full-width on mobile for maximum readability. */
  #abstract .column.is-four-fifths {
    width: 100%;
  }

  /* ---- Dataset Section ----
     Table font even smaller on mobile for better fit.
     The overflow-x:auto wrapper already handles horizontal scroll. */
  .dataset-table {
    font-size: 0.72rem;
  }

  .dataset-table th,
  .dataset-table td {
    padding: 0.4em 0.3em;
    white-space: nowrap;  /* prevent awkward line breaks inside cells */
  }

  .dataset-legend {
    font-size: 0.7rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* ---- Toolbox Section ----
     Videos stack vertically (Bulma handles column stacking).
     Reduce spacing between subsections. */
  .toolbox-subsection {
    margin-bottom: 1.75rem;
  }

  .toolbox-subsection-title {
    font-size: 1.1rem !important;
  }

  .toolbox-subsection-desc {
    font-size: 0.82rem;
    max-width: 100%;
    padding: 0 0.25rem;
  }

  .toolbox-col-label {
    font-size: 0.78rem;
    margin-bottom: 0.35rem;
  }

  .speed-badge {
    font-size: 0.5em;
  }

  .stacked-videos {
    gap: 0.5rem;
  }

  /* ---- Feature Cards (Key Contributions) ----
     Single column on mobile — Bulma stacks .column.is-half.
     Reduce internal padding for compact display. */
  .feature-card .card-content {
    padding: 1.25rem;
  }

  .feature-card .content {
    font-size: 0.88rem;
  }

  /* ---- System Setup ----
     Image quality comparison: stack vertically on mobile. */
  #system-setup .column.is-5 {
    margin-bottom: 1.5rem;
  }

  .figure-caption {
    font-size: 0.78rem;
  }

  /* ---- Results Section ----
     Table needs to breathe on mobile. */
  #results .table {
    font-size: 0.82rem;
  }

  #results .table th,
  #results .table td {
    padding: 0.5em 0.4em;
  }

  /* ---- BibTeX ----
     Pre block should scroll horizontally, not overflow the viewport. */
  #BibTeX pre {
    font-size: 0.72rem;
    padding: 1rem;
    overflow-x: auto;
    white-space: pre;      /* preserve formatting but allow scroll */
    word-break: normal;
  }

  /* ---- Coming Soon Notice ---- */
  .coming-soon-notice {
    padding: 2rem 1rem;
  }

  /* ---- Footer ---- */
  .footer {
    padding: 2rem 1rem;
  }

  .footer .content p {
    font-size: 0.82rem;
  }

  /* ---- Placeholder Figures ---- */
  .placeholder-figure {
    padding: 1.25rem;
    min-height: 150px;
    font-size: 0.85rem;
  }

  /* ---- Navigation ----
     Ensure mobile menu items have adequate touch targets.
     Menu items should be tall enough for comfortable tapping. */
  .navbar-menu.is-active {
    padding: 0.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .navbar-menu .navbar-item {
    min-height: 48px;       /* comfortable tap target */
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
  }
}

/* ----------------------------------------------------------------
   TABLET — 769px to 1023px
   iPad portrait and small tablets. Moderate scaling.
   ---------------------------------------------------------------- */
@media screen and (min-width: 769px) and (max-width: 1023px) {

  /* Slightly smaller base for tablets — 18px is a good middle ground */
  html {
    font-size: 18px;
  }

  /* Title scales down moderately */
  .publication-title {
    font-size: 2.2rem !important;
  }

  /* Authors — allow wrapping with moderately sized cards */
  .author-row {
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
  }

  .author-profile {
    width: 155px;
  }

  .author-photo {
    width: 135px;
    height: 135px;
  }

  .author-initials {
    width: 135px;
    height: 135px;
    font-size: 1.85rem;
  }

  .author-name {
    font-size: 1rem;
  }

  .author-affiliation {
    font-size: 0.85rem;
  }

  /* Section padding — moderate reduction */
  .section {
    padding: 2.5rem 1.5rem;
  }

  /* Dataset table — slightly smaller for tablet */
  .dataset-table {
    font-size: 0.78rem;
  }

  /* Toolbox descriptions — allow wider on tablet */
  .toolbox-subsection-desc {
    max-width: 90%;
  }

  /* Feature card content — moderate padding */
  .feature-card .card-content {
    padding: 1.5rem;
  }

  /* BibTeX */
  #BibTeX pre {
    font-size: 0.78rem;
    overflow-x: auto;
  }
}

/* ----------------------------------------------------------------
   SMALL DESKTOP — 1024px to 1215px
   iPad landscape, smaller laptops. Minor tweaks.
   ---------------------------------------------------------------- */
@media screen and (min-width: 1024px) and (max-width: 1215px) {

  html {
    font-size: 19px;
  }

  .publication-title {
    font-size: 2.5rem !important;
  }
}

/* ----------------------------------------------------------------
   LANDSCAPE PHONES — short & wide viewports
   Prevents the hero from consuming the entire viewport height.
   ---------------------------------------------------------------- */
@media screen and (max-width: 768px) and (orientation: landscape) {

  .hero .hero-body {
    padding-top: 1rem;
    padding-bottom: 0.5rem;
  }

  /* Authors: show 3 per row in landscape since we have the width.
     Slightly smaller than portrait to fit more per row. */
  .author-row {
    gap: 1rem 1.5rem;
  }

  .author-profile {
    width: 120px;
  }

  .author-photo {
    width: 100px;
    height: 100px;
  }

  .author-initials {
    width: 100px;
    height: 100px;
    font-size: 1.4rem;
  }

  .author-name {
    font-size: 0.85rem;
  }
}

/* ----------------------------------------------------------------
   VERY SMALL PHONES — max-width: 374px
   Older iPhones (SE 1st gen), narrow Android devices.
   Extra size reductions to prevent overflow.
   ---------------------------------------------------------------- */
@media screen and (max-width: 374px) {

  html {
    font-size: 15px;
  }

  .publication-title {
    font-size: 1.4rem !important;
  }

  /* Authors: single column on very narrow screens — since we have
     the full width, photos can stay generous for face recognition. */
  .author-row {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .author-profile {
    width: 145px;
  }

  .author-photo {
    width: 125px;
    height: 125px;
  }

  .author-initials {
    width: 125px;
    height: 125px;
    font-size: 1.7rem;
  }

  .author-name {
    font-size: 0.92rem;
  }

  /* Badges stack fully vertical */
  .publication-links {
    flex-direction: column;
    align-items: center;
  }

  .badge-row-break {
    display: none;  /* not needed when already vertical */
  }

  .publication-links .button {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  /* Dataset table — minimum viable font */
  .dataset-table {
    font-size: 0.65rem;
  }
}

/* ----------------------------------------------------------------
   LARGE / HIGH-DPI DESKTOPS — min-width: 1408px
   Widescreen monitors. Increase content max-width and
   allow slightly larger type for comfortable reading distance.
   ---------------------------------------------------------------- */
@media screen and (min-width: 1408px) {

  html {
    font-size: 20px;  /* restore the intended large base */
  }
}

/* ----------------------------------------------------------------
   PRINT STYLES
   Basic print-friendly overrides for users printing the page.
   ---------------------------------------------------------------- */
@media print {

  /* Reset font size for print */
  html {
    font-size: 12pt;
  }

  /* Hide non-essential interactive elements */
  .navbar,
  .coming-soon-link,
  .coming-soon-notice,
  .placeholder-figure,
  footer {
    display: none !important;
  }

  /* Remove section backgrounds */
  .section-alt {
    background-color: #fff;
  }

  /* Ensure all content is visible */
  .section {
    padding: 1rem 0;
  }

  /* Remove card shadows for print */
  .feature-card {
    box-shadow: none !important;
    border: 1px solid #ddd;
  }
}

/* ----------------------------------------------------------------
   GLOBAL RESPONSIVE HELPERS
   Utility classes and base styles that improve responsiveness
   regardless of breakpoint.
   ---------------------------------------------------------------- */

/* Ensure all images are responsive by default */
img {
  max-width: 100%;
  height: auto;
}

/* Prevent horizontal overflow — applied at body level to avoid
   clipping Bulma's negative-margin column layouts within .container. */
body {
  overflow-x: hidden;
}

/* Smooth transitions for interactive elements — respects
   user's reduced-motion preference for accessibility. */
@media (prefers-reduced-motion: no-preference) {
  a, .button, .navbar-item, .feature-card {
    transition: all 0.2s ease;
  }
}

/* Users who prefer reduced motion — disable transitions */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .feature-card:hover {
    transform: none;
  }
}

/* Improve focus visibility for keyboard navigation (accessibility).
   Only shows the outline when user is navigating via keyboard,
   not when clicking with a mouse. */
:focus-visible {
  outline: 3px solid hsl(204, 86%, 53%);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Hide focus outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Smooth scrolling for anchor links (in-page navigation).
   Respects reduced-motion preference. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Note: -webkit-text-size-adjust is set in the top-level html rule above
   to prevent iOS Safari from inflating text in landscape mode. */
