/* Minimal Accessibility Fixes for IBG Property Website */
/* Only targeting specific audit issues without breaking layout */

/* Improve color contrast for buttons - keep existing sizing */
.btn-yellow-neg {
    background-color: #f4c000 !important;
    color: #000000 !important;
    font-weight: bold !important;
}

.btn-yellow-neg:hover,
.btn-yellow-neg:focus {
    background-color: #d4a000 !important;
    color: #000000 !important;
}

/* Improve contrast for status badges */
.status.sale {
    background-color: #d32f2f !important;
    color: #ffffff !important;
    font-weight: bold !important;
}

.status.rent {
    background-color: #1976d2 !important;
    color: #ffffff !important;
    font-weight: bold !important;
}

/* Improve footer text contrast only */
#footer .subtitle {
    color: #ffffff !important;
    font-weight: bold !important;
}

#footer a {
    color: #f4c000 !important;
}

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

/* Focus indicators for keyboard navigation - minimal and non-intrusive */
button:focus,
input:focus,
select:focus,
textarea:focus,
.btn:focus {
    outline: 2px solid #f4c000 !important;
    outline-offset: 2px !important;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #f4c000;
    color: #000000;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
    font-weight: bold;
    border: 2px solid #000000;
}

.skip-link:focus {
    top: 6px;
}

/* Minimal touch target improvements - only for critical elements */
.navbar-toggle {
    min-width: 44px !important;
    min-height: 44px !important;
}

/* Improve form control focus without changing size */
.form-control:focus {
    border-color: #f4c000 !important;
    outline: 2px solid #f4c000 !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}

.bootstrap-select .btn:focus {
    border-color: #f4c000 !important;
    outline: 2px solid #f4c000 !important;
    outline-offset: 2px !important;
}

/* Improve submit button contrast without changing layout */
button[type="submit"],
.btn[type="submit"] {
    background-color: #f4c000 !important;
    color: #000000 !important;
    font-weight: bold !important;
}

button[type="submit"]:hover,
button[type="submit"]:focus,
.btn[type="submit"]:hover,
.btn[type="submit"]:focus {
    background-color: #d4a000 !important;
    color: #000000 !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-yellow-neg {
        background-color: #ffff00 !important;
        color: #000000 !important;
        border: 3px solid #000000 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
/* ===== COMPREHENSIVE FOOTER ACCESSIBILITY IMPROVEMENTS ===== */

/* Improve footer background contrast */
#footer {
    background-color: #1a1a1a !important; /* Darker background for better contrast */
}

/* Footer title improvements */
#footer .title {
    color: #ffffff !important;
    font-weight: bold !important;
    opacity: 1 !important;
}

/* Footer subtitle improvements - override existing styles */
#footer .subtitle {
    color: #ffffff !important;
    font-weight: bold !important;
    opacity: 1 !important; /* Remove opacity for better contrast */
    font-size: 14px !important; /* Increase font size */
}

/* Footer text and links - comprehensive improvements */
#footer a,
#footer p {
    color: #e0e0e0 !important; /* Better contrast than original white with opacity */
    opacity: 1 !important; /* Remove opacity for better contrast */
    font-size: 14px !important; /* Increase from 13px to 14px */
    line-height: 1.6 !important; /* Better line height for readability */
}

/* Footer link interactions */
#footer a {
    text-decoration: underline !important;
    transition: all 0.25s ease-in-out !important;
}

#footer a:hover,
#footer a:focus {
    color: #f4c000 !important; /* Use consistent yellow color */
    background-color: rgba(244, 192, 0, 0.1) !important;
    text-decoration: none !important;
    outline: 2px solid #f4c000 !important;
    outline-offset: 2px !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
}

/* Footer suggest link improvements */
#footer #suggest {
    color: #f4c000 !important;
    opacity: 1 !important;
    font-weight: bold !important;
    font-size: 14px !important;
    text-decoration: underline !important;
}

#footer #suggest:hover,
#footer #suggest:focus {
    color: #000000 !important;
    background-color: #f4c000 !important;
    text-decoration: none !important;
    outline: 2px solid #ffffff !important;
    outline-offset: 2px !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
}

/* Social icons accessibility improvements */
#footer .social-icons a {
    display: inline-block !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 8px !important;
    margin: 4px !important;
    border-radius: 4px !important;
    text-align: center !important;
    line-height: 1.2 !important;
}

#footer .social-icons a:hover,
#footer .social-icons a:focus {
    background-color: #f4c000 !important;
    color: #000000 !important;
    transform: scale(1.1) !important;
    outline: 2px solid #ffffff !important;
    outline-offset: 2px !important;
}

/* Socket (copyright) section improvements */
#socket {
    background-color: #0f0f0f !important; /* Even darker for distinction */
    border-top: 1px solid #333333 !important;
}

#socket p,
#socket p a {
    color: #cccccc !important;
    opacity: 1 !important; /* Remove low opacity */
    font-size: 13px !important;
    line-height: 1.5 !important;
}

#socket p a:hover,
#socket p a:focus {
    color: #f4c000 !important;
    text-decoration: underline !important;
    outline: 1px solid #f4c000 !important;
    outline-offset: 1px !important;
}

/* High contrast mode footer support */
@media (prefers-contrast: high) {
    #footer {
        background-color: #000000 !important;
        border-top: 3px solid #ffffff !important;
    }
    
    #footer .subtitle,
    #footer a,
    #footer p {
        color: #ffffff !important;
        opacity: 1 !important;
    }
    
    #footer a:hover,
    #footer a:focus {
        background-color: #ffffff !important;
        color: #000000 !important;
    }
    
    #socket {
        background-color: #000000 !important;
        border-top: 2px solid #ffffff !important;
    }
    
    #socket p,
    #socket p a {
        color: #ffffff !important;
    }
}

/* Large text support for footer */
@media (min-resolution: 120dpi) {
    #footer a,
    #footer p {
        font-size: 15px !important;
    }
    
    #footer .subtitle {
        font-size: 15px !important;
    }
}

/* Print accessibility for footer */
@media print {
    #footer {
        background-color: transparent !important;
        color: #000000 !important;
    }
    
    #footer a,
    #footer p {
        color: #000000 !important;
    }
    
    #footer a:after {
        content: " (" attr(href) ")" !important;
        font-size: 12px !important;
    }
    
    #socket {
        background-color: transparent !important;
    }
    
    #socket p,
    #socket p a {
        color: #000000 !important;
    }
}

/* ===== END FOOTER ACCESSIBILITY IMPROVEMENTS ===== */

/* ===== SPECIFIC CONTRAST FIXES FOR PAGESPEED AUDIT ===== */

/* Fix for "ПРОДАЙТЕ С НАС" link contrast issue mentioned in audit */
.suggest-property,
a.suggest-property {
    background-color: #1976d2 !important; /* Strong blue background */
    color: #ffffff !important; /* White text for high contrast */
    font-weight: bold !important;
    padding: 12px 24px !important;
    border: 2px solid #1565c0 !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
    min-height: 44px !important; /* Touch target size */
    line-height: 1.4 !important;
}

.suggest-property:hover,
.suggest-property:focus,
a.suggest-property:hover,
a.suggest-property:focus {
    background-color: #0d47a1 !important; /* Darker blue on hover */
    color: #ffffff !important;
    border-color: #0d47a1 !important;
    outline: 3px solid #f4c000 !important; /* Yellow focus outline */
    outline-offset: 2px !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}

.suggest-property:active,
a.suggest-property:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* Ensure all call-to-action buttons have sufficient contrast */
.btn-cta,
.cta-button,
.action-button {
    background-color: #1976d2 !important;
    color: #ffffff !important;
    font-weight: bold !important;
    border: 2px solid #1565c0 !important;
    min-height: 44px !important;
    padding: 12px 24px !important;
}

.btn-cta:hover,
.btn-cta:focus,
.cta-button:hover,
.cta-button:focus,
.action-button:hover,
.action-button:focus {
    background-color: #0d47a1 !important;
    color: #ffffff !important;
    border-color: #0d47a1 !important;
    outline: 3px solid #f4c000 !important;
    outline-offset: 2px !important;
}

/* Fix any low contrast text in property listings */
.property-listing .price,
.property-listing .title,
.property-listing .description {
    color: #212121 !important; /* Dark gray for good contrast */
    font-weight: 500 !important;
}

.property-listing .price {
    color: #d32f2f !important; /* Red for prices */
    font-weight: bold !important;
}

/* Fix navigation link contrast */
.navbar-nav > li > a {
    color: #212121 !important;
    font-weight: 500 !important;
}

.navbar-nav > li > a:hover,
.navbar-nav > li > a:focus {
    color: #1976d2 !important;
    background-color: rgba(25, 118, 210, 0.1) !important;
    outline: 2px solid #f4c000 !important;
    outline-offset: 2px !important;
}

.navbar-nav > li > a.active {
    color: #1976d2 !important;
    font-weight: bold !important;
    background-color: rgba(25, 118, 210, 0.1) !important;
}

/* Fix dropdown menu contrast */
.dropdown-menu > li > a {
    color: #212121 !important;
    font-weight: 500 !important;
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
    color: #ffffff !important;
    background-color: #1976d2 !important;
    outline: 2px solid #f4c000 !important;
    outline-offset: 2px !important;
}

/* Fix form input contrast */
.form-control {
    color: #212121 !important;
    background-color: #ffffff !important;
    border: 2px solid #757575 !important;
}

.form-control:focus {
    border-color: #1976d2 !important;
    outline: 2px solid #f4c000 !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}

/* Fix search input contrast */
.search-menu input,
.dynamicSearchInput {
    color: #212121 !important;
    background-color: #ffffff !important;
    border: 2px solid #757575 !important;
    padding: 8px 12px !important;
}

.search-menu input:focus,
.dynamicSearchInput:focus {
    border-color: #1976d2 !important;
    outline: 2px solid #f4c000 !important;
    outline-offset: 2px !important;
}

/* High contrast mode enhancements */
@media (prefers-contrast: high) {
    .suggest-property,
    a.suggest-property {
        background-color: #000000 !important;
        color: #ffffff !important;
        border: 3px solid #ffffff !important;
    }
    
    .suggest-property:hover,
    .suggest-property:focus,
    a.suggest-property:hover,
    a.suggest-property:focus {
        background-color: #ffffff !important;
        color: #000000 !important;
        border: 3px solid #000000 !important;
    }
    
    .navbar-nav > li > a {
        color: #000000 !important;
        border: 1px solid #000000 !important;
    }
    
    .navbar-nav > li > a:hover,
    .navbar-nav > li > a:focus {
        background-color: #000000 !important;
        color: #ffffff !important;
    }
}

/* Print accessibility */
@media print {
    .suggest-property,
    a.suggest-property {
        background-color: transparent !important;
        color: #000000 !important;
        border: 2px solid #000000 !important;
    }
    
    .navbar-nav > li > a {
        color: #000000 !important;
    }
}

/* ===== END SPECIFIC CONTRAST FIXES ===== */