/*
 * Red Dermamedic
 *
 * Página:     .rd-page .rd-wrap .rd-header .rd-brand .rd-nav__link .rd-nav__cta
 * Portada:    .rd-hero .rd-purpose .rd-pillars .rd-directory .rd-direction .rd-band
 * Fichas:     .rd-grid .rd-card .rd-card__photo .rd-logo-stage .rd-wordmark
 * Mednet:     .rd-feature
 * Filtro:     .rd-filter .rd-filter__option .is-active
 * Perfil:     .rd-profile .rd-back .rd-block
 * Formulario: .rd-join .rd-form .rd-field .rd-hp
 * Estados:    .rd-state .rd-state--empty .rd-state--loading .rd-state--success .rd-state--error
 *
 * Verde del logo #185c5c. Dorado de acento #b89060. El catálogo vive en members.php.
 */

html:has(.rd-page) {
    scroll-padding-top: 5.25rem;
}

#la-red,
#miembros,
#consulta,
#rd-incorporation,
#rd-inquiry,
#rd-contribution {
    scroll-margin-top: 5.25rem;
}

.rd-page {
    margin: 0;
    overflow-x: clip;
    background: #f7f4ef;
    color: #1c2e2c;
    font-family: Montserrat, "Segoe UI", sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
}

.rd-page h1,
.rd-page h2,
.rd-page h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #143f3c;
}

.rd-page h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 4.2vw, 3.25rem);
}

.rd-page h2 {
    margin: 0 0 0.85rem;
    font-size: clamp(1.65rem, 2.6vw, 2.15rem);
}

.rd-page h3 {
    margin: 0;
    font-size: 1.05rem;
}

.rd-wrap {
    max-width: 1120px;
}

.rd-skip {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 40;
    padding: 0.6rem 1rem;
    background: #185c5c;
    color: #fff;
    border-radius: 0.4rem;
}

.rd-skip:focus {
    top: 0.75rem;
}

.rd-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fffcf8;
    border-bottom: 1px solid #e7e1d6;
}

.rd-header .navbar {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.rd-brand {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
    color: #185c5c;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-decoration: none;
}

.rd-brand:hover,
.rd-brand:focus {
    color: #0f3f3f;
}

.rd-nav__link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    color: #185c5c;
    font-weight: 500;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
}

.rd-nav__link:hover,
.rd-nav__link:focus {
    color: #8a6840;
}

.rd-nav__cta {
    margin: 0.35rem 0 0.35rem 0.4rem;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
}

.rd-page .navbar-toggler {
    width: 44px;
    height: 44px;
    border: 0;
    box-shadow: none;
}

.rd-nav-toggle__bars,
.rd-nav-toggle__bars span {
    display: block;
}

.rd-nav-toggle__bars {
    width: 18px;
    margin: 0 auto;
}

.rd-nav-toggle__bars span {
    height: 2px;
    margin: 4px 0;
    background: #185c5c;
}

.rd-page :focus-visible {
    outline: 2px solid #8a6840;
    outline-offset: 3px;
}

.rd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.65rem 1.25rem;
    border: 1px solid #185c5c;
    border-radius: 999px;
    background: #185c5c;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    text-decoration: none;
}

.rd-btn:hover,
.rd-btn:focus {
    background: #0f3f3f;
    border-color: #0f3f3f;
    color: #fff;
}

.rd-btn--light {
    background: #fff;
    border-color: #fff;
    color: #185c5c;
}

.rd-btn--light:hover,
.rd-btn--light:focus {
    background: #f3e6d4;
    border-color: #f3e6d4;
    color: #143f3c;
}

.rd-btn--line {
    align-self: flex-start;
    margin-top: auto;
    background: transparent;
    color: #185c5c;
}

.rd-btn--line:hover,
.rd-btn--line:focus {
    background: #185c5c;
    color: #fff;
}

.rd-btn--small {
    min-height: 40px;
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
}

.rd-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 34rem;
    overflow: hidden;
    background: #124a4a;
    color: #fff;
}

.rd-hero__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 64% 42%;
}

.rd-hero__veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(16, 58, 58, 0.92) 0%, rgba(24, 92, 92, 0.78) 42%, rgba(24, 92, 92, 0.38) 100%);
}

.rd-hero__content {
    position: relative;
    z-index: 1;
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
}

.rd-hero .rd-kicker {
    display: none;
    margin-bottom: 0.9rem;
    color: #e8d4b0;
    font-size: 0.82rem;
    letter-spacing: 0.14em;
}

.rd-hero h1,
.rd-hero .rd-lead {
    max-width: 40rem;
    color: #fff;
}

.rd-hero .rd-lead {
    max-width: 36rem;
    margin: 0 0 1.6rem;
    font-size: 1.125rem;
    font-weight: 400;
}

.rd-purpose,
.rd-directory,
.rd-direction {
    padding: 4.5rem 0;
}

.rd-purpose {
    background: #fffcf8;
}

.rd-section-lead {
    max-width: 46rem;
    margin: 0 0 2rem;
    color: #243834;
}

.rd-purpose__copy {
    max-width: 46rem;
    margin: 0 0 2rem;
    color: #243834;
}

.rd-purpose__copy p {
    margin: 0;
}

.rd-purpose__copy p + p {
    margin-top: 1rem;
}

.rd-pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.rd-pillar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    min-height: 100%;
    margin: 0;
    padding: 1.35rem 1.25rem;
    background: #f7f4ef;
    border-top: 2px solid #b89060;
}

.rd-pillar__icon {
    display: inline-flex;
    color: #185c5c;
}

.rd-directory {
    background: #f7f4ef;
}

.rd-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0 0 1.75rem;
}

.rd-filter__option {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0.25rem 0.75rem;
    border: 1px solid #d9d1c4;
    border-radius: 999px;
    background: #fff;
    color: #185c5c;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
}

.rd-filter__option:hover,
.rd-filter__option:focus,
.rd-filter__option.is-active {
    border-color: #185c5c;
    background: #185c5c;
    color: #fff;
}

.rd-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: stretch;
}

.rd-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e6e0d6;
    border-radius: 0.85rem;
}

.rd-card--lead {
    box-shadow: inset 0 0 0 1px #b89060;
}

.rd-feature__photo {
    position: relative;
    aspect-ratio: 3 / 2;
    background: #e7eeec;
}

.rd-feature__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rd-logo-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 104px;
    margin: 0;
    padding: 0.85rem 1rem;
    background: #fff;
    border-bottom: 1px solid #f0ebe3;
}

.rd-logo {
    display: block;
    width: auto;
    height: auto;
    object-fit: contain;
}

.rd-logo--wide {
    max-width: 86%;
    max-height: 58px;
}

.rd-logo--square {
    max-width: 46%;
    max-height: 78px;
}

.rd-wordmark {
    margin: 0;
    color: #185c5c;
    font-size: 1.7rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.rd-card .rd-logo-stage {
    height: 188px;
    padding: 0.85rem 0.9rem;
}

.rd-card .rd-logo--wide {
    max-width: 94%;
    max-height: 156px;
}

.rd-card .rd-logo--square {
    max-width: 72%;
    max-height: 156px;
}

.rd-card .rd-wordmark {
    font-size: 2.15rem;
}

.rd-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.1rem 1.2rem 1.25rem;
}

.rd-card__category {
    display: inline-flex;
    align-self: flex-start;
    margin: 0;
    padding: 0.28rem 0.62rem;
    border-radius: 999px;
    background: #f3eee6;
    color: #8a6840;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1.3;
    text-transform: uppercase;
}

.rd-profile .rd-card__category {
    margin: 0 0.45rem 0.85rem 0;
}

.rd-card__summary {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #243834;
    font-size: 0.98rem;
    line-height: 1.45;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    min-height: calc(1.45em * 5);
}

.rd-card__summary.is-open {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

.rd-card__more {
    align-self: flex-end;
    min-height: 1.35em;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #185c5c;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: right;
    cursor: pointer;
    visibility: hidden;
}

.rd-card__more.is-on {
    visibility: visible;
}

.rd-card__more:hover,
.rd-card__more:focus {
    color: #8a6840;
}

.rd-feature {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2rem;
    align-items: center;
    margin-top: 2.75rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e6e0d6;
    border-radius: 0.85rem;
}

.rd-feature__copy h2 {
    margin-top: 0.35rem;
}

.rd-feature__copy p {
    margin: 0 0 1.25rem;
    max-width: 36rem;
}

.rd-logo-stage--feature {
    justify-content: flex-start;
    height: auto;
    min-height: 72px;
    padding: 0 0 0.5rem;
    border: 0;
}

.rd-feature__photo {
    overflow: hidden;
    border-radius: 0.65rem;
}

.rd-direction {
    background: #fffcf8;
}

.rd-direction__inner {
    max-width: 44rem;
    text-align: center;
}

.rd-direction p {
    margin: 0;
    font-size: 1.0625rem;
}

.rd-band {
    background: #185c5c;
    color: #fff;
}

.rd-band__inner {
    max-width: 40rem;
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
    text-align: center;
}

.rd-band h2,
.rd-band p {
    color: #fff;
}

.rd-band p {
    margin: 0 0 1.4rem;
}

.rd-footer {
    padding: 1.4rem 0;
    background: #fffcf8;
    color: #5c6b68;
    text-align: center;
}

.rd-footer p {
    margin: 0;
    font-size: 0.92rem;
}

.rd-profile {
    padding: 2.5rem 0 4rem;
}

.rd-profile__intro {
    display: grid;
    gap: 1.5rem;
    align-items: start;
}

.rd-profile__photo {
    overflow: hidden;
    aspect-ratio: 3 / 2;
    border-radius: 0.85rem;
    background: #e7eeec;
}

.rd-profile__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rd-back {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-bottom: 1.5rem;
    color: #185c5c;
    font-weight: 600;
    text-decoration: none;
}

.rd-back:hover,
.rd-back:focus {
    color: #8a6840;
}

.rd-profile h1 {
    margin: 0.15rem 0 0.55rem;
}

.rd-lead {
    font-size: 1.125rem;
}

.rd-block {
    margin-top: 2.25rem;
}

.rd-block p,
.rd-services,
.rd-channels {
    max-width: 42rem;
}

.rd-services,
.rd-channels {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rd-services li,
.rd-channels li {
    padding: 0.55rem 0;
    border-bottom: 1px solid #e7e1d6;
}

.rd-channels a {
    color: #185c5c;
    font-weight: 600;
}

.rd-logo-stage--profile {
    min-height: 220px;
    height: auto;
    border: 1px solid #e6e0d6;
    border-radius: 0.85rem;
}

.rd-logo-stage--profile .rd-logo--wide {
    max-width: 88%;
    max-height: 148px;
}

.rd-logo-stage--profile .rd-logo--square {
    max-height: 160px;
    max-width: 62%;
}

.rd-join {
    padding: 3.5rem 0 4.5rem;
    background: #f7f4ef;
}

.rd-join__layout {
    display: grid;
    gap: 1.75rem;
    align-items: start;
}

.rd-join__intro h2 {
    margin-bottom: 0.9rem;
}

.rd-join__intro p {
    max-width: 28rem;
    margin: 0;
    color: #243834;
}

.rd-join__quiet {
    margin-top: 1rem;
    color: #5c6b68;
    font-size: 0.95rem;
}

.rd-join__mark {
    width: 2.5rem;
    height: 2px;
    margin: 0 0 1.15rem;
    border: 0;
    background: #b89060;
}

.rd-join__card {
    container: rdjoin / inline-size;
    padding: 1.5rem 1.25rem 1.35rem;
    background: #fffcf8;
    border: 1px solid #e4dcd0;
    border-top: 3px solid #b89060;
    border-radius: 1rem;
    box-shadow: 0 16px 40px rgba(20, 50, 48, 0.06);
}

.rd-join .rd-form {
    max-width: none;
}

.rd-join__fields {
    display: grid;
    gap: 1.05rem;
}

.rd-join__fields[hidden],
.rd-join__confirm[hidden],
.rd-join__alert[hidden] {
    display: none !important;
}

.rd-join .form-label {
    margin-bottom: 0.4rem;
    color: #143f3c;
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.35;
}

.rd-field__hint {
    margin: 0 0 0.45rem;
    color: #5c6b68;
    font-size: 0.9rem;
}

.rd-join .form-control {
    min-height: 3.25rem;
    padding: 0.75rem 0.95rem;
    border: 1px solid #d5cdc2;
    border-radius: 0.7rem;
    background: #fbfaf7;
    color: #1c2e2c;
    font-size: 1rem;
    box-shadow: none;
}

.rd-join textarea.form-control {
    min-height: 9.5rem;
    resize: vertical;
}

.rd-join .form-control:focus {
    border-color: #1b6b62;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(27, 107, 98, 0.18);
}

.rd-join .form-control:focus-visible {
    outline: none;
}

.rd-join .form-control.is-invalid {
    border-color: #9a3b3b;
    background: #fff8f7;
}

.rd-join .form-control.is-invalid:focus {
    border-color: #9a3b3b;
    box-shadow: 0 0 0 3px rgba(154, 59, 59, 0.16);
}

.rd-join__actions {
    display: grid;
    gap: 0.75rem;
}

.rd-join__submit {
    width: 100%;
    min-height: 52px;
}

.rd-join__submit:disabled {
    cursor: wait;
    opacity: 0.82;
}

.rd-join__note {
    margin: 0;
    color: #5c6b68;
    font-size: 0.9rem;
}

.rd-join__alert {
    margin: 0 0 1rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid #e4c8c8;
    border-radius: 0.7rem;
    background: #fbf3f2;
    color: #6e2424;
    font-size: 0.92rem;
}

.rd-join__confirm h3 {
    margin: 0 0 0.75rem;
    font-size: 1.7rem;
}

.rd-join__confirm-text {
    margin: 0 0 1rem;
    color: #243834;
    font-size: 1.05rem;
}

.rd-form {
    max-width: 44rem;
}

.rd-field {
    margin-bottom: 0.25rem;
}

.rd-field__error {
    margin: 0.35rem 0 0;
    color: #8d2d2d;
    font-size: 0.85rem;
}

.rd-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.rd-state {
    margin: 0 0 1rem;
    padding: 0.8rem 1rem;
    border-radius: 0.5rem;
}

.rd-state--empty {
    background: #fff;
    border: 1px solid #e6e0d6;
}

.rd-state--loading {
    background: #eef4f3;
}

.rd-state--success {
    background: #e5f2ef;
    color: #143f3c;
}

.rd-state--error {
    background: #f8ecec;
    color: #6e2424;
}

.rd-kicker {
    margin: 0 0 0.4rem;
    color: #8a6840;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (min-width: 768px) {
    .rd-grid {
        grid-template-columns: 1fr 1fr;
    }

    .rd-profile__intro {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
        gap: 2rem;
    }
}

@media (min-width: 768px) {
    .rd-join__card {
        padding: 2rem 2rem 1.75rem;
    }
}

@media (min-width: 992px) {
    .rd-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 1.5rem;
    }

    .rd-join {
        padding: 4.5rem 0 5rem;
    }

    .rd-join__layout {
        grid-template-columns: minmax(16rem, 0.82fr) minmax(0, 1.18fr);
        gap: 3.5rem;
    }
}

@container rdjoin (min-width: 32rem) {
    .rd-join__fields {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .rd-field:not(.rd-field--wide) .form-label {
        display: flex;
        align-items: flex-end;
        min-height: 2.7em;
    }

    .rd-field--wide,
    .rd-join__actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767.98px) {
    .rd-pillars {
        grid-template-columns: 1fr;
    }

    .rd-hero .rd-kicker {
        display: block;
    }
}

@media (max-width: 991.98px) {
    .rd-feature {
        grid-template-columns: 1fr;
    }

    .rd-hero {
        min-height: 28rem;
    }

    .rd-hero__veil {
        background: rgba(16, 58, 58, 0.78);
    }

    .rd-nav__cta {
        margin: 0.4rem 0.85rem 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rd-page *,
    .rd-page *::before,
    .rd-page *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}
