/* Padres Digitales · Home */
.pd-home {
    background: transparent;
}

.pd-home-hero {
    padding: clamp(4.6rem, 9vw, 8.5rem) 0 clamp(2.75rem, 5vw, 5.5rem);
    text-align: center;
}

.pd-home-hero__inner {
    display: grid;
    justify-items: center;
    gap: var(--pd-space-3);
}

.pd-home-hero__logo {
    display: block;
    width: clamp(136px, 15vw, 210px);
    height: auto;
    margin: 0 auto var(--pd-space-3);
}

.pd-home-hero h1 {
    max-width: 1020px;
    margin: 0;
    color: var(--pd-color-text);
    font-size: clamp(3.35rem, 7.2vw, 6.9rem);
    line-height: 0.96;
    letter-spacing: 0;
}

.pd-home-hero__lead {
    max-width: 720px;
    margin: 0;
    color: var(--pd-color-muted);
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
    line-height: 1.5;
}

.pd-home-search {
    display: flex;
    gap: 0.75rem;
    width: min(100%, 760px);
    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-home-search label {
    flex: 1;
    margin: 0;
}

.pd-home-search input[type="search"] {
    width: 100%;
    min-height: 54px;
    padding: 0 1rem;
    color: var(--pd-color-text);
    background: transparent;
    border: 0;
    font-size: 1.05rem;
}

.pd-home-search input[type="search"]:focus {
    outline: 0;
}

.pd-home-search button {
    min-height: 54px;
    padding: 0 1.35rem;
    border: 0;
    border-radius: calc(var(--pd-radius) - 6px);
    background: var(--pd-color-text);
    color: #fff;
    font-weight: 750;
    cursor: pointer;
}

.pd-home-access {
    padding: 0 0 clamp(3rem, 6vw, 6rem);
}

.pd-home-access__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(1rem, 1.8vw, 1.5rem);
}

.pd-home-card {
    position: relative;
    overflow: hidden;
    display: flex;
    min-height: 248px;
    padding: clamp(1.5rem, 2vw, 2rem);
    flex-direction: column;
    justify-content: space-between;
    background: var(--pd-color-surface);
    border: 1px solid rgba(210, 210, 215, 0.92);
    border-radius: var(--pd-radius);
    color: var(--pd-color-text);
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(29, 29, 31, 0.03);
    transition: border-color 90ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.pd-home-card > span,
.pd-home-card > p {
    position: relative;
    z-index: 1;
}

.pd-home-card:hover,
.pd-home-card:focus {
    color: var(--pd-color-text);
    border-color: var(--pd-color-text);
    box-shadow: 0 18px 45px rgba(29, 29, 31, 0.08);
    transform: translateY(-2px);
}

.pd-home-card:focus-visible {
    outline: 2px solid var(--pd-color-text);
    outline-offset: 4px;
}

.pd-home-card__icon {
    position: absolute;
    left: clamp(.9rem, 1.6vw, 1.2rem);
    top: clamp(.95rem, 1.7vw, 1.35rem);
    display: block;
    background: linear-gradient(135deg, rgba(4, 19, 33, .34) 0%, rgba(8, 44, 75, .28) 46%, rgba(10, 93, 148, .34) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: clamp(64px, 5.2vw, 86px);
    font-weight: 840;
    letter-spacing: -.075em;
    line-height: .78;
    pointer-events: none;
    z-index: 0;
}

.pd-home-card h2 {
    margin: clamp(3.8rem, 5.6vw, 5.2rem) 0 var(--pd-space-1);
    font-size: clamp(1.25rem, 1.8vw, 1.6rem);
    line-height: 1.12;
}

.pd-home-card p {
    margin: 0;
    color: var(--pd-color-muted);
    font-size: 1rem;
    line-height: 1.45;
}

.pd-home-latest {
    padding: clamp(2rem, 5vw, 5rem) 0 clamp(4rem, 7vw, 7rem);
    background: transparent;
}

.pd-home-latest__header {
    display: flex;
    gap: var(--pd-space-2);
    align-items: end;
    justify-content: space-between;
    margin-bottom: var(--pd-space-3);
}

.pd-home-latest h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.1;
}

.pd-home-latest__link {
    color: var(--pd-color-text);
    font-weight: 700;
}

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

.pd-home-post {
    background: var(--pd-color-surface);
    border: 1px solid rgba(210, 210, 215, 0.92);
    border-radius: var(--pd-radius);
    box-shadow: 0 1px 2px rgba(29, 29, 31, 0.03);
    overflow: hidden;
}

.pd-home-post a {
    display: block;
    min-height: 100%;
    padding: clamp(1.35rem, 2vw, 2rem);
    color: var(--pd-color-text);
    text-decoration: none;
}

.pd-home-post__image {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    margin: calc(clamp(1.35rem, 2vw, 2rem) * -1) calc(clamp(1.35rem, 2vw, 2rem) * -1) var(--pd-space-3);
    overflow: hidden;
    background: linear-gradient(135deg, #fff 0%, #f5f5f7 52%, #d2d2d7 100%);
}

.pd-home-post__image img,
.pd-posts-index__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) saturate(0) contrast(0.84) brightness(1.12);
    opacity: 0.86;
    transition: filter 90ms ease, opacity 180ms ease, transform 180ms ease;
}

.pd-home-post__image::after,
.pd-posts-index__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: background 90ms ease;
}

.pd-home-post a:hover .pd-home-post__image img,
.pd-home-post a:focus .pd-home-post__image img,
.pd-posts-index__card a:hover .pd-posts-index__image img,
.pd-posts-index__card a:focus .pd-posts-index__image img {
    filter: none;
    opacity: 1;
    transform: scale(1.025);
}

.pd-home-post a:hover .pd-home-post__image::after,
.pd-home-post a:focus .pd-home-post__image::after,
.pd-posts-index__card a:hover .pd-posts-index__image::after,
.pd-posts-index__card a:focus .pd-posts-index__image::after {
    background: transparent;
}

.pd-home-post h3 {
    margin: 0 0 var(--pd-space-1);
    font-size: 1.15rem;
    line-height: 1.25;
}

.pd-home-post 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-home-help {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: var(--pd-space-3);
    align-items: center;
    width: min(calc(100% - 2rem), 1120px);
    margin: 0 auto clamp(4rem, 7vw, 7rem);
    padding: clamp(1.6rem, 3vw, 2.4rem);
    color: #f5f5f7;
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.3), transparent 32%),
        radial-gradient(circle at 88% 18%, rgba(210, 210, 215, 0.22), transparent 34%),
        linear-gradient(132deg, #0f0f11 0%, #1d1d1f 50%, #4a4a50 100%);
    border: 1px solid rgba(210, 210, 215, 0.28);
    border-radius: var(--pd-radius);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 24px 72px rgba(29,29,31,.16);
}

.pd-home-help::before,
.pd-home-help::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-home-help::before {
    left: -22%;
    top: 4%;
    transform: rotate(-9deg);
    animation: pd-binary-drift-a 14s linear infinite;
}

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

.pd-home-help > * {
    position: relative;
    z-index: 1;
}

.pd-home-help__label {
    margin: 0 0 .4rem;
    color: #d2d2d7;
    font-size: .9rem;
    font-weight: 700;
}

.pd-home-help h2 {
    margin: 0;
    color: #f5f5f7;
    font-size: clamp(1.7rem, 3vw, 2.6rem);
    line-height: 1.08;
}

.pd-home-help__copy p:not(.pd-home-help__label) {
    max-width: 36rem;
    margin: .6rem 0 0;
    color: rgba(245,245,247,.72);
    font-size: .98rem;
    line-height: 1.5;
}

.pd-home-help__form {
    display: grid;
    gap: .75rem;
    min-width: min(100%, 430px);
}

.pd-home-help__form label {
    margin: 0;
}

.pd-home-help__form label > span:first-child {
    display: block;
    margin-bottom: .35rem;
    color: #d2d2d7;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.pd-home-help__form select,
.pd-home-help__form textarea {
    width: 100%;
    min-height: 46px;
    padding: .78rem .9rem;
    color: #f5f5f7;
    background: rgba(245,245,247,.12);
    border: 1px solid rgba(210,210,215,.28);
    border-radius: 14px;
    font: inherit;
}

.pd-home-help__form textarea {
    resize: vertical;
    line-height: 1.45;
}

.pd-home-help__privacy {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .55rem;
    align-items: start;
    color: rgba(245,245,247,.74);
    font-size: .76rem;
    line-height: 1.35;
}

.pd-home-help__privacy input { margin-top: .2rem; }

.pd-home-help__legal {
    margin: 0;
    color: rgba(245,245,247,.55);
    font-size: .72rem;
    line-height: 1.38;
}

.pd-home-help__form button {
    justify-self: start;
    min-height: 44px;
    padding: 0 1.2rem;
    color: #1d1d1f;
    background: #f5f5f7;
    border: 0;
    border-radius: 999px;
    font-weight: 760;
}

@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%; }
}

@media (prefers-reduced-motion: reduce) {
    .pd-home-help::before,
    .pd-home-help::after {
        animation: none;
        transform: none;
    }
}

.pd-posts-index {
    min-height: 70vh;
    padding: clamp(4rem, 8vw, 8rem) 0 clamp(4rem, 7vw, 7rem);
    background: transparent;
}

.pd-posts-index__logo {
    display: block;
    width: clamp(148px, 14vw, 210px);
    height: auto;
    margin: 0 0 var(--pd-space-3);
}

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

.pd-posts-index__lead {
    max-width: 640px;
    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-posts-index__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--pd-space-2);
    margin-top: clamp(2rem, 4vw, 4rem);
}

.pd-posts-index__card a {
    display: block;
    min-height: 190px;
    background: var(--pd-color-surface);
    border: 1px solid rgba(210, 210, 215, 0.92);
    border-radius: var(--pd-radius);
    color: var(--pd-color-text);
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(29, 29, 31, 0.03);
    overflow: hidden;
    transition: border-color 90ms ease, transform 160ms ease, box-shadow 160ms ease;
}

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

.pd-posts-index__card a:hover,
.pd-posts-index__card a:focus {
    border-color: var(--pd-color-text);
    box-shadow: 0 18px 45px rgba(29, 29, 31, 0.08);
    transform: translateY(-2px);
}

.pd-posts-index__card h2 {
    margin: 0;
    padding: clamp(1.45rem, 2vw, 2rem) clamp(1.45rem, 2vw, 2rem) 0;
    font-size: 1.22rem;
    line-height: 1.22;
}

.pd-posts-index__card p {
    margin: var(--pd-space-2) 0 0;
    padding: 0 clamp(1.45rem, 2vw, 2rem) clamp(1.45rem, 2vw, 2rem);
    color: var(--pd-color-muted);
}

.pd-posts-index__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-posts-index__pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: var(--pd-space-4);
}

.pd-posts-index__pagination .page-numbers {
    display: inline-flex;
    min-width: 42px;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 0.8rem;
    background: var(--pd-color-surface);
    border: 1px solid rgba(210, 210, 215, 0.92);
    border-radius: 999px;
    color: var(--pd-color-text);
    text-decoration: none;
}

.pd-posts-index__pagination .current {
    background: var(--pd-color-text);
    color: #fff;
}

.pd-posts-index__empty {
    margin-top: var(--pd-space-4);
    color: var(--pd-color-muted);
}

@media (max-width: 900px) {
    .pd-home-access__grid,
    .pd-home-posts,
    .pd-posts-index__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pd-home-help {
        grid-template-columns: 1fr;
    }
}

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

    .pd-home-search button {
        width: 100%;
    }

    .pd-home-access__grid,
    .pd-home-posts,
    .pd-posts-index__grid {
        grid-template-columns: 1fr;
    }

    .pd-home-card {
        min-height: 180px;
    }

    .pd-home-card__icon {
        font-size: clamp(68px, 20vw, 92px);
    }

    .pd-home-latest__header {
        display: grid;
        align-items: start;
    }
}


/* 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-home-help button:hover,
.pd-home-help button:focus,
.pd-home-help 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-home-help__privacy a { color: currentColor !important; font-weight: 760 !important; font-style: normal !important; text-decoration: none !important; }

/* 7.12.0: binario más visible en home y tarjetas numeradas. */
.pd-home-card {
    isolation: isolate;
}

.pd-home-card::before {
    position: absolute;
    inset: -16% -28%;
    z-index: 0;
    content: "0101 1100 0011 1010 0110\A1001 0101 0010 1110 0001\A1011 0100 0101 1100 0011";
    color: rgba(63,70,79,.15);
    font-family: "Courier New", monospace;
    font-size: clamp(.95rem, 1.4vw, 1.3rem);
    font-weight: 700;
    letter-spacing: .16em;
    line-height: 1.62;
    white-space: pre-wrap;
    transform: rotate(-11deg);
    pointer-events: none;
    transition: opacity 160ms ease;
}

.pd-home-card:hover::before,
.pd-home-card:focus::before {
    opacity: .92;
}

.pd-home-card > * {
    position: relative;
    z-index: 1;
}

.pd-home-help::before {
    inset: -14% auto auto -18%;
    width: 155%;
    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,.29);
    font-size: clamp(1rem, 1.75vw, 1.72rem);
    line-height: 1.58;
    opacity: .9;
}

.pd-home-help::after {
    right: -34%;
    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,.33);
    font-size: clamp(.95rem, 1.55vw, 1.48rem);
    line-height: 1.7;
    opacity: .82;
}

@media (max-width: 640px) {
    .pd-home-help::before {
        inset: -4% auto auto -52%;
        width: 230%;
        font-size: .98rem;
    }

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

/* 7.12.1: tarjetas home con binario vivo, distinto y a fondo completo. */
.pd-home-card::before,
.pd-home-card::after {
    position: absolute;
    inset: -38% -46%;
    z-index: 0;
    width: auto;
    height: auto;
    font-family: "Courier New", monospace;
    font-weight: 700;
    white-space: pre-wrap;
    pointer-events: none;
}

.pd-home-card::before {
    content: "0101 1100 0011 1010 0110 1001 0101\A0010 1110 0001 1011 0100 0101 1100\A1001 0101 0010 1110 0001 1011 0100\A0011 1010 0110 1001 0101 0010 1110";
    color: rgba(74,80,90,.18);
    font-size: clamp(.95rem, 1.25vw, 1.28rem);
    letter-spacing: .15em;
    line-height: 1.72;
    transform: rotate(-13deg);
    animation: pd-card-binary-drift-a 19s linear infinite;
}

.pd-home-card::after {
    content: "1110 0001 1011 0100 0101 1100\A0110 1001 0101 0010 1110 0001\A1100 0011 1010 0110 1001 0101";
    color: rgba(142,151,162,.20);
    font-size: clamp(.86rem, 1.1vw, 1.12rem);
    letter-spacing: .18em;
    line-height: 1.95;
    transform: rotate(11deg);
    animation: pd-card-binary-drift-b 24s linear infinite;
}

.pd-home-card:nth-child(2)::before { transform: rotate(8deg); animation-duration: 22s; animation-direction: reverse; }
.pd-home-card:nth-child(2)::after { transform: rotate(-16deg); animation-duration: 27s; }
.pd-home-card:nth-child(3)::before { transform: rotate(-5deg); animation-duration: 25s; }
.pd-home-card:nth-child(3)::after { transform: rotate(18deg); animation-duration: 21s; animation-direction: reverse; }
.pd-home-card:nth-child(4)::before { transform: rotate(15deg); animation-duration: 20s; animation-direction: reverse; }
.pd-home-card:nth-child(4)::after { transform: rotate(-9deg); animation-duration: 29s; }

.pd-home-card:nth-child(2)::before,
.pd-home-card:nth-child(4)::after {
    color: rgba(35,41,50,.14);
}

.pd-home-card:nth-child(3)::after,
.pd-home-card:nth-child(4)::before {
    color: rgba(160,169,180,.23);
}

@keyframes pd-card-binary-drift-a {
    0% { translate: -4% -5%; }
    50% { translate: 7% 9%; }
    100% { translate: -4% -5%; }
}

@keyframes pd-card-binary-drift-b {
    0% { translate: 8% 6%; }
    50% { translate: -7% -8%; }
    100% { translate: 8% 6%; }
}

@media (prefers-reduced-motion: reduce) {
    .pd-home-card::before,
    .pd-home-card::after {
        animation: none;
    }
}
