/* Diseño moderno y aislado para entradas individuales. */
body.atde-modern-single {
    background: #fff;
    color: var(--atde-dark);
}

body.atde-modern-single #content,
body.atde-modern-single .site-content,
body.atde-modern-single .content-area,
body.atde-modern-single .site-main {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
}

.atde-site-main,
.atde-site-main * {
    box-sizing: border-box;
}

.atde-site-main {
    font-family: inherit;
    color: var(--atde-dark);
    background: #fff;
}

.atde-container {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.atde-hero {
    position: relative;
    overflow: hidden;
    padding: 74px 0 82px;
    background:
        radial-gradient(circle at 82% 30%, rgba(17, 71, 166, .15), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #f7f9fd 55%, #edf3fc 100%);
    border-top: 1px solid #edf1f7;
    border-bottom: 1px solid #dfe7f2;
}

.atde-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 32px;
    color: #66758b;
    font-size: 14px;
}

.atde-breadcrumb a {
    color: var(--atde-primary);
    text-decoration: none;
    font-weight: 700;
}

.atde-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr);
    gap: 64px;
    align-items: center;
}

.atde-category,
.atde-eyebrow {
    display: inline-flex;
    align-items: center;
    margin: 0 0 16px;
    color: var(--atde-primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
}

.atde-category::before,
.atde-eyebrow::before {
    content: '';
    width: 28px;
    height: 3px;
    margin-right: 10px;
    border-radius: 99px;
    background: var(--atde-accent);
}

.atde-post-title {
    max-width: 880px;
    margin: 0;
    color: var(--atde-dark);
    font-size: clamp(38px, 5.3vw, 66px);
    line-height: 1.04;
    letter-spacing: -.04em;
    font-weight: 800;
    text-wrap: balance;
}

.atde-lead {
    max-width: 790px;
    margin: 24px 0 0;
    color: #46566e;
    font-size: clamp(18px, 2vw, 21px);
    line-height: 1.72;
}

.atde-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 26px;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
}

.atde-hero-card {
    position: relative;
    min-height: 340px;
    border-radius: 42% 58% 50% 50% / 52% 40% 60% 48%;
    background: linear-gradient(145deg, #0e3f96, #174faa);
    box-shadow: 0 30px 60px rgba(17, 71, 166, .2);
}

.atde-doc-illustration {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 180px;
    height: 225px;
    padding: 52px 28px;
    transform: translate(-45%, -50%) rotate(7deg);
    border-radius: 16px;
    background: #fff;
    box-shadow: -38px 20px 0 rgba(205, 217, 237, .85), 0 24px 45px rgba(8, 24, 54, .25);
}

.atde-doc-line {
    display: block;
    height: 8px;
    margin: 15px 0;
    border-radius: 8px;
    background: #dce5f2;
}

.atde-doc-line-accent {
    width: 68%;
    background: var(--atde-accent);
}

.atde-doc-line-short { width: 72%; }

.atde-check {
    position: absolute;
    right: 10%;
    top: 16%;
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    border-radius: 22px;
    color: #10a05a;
    background: #fff;
    font-size: 39px;
    font-weight: 800;
    box-shadow: 0 18px 35px rgba(8, 24, 54, .16);
}

.atde-badge {
    position: absolute;
    left: 4%;
    bottom: 8%;
    display: grid;
    width: 110px;
    height: 110px;
    place-items: center;
    border-radius: 50%;
    color: var(--atde-dark);
    background: var(--atde-accent);
    font-size: 21px;
    font-weight: 900;
    box-shadow: 0 18px 35px rgba(8, 24, 54, .2);
}

.atde-content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 42px;
    align-items: start;
    padding-top: 64px;
    padding-bottom: 76px;
}

.atde-content-layout.atde-no-sidebar {
    display: block;
    max-width: 930px;
}

.atde-article {
    min-width: 0;
    padding: clamp(28px, 5vw, 62px);
    border: 1px solid #e4eaf3;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(15, 35, 69, .07);
}

.atde-featured-image {
    overflow: hidden;
    margin: 0 0 36px;
    border-radius: 18px;
    background: #eaf0f8;
}

.atde-featured-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
}

.atde-toc {
    margin: 0 0 38px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #dce5f2;
    border-radius: 16px;
    background: var(--atde-light);
}

.atde-toc-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border: 0;
    color: var(--atde-dark);
    background: transparent;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.atde-toc-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--atde-primary);
}

.atde-toc ol {
    margin: 0;
    padding: 0 22px 20px 43px;
}

.atde-toc li {
    margin: 7px 0;
    color: #63738a;
}

.atde-toc a {
    color: #38506f;
    text-decoration: none;
    line-height: 1.5;
}

.atde-toc a:hover { color: var(--atde-primary); }
.atde-toc.is-collapsed ol { display: none; }

.atde-entry-content {
    color: #37475e;
    font-size: 18px;
    line-height: 1.86;
    overflow-wrap: anywhere;
}

.atde-entry-content > *:first-child { margin-top: 0; }

.atde-entry-content p {
    margin: 0 0 1.35em;
}

.atde-entry-content h2,
.atde-entry-content h3,
.atde-entry-content h4 {
    color: var(--atde-dark);
    line-height: 1.22;
    letter-spacing: -.02em;
    text-wrap: balance;
    scroll-margin-top: 110px;
}

.atde-entry-content h2 {
    position: relative;
    margin: 2.2em 0 .75em;
    padding-top: 18px;
    font-size: clamp(28px, 3.3vw, 39px);
}

.atde-entry-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 52px;
    height: 4px;
    border-radius: 99px;
    background: var(--atde-accent);
}

.atde-entry-content h3 {
    margin: 1.75em 0 .65em;
    font-size: clamp(23px, 2.6vw, 30px);
}

.atde-entry-content h4 {
    margin: 1.5em 0 .55em;
    font-size: 21px;
}

.atde-entry-content a {
    color: var(--atde-primary);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.atde-entry-content ul,
.atde-entry-content ol {
    margin: 0 0 1.5em;
    padding-left: 1.4em;
}

.atde-entry-content li {
    margin: .45em 0;
    padding-left: .25em;
}

.atde-entry-content li::marker {
    color: var(--atde-primary);
    font-weight: 800;
}

.atde-entry-content blockquote {
    margin: 2em 0;
    padding: 24px 26px;
    border: 0;
    border-left: 5px solid var(--atde-accent);
    border-radius: 0 14px 14px 0;
    color: #2d405d;
    background: #f7f9fc;
    font-size: 1.08em;
}

.atde-entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
}

.atde-entry-content figure {
    max-width: 100%;
    margin: 2em 0;
}

.atde-entry-content figcaption {
    margin-top: 8px;
    color: #718096;
    font-size: 14px;
    text-align: center;
}

.atde-entry-content table {
    width: 100%;
    margin: 2em 0;
    border-collapse: collapse;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid #dfe6f0;
    border-radius: 12px;
    font-size: 16px;
}

.atde-entry-content th,
.atde-entry-content td {
    padding: 14px 16px;
    border: 1px solid #dfe6f0;
    text-align: left;
    vertical-align: top;
}

.atde-entry-content th {
    color: #fff;
    background: var(--atde-primary);
}

.atde-entry-content tr:nth-child(even) td { background: #f8fafc; }

.atde-entry-content .wp-block-button__link,
.atde-entry-content button,
.atde-entry-content input[type="submit"] {
    border-radius: 10px;
}

.atde-sidebar-sticky {
    position: sticky;
    top: 120px;
    display: grid;
    gap: 24px;
}

.atde-contact-card,
.atde-services-card {
    padding: 28px;
    border-radius: 20px;
}

.atde-contact-card {
    color: #fff;
    background: linear-gradient(145deg, #0f397f, var(--atde-primary));
    box-shadow: 0 22px 45px rgba(17, 71, 166, .22);
}

.atde-contact-card .atde-eyebrow {
    color: #fff;
    opacity: .9;
}

.atde-contact-card h2,
.atde-services-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
    line-height: 1.2;
}

.atde-contact-card p:not(.atde-eyebrow) {
    margin: 0 0 22px;
    color: rgba(255,255,255,.86);
    line-height: 1.65;
}

.atde-services-card {
    border: 1px solid #e1e8f2;
    background: #fff;
    box-shadow: 0 14px 38px rgba(15, 35, 69, .07);
}

.atde-services-card ul {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.atde-services-card li {
    position: relative;
    padding-left: 28px;
    color: #4b5d75;
    line-height: 1.45;
}

.atde-services-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: #13a660;
    font-weight: 900;
}

.atde-btn {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    border-radius: 10px;
    font-weight: 800;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.atde-btn:hover {
    transform: translateY(-2px);
}

.atde-btn-primary {
    color: #fff;
    background: var(--atde-primary);
    box-shadow: 0 12px 24px rgba(17, 71, 166, .22);
}

.atde-contact-card .atde-btn-primary {
    color: var(--atde-dark);
    background: var(--atde-accent);
    box-shadow: none;
}

.atde-btn-block { width: 100%; }

.atde-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-top: 46px;
    padding-top: 26px;
    border-top: 1px solid #e5ebf3;
    color: #53657d;
}

.atde-tags a {
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--atde-primary);
    background: #eef4fd;
    font-size: 14px;
    text-decoration: none;
    font-weight: 700;
}

.atde-inline-cta {
    display: flex;
    gap: 30px;
    align-items: center;
    justify-content: space-between;
    margin-top: 48px;
    padding: 30px;
    border: 1px solid #dbe5f2;
    border-radius: 18px;
    background: linear-gradient(135deg, #f8faff, #edf4ff);
}

.atde-inline-cta h2 {
    margin: 0 0 10px;
    color: var(--atde-dark);
    font-size: 28px;
}

.atde-inline-cta p:not(.atde-eyebrow) {
    max-width: 650px;
    margin: 0;
    color: #52647b;
    line-height: 1.65;
}

.atde-related {
    padding: 76px 0 90px;
    background: var(--atde-light);
    border-top: 1px solid #e2e8f1;
}

.atde-section-heading {
    max-width: 720px;
    margin-bottom: 34px;
}

.atde-section-heading h2 {
    margin: 0;
    color: var(--atde-dark);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.12;
}

.atde-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.atde-related-card {
    overflow: hidden;
    border: 1px solid #dde5f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 35, 69, .07);
}

.atde-related-image {
    display: block;
    height: 190px;
    overflow: hidden;
    background: linear-gradient(135deg, #123e8c, #1e5cc3);
}

.atde-related-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.atde-related-card:hover .atde-related-image img { transform: scale(1.04); }

.atde-related-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: #fff;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: .08em;
}

.atde-related-body { padding: 24px; }

.atde-related-body h3 {
    margin: 0 0 12px;
    font-size: 22px;
    line-height: 1.3;
}

.atde-related-body h3 a {
    color: var(--atde-dark);
    text-decoration: none;
}

.atde-related-body p {
    margin: 0 0 18px;
    color: #607188;
    line-height: 1.6;
}

.atde-read-more {
    color: var(--atde-primary);
    text-decoration: none;
    font-weight: 800;
}

@media (max-width: 1020px) {
    .atde-hero-grid {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 36px;
    }

    .atde-hero-card { min-height: 290px; }

    .atde-content-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 26px;
    }
}

@media (max-width: 860px) {
    .atde-hero { padding: 54px 0 64px; }
    .atde-hero-grid { grid-template-columns: 1fr; }
    .atde-hero-card { display: none; }

    .atde-content-layout {
        grid-template-columns: 1fr;
        padding-top: 36px;
    }

    .atde-sidebar-sticky { position: static; }
    .atde-sidebar { order: -1; }

    .atde-contact-card {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 12px 20px;
        align-items: center;
    }

    .atde-contact-card .atde-eyebrow,
    .atde-contact-card h2,
    .atde-contact-card p { grid-column: 1; }
    .atde-contact-card .atde-btn { grid-column: 2; grid-row: 1 / 4; }
    .atde-services-card { display: none; }

    .atde-related-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .atde-container { width: min(100% - 24px, 1180px); }
    .atde-hero { padding: 38px 0 48px; }
    .atde-breadcrumb { margin-bottom: 22px; font-size: 12px; }
    .atde-post-title { font-size: clamp(34px, 11vw, 48px); }
    .atde-lead { font-size: 17px; line-height: 1.65; }
    .atde-content-layout { padding-bottom: 52px; }
    .atde-article { padding: 24px 18px; border-radius: 16px; }
    .atde-entry-content { font-size: 17px; line-height: 1.78; }
    .atde-entry-content h2 { font-size: 29px; }
    .atde-entry-content h3 { font-size: 24px; }
    .atde-inline-cta { align-items: stretch; flex-direction: column; padding: 24px; }
    .atde-inline-cta .atde-btn { width: 100%; }

    .atde-contact-card {
        display: block;
        padding: 24px;
    }
    .atde-contact-card .atde-btn { width: 100%; }

    .atde-related { padding: 56px 0 66px; }
    .atde-related-grid { grid-template-columns: 1fr; }
    .atde-related-image { height: 210px; }

    .atde-entry-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media print {
    .atde-sidebar,
    .atde-inline-cta,
    .atde-related,
    .atde-toc,
    .atde-hero-card { display: none !important; }

    .atde-hero { padding: 20px 0; background: #fff; }
    .atde-content-layout { display: block; }
    .atde-article { border: 0; box-shadow: none; padding: 0; }
}
