/* Universal Layout Styles - Applied to ALL Pages */
/* Ensures consistent header, sidebar, footer, navigation, and link styling */

/* ===== GLOBAL LINK CONTRAST FIX ===== */
a {
    color: #4a90e2 !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #6eb0ff !important;
    text-decoration: underline;
}

/* Specific link types with enhanced contrast */
.download-link,
.product-link,
.news-link,
.manufacturer-link {
    color: #5cb85c !important;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.download-link:hover,
.product-link:hover,
.news-link:hover,
.manufacturer-link:hover {
    background: rgba(92, 184, 92, 0.1);
    color: #7ed97e !important;
}

/* Button links */
.btn-link,
button a {
    color: #ffffff !important;
}

/* ===== HEADER UNIFORMITY ===== */
header,
.header,
.site-header {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-bottom: 2px solid rgba(74, 144, 226, 0.3);
    padding: 0.5rem 0;
    /* Reduced from 1rem for more compact header */
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ===== SIDEBAR UNIFORMITY ===== */
.sidebar,
aside {
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.95), rgba(30, 30, 45, 0.95));
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(74, 144, 226, 0.2);
    height: calc(100vh - 94px) !important;
    position: sticky;
    top: 94px;
    overflow-y: auto;
}

/* ===== FOOTER UNIFORMITY - COMPACT VERSION ===== */
footer,
.footer {
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    border-top: 2px solid rgba(74, 144, 226, 0.3);
    margin-top: 20px;
    padding: 1rem 0 60px 0;
    /* Reduced padding for more content space */
    position: relative;
    clear: both;
}

/* ===== MAIN CONTENT SPACING - COMPACT VERSION ===== */
main,
.main {
    padding-bottom: 20px;
    /* Compact spacing for more content */
    min-height: calc(100vh - 200px);
}

body {
    padding-bottom: 50px !important;
    /* For footer ticker */
}

/* ===== NAVIGATION UNIFORMITY ===== */
nav ul,
.nav ul,
.navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

nav li,
.nav li,
.navigation li {
    margin-bottom: 0.5rem;
}

nav a,
.nav a,
.navigation a {
    color: #e0e0e0 !important;
    padding: 0.75rem 1rem;
    display: block;
    border-radius: 8px;
    transition: all 0.3s ease;
}

nav a:hover,
.nav a:hover,
.navigation a:hover,
nav a.active,
.nav a.active,
.navigation a.active {
    background: rgba(74, 144, 226, 0.2);
    color: #4a90e2 !important;
    transform: translateX(5px);
}

/* ===== CHAT BUTTON UNIFORMITY ===== */
.kimberley-chat-container {
    position: fixed !important;
    bottom: 60px !important;
    /* Above ticker */
    right: 24px !important;
    z-index: 99999 !important;
}

.kimberley-chat-toggle {
    background: linear-gradient(135deg, #4a90e2, #357abd) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 64px !important;
    height: 64px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 6px 24px rgba(74, 144, 226, 0.4) !important;
    transition: all 0.3s ease !important;
    font-size: 28px !important;
}

.kimberley-chat-toggle:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 8px 32px rgba(74, 144, 226, 0.6) !important;
}

.kimberley-chat-window {
    position: fixed !important;
    bottom: 140px !important;
    /* Above button */
    right: 24px !important;
    width: 380px !important;
    max-width: calc(100vw - 48px) !important;
    height: 600px !important;
    max-height: calc(100vh - 200px) !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3) !important;
}

/* ===== RESPONSIVE MOBILE ===== */
@media (max-width: 768px) {
    .kimberley-chat-toggle {
        width: 56px !important;
        height: 56px !important;
        bottom: 56px !important;
        right: 16px !important;
    }

    .kimberley-chat-window {
        width: calc(100vw - 32px) !important;
        height: calc(100vh - 180px) !important;
        bottom: 120px !important;
        right: 16px !important;
    }

    .sidebar,
    aside {
        position: relative;
        height: auto !important;
    }
}

/* ===== GRID LAYOUTS ===== */
.news-grid,
.products-grid,
.downloads-grid,
.manufacturer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.news-card,
.product-card,
.download-card,
.manufacturer-card {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.95), rgba(20, 20, 30, 0.95));
    border: 1px solid rgba(74, 144, 226, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-card:hover,
.product-card:hover,
.download-card:hover,
.manufacturer-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(74, 144, 226, 0.3);
    border-color: rgba(74, 144, 226, 0.5);
}

/* ===== BUTTONS ===== */
.cta-outline,
.btn-primary,
button.primary {
    background: transparent;
    border: 2px solid #4a90e2;
    color: #4a90e2 !important;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-outline:hover,
.btn-primary:hover,
button.primary:hover {
    background: #4a90e2;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.4);
}