/* ==========================================================================
   Browser Compatibility & Vendor Prefixes
   ========================================================================== */

/* ==========================================================================
   Flexbox Support for Older Browsers
   ========================================================================== */

.flex-container {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
}

.flex-item {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -moz-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
}

.flex-direction-column {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -moz-box-orient: vertical;
    -moz-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
}

.flex-direction-row {
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
    -moz-box-orient: horizontal;
    -moz-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
}

.flex-wrap {
    -webkit-flex-wrap: wrap;
    -moz-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

.flex-justify-center {
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -moz-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}

.flex-justify-between {
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    -moz-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

.flex-align-center {
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

/* ==========================================================================
   Grid Support for Older Browsers
   ========================================================================== */

.grid-container {
    display: -ms-grid;
    display: grid;
}

.grid-2-columns {
    -ms-grid-columns: 1fr 1fr;
    grid-template-columns: 1fr 1fr;
}

.grid-3-columns {
    -ms-grid-columns: 1fr 1fr 1fr;
    grid-template-columns: 1fr 1fr 1fr;
}

.grid-4-columns {
    -ms-grid-columns: 1fr 1fr 1fr 1fr;
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

/* ==========================================================================
   Transitions and Animations
   ========================================================================== */

.transition-all {
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.transition-color {
    -webkit-transition: color 0.3s ease;
    -moz-transition: color 0.3s ease;
    -o-transition: color 0.3s ease;
    transition: color 0.3s ease;
}

.transition-background {
    -webkit-transition: background-color 0.3s ease;
    -moz-transition: background-color 0.3s ease;
    -o-transition: background-color 0.3s ease;
    transition: background-color 0.3s ease;
}

.transition-transform {
    -webkit-transition: -webkit-transform 0.3s ease;
    -moz-transition: -moz-transform 0.3s ease;
    -o-transition: -o-transform 0.3s ease;
    transition: transform 0.3s ease;
}

/* ==========================================================================
   Transform Support
   ========================================================================== */

.transform-scale {
    -webkit-transform: scale(1.05);
    -moz-transform: scale(1.05);
    -ms-transform: scale(1.05);
    -o-transform: scale(1.05);
    transform: scale(1.05);
}

.transform-rotate {
    -webkit-transform: rotate(5deg);
    -moz-transform: rotate(5deg);
    -ms-transform: rotate(5deg);
    -o-transform: rotate(5deg);
    transform: rotate(5deg);
}

.transform-translate {
    -webkit-transform: translateY(-5px);
    -moz-transform: translateY(-5px);
    -ms-transform: translateY(-5px);
    -o-transform: translateY(-5px);
    transform: translateY(-5px);
}

/* ==========================================================================
   Box Shadow Support
   ========================================================================== */

.box-shadow {
    -webkit-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    -moz-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.box-shadow-hover {
    -webkit-box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    -moz-box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* ==========================================================================
   Border Radius Support
   ========================================================================== */

.border-radius {
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
}

.border-radius-lg {
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;
}

.border-radius-xl {
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    border-radius: 12px;
}

/* ==========================================================================
   Gradient Support
   ========================================================================== */

.gradient-primary {
    background: #4B382F;
    background: -webkit-linear-gradient(135deg, #4B382F 0%, #6B4E3D 100%);
    background: -moz-linear-gradient(135deg, #4B382F 0%, #6B4E3D 100%);
    background: -o-linear-gradient(135deg, #4B382F 0%, #6B4E3D 100%);
    background: linear-gradient(135deg, #4B382F 0%, #6B4E3D 100%);
}

.gradient-accent {
    background: #E1AA05;
    background: -webkit-linear-gradient(135deg, #E1AA05 0%, #F4C430 100%);
    background: -moz-linear-gradient(135deg, #E1AA05 0%, #F4C430 100%);
    background: -o-linear-gradient(135deg, #E1AA05 0%, #F4C430 100%);
    background: linear-gradient(135deg, #E1AA05 0%, #F4C430 100%);
}

/* ==========================================================================
   Filter Support
   ========================================================================== */

.filter-blur {
    -webkit-filter: blur(5px);
    -moz-filter: blur(5px);
    -o-filter: blur(5px);
    -ms-filter: blur(5px);
    filter: blur(5px);
}

.filter-grayscale {
    -webkit-filter: grayscale(100%);
    -moz-filter: grayscale(100%);
    -o-filter: grayscale(100%);
    -ms-filter: grayscale(100%);
    filter: grayscale(100%);
}

/* ==========================================================================
   Backdrop Filter Support
   ========================================================================== */

.backdrop-blur {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* ==========================================================================
   User Select Support
   ========================================================================== */

.user-select-none {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* ==========================================================================
   Touch Action Support
   ========================================================================== */

.touch-action-none {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* ==========================================================================
   Scroll Behavior Support
   ========================================================================== */

.smooth-scroll {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* ==========================================================================
   Font Smoothing Support
   ========================================================================== */

.font-smooth {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Appearance Support
   ========================================================================== */

.appearance-none {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* ==========================================================================
   Text Size Adjust Support
   ========================================================================== */

.text-size-adjust {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* ==========================================================================
   IE Specific Fixes
   ========================================================================== */

/* IE 10+ */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    .ie-flex-fix {
        display: -ms-flexbox;
    }
    
    .ie-grid-fix {
        display: -ms-grid;
    }
}

/* IE 11 */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    .container {
        display: -ms-flexbox;
        -ms-flex-pack: center;
    }
}

/* ==========================================================================
   Safari Specific Fixes
   ========================================================================== */

/* Safari 9+ */
@supports (-webkit-appearance: none) {
    .safari-fix {
        -webkit-appearance: none;
    }
}

/* ==========================================================================
   Firefox Specific Fixes
   ========================================================================== */

/* Firefox */
@-moz-document url-prefix() {
    .firefox-fix {
        -moz-appearance: none;
    }
}
