/* Skip to content link */
.skip-to-content-link {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1em;
    background-color: white;
    color: black;
    opacity: 0;
}

.skip-to-content-link:focus {
    left: 50%;
    transform: translateX(-50%);
    opacity: 1;
}

/* Text Resizer */
body.text-size-large {
    font-size: 1.2em;
}

body.text-size-larger {
    font-size: 1.4em;
}

body.text-size-largest {
    font-size: 1.6em;
}

/* High Contrast Mode */
body.high-contrast {
    background-color: #000000 !important;
    color: #FFFFFF !important;
}

/* Headers */
body.high-contrast header,
body.high-contrast .site-header,
body.high-contrast #masthead,
body.high-contrast .elementor-location-header {
    background-color: #000000 !important;
    color: #FFFFFF !important;
    border-color: #FFFFFF !important;
}

/* Text Elements */
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast h5,
body.high-contrast h6,
body.high-contrast p,
body.high-contrast span,
body.high-contrast div {
    color: #FFFFFF !important;
    background-color: #000000 !important;
}

/* Navigation */
body.high-contrast nav,
body.high-contrast .menu,
body.high-contrast .nav-menu {
    background-color: #000000 !important;
}

body.high-contrast nav a,
body.high-contrast .menu a,
body.high-contrast .nav-menu a {
    color: #FFFF00 !important;
    background-color: #000000 !important;
}

body.high-contrast nav a:hover,
body.high-contrast .menu a:hover,
body.high-contrast .nav-menu a:hover {
    color: #000000 !important;
    background-color: #FFFF00 !important;
}

/* Links */
body.high-contrast a {
    color: #FFFF00 !important;
    text-decoration: underline !important;
}

body.high-contrast a:hover,
body.high-contrast a:focus {
    color: #000000 !important;
    background-color: #FFFF00 !important;
    text-decoration: none !important;
}

/* Buttons */
body.high-contrast button,
body.high-contrast .button,
body.high-contrast input[type="button"],
body.high-contrast input[type="submit"] {
    color: #000000 !important;
    background-color: #FFFF00 !important;
    border: 2px solid #FFFF00 !important;
    text-shadow: none !important;
}

body.high-contrast button:hover,
body.high-contrast .button:hover,
body.high-contrast input[type="button"]:hover,
body.high-contrast input[type="submit"]:hover {
    color: #FFFF00 !important;
    background-color: #000000 !important;
    border-color: #FFFF00 !important;
}

/* Form Elements */
body.high-contrast input[type="text"],
body.high-contrast input[type="email"],
body.high-contrast input[type="password"],
body.high-contrast input[type="search"],
body.high-contrast textarea,
body.high-contrast select {
    color: #FFFFFF !important;
    background-color: #000000 !important;
    border: 2px solid #FFFFFF !important;
}

/* Images */
body.high-contrast img {
    filter: grayscale(100%) contrast(150%) !important;
}

/* Tables */
body.high-contrast table,
body.high-contrast th,
body.high-contrast td {
    border-color: #FFFFFF !important;
}

body.high-contrast th {
    background-color: #333333 !important;
    color: #FFFFFF !important;
}

/* Site Logo */
body.high-contrast .site-logo,
body.high-contrast .custom-logo {
    filter: invert(100%) !important;
}

/* Elementor Elements */
body.high-contrast .elementor-widget-container,
body.high-contrast .elementor-background-overlay,
body.high-contrast .elementor-element {
    background-color: #000000 !important;
}

/* Focus States */
body.high-contrast *:focus {
    outline: 2px solid #FFFF00 !important;
    outline-offset: 2px !important;
}

/* Header Specific */
body.high-contrast .site-header,
body.high-contrast header.site-header,
body.high-contrast .elementor-location-header {
    border-bottom: 2px solid #FFFFFF !important;
}

/* Menu Toggle/Hamburger */
body.high-contrast .menu-toggle,
body.high-contrast .hamburger-menu {
    background-color: #000000 !important;
    border: 2px solid #FFFFFF !important;
}

body.high-contrast .menu-toggle span,
body.high-contrast .hamburger-menu span {
    background-color: #FFFFFF !important;
}

/* Accessibility Widget Styles */
.educms-accessibility-widget {
    padding: none;
    border-radius: 0.5rem;
}

/* Base Font Variables */
:root {
    --educms-font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    --educms-font-weight-light: 300;
    --educms-font-weight-regular: 400;
    --educms-font-weight-medium: 500;
    --educms-font-weight-semibold: 600;
    --educms-font-weight-bold: 700;
}

/* Apply Poppins to all widget elements */
.educms-accessibility-widget {
    font-family: var(--educms-font-family);
}

.educms-accessibility-widget button,
.educms-accessibility-widget input,
.educms-accessibility-widget select,
.educms-accessibility-widget textarea {
    font-family: var(--educms-font-family);
}

.educms-accessibility-widget button {
    margin: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    border: 1px solid #dee2e6;
    background-color: #fff;
    transition: all 0.2s ease-in-out;
}

.educms-accessibility-widget button:hover {
    background-color: #e9ecef;
}

/* Unified Accessibility Header */
.educms-accessibility-header {
    --primary-color: #0073e6;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --button-radius: 8px;
    --button-padding: 12px;
    --icon-size: 16px;
    --transition-speed: 0.3s;
    
    width: 100%;
    margin-bottom: 30px;
    transition: all var(--transition-speed) ease;
}

.educms-accessibility-header .accessibility-controls {
    width: 100%;
}

.educms-accessibility-header .accessibility-controls-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
}

.educms-accessibility-header .feature-group {
    display: inline-flex;
    align-items: center;
    padding: 0 15px;
    position: relative;
}

.educms-accessibility-header .feature-group:last-child {
    padding-right: 0;
}

.educms-accessibility-header .feature-group:first-child {
    padding-left: 0;
}

.educms-accessibility-header .feature-group {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 5px;
    border-right: 1px solid #e0e0e0;
}

.educms-accessibility-header .feature-group:last-child {
    border-right: none;
}

.educms-accessibility-header .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.educms-accessibility-header .btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 230, 0.4);
}

.educms-accessibility-header .btn:hover {
    transform: translateY(-2px);
}

.educms-accessibility-header .btn:active {
    transform: translateY(0);
}

.educms-accessibility-header .button-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.educms-accessibility-header .text-resize-group {
    display: inline-flex;
    gap: 5px;
    position: relative;
}

.educms-accessibility-header .accessibility-text {
    font-style: normal;
    font-weight: 600;
    font-size: inherit;
    line-height: 1;
}

.text-resize-group[data-current-size="0"] .text-resize-reset {
    opacity: 0.5;
    cursor: not-allowed;
}

.text-resize-group button:disabled,
.text-resize-group button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0.1) !important;
}

.educms-accessibility-header button:disabled,
.educms-accessibility-header button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0.1) !important;
}

/* Text size indicators */
.text-resize-decrease .accessibility-text { font-size: 14px; }
.text-resize-reset .accessibility-text { font-size: 16px; }
.text-resize-increase .accessibility-text { font-size: 18px; }

.feature-group-label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Text resizer widget styles */
.text-resizer-widget {
    
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--button-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.text-resizer-widget .btn-group {
    display: inline-flex;
    gap: 8px;
}

.text-resizer-widget .btn {
    position: relative;
    padding: var(--button-padding);
    min-width: 50px;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--button-radius);
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.text-resizer-widget .button-content {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.text-resizer-widget .btn i {
    font-size: var(--icon-size);
    transition: transform var(--transition-speed) ease;
}

.text-resizer-widget .text-resize-increase i:first-child {
    font-size: calc(var(--icon-size) * 1.2);
}

.text-resizer-widget .text-resize-decrease i:first-child {
    font-size: calc(var(--icon-size) * 0.8);
}

.text-resizer-widget .btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 73, 230, 0.2);
}

.text-resizer-widget .btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 73, 230, 0.1);
}

.text-resizer-widget .btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.text-resizer-widget .btn-outline-primary:hover:not(:disabled) {
    color: white;
    background-color: var(--primary-color);
}

.text-resizer-widget .btn-outline-secondary {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.text-resizer-widget .btn-outline-secondary:hover:not(:disabled) {
    color: white;
    background-color: var(--secondary-color);
}

.text-resizer-widget .btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Tooltip styles */
.text-resizer-widget .btn[data-tooltip] {
    position: relative;
}

.text-resizer-widget .btn[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    padding: 6px 12px;
    border-radius: 4px;
    background: #333;
    color: white;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
    z-index: 1000;
}

.text-resizer-widget .btn[data-tooltip]:hover:before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
}

/* Text size indicator */
.text-size-indicator {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
    text-align: center;
    min-height: 20px;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.text-size-indicator.active {
    opacity: 1;
}

/* Vertical layout styles */
.text-resizer-widget .flex-column {
    flex-direction: column;
    width: fit-content;
}

.text-resizer-widget .flex-column .btn {
    width: 100%;
    justify-content: flex-start;
}

/* Global text transition styles */
h1, h2, h3, h4, h5, h6,
p, div, span, li, a, label, input, textarea, button {
    transition: font-size 0.3s ease;
}
/* button css  */
.increase-btn{
    background-color: white;
    border: 1px solid #7c7b7b;
    padding: 5px;
}

/* Skip to Content Widget Styles */
.skip-content-widget {
    position: fixed;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    transition: top 0.3s ease;
}

.skip-to-content-btn {
    position: relative;
    display: inline-block;
    padding: 15px 30px;
    background: #4A90E2;
    color: #FFFFFF;
    font-size: 16px;
    text-decoration: none;
    border: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    font-family: var(--educms-font-family);
    font-weight: var(--educms-font-weight-medium);
    padding: 15px 25px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.skip-to-content-btn:focus {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    clip-path: none;
    outline: 2px solid #FFFFFF;
    outline-offset: 2px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Improved skip to content focus and animation styles */
.skip-content-widget:focus-within {
    top: 0;
}

.skip-to-content-btn:focus {
    outline: 2px solid #FFFFFF;
    outline-offset: 2px;
}

/* Target element style when focused */
[id]:focus {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
}

/* Animation for skip button */
@keyframes skipButtonSlideDown {
    from {
        transform: translate(-50%, -100%);
    }
    to {
        transform: translate(-50%, 0);
    }
}

.skip-content-widget:focus-within {
    animation: skipButtonSlideDown 0.3s ease forwards;
}

/* High contrast mode support */
body.high-contrast .skip-to-content-btn {
    background: #FFFF00 !important;
    color: #000000 !important;
    border: 2px solid #FFFFFF !important;
}

body.high-contrast .skip-to-content-btn:focus {
    outline-color: #FFFFFF !important;
    box-shadow: 0 0 0 2px #000000, 0 0 0 4px #FFFFFF !important;
}

/* Make sure the button is visible on keyboard focus */
.skip-to-content-btn:focus {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: nowrap;
}

/* Site Map Widget Styles */
.site-map-widget {
    position: relative;
}

.toggle-site-map {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #333;
}

.toggle-site-map:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.toggle-site-map:focus {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
}

.toggle-site-map i {
    font-size: 16px;
    color: #4A90E2;
}

/* Modal Styles */
.site-map-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.site-map-modal[aria-hidden="false"] {
    display: block;
}

.site-map-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.site-map-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    margin: 2vh auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.site-map-modal[aria-hidden="false"] .site-map-modal-content {
    opacity: 1;
    transform: translateY(0);
}

.site-map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.site-map-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.close-site-map {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

.close-site-map:hover {
    color: #333;
    transform: scale(1.1);
}

.site-map-description {
    padding: 20px 30px;
    margin: 0;
    font-size: 14px;
    color: #666;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.site-map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 30px;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
    background: #fff;
}

.site-map-section {
    min-width: 280px;
}

.site-map-section h3 {
    margin: 0 0 15px;
    padding-bottom: 10px;
    font-size: 18px;
    color: #333;
    border-bottom: 2px solid #4A90E2;
}

.site-map-nav {
    margin-bottom: 20px;
}

.site-map-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-map-item {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.4;
}

.site-map-item a {
    display: inline-block;
    color: #555;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 4px 0;
}

.site-map-item a:hover {
    color: #4A90E2;
    transform: translateX(5px);
}

.site-map-sublist {
    list-style: none;
    padding-left: 20px;
    margin: 4px 0 8px;
    border-left: 2px solid #eee;
}

/* Sitemap Animations */
.site-map-modal.sitemap-animation-fade[aria-hidden="false"] .site-map-modal-content {
    animation: siteMapFadeIn 0.3s ease forwards;
}

.site-map-modal.sitemap-animation-slide[aria-hidden="false"] .site-map-modal-content {
    animation: siteMapSlideIn 0.3s ease forwards;
}

.site-map-modal.sitemap-animation-zoom[aria-hidden="false"] .site-map-modal-content {
    animation: siteMapZoomIn 0.3s ease forwards;
}

@keyframes siteMapFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes siteMapSlideIn {
    from {
        opacity: 0;
        transform: translateY(-100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes siteMapZoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* High Contrast Support */
body.high-contrast .site-map-modal-content {
    background-color: #000000 !important;
    border: 2px solid #FFFFFF !important;
}

body.high-contrast .site-map-header {
    background-color: #000000 !important;
    border-color: #FFFFFF !important;
}

body.high-contrast .site-map-header h2 {
    color: #FFFFFF !important;
}

body.high-contrast .site-map-description {
    background-color: #000000 !important;
    border-color: #FFFFFF !important;
    color: #FFFFFF !important;
}

body.high-contrast .site-map-section h3 {
    color: #FFFFFF !important;
    border-color: #FFFF00 !important;
}

body.high-contrast .site-map-grid {
    background-color: #000000 !important;
}

body.high-contrast .site-map-item a {
    color: #FFFF00 !important;
}

body.high-contrast .site-map-item a:hover {
    color: #000000 !important;
    background-color: #FFFF00 !important;
}

body.high-contrast .site-map-sublist {
    border-color: #FFFFFF !important;
}

body.high-contrast .close-site-map {
    color: #FFFFFF !important;
}

body.high-contrast .close-site-map:hover {
    color: #FFFF00 !important;
}

.site-map-icon {
    --button-size: 40px;
    width: var(--button-size) !important;
    height: var(--button-size) !important;
    padding: 0 !important;
    border: 1px solid var(--primary-color);
    border-radius: var(--button-radius);
}

.site-map-icon i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: var(--icon-size);
    color: var(--primary-color);
}

.site-map-icon:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 115, 230, 0.2);
}

.site-map-icon:hover i {
    color: #fff;
}

.site-map-icon:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 230, 0.4);
}

/* High contrast support */
body.high-contrast .site-map-icon {
    border-color: #FFFF00 !important;
    background-color: transparent !important;
}

body.high-contrast .site-map-icon i {
    color: #FFFF00 !important;
}

body.high-contrast .site-map-icon:hover {
    background-color: #FFFF00 !important;
}

body.high-contrast .site-map-icon:hover i {
    color: #000000 !important;
}