/* Modern Stanley Market Website Styles */
/* Enhanced version with improved design, performance and mobile responsiveness */

/* CSS Variables for consistent theming */
:root {
    --primary-color: #2c5282;
    --secondary-color: #3182ce;
    --accent-color: #e53e3e;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --background-light: #f7fafc;
    --background-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 8px;
    --max-width: 1200px;
}

/* Reset and base styles */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-light);
}

/* Improved typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 1rem 0;
    color: var(--text-primary);
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 1.5rem 0 1rem 0;
    color: var(--text-primary);
}

p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
    color: var(--text-secondary);
}

/* Modern container and layout */
#mainWrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--background-light) 0%, #ffffff 100%);
}

#wrapperContent {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Enhanced header with modern design */
.indexheaderWrapper, #HeaderWrapper {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Modern slideshow container */
#slideWrapper {
    position: relative;
    height: 500px;
    overflow: hidden;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

#slideshowID {
    position: relative;
    width: 100%;
    height: 100%;
}

#slideshowID img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    transition: opacity 0.5s ease-in-out;
}

#slideshowID img.first {
    display: block;
    opacity: 1;
}

/* Modern logo design */
#logo {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #c53030 100%);
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#logo:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

#logo p {
    color: white;
    text-align: center;
    margin: 0;
    padding: 0;
}

#logoline1 {
    font-size: 16px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: block;
    margin-bottom: 2px;
}

.logoline2 {
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    display: block;
}

/* Modern navigation */
#nav-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

#nav-menu ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#nav-menu li {
    margin: 0;
}

#nav-menu a {
    display: inline-block;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#nav-menu a:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Mobile menu button */
.mobile-only {
    display: none;
}

#mobile-menu-button {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 101;
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

#mobile-menu-button a {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Content sections */
#midWrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Modern content boxes */
.thickBorderOverBox, #mid1, #mid4 {
    background: var(--background-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease;
}

.thickBorderOverBox:hover, #mid1:hover, #mid4:hover {
    box-shadow: var(--shadow-md);
}

/* Content sections layout */
#mid2, #mid3 {
    background: var(--background-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    position: relative;
}

#mid2 img, #mid3 img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

#mid2text {
    padding: 1.5rem;
}

/* Modern buttons */
.contentbutton a, .buttonGradient a {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #c53030 100%);
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.contentbutton a:hover, .buttonGradient a:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #c53030 0%, var(--accent-color) 100%);
}

/* Lists styling */
ul li {
    margin-bottom: 0.5rem;
}

ul li a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

ul li a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Modern footer */
#footerWrapper {
    background: var(--text-primary);
    color: white;
    padding: 2rem 1rem;
    margin-top: 3rem;
    border-top: none;
}

.footerList {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footerList li {
    padding: 0;
    border: none;
    margin: 0;
}

.footerList li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: background-color 0.3s ease;
}

.footerList li a:hover {
    background: var(--secondary-color);
}

#socialfooter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
    padding: 0;
    list-style: none;
}

/* Images and media */
img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

/* AdSense containers */
.adsense {
    margin: 2rem 0;
    text-align: center;
    padding: 1rem;
    background: var(--background-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

/* Responsive design */
@media (min-width: 768px) {
    #midWrapper {
        grid-template-columns: 2fr 1fr;
        gap: 2rem;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.25rem;
    }
    
    .mobile-only {
        display: none !important;
    }
}

@media (max-width: 767px) {
    :root {
        --max-width: 100%;
    }
    
    #nav-menu {
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100vh;
        background: var(--background-white);
        transition: right 0.3s ease;
        box-shadow: var(--shadow-lg);
        z-index: 1000;
        padding: 4rem 1rem 1rem;
    }
    
    #nav-menu.open {
        right: 0;
    }
    
    #nav-menu ul {
        flex-direction: column;
        gap: 0;
    }
    
    #nav-menu a {
        display: block;
        padding: 1rem;
        margin-bottom: 1px;
        background: transparent;
        color: var(--text-primary);
        border-radius: 0;
        border: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    #nav-menu a:hover {
        background: var(--background-light);
        transform: none;
        box-shadow: none;
    }
    
    .mobile-only {
        display: block;
    }
    
    #logo {
        width: 80px;
        height: 80px;
        top: 10px;
        left: 10px;
    }
    
    #logoline1 {
        font-size: 12px;
    }
    
    .logoline2 {
        font-size: 10px;
    }
    
    #slideWrapper {
        height: 300px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    p {
        font-size: 1rem;
    }
    
    .thickBorderOverBox, #mid1, #mid4 {
        padding: 1.5rem;
    }
    
    .footerList {
        flex-direction: column;
        text-align: center;
    }
}

/* Animation and transitions */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Focus states for accessibility */
a:focus, button:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    #nav-menu, #mobile-menu-button, .adsense {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .thickBorderOverBox, #mid1, #mid4 {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}