/* Modular preset styles. Loaded on the front end and in the editor only while the Modular preset is active. */

/* ==============================================================================
   MODULAR STATS (pattern swiss/stats)
   ============================================================================== */

/* Cut the bottom-right corner of each stat card and draw the border along the cut. */
.modular-stat-card {
  --modular-stat-cut: 3rem;
  position: relative;
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - var(--modular-stat-cut)),
    calc(100% - var(--modular-stat-cut)) 100%,
    0 100%
  );
}

.modular-stat-card::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: var(--modular-stat-cut);
  height: var(--modular-stat-cut);
  background: linear-gradient(
    to top left,
    transparent calc(50% - 1px),
    var(--wp--custom--line--color) calc(50% - 1px),
    var(--wp--custom--line--color) 50%,
    transparent 50%
  );
  pointer-events: none;
}

/* HEADER: Modular's header (presets/modular/patterns/header-centered-menu-and-button.php) has Get Started as a Text
   button (button-styles/text-btn.css) whose text matches the top menu links: link colour, hover colour, font,
   size, weight and letter spacing from theme.json settings.custom.menu (the same values the main menu reads in
   inc/megamenu.php), Contrast wherever the light header tone shows the solid bar (style.css LIGHT HEADER). */
.wp-site-blocks > header .is-style-text-btn .wp-block-button__link {
  font-family: var(--wp--custom--menu--font-family);
  font-size: var(--wp--custom--menu--font-size);
  font-weight: var(--wp--custom--menu--font-weight);
  letter-spacing: var(--wp--custom--menu--letter-spacing);
  color: var(--wp--custom--menu--link-color);
}

.wp-site-blocks > header .is-style-text-btn .wp-block-button__link:hover,
.wp-site-blocks
  > header
  .is-style-text-btn
  .wp-block-button__link:focus-visible {
  color: var(--wp--custom--menu--link-hover-color);
}

:is(
    .swiss-header-light
      .wp-site-blocks:not(
        :has(
          :is(.wp-block-post-content, main)
            > :is(.banner-fullheight, .banner-fullheight-short):first-child:not(
              .banner-no-overlap
            )
        )
      )
      > header,
    .swiss-header-light.swiss-header-solid .wp-site-blocks > header,
    .swiss-header-light .wp-site-blocks > header.bsh-docked
  )
  .is-style-text-btn
  .wp-block-button__link {
  color: var(--wp--preset--color--contrast);
}

/* Get Started is hidden at 1120px and below, so it never wraps under the logo: with the logo and the full menu
   (five items on swiss.rocquett.com) it only fits the 90px row from about 1090px. At 1023px and below the menu
   collapses to its button, so the logo and menu button have the row to themselves. The same width as Deep Tech;
   raise it for a longer menu. */
@media (max-width: 1120px) {
  .wp-site-blocks > header .header-height > .wp-block-buttons {
    display: none;
  }
}

/* CALL TO ACTION (Site Options > Call to Action, inc/site-cta.php): when the footer opens with the CTA band, it
   follows the last section with no gap (the base .site-footer top margin is spacing 9). Without the CTA the
   footer keeps its margin. */
.site-footer:has(> .cta:first-child) {
  margin-top: 0;
}

/* ==============================================================================
   SLIDER STATIC CONTENT COLUMN (pattern swiss/slider-static-content-column)
   Fixed text column, a full-height divider, and a Carousel Slider block of image cards on the right. Only the
   images slide; the arrows (Buttons with slider-prev / slider-next) are wired up by assets/js/slider-controls.js.
   ============================================================================== */

/* Desktop (columns side by side, 992px and up; base style.css TABLET stacks all columns up to 991px): the
   divider runs the full height of the section, and the arrows sit at the foot of the text column. */
@media (min-width: 992px) {
  .slider-static-content .slider-static-text {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid var(--wp--custom--line--color);
  }

  .slider-static-content .slider-static-text > .wp-block-buttons.slider-arrows {
    margin-top: var(--wp--preset--spacing--6);
  }
}

/* Tablets and phones (columns stacked, 991px and below): no divider; the arrows follow the text and the
   slider follows them. */
@media (max-width: 991px) {
  .slider-static-content .slider-static-text {
    padding-right: 0 !important;
    padding-bottom: var(--wp--preset--spacing--4) !important;
  }

  .slider-static-content .slider-static-images {
    padding-top: 0 !important;
    padding-left: 0 !important;
  }
}

/* Arrows: 44px squares with a Light Gray border and a Primary arrow; the button text ("Previous slide",
   "Next slide") stays as the accessible name but is hidden visually. */
.slider-static-content .slider-arrows .wp-block-button .wp-block-button__link {
  --slider-arrow-size: 44px;
  position: relative;
  display: block;
  width: var(--slider-arrow-size);
  height: var(--slider-arrow-size);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--wp--preset--color--light-gray);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: transparent;
  font-size: 0;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.slider-static-content
  .slider-arrows
  .wp-block-button
  .wp-block-button__link::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px;
  height: 16px;
  background-color: var(--wp--preset--color--primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M0 7h12.2L6.6 1.4 8 0l8 8-8 8-1.4-1.4L12.2 9H0z'/%3E%3C/svg%3E")
    center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M0 7h12.2L6.6 1.4 8 0l8 8-8 8-1.4-1.4L12.2 9H0z'/%3E%3C/svg%3E")
    center / 100% 100% no-repeat;
  transition: background-color 0.2s ease;
}

.slider-static-content
  .slider-arrows
  .slider-prev
  .wp-block-button__link::before {
  transform: scaleX(-1);
}

.slider-static-content
  .slider-arrows
  .wp-block-button
  .wp-block-button__link:is(:hover, :focus-visible) {
  border-color: var(--wp--preset--color--primary);
  background: var(--wp--preset--color--primary);
}

.slider-static-content
  .slider-arrows
  .wp-block-button
  .wp-block-button__link:is(:hover, :focus-visible)::before {
  background-color: var(--wp--preset--color--white);
}

.slider-static-content
  .slider-arrows
  .wp-block-button
  .wp-block-button__link:focus-visible {
  outline: 2px solid var(--wp--preset--color--primary);
  outline-offset: 2px;
}

/* Image cards: the Modular cut corner (bottom right, 60px) and a shorter card on phones. The dark gradient behind
   the caption is the Cover block's own overlay, so it can be changed per slide. */
.slider-static-content .slider-image-card {
  --slider-card-cut: 60px;
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - var(--slider-card-cut)),
    calc(100% - var(--slider-card-cut)) 100%,
    0 100%
  );
}

@media (max-width: 991px) {
  .slider-static-content .slider-image-card {
    --slider-card-cut: 40px;
    min-height: 420px !important;
  }
}

/* ==============================================================================
   SLIDER CARDS (pattern swiss/slider-cards-bar)
   Value cards in a Carousel Slider block with the slider bar under it (base style.css SLIDER BAR sets the card
   widths and the bar). Each card is a Group with a Light Gray left border; here it fills the slide's height so the
   lines are all as long as the tallest card.
   ============================================================================== */
.slider-cards .slider-value-card {
  box-sizing: border-box;
  height: 100%;
}

/* ==============================================================================
   ACCORDIONS (every core Accordion block while Modular is active; e.g. pattern swiss/content-with-accordion)
   The row line, heading font (Body, Medium-Large, 600), colours and panel text colour are in theme.json
   styles.blocks core/accordion-item, -heading and -panel (editable in Global Styles). This CSS adds what
   theme.json can't: rows with no gap between them, so the space above and below each title is the same
   (spacing 3), the title in Primary on hover or while open, a darker line under the open item, and a 32px
   Light Gray box with an up-right arrow instead of the plus sign (Dark Gray; on hover, focus and while open a
   Primary box with a White arrow, turned to point down-right while open). Opening and closing is the block's own script.
   ============================================================================== */

/* No gap between rows: the accordion's block spacing would add 24px above every row but the first. */
.wp-block-accordion > .wp-block-accordion-item {
  margin-block: 0;
  transition: border-color 0.2s ease;
}

.wp-block-accordion > .wp-block-accordion-item.is-open {
  border-bottom-color: var(--wp--preset--color--dark-gray);
}

.wp-block-accordion .wp-block-accordion-heading {
  margin: 0;
  padding: 0;
}

.wp-block-accordion .wp-block-accordion-heading__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wp--preset--spacing--3);
  width: 100%;
  padding: var(--wp--preset--spacing--3) 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease;
}

.wp-block-accordion .wp-block-accordion-heading__toggle:hover,
.wp-block-accordion
  .wp-block-accordion-item.is-open
  .wp-block-accordion-heading__toggle {
  color: var(--wp--preset--color--primary);
}

.wp-block-accordion .wp-block-accordion-heading__toggle:focus-visible {
  outline: 2px solid var(--wp--preset--color--primary);
  outline-offset: 2px;
}

/* The box: the block's icon span with its plus sign hidden. */
.wp-block-accordion .wp-block-accordion-heading__toggle-icon {
  position: relative;
  flex: none;
  box-sizing: border-box;
  width: 32px; /* the same size as the Text button's square (button-styles/text-btn.css --text-btn-box) */
  height: 32px;
  border: 1px solid var(--wp--preset--color--light-gray);
  background: var(--wp--preset--color--base);
  color: transparent;
  font-size: 0;
  transform: none !important;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

/* Hover and open: a Primary box with a White arrow. */
.wp-block-accordion
  .wp-block-accordion-heading__toggle:hover
  .wp-block-accordion-heading__toggle-icon,
.wp-block-accordion
  .wp-block-accordion-heading__toggle:focus-visible
  .wp-block-accordion-heading__toggle-icon,
.wp-block-accordion
  .wp-block-accordion-item.is-open
  .wp-block-accordion-heading__toggle-icon {
  border-color: var(--wp--preset--color--primary);
  background: var(--wp--preset--color--primary);
}

.wp-block-accordion .wp-block-accordion-heading__toggle-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px; /* the same arrow at the same size as the Text button's (button-styles/text-btn.css --text-btn-arrow) */
  height: 20px;
  background-color: var(--wp--preset--color--dark-gray);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.67 14.64 4.59 13.55l7.42-7.42H5.36V4.59h9.27v9.27h-1.54V7.22z'/%3E%3C/svg%3E")
    center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.67 14.64 4.59 13.55l7.42-7.42H5.36V4.59h9.27v9.27h-1.54V7.22z'/%3E%3C/svg%3E")
    center / 100% 100% no-repeat;
  transition:
    rotate 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.2s ease;
}

.wp-block-accordion
  .wp-block-accordion-heading__toggle:hover
  .wp-block-accordion-heading__toggle-icon::before,
.wp-block-accordion
  .wp-block-accordion-heading__toggle:focus-visible
  .wp-block-accordion-heading__toggle-icon::before,
.wp-block-accordion
  .wp-block-accordion-item.is-open
  .wp-block-accordion-heading__toggle-icon::before {
  background-color: var(--wp--preset--color--white);
}

.wp-block-accordion
  .wp-block-accordion-item.is-open
  .wp-block-accordion-heading__toggle-icon::before {
  rotate: 90deg;
}

/* A panel shows only while its item is open. WordPress hides closed panels only once the accordion script has
   started, so without this every panel shows (and the page jumps) for a moment on load. The item's is-open class
   is in the saved markup and the script switches it. Front end only: in the editor the block shows its panels
   its own way. */
body:not(.editor-styles-wrapper)
  .wp-block-accordion-item:not(.is-open)
  > .wp-block-accordion-panel {
  display: none;
}

/* Panel text: no top margin, and the same spacing 3 below as the space above the title. */
.wp-block-accordion .wp-block-accordion-panel > :first-child {
  margin-top: 0;
}

.wp-block-accordion .wp-block-accordion-panel > :last-child {
  margin-bottom: 0;
  padding-bottom: var(--wp--preset--spacing--3);
}

@media (prefers-reduced-motion: reduce) {
  .wp-block-accordion .wp-block-accordion-heading__toggle-icon,
  .wp-block-accordion .wp-block-accordion-heading__toggle-icon::before {
    transition: none;
  }
}

/* ==============================================================================
   CONTENT WITH COLUMNS (pattern swiss/content-with-columns)
   The line above the columns and the lines between them are block borders (the Columns Row group's top border,
   and a left border on columns 2 and 3). Once the columns stack (991px and below: core stacks them below 782px
   and base style.css TABLET from 768 to 991px) the left
   lines become a line on top of columns 2 and 3, no column has side padding, and the space above, below and
   between the icon and the statement is smaller (spacing 5, 5 and 4).
   ============================================================================== */
@media (max-width: 991px) {
  .content-with-columns-row .wp-block-column {
    padding: var(--wp--preset--spacing--5) 0 !important;
  }

  /* Less space between the icon and the statement than on desktop (spacing 8). */
  .content-with-columns-row .wp-block-column > p {
    margin-top: var(--wp--preset--spacing--4) !important;
  }

  .content-with-columns-row .wp-block-column + .wp-block-column {
    border-left: 0 !important;
    border-top: 1px solid var(--wp--custom--line--color);
  }
}

/* ==============================================================================
   MODULAR BANNER (swiss/banner, and the slides of swiss/banner-slider)
   ============================================================================== */

/* Once the intro and button columns stack (991px and below: core Columns stack below 782px and base style.css
   TABLET stacks them from 768 to 991px), everything in them is centred: the intro loses the side padding it has
   beside the button, and the buttons are centred. Set by the stacking width rather than the blocks' own mobile
   settings, which start at 768px and lose to core's left-justify rule for Buttons. !important beats the blocks'
   own alignment, padding and justification. */
@media (max-width: 991px) {
  /* No extra 2rem above each stacked column (base style.css TABLET, 768-991px): the columns' gap is enough. */
  .banner-fullheight
    .wp-block-columns:not(.is-not-stacked-on-mobile)
    > .wp-block-column {
    text-align: center;
    margin-block-start: 0 !important;
  }

  .banner-fullheight
    .wp-block-columns:not(.is-not-stacked-on-mobile)
    > .wp-block-column
    > p {
    text-align: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* No space of its own above the button: the stacked columns are already spaced apart. */
  .banner-fullheight
    .wp-block-columns:not(.is-not-stacked-on-mobile)
    > .wp-block-column
    > .wp-block-buttons {
    justify-content: center !important;
    margin-top: 0 !important;
  }
}

/* ==============================================================================
   MODULAR BANNER SHORT
   ============================================================================== */

/* The banner photo's 500px height is base style.css BANNERS (.banner-text), shared with Deep Tech Text Banner. */

/* Banner Slider (swiss/banner-slider): the slide lines (base style.css SLIDER LINES) are centred,
   like the banner heading and button. */
.banner-slider .slider-lines {
  --slider-lines-justify: center;
  --slider-lines-pull: 0px;
}

/* ==============================================================================
   MODULAR FEATURE GRID (pattern swiss/feature-grid)
   The grid is full width, so its lines run to the screen edges: a line along the top of the grid, a line under
   every item (the last row's makes the bottom line) and a line on the left of every item that doesn't start a
   row. Three columns from 992px, two from 600 to 991px, one below 600px. The items at the outer edges get extra
   padding so their content lines up with the wide content edge (the grid is a size container, so 100cqw is its
   width without the scrollbar); on narrower screens it falls back to the root side padding. Line colour:
   --modular-feature-grid-line. !important beats the items' own padding.
   ============================================================================== */
.modular-feature-grid-items {
  --modular-feature-grid-line: var(--wp--custom--line--color);
  --modular-feature-grid-edge: max(
    var(--wp--style--root--padding-left, 1.5rem),
    calc((100cqw - var(--wp--style--global--wide-size, 1440px)) / 2)
  );
  container-type: inline-size;
  border-top: 1px solid var(--modular-feature-grid-line);
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.modular-feature-grid-items > .modular-feature {
  border-bottom: 1px solid var(--modular-feature-grid-line);
}

@media (min-width: 992px) {
  .modular-feature-grid-items > .modular-feature:not(:nth-child(3n + 1)) {
    border-left: 1px solid var(--modular-feature-grid-line);
  }
  .modular-feature-grid-items > .modular-feature:nth-child(3n + 1) {
    padding-left: var(--modular-feature-grid-edge) !important;
  }
  .modular-feature-grid-items > .modular-feature:nth-child(3n) {
    padding-right: var(--modular-feature-grid-edge) !important;
  }
}

@media (min-width: 600px) and (max-width: 991px) {
  .modular-feature-grid-items {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .modular-feature-grid-items > .modular-feature:nth-child(even) {
    border-left: 1px solid var(--modular-feature-grid-line);
    padding-right: var(--modular-feature-grid-edge) !important;
  }
  .modular-feature-grid-items > .modular-feature:nth-child(odd) {
    padding-left: var(--modular-feature-grid-edge) !important;
  }
}

@media (max-width: 599px) {
  .modular-feature-grid-items {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .modular-feature-grid-items > .modular-feature {
    padding: var(--wp--preset--spacing--5) var(--modular-feature-grid-edge) !important;
  }
}

/* ==============================================================================
   SMALL BUTTONS (11 Nov 2026, the user's choice): every small button (btn-small, any style: Fill, Outline, Arrow
   Join, Text) is weight 400; full-size buttons keep the preset's 300 (theme.json core/button).
   ============================================================================== */
.wp-block-button.btn-small .wp-block-button__link {
  font-weight: 400;
  letter-spacing: 0.1em;
}

/* ==============================================================================
   PAGINATION (11 Nov 2026, the user's design, after the archwaypartnership.uga.edu news pagination): the blog's
   Query Pagination (class blog-pagination, post-loop-grid.php) as a centred row of square Primary buttons, 28px
   high like small buttons (btn-small), 10px apart, weight 400, white text, Dark Primary on hover and focus (the Fill
   colours). Page numbers are 28px squares with Small text; Previous and Next are 28px high with the button's
   letter spacing and XSmall text (the small buttons' size), and the core chevron-left / chevron-right icon (the ic-inline-* classes on the blocks; the Previous
   icon is moved in front of its text with order). The current page is plain Contrast text (no box), and the "…"
   gap is plain Dark Gray, since neither can be clicked. Phones (600px and below): one line, squares 6px apart,
   and Previous / Next as caret-only squares (their words stay for screen readers).
   ============================================================================== */
.blog-pagination {
  --blog-pagination-size: 28px;
  --blog-pagination-gap: 10px;
  gap: var(--blog-pagination-gap) !important;
  margin-top: var(--wp--preset--spacing--7);
  font-weight: 400;
  line-height: 1;
}

.blog-pagination .wp-block-query-pagination-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: var(--blog-pagination-gap);
  margin: 0;
}

.blog-pagination a,
.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: var(--blog-pagination-size);
  height: var(--blog-pagination-size);
  margin: 0;
  padding: 0 4px;
  font-size: var(--wp--preset--font-size--small);
  text-decoration: none;
}

.blog-pagination a {
  background: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--white);
  transition: background-color 0.2s;
}

.blog-pagination a:hover,
.blog-pagination a:focus-visible {
  background: var(--wp--preset--color--dark-primary);
  color: var(--wp--preset--color--white);
}

.blog-pagination .page-numbers.current {
  color: var(--wp--preset--color--contrast);
}

.blog-pagination .page-numbers.dots {
  color: var(--wp--preset--color--dark-gray);
}

.blog-pagination .wp-block-query-pagination-previous,
.blog-pagination .wp-block-query-pagination-next {
  gap: 0.3em;
  padding: 0 0.75rem;
  font-size: var(--wp--preset--font-size--xsmall);
  letter-spacing: var(
    --swiss-button-letter-spacing,
    0.05em
  ); /* the full-size buttons' (theme.json core/button) */
}

.blog-pagination .wp-block-query-pagination-previous::after {
  order: -1;
}

@media (max-width: 600px) {
  .blog-pagination {
    --blog-pagination-gap: 6px;
    flex-wrap: nowrap !important;
  }

  .blog-pagination .wp-block-query-pagination-numbers {
    flex-wrap: nowrap;
  }

  .blog-pagination .wp-block-query-pagination-previous,
  .blog-pagination .wp-block-query-pagination-next {
    width: var(--blog-pagination-size);
    padding: 0;
    font-size: 0;
    letter-spacing: 0;
  }

  .blog-pagination .wp-block-query-pagination-previous::after,
  .blog-pagination .wp-block-query-pagination-next::after {
    width: 18px;
    height: 18px;
  }
}
