
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--ecs-font-family);
    line-height: 1.6;
    color: var(--ecs-gray-800);
    background-color: var(--ecs-white);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--ecs-secondary);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

/* Paragraphs */
p {
    margin-bottom: 1.5rem;
    color: var(--ecs-gray-700);
}

/* Links */
a {
    color: var(--ecs-primary);
    text-decoration: none;
    transition: var(--ecs-transition);
}

a:hover {
    color: var(--ecs-primary-dark);
    text-decoration: underline;
}

/* Lists */
ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--ecs-gray-700);
}

ul li, ol li {
    margin-bottom: 0.5rem;
}

ul {
    list-style-type: disc;
}

ul ul {
    list-style-type: circle;
}

ul ul ul {
    list-style-type: square;
}

ol {
    list-style-type: decimal;
}

ol ol {
    list-style-type: lower-alpha;
}

ol ol ol {
    list-style-type: lower-roman;
}

/* Definition Lists */
dl {
    margin-bottom: 1.5rem;
}

dt {
    font-weight: 700;
    color: var(--ecs-secondary);
}

dd {
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--ecs-gray-700);
}

/* Blockquotes */
blockquote {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--ecs-primary);
    background-color: var(--ecs-gray-50);
    color: var(--ecs-gray-700);
    font-style: italic;
    border-radius: var(--ecs-radius-md);
}

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

/* Code */
code, pre {
    font-family: var(--ecs-font-mono);
    background-color: var(--ecs-gray-100);
    border-radius: var(--ecs-radius-sm);
}

code {
    padding: 0.2rem 0.4rem;
    color: var(--ecs-secondary-dark);
    font-size: 0.875em;
}

pre {
    padding: 1rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    border: 1px solid var(--ecs-gray-200);
    color: var(--ecs-gray-800);
}

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

/* Horizontal Rule */
hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid var(--ecs-gray-200);
}

/* Tables */
table {
    width: 100%;
    margin-bottom: 1.5rem;
    border-collapse: collapse;
    border-spacing: 0;
}

thead {
    background-color: var(--ecs-secondary);
    color: white;
}

th, td {
    padding: 0.75rem;
    border: 1px solid var(--ecs-gray-300);
    text-align: left;
}

th {
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: var(--ecs-gray-50);
}

tr:hover {
    background-color: var(--ecs-gray-100);
}

/* Forms */
fieldset {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--ecs-gray-300);
    border-radius: var(--ecs-radius-md);
}

legend {
    padding: 0 0.5rem;
    font-weight: 600;
    color: var(--ecs-secondary);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--ecs-gray-700);
}

input, select, textarea {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--ecs-gray-800);
    background-color: var(--ecs-white);
    border: 1px solid var(--ecs-gray-300);
    border-radius: var(--ecs-radius-md);
    transition: var(--ecs-transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--ecs-primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

input[type="checkbox"], input[type="radio"] {
    display: inline-block;
    width: auto;
    margin-right: 0.5rem;
    margin-bottom: 0;
}

button, input[type="button"], input[type="reset"], input[type="submit"] {
    display: inline-block;
    width: auto;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: white;
    background-color: var(--ecs-primary);
    border: none;
    border-radius: var(--ecs-radius-md);
    cursor: pointer;
    transition: var(--ecs-transition);
}

button:hover, input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover {
    background-color: var(--ecs-primary-dark);
    transform: translateY(-2px);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: var(--ecs-radius-md);
}

figure {
    margin: 0 0 1.5rem;
}

figcaption {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--ecs-gray-600);
    text-align: center;
}

/* Quotes */
q {
    font-style: italic;
    color: var(--ecs-gray-700);
}

/* Abbreviations */
abbr, acronym {
    cursor: help;
    border-bottom: 1px dotted var(--ecs-gray-400);
}

/* Address */
address {
    font-style: normal;
    margin-bottom: 1.5rem;
    color: var(--ecs-gray-700);
}

/* Small Text */
small {
    font-size: 0.875em;
    color: var(--ecs-gray-600);
}

/* Strong Text */
strong, b {
    font-weight: 700;
    color: var(--ecs-gray-900);
}

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

/* Subscript and Superscript */
sub, sup {
    font-size: 0.75em;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sup {
    top: -0.5em;
}

sub {
    bottom: -0.25em;
}

/* Mark Text */
mark {
    background-color: rgba(245, 158, 11, 0.2);
    padding: 0.2em;
    border-radius: var(--ecs-radius-sm);
}

/* Keyboard Input */
kbd {
    padding: 0.2em 0.4em;
    font-family: var(--ecs-font-mono);
    font-size: 0.875em;
    color: var(--ecs-white);
    background-color: var(--ecs-gray-800);
    border-radius: var(--ecs-radius-sm);
}

/* Details & Summary */
details {
    margin-bottom: 1.5rem;
    border: 1px solid var(--ecs-gray-200);
    border-radius: var(--ecs-radius-md);
    overflow: hidden;
}

summary {
    padding: 1rem;
    background-color: var(--ecs-gray-50);
    cursor: pointer;
    font-weight: 600;
    color: var(--ecs-secondary);
}

details[open] summary {
    border-bottom: 1px solid var(--ecs-gray-200);
}

details > *:not(summary) {
    padding: 1rem;
}

/* Progress */
progress {
    width: 100%;
    height: 0.75rem;
    border-radius: var(--ecs-radius-full);
    overflow: hidden;
}

progress::-webkit-progress-bar {
    background-color: var(--ecs-gray-200);
}

progress::-webkit-progress-value {
    background-color: var(--ecs-primary);
}

progress::-moz-progress-bar {
    background-color: var(--ecs-primary);
}

/* Meter */
meter {
    width: 100%;
    height: 0.75rem;
    border-radius: var(--ecs-radius-full);
}

/* Audio & Video */
audio, video {
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: var(--ecs-radius-md);
}

/* iFrame */
iframe {
    width: 100%;
    border: none;
    border-radius: var(--ecs-radius-md);
    margin-bottom: 1.5rem;
}

/* Canvas */
canvas {
    max-width: 100%;
    margin-bottom: 1.5rem;
    border-radius: var(--ecs-radius-md);
}

/* SVG */
svg {
    max-width: 100%;
    height: auto;
}