.asencat-press {
    --ap-accent: #d96f32;
    --ap-accent-dark: #ad4f1d;
    --ap-text: #252525;
    --ap-muted: #6d6d6d;
    --ap-border: rgba(37, 37, 37, .12);
    --ap-card: #ffffff;
    --ap-soft: #f4f1ec;
    width: 100%;
    max-width: 1180px;
    margin: clamp(36px, 6vw, 72px) auto clamp(80px, 10vw, 140px);
    padding: 0 clamp(16px, 3vw, 28px);
    color: var(--ap-text);
    background: transparent;
    font-family: inherit;
    text-align: center;
}

.asencat-press,
.asencat-press * {
    box-sizing: border-box;
}

.ap-notice {
    max-width: 860px;
    margin: 0 auto 28px;
    padding: 16px 20px;
    border: 1px solid;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.5;
}

.ap-notice-success {
    color: #195d2b;
    background: #edf8f0;
    border-color: #b6dfbf;
}

.ap-notice-error {
    color: #8d1d1d;
    background: #fff0f0;
    border-color: #e6bcbc;
}

.ap-notice-info {
    color: #234f73;
    background: #eef5fb;
    border-color: #bfd5e8;
}

.ap-access-panel {
    max-width: 860px;
    margin: 0 auto;
    padding: clamp(30px, 6vw, 64px);
    border: 1px solid var(--ap-border);
    border-radius: 30px;
    background: rgba(255, 255, 255, .78);
}

.ap-access-copy {
    max-width: 660px;
    margin: 0 auto 34px;
}

.ap-access-copy h2,
.ap-private-header h2 {
    margin: 10px 0 16px;
    margin-top: 25px !important;
    color: var(--ap-text);
    font-size: 25px;
    line-height: 1.08;
    letter-spacing: -.025em;
}

.ap-access-copy p,
.ap-private-header p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--ap-muted);
    font-size: 17px;
    line-height: 1.65;
}

.ap-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--ap-accent-dark);
    background: rgba(217, 111, 50, .12);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    line-height: 1;
    text-transform: uppercase;
}

.ap-access-form {
    max-width: 620px;
    margin: 0 auto;
    padding: clamp(24px, 4vw, 38px);
    border: 1px solid var(--ap-border);
    border-radius: 24px;
    background: var(--ap-card);
}

.ap-field {
    margin-bottom: 19px;
}

.ap-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--ap-text);
    font-weight: 700;
    text-align: center;
}

.ap-field input {
    width: 100%;
    min-height: 50px;
    padding: 12px 15px;
    border: 1px solid #cfcac3;
    border-radius: 14px;
    outline: none;
    background: #fff;
    color: var(--ap-text);
    font: inherit;
    text-align: center;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.ap-field input:focus {
    border-color: var(--ap-accent);
    box-shadow: 0 0 0 4px rgba(217, 111, 50, .13);
}

.ap-field small {
    display: block;
    margin-top: 7px;
    color: var(--ap-muted);
    font-size: 12px;
    line-height: 1.45;
}

.ap-button,
.ap-download,
.ap-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    border: 0;
    border-radius: 999px;
    background: var(--ap-accent);
    color: #fff !important;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform .18s ease, background-color .18s ease;
}

.ap-button {
    width: 100%;
    margin-top: 3px;
    font: inherit;
}

.ap-button:hover,
.ap-download:hover,
.ap-logout:hover {
    background: var(--ap-accent-dark);
    color: #fff !important;
    transform: translateY(-1px);
}

.ap-legal-block {
    margin: 6px 0 20px;
    padding: 18px;
    border: 1px solid var(--ap-border);
    border-radius: 16px;
    background: var(--ap-soft);
}

.ap-form-note,
.ap-privacy {
    margin: 15px 0 0 !important;
    color: var(--ap-muted) !important;
    font-size: 12px !important;
    line-height: 1.55 !important;
}

.ap-legal-block .ap-privacy {
    margin-top: 0 !important;
    text-align: center;
}

.ap-privacy a,
.ap-consent a {
    color: var(--ap-accent-dark);
    font-weight: 700;
}

.ap-consent {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
    color: var(--ap-text);
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
    cursor: pointer;
}

.ap-consent input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--ap-accent);
    cursor: pointer;
}

.ap-consent span {
    max-width: 470px;
}

.ap-honeypot {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.ap-private-area {
    width: 100%;
    padding: 0 0 16px;
    background: transparent;
}

.ap-private-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    max-width: 900px;
    margin: 0 auto 42px;
    padding: clamp(28px, 5vw, 48px);
    border: 1px solid var(--ap-border);
    border-radius: 28px;
    background: rgba(255, 255, 255, .72);
}

.ap-private-heading {
    width: 100%;
}

.ap-private-header h2 {
    margin-bottom: 12px;
}

.ap-private-header p {
    font-size: 15px;
}

.ap-logout {
    min-height: 42px;
    padding: 10px 18px;
    font-size: 14px;
}

.ap-files-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.ap-file-card {
    display: flex;
    min-width: 0;
    min-height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--ap-border);
    border-radius: 26px;
    background: var(--ap-card);
}

.ap-file-preview {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-bottom: 1px solid var(--ap-border);
    background: var(--ap-soft);
    text-decoration: none;
}

.ap-file-preview img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    transition: transform .25s ease;
}

.ap-file-preview:hover img {
    transform: scale(1.025);
}

.ap-file-type {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(37, 37, 37, .82);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
    line-height: 1;
}

.ap-file-content {
    display: flex;
    min-height: 245px;
    flex: 1;
    flex-direction: column;
    align-items: center;
    padding: 26px 24px 24px;
    text-align: center;
}

.ap-file-content h3 {
    margin: 0 0 11px;
    color: var(--ap-text);
    font-size: 21px;
    line-height: 1.25;
}

.ap-file-content p {
    margin: 0 0 18px;
    color: var(--ap-muted);
    font-size: 14px;
    line-height: 1.6;
}

.ap-file-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin: auto 0 18px;
    color: var(--ap-muted);
    font-size: 12px;
}

.ap-file-meta span + span::before {
    margin-right: 9px;
    content: "·";
}

.ap-download {
    min-height: 42px;
    padding: 10px 17px;
    font-size: 14px;
}

.ap-empty {
    max-width: 760px;
    margin: 0 auto;
    padding: 50px 26px;
    border: 1px solid var(--ap-border);
    border-radius: 26px;
    background: rgba(255, 255, 255, .72);
}

.ap-empty h3 {
    margin: 0 0 8px;
    color: var(--ap-text);
}

.ap-empty p {
    margin: 0;
    color: var(--ap-muted);
}

@media (max-width: 980px) {
    .ap-files-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    /*
     * El tema pot afegir marges i amplades màximes a la columna que conté
     * el shortcode. En mòbil fem sortir el plugin d'aquest límit perquè
     * aprofiti pràcticament tota l'amplada real de la pantalla.
     */
    .asencat-press {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        margin-top: 28px;
        margin-right: calc(50% - 50vw + 8px);
        margin-bottom: 90px;
        margin-left: calc(50% - 50vw + 8px);
        padding: 0;
    }

    .ap-access-panel,
    .ap-private-header {
        width: 100%;
        max-width: none;
        padding: 24px 10px;
        border-radius: 22px;
    }

    .ap-access-copy {
        width: 100%;
        max-width: none;
        margin-bottom: 25px;
        padding: 0 8px;
    }

    .ap-access-form {
        width: 100%;
        max-width: none;
        padding: 22px 14px;
        border-radius: 20px;
    }

    .ap-field input {
        min-width: 0;
    }

    .ap-legal-block {
        padding: 16px 13px;
    }

    .ap-files-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ap-file-card {
        width: 100%;
        max-width: 470px;
        margin: 0 auto;
        border-radius: 22px;
    }

    .ap-file-content {
        min-height: 0;
    }
}

@media (max-width: 420px) {
    .asencat-press {
        width: calc(100vw - 8px);
        max-width: calc(100vw - 8px);
        margin-right: calc(50% - 50vw + 4px);
        margin-left: calc(50% - 50vw + 4px);
    }

    .ap-access-panel,
    .ap-private-header {
        padding-right: 6px;
        padding-left: 6px;
    }

    .ap-access-form {
        padding: 20px 12px;
    }

    .ap-access-copy {
        padding-right: 6px;
        padding-left: 6px;
    }

    .ap-consent {
        gap: 8px;
    }
}
