/* Padres Digitales · Variables y base visual */
:root {
    --pd-color-background: #F5F5F7;
    --pd-platinum-surface:
        radial-gradient(ellipse at 16% 0%, rgba(255,255,255,.28), transparent 30%),
        radial-gradient(ellipse at 86% 8%, rgba(210,210,215,.24), transparent 34%),
        linear-gradient(125deg, #101012 0%, #1d1d1f 43%, #4e4e55 72%, #19191b 100%);
    --pd-color-text: #1D1D1F;
    --pd-color-muted: #6E6E73;
    --pd-color-border: #D2D2D7;
    --pd-color-surface: #FFFFFF;
    --pd-radius: 20px;
    --pd-font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --pd-space-1: 0.5rem;
    --pd-space-2: 1rem;
    --pd-space-3: 1.5rem;
    --pd-space-4: 2rem;
    --pd-space-5: 3rem;
    --pd-content-width: 1200px;
}

html {
    background-color: var(--pd-color-background);
}

body {
    position: relative;
    z-index: 0;
    isolation: isolate;
    background-color: transparent;
    color: var(--pd-color-text);
    font-family: var(--pd-font-family);
    line-height: 1.6;
}

.pd-site-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: var(--pd-color-background);
}

.pd-site-background::before {
    content: "";
    position: absolute;
    inset: -2%;
    background: url('../images/malla-apple-dense.svg') center center / cover no-repeat;
    opacity: .64;
    will-change: transform;
    transform: translate3d(0,0,0);
    animation: pdMeshDrift 5.8s ease-in-out infinite alternate;
}

@keyframes pdMeshDrift {
    0% { transform: translate3d(-4px, 3px, 0) scale(1.012); }
    35% { transform: translate3d(5px, -5px, 0) scale(1.02); }
    70% { transform: translate3d(8px, 3px, 0) scale(1.016); }
    100% { transform: translate3d(-5px, -2px, 0) scale(1.014); }
}

@media (prefers-reduced-motion: reduce) {
    .pd-site-background::before { animation: none; }
}

body h1, body h2, body h3, body h4, body h5, body h6,
body button, body input, body select, body textarea {
    font-family: var(--pd-font-family);
}

/* Clases disponibles para futuros componentes y plantillas. */
.pd-container {
    width: min(calc(100% - 2rem), var(--pd-content-width));
    margin-inline: auto;
}

.pd-card {
    padding: var(--pd-space-3);
    background: var(--pd-color-surface);
    color: var(--pd-color-text);
    border: 1px solid var(--pd-color-border);
    border-radius: var(--pd-radius);
}

.pd-text-muted { color: var(--pd-color-muted); }

.pd-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--pd-color-text);
    border-radius: var(--pd-radius);
    background: var(--pd-color-text);
    color: var(--pd-color-background);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.pd-button:hover, .pd-button:focus {
    background: var(--pd-color-background);
    color: var(--pd-color-text);
}

button,
input[type="button"],
input[type="submit"],
.button,
.wp-block-button__link {
    transition: background 90ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

button:hover,
button:focus,
input[type="button"]:hover,
input[type="button"]:focus,
input[type="submit"]:hover,
input[type="submit"]:focus,
.button:hover,
.button:focus,
.wp-block-button__link:hover,
.wp-block-button__link:focus {
    color: var(--pd-color-text);
    background: var(--pd-color-background);
    border-color: var(--pd-color-text);
    box-shadow: inset 0 0 0 1px var(--pd-color-text), 0 14px 36px rgba(29, 29, 31, 0.1);
    transform: translateY(-1px);
}

.pd-button:focus-visible {
    outline: 2px solid var(--pd-color-text);
    outline-offset: 3px;
}

.pd-scroll-top {
    position: fixed;
    right: 1rem;
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    max-width: 46px !important;
    max-height: 46px !important;
    box-sizing: border-box;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    font-size: 0 !important;
    line-height: 0 !important;
    text-align: center;
    appearance: none !important;
    -webkit-appearance: none !important;
    color: #3b3b40;
    background: rgba(255,255,255,.68);
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, 8px, 0) scale(.94);
    transition: opacity 90ms ease, transform 220ms ease, background 220ms ease, color 220ms ease;
    backdrop-filter: blur(20px) saturate(150%);
    box-shadow: 0 8px 24px rgba(29,29,31,.12), inset 0 1px 0 rgba(255,255,255,.95);
}
.pd-scroll-top.is-visible { opacity: 1; pointer-events: auto; transform: translate3d(0, 0, 0) scale(1); }
.pd-scroll-top:hover, .pd-scroll-top:focus-visible { color: #f5f5f7; background: rgba(29,29,31,.82); transform: translate3d(0, -2px, 0) scale(1.03); }
.pd-scroll-top svg {
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    flex: none;
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: translate(-50%, -50%);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-footer,
.site-info {
    display: none !important;
}

.pd-footer {
    position: relative;
    z-index: 1;
    color: #424245;
    background: rgba(245,245,247,.94);
    border-top: 1px solid rgba(210,210,215,.86);
    font-size: .82rem;
    line-height: 1.45;
}

.pd-footer__inner {
    width: min(calc(100% - 2rem), 1120px);
    margin: 0 auto;
    padding: 1.25rem 0 1.4rem;
}

.pd-footer__notice {
    max-width: 980px;
    margin: 0 0 1rem;
    color: #6e6e73;
    font-size: .78rem;
}

.pd-footer__breadcrumb {
    display: flex;
    gap: .55rem;
    align-items: center;
    padding: .85rem 0;
    border-top: 1px solid rgba(210,210,215,.86);
    color: #6e6e73;
}

.pd-footer__breadcrumb svg { width: 16px; height: 16px; fill: currentColor; }
.pd-footer a { color: #424245; text-decoration: none; }
.pd-footer a:hover, .pd-footer a:focus { color: #1d1d1f; text-decoration: underline; }

.pd-footer__links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
    padding: 1rem 0 1.6rem;
    border-top: 1px solid rgba(210,210,215,.86);
}

.pd-footer__group { display: block; }
.pd-footer__group summary {
    list-style: none;
    color: #1d1d1f;
    font-weight: 700;
    cursor: default;
}
.pd-footer__group summary::-webkit-details-marker { display: none; }
.pd-footer__group ul { margin: .55rem 0 0; padding: 0; list-style: none; }
.pd-footer__group li + li { margin-top: .42rem; }

.pd-footer__bottom {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid rgba(210,210,215,.86);
    color: #6e6e73;
}
.pd-footer__bottom p { margin: 0; }
.pd-footer__legal { display: flex; flex-wrap: wrap; gap: .45rem; }

@media (min-width: 701px) {
    .pd-footer__group[open] summary ~ * { display: block; }
    .pd-footer__group:not([open]) ul { display: block; }
}

@media (max-width: 700px) {
    .pd-footer { font-size: .92rem; }
    .pd-footer__inner { width: min(calc(100% - 2rem), 560px); padding-bottom: 6rem; }
    .pd-footer__notice { font-size: .88rem; }
    .pd-footer__breadcrumb { flex-wrap: wrap; font-size: .95rem; }
    .pd-footer__links { display: block; padding: 0; }
    .pd-footer__group { border-top: 1px solid rgba(210,210,215,.86); }
    .pd-footer__group summary {
        display: flex;
        min-height: 48px;
        align-items: center;
        justify-content: space-between;
        font-size: 1rem;
        font-weight: 500;
        cursor: pointer;
    }
    .pd-footer__group summary::after {
        content: "⌄";
        color: #1d1d1f;
        font-size: 1.25rem;
        line-height: 1;
        transition: transform 90ms ease;
    }
    .pd-footer__group[open] summary::after { transform: rotate(180deg); }
    .pd-footer__group ul { margin: 0; padding: 0 0 .9rem 1rem; }
    .pd-footer__group li + li { margin-top: .72rem; }
    .pd-footer__bottom { display: grid; gap: .65rem; font-size: .9rem; }
}


.pd-footer__notice {
    max-width: none !important;
    color: #8e8e93 !important;
    font-size: .74rem !important;
    line-height: 1.38 !important;
    letter-spacing: -.005em;
}

@media (max-width: 700px) {
    .pd-footer__notice {
        font-size: .82rem !important;
        line-height: 1.42 !important;
    }
}


/* 7.5.4 actualización 3: botones de formulario con inversión clara al interactuar. */
button[type="submit"]:hover,
button[type="submit"]:focus,
button[type="submit"]:active,
.pd-search-empty button:hover,
.pd-search-empty button:focus,
.pd-search-empty button:active,
.pd-article-help button:hover,
.pd-article-help button:focus,
.pd-article-help button:active,
.pd-article-help__contact button:hover,
.pd-article-help__contact button:focus,
.pd-article-help__contact button:active,
.pd-home-search button:hover,
.pd-home-search button:focus,
.pd-home-search button:active,
.pd-search__form button:hover,
.pd-search__form button:focus,
.pd-search__form button:active {
    color: #fff !important;
    background: #1d1d1f !important;
    border-color: #1d1d1f !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.72), 0 14px 36px rgba(0,0,0,.18) !important;
    transform: translateY(-1px) !important;
}


/* 7.6.2: interacción más rápida en botones y redes. */
:where(button, input[type="submit"], .pd-desktop-header-social a, .pd-mobile-menu-social a, .pd-article-share a, .pd-footer a, .pd-subscribe-form button) {
    transition-duration: 90ms !important;
}

.pd-subscribe-message {
    margin: 0 0 1rem;
    padding: .85rem 1rem;
    border-radius: 16px;
    font-size: .92rem;
    font-weight: 650;
}
.pd-subscribe-message--ok { color: #0f5132; background: rgba(209,231,221,.72); border: 1px solid rgba(186,219,204,.9); }
.pd-subscribe-message--error { color: #842029; background: rgba(248,215,218,.72); border: 1px solid rgba(245,194,199,.9); }


/* Enlaces dentro de cajas oscuras: mantener estética en blanco, sin azul. */
.pd-article-help a,
.pd-search-empty a,
.pd-guide-request a,
[class*="dark"] a,
[style*="background:#1d1d1f"] a,
[style*="background: #1d1d1f"] a,
[style*="linear-gradient"] a {
    color: #fff !important;
    font-weight: 800 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    text-decoration-thickness: 1.4px !important;
}

.pd-article-help__privacy a,
.pd-subscribe-form__privacy a,
.pd-contact-form__privacy a,
.pd-collab-form__privacy a,
.pd-search-empty__privacy a,
.pd-home-help__privacy a {
    color: inherit !important;
    text-decoration: none !important;
}

/* Enlaces legales dentro de formularios: discretos, sin azul ni subrayado. */
.pd-article-help__privacy a,
.pd-subscribe-form__privacy a,
.pd-contact-form__privacy a,
.pd-collab-form__privacy a,
.pd-search-empty__privacy a,
.pd-home-help__privacy a {
    color: currentColor !important;
    font-weight: 760 !important;
    font-style: normal !important;
    text-decoration: none !important;
}

/* Desplegables legibles en formularios. */
.pd-article-help select,
.pd-search-empty select,
.pd-home-help select,
.pd-contact-form select,
.pd-collab-form select,
.pd-subscribe-form select {
    color: #1d1d1f !important;
    background: rgba(245,245,247,.94) !important;
}

.pd-article-help select option,
.pd-search-empty select option,
.pd-home-help select option,
.pd-contact-form select option,
.pd-collab-form select option,
.pd-subscribe-form select option {
    color: #1d1d1f !important;
    background: #fff !important;
}

.pd-article-help select option:checked,
.pd-search-empty select option:checked,
.pd-home-help select option:checked,
.pd-contact-form select option:checked,
.pd-collab-form select option:checked,
.pd-subscribe-form select option:checked {
    color: #fff !important;
    background: #1d1d1f !important;
}
