/* SEO Optimization CSS */

/* Accessibility improvements */
:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to content link for screen readers */
.skip-to-content {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-to-content:focus {
    position: fixed;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    padding: 15px 20px;
    background: white;
    color: var(--primary-color);
    z-index: 9999;
    font-weight: bold;
    border-bottom-right-radius: 5px;
}

/* Improved text contrast */
body {
    color: #333; /* Darker text for better contrast */
}

/* Ensure all links have proper hover states */
a:hover, a:focus {
    text-decoration: underline;
}

/* Ensure proper heading hierarchy */
h1 {
    margin-top: 0;
}

h2 {
    margin-top: 1.5em;
}

h3 {
    margin-top: 1.2em;
}

/* Improve form accessibility */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input, select, textarea {
    font-size: 16px; /* Prevents iOS zoom */
}

/* Improve image accessibility */
img {
    max-width: 100%;
    height: auto;
}

/* Add alt text styling for when images fail to load */
img::before {
    content: attr(alt);
    display: block;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-style: italic;
}

/* Improve table accessibility */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th {
    text-align: left;
    background-color: #f8f9fa;
}

th, td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
}

/* Improve button accessibility */
.btn, button {
    cursor: pointer;
    min-height: 44px; /* Touch target size */
}

/* Improve form validation */
input:invalid, textarea:invalid, select:invalid {
    border-color: #dc3545;
}

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

/* Improve keyboard navigation */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Improve color contrast for links */
a {
    color: #0056b3; /* Darker blue for better contrast */
}

/* Improve list styling */
ul, ol {
    padding-left: 20px;
}

li {
    margin-bottom: 8px;
}

/* Improve blockquote styling */
blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin-left: 0;
    font-style: italic;
}

/* Improve code styling */
code {
    background-color: #f8f9fa;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
}

/* Improve pre styling */
pre {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: monospace;
}

/* Improve abbr styling */
abbr[title] {
    text-decoration: underline dotted;
    cursor: help;
}

/* Improve mark styling */
mark {
    background-color: #fffacd;
    padding: 2px 4px;
}

/* Improve small styling */
small {
    font-size: 80%;
}

/* Improve strong styling */
strong {
    font-weight: 700;
}

/* Improve em styling */
em {
    font-style: italic;
}

/* Improve del styling */
del {
    text-decoration: line-through;
}

/* Improve ins styling */
ins {
    text-decoration: underline;
}

/* Improve sub styling */
sub {
    vertical-align: sub;
    font-size: 80%;
}

/* Improve sup styling */
sup {
    vertical-align: super;
    font-size: 80%;
}

/* Improve hr styling */
hr {
    border: 0;
    border-top: 1px solid #ddd;
    margin: 20px 0;
}

/* Improve figure styling */
figure {
    margin: 20px 0;
}

figcaption {
    font-style: italic;
    text-align: center;
    margin-top: 10px;
}

/* Improve details/summary styling */
details {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
}

summary {
    cursor: pointer;
    font-weight: 600;
}

/* Improve dialog styling */
dialog {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    max-width: 500px;
    margin: auto;
}

/* Improve progress styling */
progress {
    width: 100%;
    height: 10px;
    border-radius: 5px;
}

/* Improve meter styling */
meter {
    width: 100%;
    height: 10px;
    border-radius: 5px;
}

/* Improve datalist styling */
datalist {
    display: none;
}

/* Improve fieldset styling */
fieldset {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
}

legend {
    padding: 0 10px;
    font-weight: 600;
}

/* Improve optgroup styling */
optgroup {
    font-weight: 600;
}

/* Improve option styling */
option {
    padding: 5px;
}

/* Improve textarea styling */
textarea {
    resize: vertical;
}

/* Improve select styling */
select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

/* Improve input[type="file"] styling */
input[type="file"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
}

/* Improve input[type="color"] styling */
input[type="color"] {
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 44px;
    height: 44px;
}

/* Improve input[type="range"] styling */
input[type="range"] {
    width: 100%;
}

/* Improve input[type="checkbox"] and input[type="radio"] styling */
input[type="checkbox"], input[type="radio"] {
    width: auto;
    margin-right: 10px;
}

/* Improve input[type="date"] styling */
input[type="date"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
}

/* Improve input[type="time"] styling */
input[type="time"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
}

/* Improve input[type="number"] styling */
input[type="number"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
}

/* Improve input[type="search"] styling */
input[type="search"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
}

/* Improve input[type="tel"] styling */
input[type="tel"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
}

/* Improve input[type="url"] styling */
input[type="url"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
}

/* Improve input[type="email"] styling */
input[type="email"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
}

/* Improve input[type="password"] styling */
input[type="password"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
}

/* Improve input[type="text"] styling */
input[type="text"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
}

/* Improve input[type="submit"] styling */
input[type="submit"] {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    min-height: 44px;
}

/* Improve input[type="reset"] styling */
input[type="reset"] {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
    cursor: pointer;
    min-height: 44px;
}

/* Improve input[type="button"] styling */
input[type="button"] {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    min-height: 44px;
}
