/* Padres Digitales · Búsqueda */
.pd-search {
    min-height: 70vh;
    background: transparent;
}

.pd-search__hero {
    padding: clamp(4.5rem, 8vw, 7.5rem) 0 clamp(2rem, 4vw, 4rem);
}

.pd-search__eyebrow {
    margin: 0 0 var(--pd-space-1);
    color: var(--pd-color-muted);
    font-size: 0.95rem;
    font-weight: 700;
}

.pd-search h1 {
    max-width: 900px;
    margin: 0;
    color: var(--pd-color-text);
    font-size: clamp(3rem, 6vw, 5.8rem);
    line-height: 0.98;
}

.pd-search__lead {
    max-width: 660px;
    margin: var(--pd-space-2) 0 0;
    color: var(--pd-color-muted);
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    line-height: 1.5;
}

.pd-search__form {
    display: flex;
    gap: 0.75rem;
    width: min(100%, 760px);
    margin-top: var(--pd-space-4);
    padding: 0.5rem;
    background: var(--pd-color-surface);
    border: 1px solid var(--pd-color-border);
    border-radius: var(--pd-radius);
    box-shadow: 0 24px 70px rgba(29, 29, 31, 0.08);
}

.pd-search__form label {
    flex: 1;
    margin: 0;
}

.pd-search__form input {
    width: 100%;
    min-height: 54px;
    padding: 0 1rem;
    color: var(--pd-color-text);
    background: transparent;
    border: 0;
    font-size: 1.05rem;
}

.pd-search__form button {
    min-height: 54px;
    padding: 0 1.35rem;
    color: #fff;
    background: var(--pd-color-text);
    border: 0;
    border-radius: calc(var(--pd-radius) - 6px);
    font-weight: 750;
    transition: background 90ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.pd-search__form button:hover,
.pd-search__form button:focus {
    color: var(--pd-color-text);
    background: var(--pd-color-background);
    box-shadow: inset 0 0 0 1px var(--pd-color-text), 0 14px 36px rgba(29, 29, 31, 0.1);
    transform: translateY(-1px);
}

.pd-search__results {
    padding: 0 0 clamp(4rem, 7vw, 7rem);
}

.pd-search__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--pd-space-2);
}

.pd-search-card a {
    display: block;
    min-height: 100%;
    overflow: hidden;
    color: var(--pd-color-text);
    background: var(--pd-color-surface);
    border: 1px solid rgba(210, 210, 215, 0.92);
    border-radius: var(--pd-radius);
    text-decoration: none;
}

.pd-search-card__image {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #fff 0%, #f5f5f7 52%, #d2d2d7 100%);
}

.pd-search-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) saturate(0) contrast(0.9) brightness(1.08);
    opacity: 0.9;
    transition: filter 90ms ease, opacity 180ms ease, transform 180ms ease;
}

.pd-search-card__image::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(245, 245, 247, 0.34)),
        linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(210, 210, 215, 0.16));
    pointer-events: none;
    transition: opacity 90ms ease;
}

.pd-search-card a:hover .pd-search-card__image img,
.pd-search-card a:focus .pd-search-card__image img {
    filter: none;
    opacity: 1;
    transform: scale(1.025);
}

.pd-search-card a:hover .pd-search-card__image::after,
.pd-search-card a:focus .pd-search-card__image::after {
    opacity: 0;
}

.pd-search-card h2 {
    margin: 0;
    padding: 1.35rem 1.35rem 0;
    font-size: 1.2rem;
    line-height: 1.22;
}

.pd-search-card p {
    margin: var(--pd-space-2) 0 0;
    padding: 0 1.35rem 1.35rem;
    color: var(--pd-color-muted);
}

.pd-search-card time {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pd-search-empty {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
    gap: var(--pd-space-4);
    position: relative;
    overflow: hidden;
    width: min(calc(100% - 2rem), 1120px);
    margin: 0 auto clamp(4rem, 7vw, 7rem);
    padding: clamp(1.7rem, 3vw, 2.5rem);
    color: #f5f5f7;
    background:
        radial-gradient(circle at 16% 0%, rgba(255, 255, 255, 0.34), transparent 32%),
        radial-gradient(circle at 78% 12%, rgba(210, 210, 215, 0.24), transparent 34%),
        linear-gradient(132deg, #0f0f11 0%, #1d1d1f 44%, #4a4a50 100%);
    border: 1px solid rgba(210, 210, 215, 0.34);
    border-radius: var(--pd-radius);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 28px 90px rgba(29, 29, 31, 0.16);
}

.pd-search-empty::before,
.pd-search-empty::after {
    position: absolute;
    content: "0101 1100 0011 1010 0110 1001 0101 0010 1110 0001 1011 0100 0101 1100 0011 1010 0110 1001 0101 0010";
    width: 150%;
    color: rgba(245,245,247,.13);
    font-family: "Courier New", monospace;
    font-size: clamp(1.05rem, 1.7vw, 1.75rem);
    font-weight: 700;
    letter-spacing: .16em;
    line-height: 1.75;
    opacity: .78;
    pointer-events: none;
    text-shadow: 0 0 18px rgba(245,245,247,.16);
    white-space: pre-wrap;
    z-index: 0;
}

.pd-search-empty::before {
    left: -22%;
    top: 4%;
    transform: rotate(-9deg);
    animation: pd-binary-drift-a 14s linear infinite;
}

.pd-search-empty::after {
    right: -30%;
    bottom: -4%;
    color: rgba(134,139,146,.22);
    transform: rotate(10deg);
    animation: pd-binary-drift-b 17s linear infinite;
}

.pd-search-empty > * {
    position: relative;
    z-index: 1;
}

@keyframes pd-binary-drift-a {
    from { translate: -4% -2%; }
    to { translate: 8% 5%; }
}

@keyframes pd-binary-drift-b {
    from { translate: 7% 4%; }
    to { translate: -8% -5%; }
}

.pd-search-empty__label {
    margin: 0 0 0.4rem;
    color: #d2d2d7;
    font-size: 0.9rem;
    font-weight: 700;
}

.pd-search-empty h2 {
    margin: 0;
    color: #f5f5f7;
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.08;
}

.pd-search-empty__form {
    display: grid;
    gap: 0.75rem;
}

.pd-search-empty__form label {
    margin: 0;
}

.pd-search-empty__form label > span:first-child {
    display: block;
    margin-bottom: 0.4rem;
    color: #f5f5f7;
    font-size: 0.9rem;
    font-weight: 700;
}

.pd-search-empty textarea {
    width: 100%;
    padding: 0.85rem;
    resize: vertical;
    color: #f5f5f7;
    background: rgba(245, 245, 247, 0.12);
    border: 1px solid rgba(210, 210, 215, 0.24);
    border-radius: 12px;
}

.pd-search-empty__privacy {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.55rem;
    color: #d2d2d7;
    font-size: 0.78rem;
    line-height: 1.4;
}

.pd-search-empty__legal {
    margin: 0;
    color: rgba(245, 245, 247, 0.62);
    font-size: 0.72rem;
    line-height: 1.4;
}

.pd-search-empty button {
    justify-self: start;
    min-height: 44px;
    padding: 0 1.1rem;
    color: #1d1d1f;
    background: #f5f5f7;
    border: 0;
    border-radius: 999px;
    font-weight: 750;
    transition: background 90ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.pd-search-empty button:hover,
.pd-search-empty button:focus {
    color: #f5f5f7;
    background: #1d1d1f;
    box-shadow: inset 0 0 0 1px rgba(245, 245, 247, 0.72), 0 14px 36px rgba(0, 0, 0, 0.22);
    transform: translateY(-1px);
}

@media (max-width: 900px) {
    .pd-search__grid,
    .pd-search-empty {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .pd-search__form {
        display: grid;
    }
}


/* 7.5.4: el bloque de propuesta aparece también cuando hay resultados. */
.pd-search-empty__intro {
    max-width: 34rem;
    margin: var(--pd-space-2) 0 0;
    color: #d2d2d7;
    font-size: 1rem;
    line-height: 1.5;
}

.pd-guide-visual {
    position: relative;
    overflow: hidden;
    width: min(100%, 420px);
    min-height: clamp(96px, 12vw, 142px);
    margin: clamp(1.2rem, 2.4vw, 1.8rem) 0 0;
    border: 1px solid rgba(245,245,247,.18);
    border-radius: 22px;
    background:
        radial-gradient(circle at 18% 20%, rgba(255,255,255,.34), transparent 22%),
        radial-gradient(circle at 78% 70%, rgba(210,210,215,.18), transparent 30%),
        linear-gradient(135deg, rgba(245,245,247,.14), rgba(86,89,96,.08));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.18),
        0 22px 50px rgba(0,0,0,.16);
}

.pd-guide-visual::before,
.pd-guide-visual::after,
.pd-guide-visual span {
    position: absolute;
    content: "";
    pointer-events: none;
}

.pd-guide-visual::before {
    inset: 18% 11% 18% 13%;
    border: 1px solid rgba(245,245,247,.24);
    border-radius: 18px;
    background:
        linear-gradient(90deg, rgba(255,255,255,.22) 0 18%, transparent 18% 100%),
        repeating-linear-gradient(0deg, rgba(245,245,247,.22) 0 2px, transparent 2px 14px),
        linear-gradient(135deg, rgba(245,245,247,.10), rgba(29,29,31,.08));
    transform: rotate(-3deg);
    box-shadow: 0 18px 34px rgba(0,0,0,.16);
}

.pd-guide-visual::after {
    inset: 0;
    background:
        linear-gradient(115deg, transparent 0 38%, rgba(255,255,255,.22) 48%, transparent 58% 100%),
        repeating-linear-gradient(90deg, rgba(245,245,247,.10) 0 1px, transparent 1px 28px);
    opacity: .72;
    transform: translateX(-18%);
    animation: pd-guide-sheen 5.4s ease-in-out infinite;
}

.pd-guide-visual span {
    right: 12%;
    bottom: 18%;
    width: 34%;
    height: 36%;
    border-radius: 999px;
    background:
        radial-gradient(circle at 35% 35%, rgba(255,255,255,.42), transparent 20%),
        linear-gradient(135deg, rgba(245,245,247,.24), rgba(29,29,31,.08));
    filter: blur(.2px);
    opacity: .84;
}

@keyframes pd-guide-sheen {
    0%, 45% { transform: translateX(-38%); opacity: .28; }
    70% { transform: translateX(22%); opacity: .82; }
    100% { transform: translateX(42%); opacity: .22; }
}

@media (prefers-reduced-motion: reduce) {
    .pd-search-empty::before,
    .pd-search-empty::after,
    .pd-guide-visual::after {
        animation: none;
        transform: none;
    }
}

.pd-search-empty select,
.pd-search-empty textarea {
    width: 100%;
    padding: 0.85rem;
    color: #f5f5f7;
    background: rgba(245,245,247,0.12);
    border: 1px solid rgba(210,210,215,0.28);
    border-radius: 12px;
}

.pd-search-empty select:focus,
.pd-search-empty textarea:focus {
    outline: 1px solid rgba(245,245,247,.58);
    outline-offset: 0;
    background: rgba(245,245,247,0.16);
}

.pd-search-empty button:hover,
.pd-search-empty button:focus,
.pd-search-empty button:active {
    color: #f5f5f7 !important;
    background: #1d1d1f !important;
    box-shadow: inset 0 0 0 1px rgba(245,245,247,.78), 0 14px 36px rgba(0,0,0,.22) !important;
    transform: translateY(-1px) !important;
}


.pd-search-empty button {
    border: 1px solid #f5f5f7 !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); }

/* 7.11.9: enlaces legales de formularios sin azul ni subrayado. */
.pd-search-empty__privacy a { color: currentColor !important; font-weight: 760 !important; font-style: normal !important; text-decoration: none !important; }

/* 7.12.0: búsqueda sin resultados con binario más visible. */
.pd-search-empty::before {
    inset: -12% auto auto -18%;
    width: 150%;
    content: "0101 1100 0011 1010 0110 1001 0101 0010 1110 0001\A1011 0100 0101 1100 0011 1010 0110 1001 0101 0010\A0010 1110 0001 1011 0100 0101 1100 0011 1010 0110\A1100 0011 1010 0110 1001 0101 0010 1110 0001 1011";
    color: rgba(245,245,247,.28);
    font-size: clamp(1rem, 1.75vw, 1.72rem);
    line-height: 1.6;
    opacity: .88;
}

.pd-search-empty::after {
    right: -35%;
    bottom: -12%;
    width: 145%;
    content: "1110 0001 1011 0100 0101 1100 0011 1010\A0101 0010 1110 0001 1011 0100 0101 1100\A0110 1001 0101 0010 1110 0001 1011 0100";
    color: rgba(190,198,208,.34);
    font-size: clamp(.95rem, 1.55vw, 1.48rem);
    line-height: 1.7;
    opacity: .84;
}

@media (max-width: 760px) {
    .pd-search-empty::before {
        inset: -4% auto auto -54%;
        width: 230%;
        font-size: .98rem;
    }

    .pd-search-empty::after {
        right: -72%;
        width: 220%;
        font-size: .92rem;
    }
}
