/* Cross-Browser Compatibility Fixes for Country Club Kennels */

/* Reset and normalize for consistent rendering across browsers */
* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* Ensure viewport meta tag behavior is consistent */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Body responsive improvements */
body {
    background: #f6f6ee url(https://static.typepad.com/.shared/themes/jim/magnetic/green/bg.gif) repeat-x 50% 0 !important;
    margin: 0;
    padding: 0;
    width: 100%;
    min-width: 320px; /* Minimum mobile width */
}

/* Container responsive fixes */
#container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

/* Banner responsive improvements */
#banner {
    background: url('../images/Banner.jpeg') center center !important;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    width: 100% !important;
    max-width: 1000px !important;
    height: 280px !important;
    margin: 0 auto !important;
    position: relative;
    background-repeat: no-repeat;
}

/* Banner inner responsive */
#banner-inner {
    background-image: url(https://countryclubkennels.typepad.com/cckweb.banner.magnetic6.2.png) !important;
    background-color: transparent !important;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    overflow: visible;
    padding: 0;
    width: 100%;
    height: 100%;
}

/* Banner header responsive */
#banner-header {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
}

#banner-header a {
    display: block;
    left: 0;
    top: 0;
    height: 108px;
    text-indent: -1000em;
    width: 100%;
}

/* Navigation responsive improvements */
#nav {
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid #ccc;
    position: relative;
    z-index: 1000;
}

#nav-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 10px;
}

.nav-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 10px 0;
    
    /* Fallback for older browsers */
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
}

.nav-list-item {
    margin: 5px;
    text-align: center;
}

.nav-list-item a {
    display: block;
    padding: 8px 15px;
    text-decoration: none;
    background: #4a7c59;
    color: white;
    border-radius: 3px;
    white-space: nowrap;
    
    /* Cross-browser transitions */
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.nav-list-item a:hover {
    background: #5a8c69;
    transform: translateY(-1px);
    -webkit-transform: translateY(-1px);
    -moz-transform: translateY(-1px);
    -ms-transform: translateY(-1px);
}

/* Page body responsive */
#pagebody {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 10px;
}

#pagebody-inner {
    width: 100%;
}

#alpha {
    width: 100%;
}

#alpha-inner {
    width: 100%;
    padding: 20px 0;
}

/* Entry content responsive */
.entry {
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    
    /* Cross-browser box shadow */
    -webkit-box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    -moz-box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.entry-content {
    line-height: 1.6;
}

/* Image responsive improvements */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.asset-image {
    max-width: 100% !important;
    height: auto !important;
    width: auto !important;
}

/* Specific image fixes for floating images */
.asset-img-link img[style*="float: right"] {
    float: right;
    margin: 0 0 10px 10px !important;
    max-width: 300px;
}

.asset-img-link img[style*="float: left"] {
    float: left;
    margin: 0 10px 10px 0 !important;
    max-width: 300px;
}

/* Text responsive improvements */
p, span, li {
    word-wrap: break-word;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

/* Lists responsive */
ul, ol {
    padding-left: 20px;
}

li {
    margin-bottom: 10px;
}

/* Date header responsive */
.date-header {
    background: #4a7c59;
    color: white;
    padding: 10px 20px;
    margin: 0 0 20px 0;
    border-radius: 3px;
    font-size: 14px;
    text-align: center;
}

/* Entry header responsive */
.entry-header {
    margin-bottom: 15px;
}

.entry-header a {
    color: #4a7c59;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

/* Sidebar responsive (if exists) */
#beta {
    width: 100%;
    margin-top: 20px;
}

#beta-inner {
    width: 100%;
}

/* Mobile-specific styles */
@media screen and (max-width: 768px) {
    /* Banner adjustments for mobile */
    #banner {
        height: 80px !important;
        background-size: cover;
    }
    
    #banner-header a {
        height: 80px;
    }
    
    /* Navigation stack on mobile */
    .nav-list {
        flex-direction: column;
        -webkit-flex-direction: column;
        -ms-flex-direction: column;
    }
    
    .nav-list-item {
        margin: 2px 0;
        width: 100%;
    }
    
    .nav-list-item a {
        width: 100%;
        padding: 12px 15px;
    }
    
    /* Content padding for mobile */
    #pagebody {
        padding: 0 5px;
    }
    
    .entry {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    /* Image adjustments for mobile */
    .asset-img-link img[style*="float"] {
        float: none !important;
        margin: 10px auto !important;
        display: block;
        max-width: 100%;
    }
    
    /* Text size adjustments */
    .entry-header a {
        font-size: 20px;
    }
    
    span[style*="font-size: 11pt"] {
        font-size: 14px !important;
    }
}

/* Small mobile devices */
@media screen and (max-width: 480px) {
    #banner {
        height: 60px !important;
    }
    
    #banner-header a {
        height: 60px;
    }
    
    .entry {
        padding: 10px;
    }
    
    .nav-list-item a {
        font-size: 14px;
        padding: 10px;
    }
}

/* Large desktop improvements */
@media screen and (min-width: 1200px) {
    #container {
        max-width: 1200px;
    }
    
    #banner {
        max-width: 1000px;
    }
    
    #pagebody {
        max-width: 1000px;
    }
}

/* Cross-browser clearfix */
.pkg:after,
.entry:after,
.nav-list:after {
    content: "";
    display: table;
    clear: both;
}

/* IE specific fixes */
.ie8 #banner {
    background-size: 100% auto;
}

.ie8 .nav-list {
    display: block;
    text-align: center;
}

.ie8 .nav-list-item {
    display: inline-block;
}

/* Print styles */
@media print {
    #nav {
        display: none;
    }
    
    .entry {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    img {
        max-width: 100%;
    }
}

/* Accessibility improvements */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    /* IE 10+ specific styles */
    .nav-list {
        display: -ms-flexbox;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        -ms-flex-pack: center;
    }
}

/* Focus states for accessibility */
a:focus,
button:focus {
    outline: 2px solid #4a7c59;
    outline-offset: 2px;
}

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #4a7c59;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
}

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