/* ==========================================================================
   Content Typography — Muuttohaukat
   Overrides and extensions for Tailwind Typography (.prose) inside
   the WordPress content area (.mh-gutenberg).
   ========================================================================== */

/* -------------------------------------------------------------------------
   Base prose overrides
   ------------------------------------------------------------------------- */
.mh-gutenberg.prose {
    color: #333333;
    line-height: 1.75;
    font-size: 1.0625rem;
}

/* Full-width content — remove the 65ch max that .prose applies */
.mh-gutenberg.max-w-none {
    max-width: none;
}

/* -------------------------------------------------------------------------
   Headings
   ------------------------------------------------------------------------- */
.mh-gutenberg h1 {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 1rem;
}

.mh-gutenberg h2 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.mh-gutenberg h3 {
    font-size: 1.375rem;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
}

.mh-gutenberg h4 {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* -------------------------------------------------------------------------
   Paragraphs
   ------------------------------------------------------------------------- */
.mh-gutenberg p {
    margin-top: 0;
    margin-bottom: 1.25em;
}

/* -------------------------------------------------------------------------
   Links
   ------------------------------------------------------------------------- */
.mh-gutenberg a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s ease;
}

.mh-gutenberg a:hover {
    color: #1d4ed8;
}

/* -------------------------------------------------------------------------
   Lists
   ------------------------------------------------------------------------- */
.mh-gutenberg ul {
    list-style-type: disc;
    padding-left: 1.75em;
    margin-top: 0.5em;
    margin-bottom: 1.25em;
}

.mh-gutenberg ol {
    list-style-type: decimal;
    padding-left: 1.75em;
    margin-top: 0.5em;
    margin-bottom: 1.25em;
}

.mh-gutenberg li {
    margin-top: 0.25em;
    margin-bottom: 0.25em;
}

.mh-gutenberg li > ul,
.mh-gutenberg li > ol {
    margin-top: 0.25em;
    margin-bottom: 0.25em;
}

/* Nested list styles */
.mh-gutenberg ul ul {
    list-style-type: circle;
}

.mh-gutenberg ul ul ul {
    list-style-type: square;
}

/* -------------------------------------------------------------------------
   Blockquotes
   ------------------------------------------------------------------------- */
.mh-gutenberg blockquote {
    border-left: 4px solid #e5e7eb;
    padding: 0.5em 1em;
    margin: 1.5em 0;
    font-style: italic;
    color: #4b5563;
}

.mh-gutenberg blockquote p:last-child {
    margin-bottom: 0;
}

/* -------------------------------------------------------------------------
   Tables
   ------------------------------------------------------------------------- */
.mh-gutenberg table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.9375rem;
}

.mh-gutenberg th,
.mh-gutenberg td {
    border: 1px solid #e5e7eb;
    padding: 0.625em 0.875em;
    text-align: left;
}

.mh-gutenberg th {
    background-color: #f9fafb;
    font-weight: 600;
}

.mh-gutenberg tr:nth-child(even) {
    background-color: #f9fafb;
}

/* -------------------------------------------------------------------------
   Code
   ------------------------------------------------------------------------- */
.mh-gutenberg code {
    background-color: #f3f4f6;
    padding: 0.125em 0.375em;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

.mh-gutenberg pre {
    background-color: #1f2937;
    color: #f9fafb;
    padding: 1em 1.25em;
    border-radius: 0.375rem;
    overflow-x: auto;
    margin: 1.5em 0;
    font-size: 0.875rem;
    line-height: 1.7;
}

.mh-gutenberg pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    color: inherit;
}

/* -------------------------------------------------------------------------
   Horizontal Rule
   ------------------------------------------------------------------------- */
.mh-gutenberg hr {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 2em 0;
}

/* -------------------------------------------------------------------------
   Images & Figures
   ------------------------------------------------------------------------- */
.mh-gutenberg img {
    max-width: 100%;
    height: auto;
    border-radius: 0.25rem;
}

.mh-gutenberg figure {
    margin: 1.5em 0;
}

.mh-gutenberg figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5em;
}

/* -------------------------------------------------------------------------
   WordPress Block overrides
   ------------------------------------------------------------------------- */

/* Gutenberg Columns */
.mh-gutenberg .wp-block-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5em;
}

.mh-gutenberg .wp-block-column {
    flex: 1 1 0%;
    min-width: 0;
}

/* Gutenberg Buttons */
.mh-gutenberg .wp-block-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5em;
}

.mh-gutenberg .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.mh-gutenberg .wp-block-button__link:hover {
    opacity: 0.9;
    text-decoration: none;
}

/* Gutenberg Separator */
.mh-gutenberg .wp-block-separator {
    border: 0;
    border-top: 2px solid #e5e7eb;
    margin: 2.5em auto;
    max-width: 100px;
}

.mh-gutenberg .wp-block-separator.is-style-wide {
    max-width: none;
}

/* Gutenberg Cover */
.mh-gutenberg .wp-block-cover {
    margin-bottom: 1.5em;
}

/* Gutenberg Gallery */
.mh-gutenberg .wp-block-gallery {
    margin: 1.5em 0;
}

/* Gutenberg Quote */
.mh-gutenberg .wp-block-quote cite {
    display: block;
    margin-top: 0.5em;
    font-size: 0.875rem;
    font-style: normal;
    color: #6b7280;
}

/* -------------------------------------------------------------------------
   WordPress Alignments
   ------------------------------------------------------------------------- */
.mh-gutenberg .alignwide {
    margin-left: -2rem;
    margin-right: -2rem;
    max-width: calc(100% + 4rem);
    width: calc(100% + 4rem);
}

.mh-gutenberg .alignfull {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: 100vw;
    width: 100vw;
}

.mh-gutenberg .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.mh-gutenberg .alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 0.5em;
}

.mh-gutenberg .alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 0.5em;
}

/* -------------------------------------------------------------------------
   WordPress Captions
   ------------------------------------------------------------------------- */
.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5em;
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .mh-gutenberg.prose {
        font-size: 1rem;
    }

    .mh-gutenberg h1 {
        font-size: 1.75rem;
    }

    .mh-gutenberg h2 {
        font-size: 1.5rem;
    }

    .mh-gutenberg h3 {
        font-size: 1.25rem;
    }

    .mh-gutenberg .alignwide {
        margin-left: -1rem;
        margin-right: -1rem;
        max-width: calc(100% + 2rem);
        width: calc(100% + 2rem);
    }

    .mh-gutenberg .wp-block-columns {
        flex-direction: column;
    }
}
