/* public_html/css/blog.css */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..700;1,9..144,300..700&display=swap');

.cm-content {
    font-family: 'Inter', sans-serif;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: #262626; /* neutral-800 */
    max-width: 68ch;
    margin-left: auto;
    margin-right: auto;
}

.cm-content h1, .cm-content h2, .cm-content h3, .cm-content h4 {
    font-family: 'Fraunces', serif;
    color: #2F4E42;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.cm-content h2 { font-size: 1.875rem; font-weight: 700; position: relative; }
.cm-content h3 { font-size: 1.5rem; font-weight: 600; position: relative; }
.cm-content h4 { font-size: 1.25rem; font-weight: 600; position: relative; }
.cm-content p { margin-bottom: 1.5rem; }
.cm-content ul, .cm-content ol { margin-bottom: 1.5rem; padding-left: 1.5rem; }
.cm-content ul { list-style-type: disc; }
.cm-content ol { list-style-type: decimal; }
.cm-content li { margin-bottom: 0.5rem; }
.cm-content a { color: #AD6E45; text-decoration: underline; text-underline-offset: 2px; }
.cm-content a:hover { color: #2F4E42; }

/* Heading Permalinks (#) */
.cm-content h2,
.cm-content h3,
.cm-content h4 {
    position: relative;
}

.cm-heading-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Callouts */
.cm-callout {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 1rem; /* 2xl */
    margin: 2rem 0;
    border: 1px solid #e5e5e5;
}
.cm-callout--blue { background-color: #eff6ff; border-color: #bfdbfe; }
.cm-callout--yellow { background-color: #fefce8; border-color: #fef08a; }
.cm-callout--green { background-color: #f0fdf4; border-color: #bbf7d0; }
.cm-callout--red { background-color: #fef2f2; border-color: #fecaca; }
.cm-callout--gray { background-color: #f8fafc; border-color: #e2e8f0; }

.cm-callout-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cm-callout-content p:last-child { margin-bottom: 0; }

/* Pull Quotes */
.cm-pullquote {
    margin: 2.5rem 0;
    padding-left: 1.5rem;
    border-left: 3px solid #2F4E42; /* verde-oscuro */
}
.cm-pullquote blockquote {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    font-style: italic;
    color: #2F4E42;
    margin-bottom: 0.75rem;
}
.cm-pullquote figcaption {
    font-size: 0.875rem;
    color: #737373; /* neutral-500 */
    font-weight: 500;
}

/* Columns */
.cm-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 2rem 0;
}
@media (min-width: 768px) {
    .cm-columns { grid-template-columns: repeat(2, 1fr); }
}

/* Toggle */
.cm-toggle {
    margin: 1.5rem 0;
    border: 1px solid #e5e5e5;
    border-radius: 0.5rem;
    background: #fff;
}
.cm-toggle summary {
    padding: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none; /* Hide default marker */
}
.cm-toggle summary::-webkit-details-marker { display: none; }
.cm-toggle[open] summary i { transform: rotate(180deg); }
.cm-toggle-content {
    padding: 0 1rem 1rem 1rem;
    color: #525252;
}
.cm-toggle-content p:last-child { margin-bottom: 0; }

/* Table Wrapper */
.cm-table-wrap {
    overflow-x: auto;
    margin: 2rem 0;
}
.cm-table-wrap table {
    width: 100%;
    border-collapse: collapse;
}
.cm-table-wrap th, .cm-table-wrap td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e5e5;
    text-align: left;
}
.cm-table-wrap th { background: #f8fafc; font-weight: 600; }

/* Code blocks */
.cm-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.875rem;
}
.cm-content code {
    background: #f1f5f9;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    color: #0f172a;
}
.cm-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}
