/**
 * CSS Reset and Base Styles
 * Modern CSS reset with best practices
 * 
 * @package EHF
 * @since 1.0.0
 */

/* Box sizing border-box for all elements */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Remove default margin and padding */
* {
    margin: 0;
    padding: 0;
}

/* Improve text rendering */
html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

/* Body defaults */
body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-family: var(--ehf-font-family);
    background-color: var(--ehf-background-color);
    color: var(--ehf-text-color);
    font-size: var(--ehf-font-size-base); /* 15px */
}

/* Typography - Headings with Playfair Display */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--ehf-font-family-headings);
    font-weight: var(--ehf-font-weight-semibold);
    line-height: 1.2;
    margin-bottom: 0.5em;
    font-size: var(--ehf-font-size-xl); /* 20px for all headings */
}

/* Typography - Content with Work Sans */
p, li, span, div:not(.wp-block-group):not(.hero-post):not(.post-card), 
td, th, blockquote, figcaption, article, section {
    font-family: var(--ehf-font-family);
    font-size: var(--ehf-font-size-base); /* 15px */
    line-height: 1.6;
}

p {
    margin-bottom: 1em;
}

/* Media elements */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Form elements */
input, button, textarea, select {
    font: inherit;
    color: inherit;
}

/* Remove button styles */
button {
    background: none;
    border: none;
    cursor: pointer;
}

/* List styles */
ul, ol {
    list-style: none;
}

/* Link styles */
a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Table styles */
table {
    border-collapse: collapse;
    width: 100%;
}

/* Accessibility improvements */
*:focus {
    outline: none;
}

/* Print styles */
@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
}
/* Remove WordPress gallery figcaption blur overlay */
.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption)::before {
    content: none;
}

/* Override WordPress gallery figcaption styles */
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
    color: inherit;
    overflow: visible;
    padding: 0;
    text-align: inherit;
    text-shadow: none;
    background: none;
}

/* Single image figcaption — match gallery style */
.wp-block-image :where(figcaption) {
    text-align: left;
    margin-top: -1.5em;
    font-size: 13px;
}
