/**
 * Base Styles & Reset
 * Testing With Renata Theme
 * 
 * Modern CSS reset and foundational styles.
 */

/* ================================
   CSS RESET
   ================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

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

/* Remove default link styles */
a {
    color: inherit;
    text-decoration: none;
}

/* Remove default button styles */
button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

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

/* Remove built-in form typography styles */
input,
button,
textarea,
select {
    font: inherit;
}

/* Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

/* Remove default table styles */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* Remove default fieldset styles */
fieldset {
    border: none;
}

/* ================================
   TYPOGRAPHY
   ================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

h1 {
    font-size: var(--text-5xl);
    letter-spacing: var(--tracking-tight);
}

/* Display Font - Averox (use sparingly, always lowercase) */
.font-display,
.display-title {
    font-family: var(--font-display);
    text-transform: lowercase;
    letter-spacing: var(--tracking-wide);
}

h2 {
    font-size: var(--text-4xl);
    letter-spacing: var(--tracking-tight);
}

h3 {
    font-size: var(--text-3xl);
}

h4 {
    font-size: var(--text-2xl);
}

h5 {
    font-size: var(--text-xl);
}

h6 {
    font-size: var(--text-lg);
}

p {
    margin-bottom: var(--space-4);
    color: var(--text-secondary);
}

p:last-child {
    margin-bottom: 0;
}

/* Links */
a {
    color: var(--accent-blue);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-blue-hover);
}

/* Strong/Bold */
strong,
b {
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}

/* Emphasis/Italic */
em,
i {
    font-style: italic;
}

/* Small text */
small {
    font-size: var(--text-sm);
}

/* Code & Pre */
code,
kbd,
samp,
pre {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
}

code {
    padding: var(--space-1) var(--space-2);
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    color: var(--accent-cyan);
}

pre {
    padding: var(--space-4);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    overflow-x: auto;
}

pre code {
    padding: 0;
    background: none;
    border-radius: 0;
}

/* Blockquote */
blockquote {
    padding: var(--space-4) var(--space-6);
    margin: var(--space-6) 0;
    border-left: 4px solid var(--accent-purple);
    background-color: var(--bg-secondary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

blockquote p {
    color: var(--text-primary);
    font-style: italic;
}

/* Horizontal Rule */
hr {
    border: none;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--border-default) 20%,
        var(--border-default) 80%,
        transparent
    );
    margin: var(--space-8) 0;
}

/* Selection */
::selection {
    background-color: var(--accent-purple);
    color: var(--text-primary);
}

/* Focus styles */
:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* ================================
   LAYOUT CONTAINERS
   ================================ */

.container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-sm {
    max-width: var(--container-sm);
}

.container-md {
    max-width: var(--container-md);
}

.container-lg {
    max-width: var(--container-lg);
}

.container-2xl {
    max-width: var(--container-2xl);
}

/* Full width sections */
.full-width {
    width: 100%;
    padding: 0 var(--space-6);
}

/* ================================
   SITE STRUCTURE
   ================================ */

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
    padding: var(--space-12) 0;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    z-index: var(--z-tooltip);
    padding: var(--space-3) var(--space-4);
    background-color: var(--accent-green);
    color: var(--text-inverse);
    font-weight: var(--font-medium);
    border-radius: var(--radius-md);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-4);
}

/* ================================
   UTILITY CLASSES
   ================================ */

/* Screen reader only */
.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;
}

.screen-reader-text:focus {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Text alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Flexbox utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Visibility */
.hidden { display: none; }
.visible { visibility: visible; }
.invisible { visibility: hidden; }

/* ================================
   WORDPRESS SPECIFIC
   ================================ */

/* Alignments */
.alignleft {
    float: left;
    margin-right: var(--space-6);
    margin-bottom: var(--space-4);
}

.alignright {
    float: right;
    margin-left: var(--space-6);
    margin-bottom: var(--space-4);
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-4);
}

.alignwide {
    max-width: calc(100% + var(--space-12));
    margin-left: calc(-1 * var(--space-6));
    margin-right: calc(-1 * var(--space-6));
}

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

/* WordPress galleries */
.wp-block-gallery {
    margin-bottom: var(--space-6);
}

/* WordPress captions */
.wp-caption {
    max-width: 100%;
    margin-bottom: var(--space-4);
}

.wp-caption-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-align: center;
    padding-top: var(--space-2);
}

/* WordPress embeds */
.wp-block-embed {
    margin-bottom: var(--space-6);
}

.wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Pagination */
.navigation.pagination {
    margin-top: var(--space-12);
    text-align: center;
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: var(--space-2) var(--space-4);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: var(--font-medium);
    transition: all var(--transition-fast);
}

.page-numbers:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.page-numbers.current {
    background-color: var(--accent-green);
    border-color: var(--accent-green);
    color: var(--text-inverse);
}

.page-numbers .nav-arrow {
    font-size: var(--text-lg);
}

/* ================================
   PRINT STYLES
   ================================ */

@media print {
    body {
        background: white;
        color: black;
    }
    
    .site-header,
    .site-footer,
    .navigation,
    .comments-area {
        display: none;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
}


