/* ==========================================================================
   Rounded corners — sitewide
   --------------------------------------------------------------------------
   The template shipped a mix: square buttons (`.btn` was `border-radius: 0`),
   square blog/portfolio cards and square panels, but 20px-rounded workshop
   images and the custom hero visuals. That reads as two different designs
   stitched together.

   This file is the single source of truth for corner radius. It loads LAST on
   every page, so it wins without needing !important on anything but the
   Bootstrap utilities that carry it themselves.

   Deliberately NOT touched: anything circular (`border-radius: 100%` / `50%`)
   — social icons, avatars, play buttons, the scroll-to-top and the odometer
   markers are meant to be round, and squaring them off to a shared value
   would be a regression, not consistency.
   ========================================================================== */

:root {
  /* Pill, to match the hero's CTAs — the one button style already signed off. */
  --radius-btn: 999px;
  --radius-card: 16px;
  --radius-media: 14px;
  --radius-input: 10px;
  --radius-badge: 8px;
}

/* --- Buttons ------------------------------------------------------------ */

.btn,
input[type="submit"],
input[type="button"],
button[type="submit"],
.wptb-item--button > a,
.wptb-item--button > button {
  border-radius: var(--radius-btn);
  -webkit-border-radius: var(--radius-btn);
  -moz-border-radius: var(--radius-btn);
}

/* `.creative` draws four corner brackets with pseudo-elements. They trace a
   square and read as broken artefacts on a pill, so they're off. */
.btn.creative::before,
.btn.creative::after,
.btn.creative .btn-wrap::before,
.btn.creative .btn-wrap::after,
.btn:hover::before,
.btn:hover::after,
.btn:hover .btn-wrap::before,
.btn:hover .btn-wrap::after {
  display: none;
}

/* Bootstrap's own button/group radii, which carry their own specificity. */
.btn-group > .btn:first-child:not(:last-child),
.btn-group > .btn:last-child:not(:first-child),
.btn-group > .btn:not(:first-child):not(:last-child) {
  border-radius: var(--radius-btn);
}

/* --- Cards and panels --------------------------------------------------- */

/* Only the wrappers that actually paint something — a radius on a bare text
   wrapper is a no-op, but keeping the list tight avoids surprises.
   Class list taken from an inventory of every `wptb-*` block used across the
   41 pages, so this isn't guesswork about what exists. */
.wptb-blog-grid1 .wptb-item--inner,
.wptb-blog-list1 .wptb-item--inner,
.wptb-blog-grid-one .wptb-item--inner,
.wptb-team-grid1 .wptb-item--inner,
.wptb-team-grid3 .wptb-item--inner,
.wptb-icon-box1 .wptb-item--inner,
.wptb-counter1 .wptb-item--inner,
.wptb-packages1,
.wptb-packages1 .wptb-item--inner,
.wptb-office-address,
.wptb-contact-form,
.wptb-form--inner,
.wptb-form--wrapper,
.card,
.wptb-item--box {
  border-radius: var(--radius-card);
}

/* NOT rounded: the `.wptb-page-heading` banner at the top of 39 pages. Its
   photo lives in a transformed `.wptb-item-layer-one`, and the corners stay
   square however the radius is applied (on the inner with overflow hidden, on
   the layer, on the img, with and without layer promotion). It's a full-width
   page header rather than a card, so it reads fine square — but if it should
   match, the banner markup needs restructuring, not another CSS override.
   Don't re-add a `will-change` here; it costs GPU memory on every page and
   did not fix it. */

/* Cards that clip a photo need overflow hidden; ones that only paint a
   background must not, or absolutely-positioned ribbons get cut off. */
.wptb-blog-grid1 .wptb-item--inner,
.wptb-blog-list1 .wptb-item--inner,
.wptb-team-grid1 .wptb-item--inner,
.wptb-team-grid3 .wptb-item--inner {
  overflow: hidden;
}

/* --- Media -------------------------------------------------------------- */

.wptb-item--image,
.wptb-single--image,
.wptb-image-single,
.wptb-slider--image,
.wptb-instagram--gallery a,
.grid-item .wptb-item--image,
.image-post,
.blocks-gallery-item figure {
  border-radius: var(--radius-media);
  overflow: hidden;
}

.wptb-item--image img,
.wptb-single--image img,
.wptb-image-single img,
.wptb-slider--image img,
.image-post img {
  border-radius: inherit;
}

/* --- Form fields -------------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="date"],
textarea,
select,
.form-control,
.nice-select,
.flatpickr-input {
  border-radius: var(--radius-input);
  -webkit-border-radius: var(--radius-input);
}

.nice-select .list {
  border-radius: var(--radius-input);
}

/* --- Small badges / chips ----------------------------------------------- */

.wptb-item--date,
.wptb-item--tag,
.wptb-item--category,
.badge,
.wptb-item--label,
.post-share ul.share-list li a {
  border-radius: var(--radius-badge);
}

/* --- Accordions (FAQ) --------------------------------------------------- */

.accordion-item,
.accordion-button,
.accordion-button.collapsed {
  border-radius: var(--radius-card);
}

.accordion-item:not(:first-of-type) {
  border-top: inherit;
}

/* --- Bootstrap utilities that hard-set a radius ------------------------- */

.rounded-0 {
  border-radius: var(--radius-card) !important;
}
