/**
 * Base Styles - Dailydishy Theme
 * Typography, links, forms, and foundational elements
 */

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

/* Body */
body {
    margin: 0;
    font-family: var(--dh-font-ui);
    color: var(--dh-text);
    background: var(--dh-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent horizontal scroll */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Links */
a {
    color: var(--dh-green);
    text-decoration: none;
    transition: color var(--dh-ease);
}

a:hover {
    color: var(--dh-green-dark);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--dh-font-serif);
    color: var(--dh-text);
    line-height: 1.3;
    margin: 0 0 0.5em;
}

/* Paragraphs */
p {
    margin: 0 0 1em;
}

/* Lists */
ul, ol {
    margin: 0 0 1em;
    padding-left: 1.5em;
}

li {
    margin-bottom: 0.25em;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--dh-green);
    color: var(--dh-white);
    padding: 8px 16px;
    z-index: 100000;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* Screen reader text */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Content overflow fixes */
.post-body,
.post-body *,
.entry-content,
.entry-content * {
    max-width: 100%;
    box-sizing: border-box;
}

.post-body iframe,
.entry-content iframe {
    max-width: 100%;
    width: 100%;
    height: auto;
    min-height: 200px;
    aspect-ratio: 16/9;
    border: none;
}

.post-body table,
.entry-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    width: 100%;
    border-collapse: collapse;
}

.post-body pre,
.entry-content pre {
    overflow-x: auto;
    max-width: 100%;
    white-space: pre-wrap;
    word-break: break-word;
}
