/* Accessibility CSS - High Contrast Mode */

/* General high contrast styles */
body.high-contrast {
    color: #ffffff !important;
    background-color: #000000 !important;
}

body.high-contrast .navbar,
body.high-contrast .section:nth-child(even),
body.high-contrast footer {
    background-color: #000000 !important;
    color: #ffffff !important;
}

body.high-contrast .section:nth-child(odd),
body.high-contrast .bg-gray {
    background-color: #222222 !important;
    color: #ffffff !important;
}

body.high-contrast .bg-green {
    background-color: #000000 !important;
    border-bottom: 2px solid #ffff00 !important;
}

body.high-contrast .navbar {
    border-bottom: 1px solid #ffff00;
}

/* Text and headings */
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 .section-title,
body.high-contrast .lead {
    color: #ffffff !important;
}

body.high-contrast .text-green,
body.high-contrast .text-primary {
    color: #ffff00 !important;
}

body.high-contrast .text-gold {
    color: #ffff00 !important;
}

/* Links */
body.high-contrast a {
    color: #ffff00 !important;
    text-decoration: underline !important;
}

body.high-contrast .nav-link,
body.high-contrast .footer-links a {
    color: #ffffff !important;
    text-decoration: none !important;
}

body.high-contrast .nav-link:hover,
body.high-contrast .nav-link:focus,
body.high-contrast .footer-links a:hover,
body.high-contrast .footer-links a:focus {
    color: #ffff00 !important;
    text-decoration: underline !important;
}

body.high-contrast .nav-link.active {
    color: #ffff00 !important;
    border-bottom: 2px solid #ffff00 !important;
}

/* Buttons */
body.high-contrast .btn {
    border: 2px solid #ffff00 !important;
    background-color: #000000 !important;
    color: #ffff00 !important;
    text-decoration: none !important;
}

body.high-contrast .btn:hover,
body.high-contrast .btn:focus {
    background-color: #ffff00 !important;
    color: #000000 !important;
}

body.high-contrast .btn-outline {
    background-color: transparent !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

body.high-contrast .btn-outline:hover,
body.high-contrast .btn-outline:focus {
    background-color: #ffffff !important;
    color: #000000 !important;
}

/* Forms and inputs */
body.high-contrast input[type="text"],
body.high-contrast input[type="email"],
body.high-contrast input[type="tel"],
body.high-contrast input[type="number"],
body.high-contrast textarea,
body.high-contrast select {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
}

body.high-contrast input[type="text"]:focus,
body.high-contrast input[type="email"]:focus,
body.high-contrast input[type="tel"]:focus,
body.high-contrast input[type="number"]:focus,
body.high-contrast textarea:focus,
body.high-contrast select:focus {
    border-color: #ffff00 !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 0, 0.5) !important;
}

/* Cards and containers */
body.high-contrast .feature-box,
body.high-contrast .contact-card {
    background-color: #222222 !important;
    border: 2px solid #ffffff !important;
}

body.high-contrast .social-icons a {
    background-color: #222222 !important;
    color: #ffffff !important;
}

body.high-contrast .social-icons a:hover {
    background-color: #ffff00 !important;
    color: #000000 !important;
}

/* Gallery items */
body.high-contrast .gallery-filter button {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 1px solid #ffffff !important;
}

body.high-contrast .gallery-filter button.active,
body.high-contrast .gallery-filter button:hover,
body.high-contrast .gallery-filter button:focus {
    background-color: #ffff00 !important;
    color: #000000 !important;
}

body.high-contrast .gallery-item {
    border: 2px solid #ffffff !important;
}

body.high-contrast .gallery-item .overlay {
    background-color: rgba(0, 0, 0, 0.9) !important;
}

/* Focus indicators - important for keyboard navigation */
body.high-contrast a:focus,
body.high-contrast button:focus,
body.high-contrast input:focus,
body.high-contrast textarea:focus,
body.high-contrast select:focus {
    outline: 3px solid #ffff00 !important;
    outline-offset: 2px !important;
}

/* Tables */
body.high-contrast table,
body.high-contrast th,
body.high-contrast td {
    border: 1px solid #ffffff !important;
}

body.high-contrast th {
    background-color: #222222 !important;
}



/* Larger text option */
body.large-text {
    font-size: 120% !important;
}

body.large-text h1 {
    font-size: 2.5rem !important;
}

body.large-text h2 {
    font-size: 2.2rem !important;
}

body.large-text h3 {
    font-size: 1.9rem !important;
}

body.large-text h4 {
    font-size: 1.6rem !important;
}

body.large-text .nav-link {
    font-size: 1.2rem !important;
}

/* Accessibility controls */
.accessibility-controls {
    position: fixed;
    right: 20px;
    bottom: 80px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.accessibility-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #005000;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: none;
    transition: all 0.3s ease;
}

.accessibility-toggle:hover {
    background-color: #007000;
    transform: scale(1.1);
}

.accessibility-panel {
    position: fixed;
    bottom: 80px;
    right: 70px;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    width: 260px;
    z-index: 1001;
    display: none;
}

.accessibility-panel.show {
    display: block;
}

.accessibility-panel h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.accessibility-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.accessibility-option label {
    flex-grow: 1;
    cursor: pointer;
    font-size: 16px;
    color: #333;
}

/* Slider switch styling */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #005000;
}

input:focus + .slider {
    box-shadow: 0 0 1px #005000;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* High contrast panel */
body.high-contrast .accessibility-panel {
    background-color: #000000 !important;
    border: 2px solid #ffff00 !important;
}

body.high-contrast .accessibility-panel h3,
body.high-contrast .accessibility-option label {
    color: #ffffff !important;
}

body.high-contrast .slider {
    background-color: #555 !important;
}

body.high-contrast .slider:before {
    background-color: #ffffff !important;
}

body.high-contrast input:checked + .slider {
    background-color: #ffff00 !important;
}

body.high-contrast input:focus + .slider {
    box-shadow: 0 0 1px #ffff00 !important;
}

body.high-contrast .accessibility-toggle {
    background-color: #000000 !important;
    border: 2px solid #ffff00 !important;
    color: #ffff00 !important;
}

body.high-contrast .accessibility-toggle:hover {
    background-color: #222222 !important;
}