/*
Theme Name: Rederi Proxim
Theme URI: https://rederi.es
Author: Codex
Description: Tema de bloques limpio para Rederi, pensado para captar presupuestos y visitas de servicios de mejora del hogar en Ripoll y el Ripolles.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.0
Version: 0.2.34
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rederi-proxim
*/

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
}

::selection {
  background: rgba(125, 60, 143, 0.22);
}

a {
  text-underline-offset: 0.18em;
}

.wp-site-blocks {
  overflow-x: clip;
}

.trp-language-switcher,
.trp-floating-language-switcher,
.trp-ls-shortcode-current-language,
.trp-ls-shortcode-language {
  display: none !important;
}

.rd-topbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  font-size: var(--wp--preset--font-size--small);
}

.rd-topbar a {
  color: inherit;
}

.rd-header {
  background: rgba(255, 253, 248, 0.94);
  border-bottom: 1px solid rgba(42, 32, 45, 0.08);
  box-shadow: 0 10px 34px rgba(42, 32, 45, 0.055);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}

.rd-header__inner {
  min-height: 86px;
}

.rd-brand {
  min-width: max-content;
}

.rd-brand .wp-block-image {
  margin: 0;
}

.rd-logo img {
  display: block;
  height: auto;
  max-width: 100%;
  width: clamp(220px, 22vw, 292px);
}

.rd-wordmark {
  color: var(--wp--preset--color--lila);
  display: grid;
  font-family: "Brush Script MT", "Segoe Script", cursive;
  gap: 0.1rem;
  text-decoration: none;
  text-shadow: 0 5px 0 rgba(49, 176, 181, 0.16);
}

.rd-wordmark span {
  display: block;
  font-size: 4.2rem;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.72;
}

.rd-wordmark small {
  color: #2d9ca1;
  display: block;
  font-family: var(--wp--preset--font-family--system);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.rd-brand .wp-block-site-title a {
  color: var(--wp--preset--color--mora);
  font-weight: 750;
  text-decoration: none;
}

.rd-header .wp-block-navigation__responsive-container-open,
.rd-header .wp-block-navigation__responsive-container-close {
  color: var(--wp--preset--color--mora);
}

.rd-header .wp-block-navigation a {
  color: var(--wp--preset--color--mora);
  font-weight: 650;
  letter-spacing: 0;
}

.rd-classic-menu {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.05rem;
  justify-content: flex-end;
  list-style: none;
  margin: 0;
  padding: 0;
}

.rd-classic-menu .menu-item {
  margin: 0;
}

.rd-classic-menu a {
  color: var(--wp--preset--color--mora);
  font-size: var(--wp--preset--font-size--base);
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.25;
  text-decoration: none;
}

.rd-header .wp-block-navigation-item.current-menu-item > a,
.rd-header .wp-block-navigation a:hover,
.rd-classic-menu .current-menu-item > a,
.rd-classic-menu a:hover {
  color: var(--wp--preset--color--lila);
}

.rd-header__meta {
  gap: 0.72rem;
}

.rd-header__meta a {
  color: var(--wp--preset--color--mora);
  text-decoration: none;
}

.rd-language-switcher {
  align-items: center;
  display: inline-flex;
  flex-wrap: nowrap;
  font-size: var(--wp--preset--font-size--small);
  font-weight: 700;
  gap: 0.32rem;
  line-height: 1;
  white-space: nowrap;
}

.rd-language-switcher__link {
  color: var(--wp--preset--color--mora);
  opacity: 0.76;
  text-decoration: none;
}

.rd-language-switcher__link.is-current {
  color: var(--wp--preset--color--lila);
  opacity: 1;
}

.rd-language-switcher__link:hover {
  color: var(--wp--preset--color--lila);
  opacity: 1;
}

.rd-language-switcher__separator {
  color: rgba(42, 32, 45, 0.42);
}

.rd-phone-button .wp-block-button__link {
  box-shadow: 0 12px 24px rgba(125, 60, 143, 0.24);
  padding-bottom: 0.58rem;
  padding-top: 0.58rem;
  white-space: nowrap;
}

.rd-hero {
  min-height: clamp(620px, 84vh, 820px);
  position: relative;
  isolation: isolate;
}

.rd-hero::after {
  background:
    linear-gradient(90deg, rgba(42, 32, 45, 0.9) 0%, rgba(42, 32, 45, 0.66) 48%, rgba(42, 32, 45, 0.24) 100%),
    linear-gradient(180deg, rgba(42, 32, 45, 0.08), rgba(42, 32, 45, 0.58));
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

.rd-hero .wp-block-cover__image-background {
  filter: saturate(0.95) contrast(1.02);
}

.rd-hero .wp-block-cover__inner-container {
  position: relative;
  z-index: 2;
}

.rd-hero__content {
  padding-bottom: clamp(34px, 7vh, 70px);
  padding-top: clamp(72px, 12vh, 132px);
}

.rd-eyebrow {
  align-items: center;
  display: inline-flex;
  gap: 0.55rem;
  font-size: var(--wp--preset--font-size--small);
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: uppercase;
}

.rd-eyebrow::before {
  background: currentColor;
  content: "";
  display: inline-block;
  height: 2px;
  width: 34px;
}

.rd-hero__panel {
  max-width: 760px;
}

.rd-hero__actions {
  margin-top: clamp(24px, 4vw, 38px);
}

.rd-hero__facts {
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.88);
  margin-top: clamp(34px, 7vw, 76px);
  padding-top: clamp(18px, 3vw, 28px);
}

.rd-section {
  padding-bottom: clamp(56px, 8vw, 98px);
  padding-top: clamp(56px, 8vw, 98px);
}

.rd-section:first-of-type {
  padding-top: clamp(88px, 11vw, 138px);
}

.rd-section--tight {
  padding-bottom: clamp(42px, 6vw, 72px);
  padding-top: clamp(42px, 6vw, 72px);
}

.rd-band {
  background: var(--wp--preset--color--crema);
  border-bottom: 1px solid rgba(42, 32, 45, 0.08);
  border-top: 1px solid rgba(42, 32, 45, 0.08);
}

.rd-dark-band {
  background:
    linear-gradient(135deg, rgba(42, 32, 45, 0.98), rgba(74, 37, 86, 0.98));
  color: var(--wp--preset--color--cal);
}

.rd-dark-band a {
  color: var(--wp--preset--color--cal);
}

.rd-service-grid {
  align-items: stretch;
}

.rd-product-grid {
  row-gap: clamp(34px, 6vw, 72px);
}

.rd-product-card {
  margin-left: auto;
  margin-right: auto;
  max-width: 250px;
  text-align: center;
}

.rd-product-card :is(h2, h3) {
  margin-top: 1rem;
}

.rd-product-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  box-shadow:
    0 0 0 8px rgba(125, 60, 143, 0.08),
    0 20px 34px rgba(42, 32, 45, 0.1);
  margin-left: auto;
  margin-right: auto;
  max-width: 128px;
  overflow: hidden;
}

.rd-product-thumb img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.rd-service-card {
  background: linear-gradient(180deg, #8833a5 0%, #a35cc9 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  box-shadow: 0 20px 45px rgba(125, 60, 143, 0.18);
  color: var(--wp--preset--color--cal);
  display: flex;
  flex-direction: column;
  min-height: 390px;
  padding: clamp(18px, 3vw, 28px);
}

.rd-service-card h3,
.rd-service-card p {
  color: inherit;
}

.rd-service-card figure {
  border-radius: 6px;
  overflow: hidden;
}

.rd-service-card img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}

.rd-service-card .wp-block-buttons {
  margin-top: auto;
  padding-top: 22px;
}

.rd-service-card__mark {
  background: var(--wp--preset--color--gris);
  border-radius: 999px;
  color: var(--wp--preset--color--lila);
  display: grid;
  font-size: 1.1rem;
  font-weight: 800;
  height: 44px;
  place-items: center;
  width: 44px;
}

.rd-video-frame {
  background: var(--wp--preset--color--mora);
  border-radius: 8px;
  box-shadow: 0 24px 50px rgba(42, 32, 45, 0.14);
  overflow: hidden;
  position: relative;
}

.rd-video-frame img {
  aspect-ratio: 16 / 7;
  display: block;
  object-fit: cover;
  opacity: 0.88;
  width: 100%;
}

.rd-video-frame::after {
  background: rgba(255, 253, 248, 0.92);
  clip-path: polygon(0 0, 0 100%, 100% 50%);
  content: "";
  height: 74px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-40%, -50%);
  width: 58px;
}

.rd-flexol-shot {
  margin-left: auto;
  margin-right: auto;
  max-width: 640px;
}

.rd-flexol-shot figure {
  border-radius: 8px;
  box-shadow: 0 18px 34px rgba(42, 32, 45, 0.08);
  overflow: hidden;
}

.rd-kicker {
  color: var(--wp--preset--color--savia);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 800;
  margin-bottom: 0.55rem;
  text-transform: uppercase;
}

.rd-feature-list {
  gap: 0;
}

.rd-feature-list > .wp-block-group {
  border-top: 1px solid rgba(42, 32, 45, 0.12);
  padding: 18px 0;
}

.rd-feature-list > .wp-block-group:last-child {
  border-bottom: 1px solid rgba(42, 32, 45, 0.12);
}

.rd-material-strip {
  overflow: hidden;
}

.rd-material-strip figure {
  border-radius: 8px;
  box-shadow: 0 24px 50px rgba(42, 32, 45, 0.14);
}

.rd-material-strip img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.rd-steps {
  counter-reset: step;
}

.rd-step {
  border-top: 1px solid rgba(42, 32, 45, 0.14);
  counter-increment: step;
  padding-top: 24px;
}

.rd-step::before {
  color: var(--wp--preset--color--lila);
  content: "0" counter(step);
  display: block;
  font-size: var(--wp--preset--font-size--small);
  font-weight: 850;
  margin-bottom: 14px;
}

.rd-cta {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: clamp(26px, 5vw, 54px);
}

.rd-location {
  background: var(--wp--preset--color--cal);
}

.rd-map-frame {
  border: 1px solid rgba(42, 32, 45, 0.12);
  border-radius: 8px;
  box-shadow: 0 20px 44px rgba(42, 32, 45, 0.095);
  overflow: hidden;
}

.rd-map-frame iframe {
  aspect-ratio: 16 / 11;
  display: block;
  min-height: 430px;
  width: 100%;
}

.rd-hours {
  border-top: 1px solid rgba(42, 32, 45, 0.12);
}

.rd-hours > .wp-block-group {
  border-bottom: 1px solid rgba(42, 32, 45, 0.12);
  gap: 1rem;
  padding: 10px 0;
}

.rd-hours p {
  margin-bottom: 0;
  margin-top: 0;
}

.rd-hours strong {
  color: var(--wp--preset--color--lila);
}

.rd-contact-links {
  list-style: none;
  padding-left: 0;
}

.rd-contact-links li {
  margin-bottom: 0.45rem;
}

.rd-footer {
  background: var(--wp--preset--color--lila);
  color: rgba(255, 253, 248, 0.86);
  padding-bottom: 22px;
  padding-top: 22px;
}

.rd-footer a {
  color: var(--wp--preset--color--cal);
}

.rd-footer .wp-block-site-title a {
  color: var(--wp--preset--color--cal);
  text-decoration: none;
}

.rd-footer__bottom {
  margin-top: 0;
  padding-top: 0;
}

.rd-post-card {
  background: var(--wp--preset--color--cal);
  border: 1px solid rgba(42, 32, 45, 0.12);
  border-radius: 8px;
  padding: clamp(20px, 3vw, 28px);
}

.rd-post-card .wp-block-post-title a {
  color: var(--wp--preset--color--mora);
  text-decoration: none;
}

.rd-post-card .wp-block-post-title a:hover {
  color: var(--wp--preset--color--lila);
}

.wp-block-button__link,
.wp-block-search__button {
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.wp-block-button__link:hover,
.wp-block-search__button:hover {
  transform: translateY(-1px);
}

.is-style-outline > .wp-block-button__link {
  border-width: 1px;
}

.wp-block-search__inside-wrapper {
  border-radius: 8px;
}

.wp-block-search__input {
  border-radius: 8px 0 0 8px;
}

.wp-block-search__button {
  border-radius: 0 8px 8px 0;
}

@media (max-width: 781px) {
  .rd-topbar .wp-block-columns {
    gap: 0.25rem;
  }

  .rd-header {
    position: relative;
  }

  .rd-header__inner {
    flex-wrap: wrap !important;
    min-height: 68px;
  }

  .rd-wordmark span {
    font-size: 3.2rem;
  }

  .rd-wordmark small {
    display: none;
  }

  .rd-logo img {
    width: min(300px, 72vw);
  }

  .rd-header__meta {
    gap: 0.4rem;
  }

  .rd-header__meta {
    justify-content: space-between;
  }

  .rd-phone-button .wp-block-button__link {
    font-size: 0.88rem;
    padding: 0.5rem 0.68rem;
  }

  .has-title-font-size {
    font-size: 2.55rem !important;
  }

  .has-display-font-size {
    font-size: 3.4rem !important;
  }

  .rd-hero {
    min-height: 680px;
  }

  .rd-hero::after {
    background:
      linear-gradient(180deg, rgba(42, 32, 45, 0.78) 0%, rgba(42, 32, 45, 0.68) 54%, rgba(42, 32, 45, 0.54) 100%);
  }

  .rd-hero__facts {
    gap: 1rem;
  }

  .rd-service-card {
    min-height: auto;
  }
}

@media (prefers-color-scheme: dark) {
  body {
    --wp--preset--color--mora: #f4eef5;
    --wp--preset--color--savia: #9eb8a6;
    background: #171219;
    color: #f4eef5;
  }

  .rd-header {
    background: rgba(23, 18, 25, 0.94);
    border-bottom-color: rgba(244, 238, 245, 0.1);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
  }

  .rd-header .wp-block-navigation a,
  .rd-classic-menu a,
  .rd-header__meta a,
  .rd-language-switcher__link,
  .rd-header .wp-block-navigation__responsive-container-open,
  .rd-header .wp-block-navigation__responsive-container-close {
    color: #f4eef5;
  }

  .rd-header .wp-block-navigation a:hover,
  .rd-classic-menu a:hover,
  .rd-header__meta a:hover,
  .rd-language-switcher__link:hover,
  .rd-language-switcher__link.is-current {
    color: #d8a4e6;
  }

  .rd-language-switcher__separator {
    color: rgba(244, 238, 245, 0.42);
  }

  .rd-header .wp-block-navigation__responsive-container {
    background: #171219;
    color: #f4eef5;
  }

  .rd-band,
  .rd-location {
    background: #211a24;
    border-color: rgba(244, 238, 245, 0.1);
  }

  .rd-product-thumb {
    box-shadow:
      0 0 0 8px rgba(216, 164, 230, 0.08),
      0 20px 34px rgba(0, 0, 0, 0.24);
  }

  .rd-service-card {
    background: linear-gradient(180deg, #7d3c8f 0%, #5d2b6d 100%);
    border-color: rgba(244, 238, 245, 0.12);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.24);
  }

  .rd-video-frame,
  .rd-flexol-shot figure,
  .rd-material-strip figure,
  .rd-map-frame,
  .rd-post-card {
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.26);
  }

  .rd-map-frame {
    border-color: rgba(244, 238, 245, 0.12);
  }

  .rd-hours,
  .rd-hours > .wp-block-group,
  .rd-feature-list > .wp-block-group,
  .rd-feature-list > .wp-block-group:last-child,
  .rd-step,
  .rd-post-card {
    border-color: rgba(244, 238, 245, 0.12);
  }

  .rd-footer {
    background: #5d2b6d;
  }
}

/*
 * Modern visual layer.
 *
 * This layer deliberately works with the existing blocks and content. It
 * modernizes the shared visual system without moving or rewriting page data.
 */
body {
  --rd-accent: #7d3c8f;
  --rd-accent-strong: #5f2d6d;
  --rd-accent-soft: #f2e8f5;
  --rd-canvas: #f8f7f4;
  --rd-surface: #fffdf8;
  --rd-surface-raised: #ffffff;
  --rd-text: #29222c;
  --rd-muted: #6b626d;
  --rd-border: rgba(41, 34, 44, 0.13);
  --rd-border-strong: rgba(41, 34, 44, 0.22);
  --rd-sage: #596f62;
  --rd-terracotta: #b46a45;
  --rd-shadow-sm: 0 8px 24px rgba(41, 34, 44, 0.07);
  --rd-shadow-md: 0 18px 46px rgba(41, 34, 44, 0.1);
  --wp--preset--color--mora: var(--rd-text);
  --wp--preset--color--savia: var(--rd-sage);
  background: var(--rd-canvas);
  color: var(--rd-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body :where(p, li) {
  color: inherit;
}

body :where(h1, h2, h3, h4, h5, h6) {
  text-wrap: balance;
}

body :where(p) {
  text-wrap: pretty;
}

:where(a, button, input, textarea, select):focus-visible {
  outline: 3px solid rgba(125, 60, 143, 0.3);
  outline-offset: 3px;
}

.rd-header {
  background: rgba(255, 253, 248, 0.92);
  border-bottom: 1px solid var(--rd-border);
  box-shadow: 0 6px 24px rgba(41, 34, 44, 0.055);
  backdrop-filter: blur(18px) saturate(1.15);
}

.rd-header__inner {
  gap: 1.25rem;
  min-height: 76px;
}

.rd-logo img {
  width: clamp(178px, 18vw, 226px);
}

.rd-classic-menu {
  gap: 0.2rem;
}

.rd-classic-menu a,
.rd-header .wp-block-navigation a {
  border-radius: 6px;
  color: var(--rd-text);
  display: block;
  font-size: 0.96rem;
  font-weight: 680;
  padding: 0.62rem 0.72rem;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.rd-header .wp-block-navigation-item.current-menu-item > a,
.rd-header .wp-block-navigation a:hover,
.rd-classic-menu .current-menu-item > a,
.rd-classic-menu a:hover {
  background: var(--rd-accent-soft);
  color: var(--rd-accent-strong);
}

.rd-header__meta {
  gap: 0.8rem;
}

.rd-language-switcher {
  font-size: 0.86rem;
}

.rd-language-switcher__link {
  color: var(--rd-muted);
  opacity: 1;
}

.rd-language-switcher__link:hover,
.rd-language-switcher__link.is-current {
  color: var(--rd-accent);
}

.rd-phone-button .wp-block-button__link {
  background: var(--rd-accent);
  border: 1px solid var(--rd-accent);
  box-shadow: 0 8px 20px rgba(125, 60, 143, 0.2);
  color: #fffdf8;
  font-size: 0.92rem;
  padding: 0.62rem 0.9rem;
}

.rd-phone-button .wp-block-button__link:hover {
  background: var(--rd-accent-strong);
  border-color: var(--rd-accent-strong);
}

.rd-front-page .entry-content {
  background: var(--rd-canvas);
}

.rd-section {
  scroll-margin-top: 104px;
}

.rd-front-page .rd-section {
  padding-bottom: 84px;
  padding-top: 84px;
}

.rd-front-page .rd-section--tight {
  padding-bottom: 72px;
  padding-top: 72px;
}

.rd-front-page .rd-section:first-of-type {
  padding-top: 96px;
}

:is(#productes, #productos) {
  background: var(--rd-surface);
  border-bottom: 1px solid var(--rd-border);
  position: relative;
}

:is(#productes, #productos)::before {
  background: var(--rd-accent);
  content: "";
  height: 4px;
  left: 50%;
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  width: min(112px, 30vw);
}

:is(#productes, #productos) > h1 {
  color: var(--rd-accent) !important;
  font-size: 3rem !important;
  margin-bottom: 1rem;
}

:is(#productes, #productos) > p {
  color: var(--rd-muted);
  margin-left: auto;
  margin-right: auto;
  max-width: 760px;
  text-align: center;
}

.rd-product-grid.wp-block-columns {
  display: grid !important;
  gap: 2.2rem 1.35rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 3.2rem;
}

.rd-product-grid + .rd-product-grid {
  margin-top: 2.6rem;
}

.rd-product-grid > .wp-block-column {
  margin: 0 !important;
  min-width: 0;
}

.rd-product-card {
  align-content: start;
  height: 100%;
  max-width: 220px;
  padding: 0.35rem;
}

.rd-product-card :is(h2, h3) {
  color: var(--rd-accent) !important;
  font-size: 1.04rem !important;
  line-height: 1.28;
  margin-bottom: 0;
  margin-top: 1rem;
  min-height: 2.56em;
}

.rd-product-card p {
  color: var(--rd-muted);
  font-size: 0.94rem;
  line-height: 1.65;
  margin-top: 0;
}

.rd-product-thumb {
  background: #fffdf8;
  border: 1px solid var(--rd-border);
  border-radius: 8px;
  box-shadow:
    0 0 0 5px rgba(125, 60, 143, 0.045),
    var(--rd-shadow-sm);
  max-width: 176px;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.rd-product-card:hover .rd-product-thumb {
  border-color: rgba(125, 60, 143, 0.35);
  box-shadow:
    0 0 0 7px rgba(125, 60, 143, 0.08),
    0 16px 34px rgba(41, 34, 44, 0.11);
  transform: translateY(-3px);
}

:is(#cortines, #cortinas) {
  align-items: center;
  background: var(--rd-canvas);
  column-gap: clamp(40px, 6vw, 82px);
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  row-gap: 1rem;
}

:is(#cortines, #cortinas) > * {
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100%;
}

:is(#cortines, #cortinas) > h2 {
  align-self: end;
  color: var(--rd-accent) !important;
  font-size: 2.25rem !important;
  grid-column: 2;
  grid-row: 1;
  margin-bottom: 0.35rem;
  text-align: left !important;
}

:is(#cortines, #cortinas) > .wp-block-embed-youtube,
:is(#cortines, #cortinas) > .rd-flexol-shot {
  grid-column: 1;
  grid-row: 1 / span 2;
}

:is(#cortines, #cortinas) > p {
  align-self: start;
  color: var(--rd-muted);
  grid-column: 2;
  grid-row: 2;
  line-height: 1.75;
  margin-top: 0;
}

.rd-front-page .wp-block-embed-youtube {
  background: #171219;
  border: 1px solid var(--rd-border);
  border-radius: 8px;
  box-shadow: var(--rd-shadow-md);
  overflow: hidden;
}

.rd-front-page .wp-block-embed-youtube .wp-block-embed__wrapper,
.rd-front-page .wp-block-embed-youtube iframe {
  display: block;
  width: 100%;
}

.rd-front-page .entry-content > .wp-block-embed-youtube {
  margin-bottom: 88px;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 16px;
  max-width: 1120px !important;
  width: calc(100% - 48px);
}

:is(#serveis, #servicios) {
  background: var(--rd-surface);
  border-bottom: 1px solid var(--rd-border);
  border-top: 1px solid var(--rd-border);
}

:is(#serveis, #servicios) > h2,
:is(#on-som, #donde-estamos) > h2 {
  font-size: 2.35rem !important;
  margin-bottom: 0.8rem;
}

:is(#serveis, #servicios) > p {
  color: var(--rd-muted);
  max-width: 720px;
}

.rd-service-grid.wp-block-columns {
  display: grid !important;
  gap: 1.5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2.6rem;
}

.rd-service-grid > .wp-block-column {
  margin: 0 !important;
  min-width: 0;
}

.rd-service-card {
  background: var(--rd-surface-raised);
  border: 1px solid var(--rd-border);
  border-radius: 8px;
  box-shadow: var(--rd-shadow-sm);
  color: var(--rd-text);
  min-height: 100%;
  padding: 1.15rem;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.rd-service-card:hover {
  border-color: rgba(125, 60, 143, 0.28);
  box-shadow: var(--rd-shadow-md);
  transform: translateY(-3px);
}

.rd-service-card figure {
  background: var(--rd-accent-soft);
  border-radius: 6px;
  margin-bottom: 1.35rem;
}

.rd-service-card img {
  aspect-ratio: 4 / 3;
}

.rd-service-card h3 {
  color: var(--rd-accent) !important;
  font-size: 1.45rem !important;
  margin-bottom: 0.65rem;
}

.rd-service-card p {
  color: var(--rd-muted);
  line-height: 1.65;
}

.rd-location {
  background: var(--rd-canvas);
}

.rd-location > p {
  color: var(--rd-muted);
  max-width: 760px;
}

.rd-location .wp-block-columns {
  gap: clamp(36px, 6vw, 76px);
  margin-top: 2.8rem;
}

.rd-map-frame {
  background: var(--rd-surface);
  border: 1px solid var(--rd-border);
  border-radius: 8px;
  box-shadow: var(--rd-shadow-md);
}

.rd-map-frame iframe {
  min-height: 460px;
}

.rd-hours,
.rd-hours > .wp-block-group {
  border-color: var(--rd-border);
}

.rd-hours > .wp-block-group {
  padding: 0.78rem 0;
}

.rd-hours strong {
  color: var(--rd-accent);
}

.rd-contact-links a {
  color: var(--rd-accent);
  font-weight: 680;
}

.rd-footer {
  background: #302533;
  border-top: 4px solid var(--rd-accent);
  color: rgba(255, 253, 248, 0.82);
  padding-bottom: 28px;
  padding-top: 28px;
}

.rd-footer a {
  color: #fffdf8;
  text-decoration-color: rgba(255, 253, 248, 0.42);
}

.rd-footer__bottom {
  align-items: center;
  gap: 1rem 2rem;
}

.rd-post-card {
  background: var(--rd-surface-raised);
  border-color: var(--rd-border);
  box-shadow: var(--rd-shadow-sm);
}

.wp-block-button__link,
.wp-block-search__button {
  border-radius: 6px;
}

@media (max-width: 1050px) {
  .rd-header__inner {
    flex-wrap: wrap !important;
    gap: 0.55rem 1rem;
    padding-bottom: 0.7rem;
    padding-top: 0.7rem;
  }

  .rd-brand {
    order: 1;
  }

  .rd-header__meta {
    margin-left: auto;
    order: 2;
  }

  .rd-classic-menu {
    border-top: 1px solid var(--rd-border);
    flex-wrap: nowrap;
    justify-content: flex-start;
    margin-top: 0.25rem;
    order: 3;
    overflow-x: auto;
    padding-top: 0.45rem;
    scrollbar-width: none;
    width: 100%;
  }

  .rd-classic-menu::-webkit-scrollbar {
    display: none;
  }

  .rd-classic-menu .menu-item {
    flex: 0 0 auto;
  }

  .rd-product-grid.wp-block-columns {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  :is(#productes, #productos) .rd-product-grid > .wp-block-column:nth-child(9) {
    grid-column: 2;
  }

  :is(#productes, #productos) .rd-product-grid > .wp-block-column:nth-child(10) {
    grid-column: 3;
  }

  :is(#cortines, #cortinas) {
    column-gap: 2.5rem;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  }
}

@media (max-width: 781px) {
  .rd-header {
    position: relative;
  }

  .rd-logo img {
    width: min(188px, 42vw);
  }

  .rd-header__meta {
    gap: 0.5rem;
  }

  .rd-phone-button .wp-block-button__link {
    font-size: 0.82rem;
    padding: 0.52rem 0.64rem;
  }

  .rd-front-page .rd-section,
  .rd-front-page .rd-section--tight {
    padding-bottom: 64px;
    padding-top: 64px;
  }

  .rd-front-page .rd-section:first-of-type {
    padding-top: 76px;
  }

  :is(#productes, #productos) > h1 {
    font-size: 2.35rem !important;
  }

  .rd-product-grid.wp-block-columns {
    gap: 2rem 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 2.6rem;
  }

  :is(#productes, #productos) .rd-product-grid > .wp-block-column:nth-child(9),
  :is(#productes, #productos) .rd-product-grid > .wp-block-column:nth-child(10) {
    grid-column: auto;
  }

  .rd-product-grid + .rd-product-grid {
    margin-top: 2rem;
  }

  .rd-product-thumb {
    max-width: min(148px, 72%);
  }

  .rd-product-card {
    max-width: 100%;
    padding: 0;
  }

  .rd-product-card p {
    font-size: 0.9rem;
  }

  :is(#cortines, #cortinas) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1.35rem;
  }

  :is(#cortines, #cortinas) > h2,
  :is(#cortines, #cortinas) > .wp-block-embed-youtube,
  :is(#cortines, #cortinas) > .rd-flexol-shot,
  :is(#cortines, #cortinas) > p {
    grid-column: 1;
    grid-row: auto;
  }

  :is(#cortines, #cortinas) > h2 {
    font-size: 1.9rem !important;
    text-align: left !important;
  }

  :is(#cortines, #cortinas) > p {
    margin-bottom: 0;
  }

  .rd-service-grid.wp-block-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .rd-service-card {
    min-height: auto;
  }

  .rd-front-page .entry-content > .wp-block-embed-youtube {
    margin-bottom: 64px;
    width: calc(100% - 36px);
  }

  .rd-map-frame iframe {
    min-height: 360px;
  }
}

@media (max-width: 480px) {
  .rd-header__inner {
    gap: 0.35rem 0.5rem;
    padding-bottom: 0.45rem;
    padding-top: 0.45rem;
  }

  .rd-logo img {
    width: min(138px, 36vw);
  }

  .rd-header__meta {
    gap: 0.35rem;
  }

  .rd-language-switcher {
    font-size: 0.72rem;
  }

  .rd-phone-button .wp-block-button__link {
    font-size: 0.75rem;
    padding: 0.42rem 0.5rem;
  }

  .rd-language-switcher__link:not(.is-current) {
    max-width: 4.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .rd-classic-menu a {
    font-size: 0.85rem;
    padding: 0.42rem 0.5rem;
  }

  .rd-classic-menu {
    margin-top: 0.1rem;
    padding-top: 0.25rem;
  }

  .rd-product-grid.wp-block-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rd-product-thumb {
    max-width: min(124px, 78%);
  }

  .rd-product-card :is(h2, h3) {
    font-size: 1rem !important;
  }

  .rd-product-card p {
    font-size: 0.86rem;
    line-height: 1.55;
  }

  :is(#serveis, #servicios) > h2,
  :is(#on-som, #donde-estamos) > h2 {
    font-size: 1.95rem !important;
  }
}

/* Local SEO landing templates */
.rd-landing-shell,
.rd-landing-shell .wp-block-post-content {
  margin: 0;
}

.rd-landing-shell .wp-block-post-content > * {
  margin-block-start: 0;
}

.rd-landing-hero,
.rd-landing-section,
.rd-landing-trust,
.rd-local-contact {
  padding-left: max(24px, calc((100% - 1120px) / 2));
  padding-right: max(24px, calc((100% - 1120px) / 2));
}

.rd-landing-hero {
  background: var(--rd-surface);
  border-bottom: 1px solid var(--rd-border);
  padding-bottom: 88px;
  padding-top: 88px;
}

.rd-landing-hero__grid {
  align-items: center;
  gap: 56px;
}

.rd-landing-hero h1 {
  color: var(--rd-text);
  font-size: 3.4rem !important;
  line-height: 1.04;
  margin-bottom: 1.35rem;
  max-width: 760px;
}

.rd-landing-hero__lead {
  color: var(--rd-muted);
  font-size: 1.18rem;
  line-height: 1.75;
  max-width: 680px;
}

.rd-eyebrow {
  color: var(--rd-accent);
  font-size: 0.82rem;
  font-weight: 780;
  letter-spacing: 0;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.rd-landing-actions {
  gap: 0.75rem;
  margin-top: 2rem;
}

.rd-landing-actions .is-style-outline .wp-block-button__link {
  border-color: var(--rd-border-strong);
  color: var(--rd-text);
}

.rd-landing-hero__visual {
  align-items: center;
  aspect-ratio: 4 / 3;
  background: #f8f3eb;
  border: 1px solid var(--rd-border);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  min-height: 340px;
  overflow: hidden;
}

.rd-landing-hero__visual .wp-block-image,
.rd-landing-hero__visual img {
  height: 100%;
  margin: 0;
  width: 100%;
}

.rd-landing-hero__visual img {
  object-fit: cover;
}

.rd-landing-trust {
  background: var(--rd-canvas);
  border-bottom: 1px solid var(--rd-border);
  padding-bottom: 34px;
  padding-top: 34px;
}

.rd-landing-trust__grid {
  gap: 0;
}

.rd-trust-item {
  border-left: 3px solid var(--rd-sage);
  padding: 0.45rem 1.35rem;
}

.rd-trust-item:nth-child(2) {
  border-left-color: var(--rd-terracotta);
}

.rd-trust-item:nth-child(3) {
  border-left-color: var(--rd-accent);
}

.rd-trust-item strong {
  color: var(--rd-text);
}

.rd-trust-item p {
  color: var(--rd-muted);
  font-size: 0.92rem;
  margin: 0.25rem 0 0;
}

.rd-landing-section {
  background: var(--rd-canvas);
  padding-bottom: 88px;
  padding-top: 88px;
}

.rd-landing-section--muted {
  background: var(--rd-surface);
  border-bottom: 1px solid var(--rd-border);
  border-top: 1px solid var(--rd-border);
}

.rd-landing-section__intro {
  margin-bottom: 2.7rem;
  max-width: 760px;
}

.rd-landing-section h2 {
  color: var(--rd-text);
  font-size: 2.35rem !important;
  margin-bottom: 1rem;
}

.rd-landing-section__intro > p,
.rd-landing-section > p {
  color: var(--rd-muted);
}

.rd-editor-placeholder {
  border-left: 3px solid var(--rd-border-strong);
  color: var(--rd-muted);
  font-style: italic;
  padding-left: 0.9rem;
}

.rd-offer-grid,
.rd-comparison-grid,
.rd-gallery-grid,
.rd-process-grid {
  align-items: stretch;
  display: grid !important;
  gap: 1.35rem;
}

.rd-offer-grid,
.rd-comparison-grid,
.rd-gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rd-process-grid {
  counter-reset: rd-step;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rd-offer-grid > .wp-block-column,
.rd-comparison-grid > .wp-block-column,
.rd-gallery-grid > .wp-block-column,
.rd-process-grid > .wp-block-column {
  margin: 0 !important;
  min-width: 0;
}

.rd-offer-card,
.rd-comparison-card {
  background: var(--rd-surface-raised);
  border: 1px solid var(--rd-border);
  border-radius: 8px;
  box-shadow: var(--rd-shadow-sm);
  height: 100%;
  padding: 1.15rem;
}

.rd-offer-card figure {
  aspect-ratio: 4 / 3;
  background: #f8f3eb;
  border-radius: 6px;
  margin-bottom: 1.2rem;
  overflow: hidden;
}

.rd-offer-card figure img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.rd-offer-card h3,
.rd-comparison-card h3 {
  color: var(--rd-accent);
  font-size: 1.28rem !important;
  margin-bottom: 0.65rem;
}

.rd-offer-card p,
.rd-comparison-card p {
  color: var(--rd-muted);
}

.rd-gallery-item {
  margin: 0;
}

.rd-gallery-item,
.rd-gallery-item img {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  width: 100%;
}

.rd-gallery-item {
  background: var(--rd-surface);
  border: 1px solid var(--rd-border);
  overflow: hidden;
}

.rd-gallery-item img {
  object-fit: cover;
}

.rd-process-step {
  border-top: 3px solid var(--rd-sage);
  counter-increment: rd-step;
  padding-top: 1.15rem;
}

.rd-process-step:nth-child(2) {
  border-top-color: var(--rd-terracotta);
}

.rd-process-step:nth-child(3),
.rd-process-step:nth-child(4) {
  border-top-color: var(--rd-accent);
}

.rd-process-step::before {
  color: var(--rd-accent);
  content: counter(rd-step, decimal-leading-zero);
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
}

.rd-process-step h3 {
  font-size: 1.15rem !important;
  margin-bottom: 0.5rem;
}

.rd-process-step p {
  color: var(--rd-muted);
  font-size: 0.94rem;
}

.rd-faq-list {
  max-width: 860px;
}

.rd-faq-list details {
  border-bottom: 1px solid var(--rd-border);
  padding: 1rem 0;
}

.rd-faq-list summary {
  color: var(--rd-text);
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 720;
}

.rd-faq-list details > p {
  color: var(--rd-muted);
  margin-bottom: 0.25rem;
  padding-right: 2rem;
}

.rd-local-contact {
  background: #302533;
  border-top: 4px solid var(--rd-accent);
  color: #fffdf8;
  padding-bottom: 76px;
  padding-top: 76px;
}

.rd-local-contact__grid {
  align-items: center;
  gap: 52px;
}

.rd-local-contact__intro {
  margin-bottom: 46px;
  max-width: 780px;
}

.rd-local-contact__grid--map {
  align-items: stretch;
}

.rd-local-contact__grid--map > .wp-block-column {
  align-content: center;
}

.rd-local-contact .rd-map-frame {
  border-color: rgba(255, 253, 248, 0.24);
  box-shadow: 0 22px 48px rgba(8, 5, 9, 0.28);
  height: 100%;
}

.rd-local-contact .rd-map-frame iframe {
  height: 100%;
  min-height: 440px;
}

.rd-local-contact h2,
.rd-local-contact h3,
.rd-local-contact p,
.rd-local-contact a {
  color: #fffdf8;
}

.rd-local-contact h2 {
  font-size: 2.35rem !important;
}

.rd-local-contact .rd-landing-actions .is-style-outline .wp-block-button__link {
  border-color: rgba(255, 253, 248, 0.5);
  color: #fffdf8;
}

.rd-local-contact__details {
  border-left: 1px solid rgba(255, 253, 248, 0.22);
  padding-left: 2rem;
}

.rd-local-contact__details p {
  margin-bottom: 0.45rem;
}

.rd-local-contact .rd-hours {
  border-top-color: rgba(255, 253, 248, 0.2);
  margin-bottom: 1.25rem;
  margin-top: 1.25rem;
}

.rd-local-contact .rd-hours > .wp-block-group {
  border-bottom-color: rgba(255, 253, 248, 0.2);
}

.rd-local-contact .rd-hours strong {
  color: #e2a4ed;
}

.rd-local-contact .rd-contact-links {
  margin-bottom: 0.75rem;
}

.rd-landing-shell--subcategory .rd-landing-hero {
  padding-bottom: 72px;
  padding-top: 72px;
}

.rd-landing-shell--subcategory .rd-landing-hero h1 {
  font-size: 3rem !important;
}

@media (max-width: 1050px) {
  .rd-landing-hero__grid,
  .rd-local-contact__grid {
    gap: 36px;
  }

  .rd-offer-grid,
  .rd-comparison-grid,
  .rd-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rd-process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 781px) {
  .rd-landing-hero,
  .rd-landing-section,
  .rd-local-contact {
    padding-bottom: 64px;
    padding-top: 64px;
  }

  .rd-landing-hero__grid,
  .rd-local-contact__grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
  }

  .rd-landing-hero h1,
  .rd-landing-shell--subcategory .rd-landing-hero h1 {
    font-size: 2.5rem !important;
  }

  .rd-landing-section h2,
  .rd-local-contact h2 {
    font-size: 1.95rem !important;
  }

  .rd-landing-trust__grid,
  .rd-offer-grid,
  .rd-comparison-grid,
  .rd-gallery-grid,
  .rd-process-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
  }

  .rd-trust-item {
    margin-bottom: 1rem;
  }

  .rd-local-contact__details {
    border-left: 0;
    border-top: 1px solid rgba(255, 253, 248, 0.22);
    padding-left: 0;
    padding-top: 1.5rem;
  }

  .rd-local-contact__intro {
    margin-bottom: 34px;
  }

  .rd-local-contact .rd-map-frame iframe {
    min-height: 360px;
  }
}

@media (prefers-color-scheme: dark) {
  body {
    --rd-accent: #c783d8;
    --rd-accent-strong: #dca7e8;
    --rd-accent-soft: #33243a;
    --rd-canvas: #151117;
    --rd-surface: #1d171f;
    --rd-surface-raised: #241c27;
    --rd-text: #f5f0f6;
    --rd-muted: #c1b7c4;
    --rd-border: rgba(245, 240, 246, 0.12);
    --rd-border-strong: rgba(245, 240, 246, 0.22);
    --rd-sage: #9eb8a6;
    --rd-terracotta: #d5926e;
    --rd-shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.2);
    --rd-shadow-md: 0 18px 46px rgba(0, 0, 0, 0.3);
    --wp--preset--color--mora: var(--rd-text);
    --wp--preset--color--savia: var(--rd-sage);
    background: var(--rd-canvas);
    color: var(--rd-text);
  }

  .rd-header {
    background: rgba(21, 17, 23, 0.92);
    border-bottom-color: var(--rd-border);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.24);
  }

  .rd-header .wp-block-navigation a,
  .rd-classic-menu a,
  .rd-header__meta a,
  .rd-language-switcher__link,
  .rd-header .wp-block-navigation__responsive-container-open,
  .rd-header .wp-block-navigation__responsive-container-close {
    color: var(--rd-text);
  }

  .rd-header .wp-block-navigation-item.current-menu-item > a,
  .rd-header .wp-block-navigation a:hover,
  .rd-classic-menu .current-menu-item > a,
  .rd-classic-menu a:hover {
    background: var(--rd-accent-soft);
    color: var(--rd-accent-strong);
  }

  .rd-language-switcher__link:hover,
  .rd-language-switcher__link.is-current {
    color: var(--rd-accent-strong);
  }

  .rd-phone-button .wp-block-button__link {
    background: #8e48a0;
    border-color: #8e48a0;
    color: #fffdf8;
  }

  :is(#productes, #productos),
  :is(#serveis, #servicios),
  .rd-band,
  .rd-location {
    background: var(--rd-surface);
    border-color: var(--rd-border);
  }

  :is(#cortines, #cortinas),
  .rd-front-page .entry-content {
    background: var(--rd-canvas);
  }

  .rd-product-thumb {
    background: #f8f3eb;
    border-color: rgba(245, 240, 246, 0.18);
  }

  .rd-service-card,
  .rd-post-card {
    background: var(--rd-surface-raised);
    border-color: var(--rd-border);
    box-shadow: var(--rd-shadow-sm);
    color: var(--rd-text);
  }

  .rd-map-frame {
    background: var(--rd-surface);
    border-color: var(--rd-border);
  }

  .rd-footer {
    background: #241c27;
    border-top-color: #8e48a0;
  }

  .rd-landing-hero,
  .rd-landing-section--muted,
  .rd-landing-trust,
  .rd-offer-card,
  .rd-comparison-card,
  .rd-gallery-item {
    border-color: var(--rd-border);
  }

  .rd-landing-hero,
  .rd-landing-section--muted,
  .rd-gallery-item {
    background: var(--rd-surface);
  }

  .rd-landing-section,
  .rd-landing-trust {
    background: var(--rd-canvas);
  }

  .rd-offer-card,
  .rd-comparison-card {
    background: var(--rd-surface-raised);
  }

  .rd-local-contact {
    background: #241c27;
    border-top-color: #8e48a0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
