/**
 * Base Typography & Minimal Styling
 * 
 * Áp dụng typography nhẹ, KHÔNG reset mạnh
 * KHÔNG set width, container, margin layout
 * An toàn cho cả standalone và child theme
 */

/* ===========================
   TYPOGRAPHY
   =========================== */

body {
    font-family: var(--woo-font-primary);
    font-size: var(--woo-font-size-base);
    font-weight: var(--woo-font-weight-normal);
    line-height: var(--woo-line-height-normal);
    color: var(--woo-color-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--woo-font-heading);
    font-weight: var(--woo-font-weight-semibold);
    line-height: var(--woo-line-height-tight);
    color: var(--woo-color-heading);
}

h1 {
    font-size: var(--woo-font-size-4xl);
}

h2 {
    font-size: var(--woo-font-size-3xl);
}

h3 {
    font-size: var(--woo-font-size-2xl);
}

h4 {
    font-size: var(--woo-font-size-xl);
}

h5 {
    font-size: var(--woo-font-size-lg);
}

h6 {
    font-size: var(--woo-font-size-base);
}

/* Paragraphs */
p {
    margin-bottom: var(--woo-spacing-md);
}

p:last-child {
    margin-bottom: 0;
}

/* Links */
a {
    color: var(--woo-color-primary);
    text-decoration: none;
    transition: color var(--woo-transition-fast);
}

a:hover {
    color: var(--woo-color-primary-dark);
}

/* Strong & Em */
strong, b {
    font-weight: var(--woo-font-weight-semibold);
}

em, i {
    font-style: italic;
}

/* Small Text */
small {
    font-size: var(--woo-font-size-sm);
    color: var(--woo-color-text-light);
}

/* Lists */
ul, ol {
    margin-bottom: var(--woo-spacing-md);
    padding-left: var(--woo-spacing-xl);
}

li {
    margin-bottom: var(--woo-spacing-xs);
}

/* Blockquotes */
blockquote {
    margin: var(--woo-spacing-lg) 0;
    padding-left: var(--woo-spacing-lg);
    border-left: 4px solid var(--woo-color-primary);
    font-style: italic;
    color: var(--woo-color-text-light);
}

/* Code */
code, pre {
    font-family: var(--woo-font-mono);
    font-size: var(--woo-font-size-sm);
}

code {
    background-color: var(--woo-color-bg-alt);
    padding: 0.125rem 0.25rem;
    border-radius: var(--woo-border-radius-sm);
}

pre {
    background-color: var(--woo-color-bg-alt);
    padding: var(--woo-spacing-md);
    border-radius: var(--woo-border-radius-md);
    overflow-x: auto;
    margin-bottom: var(--woo-spacing-md);
}

pre code {
    background-color: transparent;
    padding: 0;
}

/* HR */
hr {
    border: 0;
    border-top: var(--woo-border-width) solid var(--woo-color-border);
    margin: var(--woo-spacing-xl) 0;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
}

/* ===========================
   WORDPRESS SPECIFIC
   =========================== */

/* WordPress Alignment Classes */
.alignleft {
    float: left;
    margin-right: var(--woo-spacing-lg);
    margin-bottom: var(--woo-spacing-md);
}

.alignright {
    float: right;
    margin-left: var(--woo-spacing-lg);
    margin-bottom: var(--woo-spacing-md);
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--woo-spacing-md);
}

/* WordPress Caption */
.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: var(--woo-font-size-sm);
    color: var(--woo-color-text-light);
    margin-top: var(--woo-spacing-sm);
    text-align: center;
}

/* Screen Reader Text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--woo-color-bg-alt);
    border-radius: var(--woo-border-radius-sm);
    clip: auto !important;
    clip-path: none;
    color: var(--woo-color-text);
    display: block;
    font-size: var(--woo-font-size-sm);
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ===========================
   RESPONSIVE TYPOGRAPHY
   =========================== */

@media (max-width: 768px) {
    h1 {
        font-size: var(--woo-font-size-3xl);
    }
    
    h2 {
        font-size: var(--woo-font-size-2xl);
    }
    
    h3 {
        font-size: var(--woo-font-size-xl);
    }
}
