/* =========================================================
   AlterEstate — Help Scout Docs Theme
   Tipografía y espaciado optimizados para lectura cómoda
   ========================================================= */

/* ---------- Base ---------- */
body {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: #2d3748;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

strong, b {
    color: #1a202c;
    font-weight: 600;
}

/* ---------- Header / Search ---------- */
#docsSearch {
    background: #005d4d;
    color: #fff;
}

#docsSearch h1 {
    font-weight: 500;
    font-size: 1.5rem;
}

#searchBar button {
    background: #BED35B;
    color: black;
    border: #BED35B;
    text-shadow: none;
    top: 32px;
}

#searchBar button:hover {
    background: #9EB444;
    border: #9EB444;
}

/* ---------- Brand / Layout ---------- */
.brand {
    padding: 10px 0 !important;
}

.brand img {
    width: 100%;
    height: 50px;
}

.container-fluid {
    max-width: 1200px;
}

/* ---------- Category cards (homepage) ---------- */
.category-list {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 20px !important;
    align-items: stretch;
}

.category-list .category {
    background: #fff;
    border-radius: 10px;
    padding: 2em 1.25em;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    width: auto !important;
    max-width: none !important;
    float: none !important;
    margin: 0 !important;
    box-sizing: border-box;
    display: flex !important;
    flex-direction: column;
}

.category-list .category h3 {
    font-weight: 500;
}

.category-list .category:hover {
    background: #fff !important;
    box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.08);
}

@media screen and (max-width: 900px) {
    .category-list {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media screen and (max-width: 600px) {
    .category-list {
        grid-template-columns: 1fr !important;
    }

    .category-list .category {
        margin-bottom: 0 !important;
    }
}

/* ---------- Page titles ---------- */
h1.title {
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.6em;
}

#categoryHead h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: 1.3rem;
}

/* ---------- Article: typography rhythm ---------- */
/* This is the key section — fixes "too spacious / unfriendly" feel */
#fullArticle {
    font-size: 16px;
    line-height: 1.7;
    color: #2d3748;
}

/* Paragraphs: comfortable line-height + balanced spacing */
#fullArticle p {
    font-size: 16px;
    line-height: 1.7;
    margin: 0 0 1em;
}

/* Headings — more space above, less below (sticks to its content) */
#fullArticle h2 {
    font-weight: 700;
    font-size: 24px;
    line-height: 1.3;
    color: #1a202c;
    margin: 2em 0 0.5em;
}

#fullArticle h3 {
    font-weight: 600;
    font-size: 19px;
    line-height: 1.35;
    color: #1a202c;
    margin: 1.6em 0 0.4em;
}

#fullArticle h4 {
    font-weight: 600;
    font-size: 17px;
    line-height: 1.4;
    color: #1a202c;
    margin: 1.4em 0 0.35em;
}

/* First child should not push content down */
#fullArticle > h2:first-child,
#fullArticle > h3:first-child,
#fullArticle > h4:first-child {
    margin-top: 0;
}

/* Lists — tight between items, enough air to breathe */
#fullArticle ul,
#fullArticle ol {
    margin: 0.5em 0 1.1em;
    padding-left: 1.5em;
}

#fullArticle li {
    font-size: 16px;
    line-height: 1.65;
    margin-bottom: 0.35em;
}

/* Fix: <p> inside <li> was adding too much space (was 1em) */
#fullArticle li > p {
    margin-bottom: 0.35em;
}

#fullArticle li:last-child {
    margin-bottom: 0;
}

/* Nested lists — keep tight */
#fullArticle li ul,
#fullArticle li ol {
    margin: 0.35em 0;
}

/* ---------- Links ---------- */
#fullArticle a {
    color: #005d4d;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

#fullArticle a:hover {
    color: #10b981;
}

/* ---------- Inline code ---------- */
#fullArticle code {
    background: #f3f4f6;
    color: #1a202c;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
}

/* ---------- Code blocks ---------- */
#fullArticle pre {
    background: #1a202c;
    color: #e2e8f0;
    padding: 1em 1.25em;
    border-radius: 8px;
    margin: 1.25em 0;
    overflow-x: auto;
    line-height: 1.55;
    font-size: 14px;
}

#fullArticle pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

/* ---------- Blockquotes ---------- */
#fullArticle blockquote {
    border-left: 3px solid #10b981;
    background: #f9fafb;
    padding: 0.75em 1em;
    margin: 1.2em 0;
    color: #4b5563;
    border-radius: 0 6px 6px 0;
}

#fullArticle blockquote p {
    margin: 0;
}

/* ---------- Images ---------- */
#fullArticle img {
    border-radius: 6px;
    margin: 1em 0;
    max-width: 100%;
    height: auto;
}

/* ---------- Tables ---------- */
#fullArticle table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.25em 0;
    font-size: 15px;
}

#fullArticle th,
#fullArticle td {
    border: 1px solid #e5e7eb;
    padding: 0.6em 0.85em;
    text-align: left;
    line-height: 1.5;
    vertical-align: top;
}

#fullArticle th {
    background: #f9fafb;
    font-weight: 600;
    color: #1a202c;
}

/* ---------- Horizontal rule ---------- */
#fullArticle hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 2em 0;
}

/* ---------- AE Callouts ---------- */
.ae-callout {
    padding: 14px 18px;
    margin: 1.25em 0;
    border-radius: 6px;
    background-color: #ecfdf5;
    border-left: 4px solid #10b981;
}

.ae-callout-title {
    font-weight: 600;
    color: #065f46;
    font-size: 1.05rem !important;
    margin: 0 0 0.5rem !important;
}

.ae-callout-text {
    color: #064e3b;
    margin: 0;
    line-height: 1.6;
}

.ae-callout p:last-child {
    margin-bottom: 0;
}

.ae-callout--warning {
    background-color: #fffbeb;
    border-left: 4px solid #f59e0b;
}

.ae-callout--warning .ae-callout-title {
    color: #92400e;
}

.ae-callout--warning .ae-callout-text {
    color: #78350f;
}

/* ---------- AE Cards ---------- */
.ae-cards {
    display: flex;
    gap: 20px;
    margin: 1.5em 0;
    flex-wrap: wrap;
}

.ae-card {
    flex: 1;
    min-width: 260px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

.ae-card-title {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #065f46 !important;
    margin: 0 0 0.5rem !important;
}

.ae-card-text {
    line-height: 1.6 !important;
    margin: 0 0 1rem !important;
    color: #4b5563;
}

.ae-card-cta {
    margin-top: auto;
    display: inline-block;
    background-color: #10b981;
    color: #ffffff !important;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.15s ease;
}

.ae-card-cta:hover {
    background-color: #059669;
    color: #ffffff !important;
}

/* ---------- Utilities ---------- */
.noborder {
    border: 0 !important;
}
#sidebar .nav-list a {
    font-size: 1rem;
}
.articleList a {
    font-size: 1.1rem;
}