/*
Theme Name: EnfermaNews
Theme URI: https://enfermanews.com.br
Author: EnfermaNews Team
Author URI: https://enfermanews.com.br
Description: Tema WordPress profissional, leve e otimizado para blog de enfermagem. Compatível com Elementor Pro Theme Builder. Design clean com paleta de cores médica e tipografia moderna.
Version: 1.0.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: enfermanews
Tags: blog, news, health, nursing, one-column, two-columns, custom-colors, custom-logo, custom-menu, editor-style, featured-images, footer-widgets, post-formats, theme-options, translation-ready, elementor
*/

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */

:root {
    /* Colors */
    --color-primary: #059669;
    --color-primary-dark: #047857;
    --color-primary-darker: #065F46;
    --color-primary-light: #D1FAE5;
    --color-primary-lighter: #ECFDF5;
    --color-accent: #0D9488;
    --color-accent-light: #CCFBF1;

    /* Neutrals */
    --color-bg: #FAFBFC;
    --color-surface: #F1F5F9;
    --color-surface-hover: #E8EDF2;
    --color-text-primary: #1E293B;
    --color-text-secondary: #64748B;
    --color-text-muted: #94A3B8;
    --color-border: #E2E8F0;
    --color-border-light: #F1F5F9;

    /* Semantic */
    --color-error: #EF4444;
    --color-warning: #F59E0B;
    --color-success: #10B981;
    --color-info: #3B82F6;

    /* Typography */
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Font Sizes (fluid) */
    --text-xs: clamp(0.694rem, 0.05vw + 0.68rem, 0.72rem);
    --text-sm: clamp(0.833rem, 0.09vw + 0.81rem, 0.9rem);
    --text-base: clamp(1rem, 0.15vw + 0.96rem, 1.125rem);
    --text-lg: clamp(1.2rem, 0.24vw + 1.14rem, 1.406rem);
    --text-xl: clamp(1.44rem, 0.38vw + 1.35rem, 1.758rem);
    --text-2xl: clamp(1.728rem, 0.57vw + 1.59rem, 2.197rem);
    --text-3xl: clamp(2.074rem, 0.84vw + 1.87rem, 2.747rem);
    --text-4xl: clamp(2.488rem, 1.22vw + 2.19rem, 3.433rem);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Layout */
    --container-max: 1200px;
    --container-narrow: 800px;
    --sidebar-width: 320px;
    --header-height: 72px;

    /* Borders & Shadows */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;

    /* Z-index scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-toast: 500;
}

/* ==========================================================================
   CSS Reset (Modern, Minimal)
   ========================================================================== */

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

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

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--color-text-primary);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

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

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.25;
    font-weight: 700;
    color: var(--color-text-primary);
    overflow-wrap: break-word;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); font-weight: 600; }

p {
    overflow-wrap: break-word;
    margin-bottom: var(--space-md);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

ul, ol {
    list-style-position: inside;
    margin-bottom: var(--space-md);
}

blockquote {
    border-left: 4px solid var(--color-primary);
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-lg) 0;
    background-color: var(--color-primary-lighter);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--color-text-secondary);
}

pre,
code {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

code {
    background-color: var(--color-surface);
    padding: 0.15em 0.4em;
    border-radius: var(--radius-sm);
}

pre {
    background-color: var(--color-text-primary);
    color: #E2E8F0;
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin-bottom: var(--space-lg);
}

pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: var(--space-lg);
}

th,
td {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}

th {
    font-family: var(--font-heading);
    font-weight: 600;
    background-color: var(--color-surface);
}

hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-2xl) 0;
}

/* 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 !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--color-surface);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    clip: auto !important;
    clip-path: none;
    color: var(--color-text-primary);
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: var(--space-md) var(--space-lg);
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: var(--z-toast);
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--color-primary);
    color: #fff;
    padding: var(--space-sm) var(--space-md);
    z-index: var(--z-toast);
    transition: top var(--transition-fast);
}

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