/* Legacy Browser Support CSS */
/* Enhanced compatibility for IE8, IE9, IE10, IE11 and older browsers */

/* IE8 and below fixes */
@media \0screen {
    /* IE8 specific styles */
    .container {
        width: 1200px;
        margin: 0 auto;
        zoom: 1; /* hasLayout trigger */
    }
    
    .header-content {
        zoom: 1; /* hasLayout trigger */
    }
    
    /* IE8 box-sizing fix */
    * {
        behavior: url(assets/js/boxsizing.htc);
    }
}

/* IE9 specific fixes */
@media screen and (min-width:0\0) and (min-resolution: .001dpcm) {
    .hero-banner {
        background: url('../images/hero-bg.jpg') center center;
        background-size: cover;
        -ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/hero-bg.jpg', sizingMethod='scale')";
    }
}

/* IE10+ specific styles */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    /* Flexbox fallbacks for IE10/11 */
    .header-content {
        display: -ms-flexbox;
        -ms-flex-pack: justify;
        -ms-flex-align: center;
    }
    
    .logo {
        display: -ms-flexbox;
        -ms-flex-align: center;
    }
    
    .logo a {
        display: -ms-flexbox;
        -ms-flex-align: center;
    }
    
    .logo-text {
        display: -ms-flexbox;
        -ms-flex-direction: column;
    }
    
    nav ul {
        display: -ms-flexbox;
    }
    
    .hero-banner {
        display: -ms-flexbox;
        -ms-flex-pack: center;
        -ms-flex-align: center;
    }
    
    /* IE11 gap property fallback */
    .logo > * + * {
        margin-right: 10px;
    }
    
    nav ul > li + li {
        margin-right: 2rem;
    }
}

/* CSS Variables fallbacks for IE11 and below */
.no-cssvariables {
    /* Primary gold color fallback */
    --primary-gold: #B48A34;
    --dark-gray: #3A3A3A;
    --light-gray: #f8f9fa;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
}

.no-cssvariables header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.no-cssvariables .logo-text > div:first-child {
    color: #B48A34;
}

.no-cssvariables nav a {
    color: #3A3A3A;
}

.no-cssvariables nav a:hover,
.no-cssvariables nav a.active {
    color: #B48A34;
}

.no-cssvariables .hero-banner {
    color: #ffffff;
}

/* Flexbox fallbacks */
.no-flexbox .header-content {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.no-flexbox .logo,
.no-flexbox nav {
    display: table-cell;
    vertical-align: middle;
}

.no-flexbox .logo {
    width: 40%;
}

.no-flexbox nav {
    width: 60%;
    text-align: left;
}

.no-flexbox nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.no-flexbox nav ul li {
    display: inline-block;
    margin-left: 2rem;
}

.no-flexbox .hero-banner {
    display: table;
    width: 100%;
    height: 500px;
    table-layout: fixed;
}

.no-flexbox .hero-content {
    display: table-cell;
    vertical-align: middle;
    text-align: center;
}

/* Grid fallbacks */
.no-grid .grid {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.no-grid .grid-item {
    display: table-cell;
    vertical-align: top;
    padding: 1rem;
}

/* Object-fit fallbacks */
.no-objectfit img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    font-family: 'object-fit: cover;';
}

/* Border-radius fallbacks for IE8 */
.no-borderradius .rounded {
    behavior: url(assets/js/border-radius.htc);
}

/* Box-shadow fallbacks for IE8 */
.no-boxshadow .shadow {
    behavior: url(assets/js/box-shadow.htc);
}

/* Transition fallbacks */
.no-csstransitions a:hover {
    /* Instant color change for browsers without transitions */
    color: #B48A34;
}

/* Transform fallbacks */
.no-csstransforms .transform {
    /* IE8 filter fallback */
    filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476, SizingMethod='auto expand');
}

/* Media query fallbacks for IE8 */
@media \0screen {
    /* Mobile-like styles for IE8 */
    .mobile-menu-toggle {
        display: none;
    }
    
    nav ul {
        display: block;
    }
    
    nav ul li {
        display: inline;
        margin-left: 1rem;
    }
}

/* Print styles for legacy browsers */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    /* IE8 print fixes */
    @media \0screen {
        body {
            font-size: 12pt;
            line-height: 1.4;
        }
    }
}

/* High contrast mode support */
@media (-ms-high-contrast: active) {
    .logo img {
        filter: invert(1);
    }
    
    .hero-banner {
        background: none;
        border: 2px solid;
    }
}

/* Reduced motion support for older browsers */
.no-reducedmotion * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

/* RTL support enhancements */
[dir="rtl"] .no-flexbox nav ul li {
    margin-left: 0;
    margin-right: 2rem;
}

[dir="ltr"] .no-flexbox nav ul li {
    margin-right: 0;
    margin-left: 2rem;
}

/* Accessibility enhancements for legacy browsers */
.no-focusvisible a:focus,
.no-focusvisible button:focus,
.no-focusvisible input:focus,
.no-focusvisible textarea:focus {
    outline: 2px solid #B48A34;
    outline-offset: 2px;
}

/* Performance optimizations for older browsers */
.legacy-browser * {
    /* Reduce repaints and reflows */
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -ms-backface-visibility: hidden;
    backface-visibility: hidden;
    
    /* Hardware acceleration where supported */
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
    transform: translateZ(0);
}

/* IE conditional comments alternative */
.ie8 .modern-feature {
    display: none;
}

.ie9 .advanced-feature {
    display: none;
}

.ie10 .cutting-edge-feature {
    display: none;
}

.ie11 .experimental-feature {
    display: none;
}