/* =========================================
   Top Bar Styles
   ========================================= */
.top-bar {
    background-color: #0f2d4f;
    color: #fff;
    font-size: 15px;
    padding: 10px 30px;
    width: 100%;
    z-index: 1001;
    position: relative;
}

.top-bar .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    height: auto;
    padding: 0 20px;
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
}

.top-bar-item {
    margin-right: 20px;
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s;
}

.top-bar-item:hover {
    opacity: 0.8;
    color: #fff;
}

.top-bar-item i {
    margin-right: 6px;
}

.top-bar-btn {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 4px 15px;
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s;
    font-weight: 500;
}

.top-bar-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* =========================================
   Header & Navigation Styles
   ========================================= */
.main-nav {
    width: 100%;
    background: rgba(255, 255, 255, 0.9); /* Merged: slightly transparent */
    backdrop-filter: blur(10px); /* Merged from style.css */
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: fixed; /* Merged: Fixed from style.css seems more correct for a sticky header with body padding */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    min-height: 80px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
}

.nav-container-wide {
    max-width: 90% !important;
}

.nav-logo {
    display: flex;
    align-items: center;
    z-index: 101;
    height: 100%;
}

.nav-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: 1.2rem;
    height: 100%;
}

.nav-logo img {
    height: 40px;
    width: auto;
    margin-right: 10px;
    object-fit: contain;
    display: block;
}

.nav-logo span {
    font-size: 1.2rem;
    font-weight: 500;
    color: #333;
    margin-left: 10px;
}

.nav-menu {
    display: flex;
    align-items: center;
    height: 100%;
}

.menu-items {
    display: flex;
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
    height: 100%;
    align-items: center;
}

.menu-items li {
    position: relative;
    margin-left: 10px;
    height: 100%;
    display: flex;
    align-items: center;
}

.menu-items a {
    display: flex;
    align-items: center;
    padding: 0 8px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 1rem;
    white-space: nowrap;
    height: 100%;
    line-height: 1.5;
}

.menu-items li a:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

.menu-items li i {
    margin-right: 5px;
}

/* Sub-menu Styles */
.menu-items .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 4px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 999;
    padding: 10px 0;
    list-style: none;
    text-align: left;
}

.menu-items li:hover > .sub-menu,
.menu-items li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-items .sub-menu li {
    margin: 0;
    display: block;
    width: 100%;
    height: auto;
}

.menu-items .sub-menu a {
    padding: 10px 20px;
    display: block;
    color: #555;
    font-size: 0.95rem;
    transition: all 0.2s;
    height: auto;
}

.menu-items .sub-menu a:hover {
    background: #f9f9f9;
    color: #007bff;
    padding-left: 25px;
}

.menu-items .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-top: -10px;
}

.menu-items .menu-item-has-children > a {
    padding-right: 15px;
    position: relative;
}

.menu-items .menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    margin-left: 5px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    vertical-align: middle;
    opacity: 0.5;
}

.menu-items .sub-menu .menu-item-has-children > a::after {
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 4px solid currentColor;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* Header Right Actions */
.header-right-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 20px;
}

.header-search {
    position: relative;
}

.header-search .search-form {
    display: flex;
    align-items: center;
    border: 1px solid #eee;
    border-radius: 20px;
    padding: 3px 10px;
    background: #f9f9f9;
    transition: all 0.3s;
}

.header-search .search-form:focus-within {
    background: #fff;
    border-color: #ddd;
    box-shadow: 0 0 5px rgba(0,0,0,0.05);
}

.header-search .search-field {
    border: none;
    background: transparent;
    padding: 5px;
    width: 150px;
    font-size: 13px;
    outline: none;
    color: #555;
}

.header-search .search-submit {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s;
}

.header-search .search-submit:hover {
    color: #333;
}

.header-cta-btn {
    background-color: #2d6eb7;
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
    white-space: nowrap;
}

.header-cta-btn:hover {
    background-color: #245b9b;
    color: #fff;
    transform: translateY(-1px);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    margin-right: -10px;
    transition: all 0.3s ease;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #333;
    margin: 3px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =========================================
   Footer Styles
   ========================================= */
.site-footer {
    background-color: #f8f9fa;
    padding: 60px 0 20px;
    font-size: 14px;
    color: #555;
    border-top: 1px solid #eaeaea;
    margin-top: 50px;
    line-height: 1.6;
}

.footer-container {
    max-width: 80%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 50px;
    justify-content: space-between;
}

.footer-contact-col {
    flex: 0 0 320px;
    max-width: 100%;
    margin-right: 40px;
}

.footer-logo {
    margin-bottom: 25px;
}

.footer-logo img {
    max-height: 50px;
    width: auto;
    display: block;
}

.contact-info {
    margin-bottom: 25px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    color: #555;
}

.contact-item i {
    margin-right: 12px;
    font-style: normal;
    width: 20px;
    text-align: center;
    font-size: 16px;
    line-height: 1.4;
    color: #333;
}

.contact-item a {
    color: #555;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: #0056b3;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    background-color: #e9ecef;
    border-radius: 50%;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.social-icon:hover {
    background-color: #0056b3;
    color: #fff;
    transform: translateY(-2px);
}

.footer-menu-col {
    flex: 1;
    min-width: 140px;
    margin-bottom: 30px;
}

.footer-col-markets {
    flex: 1.5;
    min-width: 200px;
}

.footer-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
    margin-top: 0;
}

.footer-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu-list li {
    margin-bottom: 12px;
    padding: 0;
    line-height: 1.4;
}

.footer-menu-list a {
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    display: inline-block;
}

.footer-menu-list a:hover {
    color: #0056b3;
    transform: translateX(3px);
}

.footer-bottom {
    border-top: 1px solid #e1e1e1;
    padding-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.copyright {
    color: #666;
    font-size: 13px;
    font-weight: 500;
}

.footer-bottom-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-bottom-menu li {
    margin-left: 20px;
    position: relative;
}

.footer-bottom-menu li::before {
    content: "|";
    position: absolute;
    left: -12px;
    color: #ccc;
    font-size: 12px;
    top: 1px;
}

.footer-bottom-menu li:first-child::before {
    display: none;
}

.footer-bottom-menu li:first-child {
    margin-left: 0;
}

.footer-bottom-menu a {
    color: #555;
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
}

.footer-bottom-menu a:hover {
    color: #333;
}

.footer-bottom-links {
    display: flex;
    align-items: center;
}

.custom-legal-links {
    margin-left: 20px;
}

.site-footer-credits {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-right: 10px;
}

/* =========================================
   Responsive Adaptations
   ========================================= */
@media (max-width: 992px) {
    .footer-contact-col {
        flex: 0 0 100%;
        margin-right: 0;
        margin-bottom: 40px;
    }
    
    .footer-menu-col {
        flex: 0 0 50%;
    }
}

@media (max-width: 768px) {
    /* Footer */
    .footer-menu-col {
        flex: 0 0 100%;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-bottom-menu {
        justify-content: center;
    }
    
    /* Top Bar */
    .top-bar {
        padding: 5px 10px;
    }
    
    .top-bar .nav-container {
        flex-direction: column;
        gap: 5px;
        padding: 5px 0;
    }
    
    .top-bar-left, .top-bar-right {
        justify-content: center;
        width: 100%;
        flex-wrap: wrap;
    }
    
    .top-bar-item {
        margin: 2px 8px;
        font-size: 12px;
    }
    
    /* Header Right Actions */
    .header-right-actions {
        margin-right: 50px;
        margin-left: auto;
        gap: 8px;
        position: relative;
        z-index: 10;
    }
    
    .header-search .search-field {
        width: 80px;
        padding: 3px;
    }
    
    .header-search .search-form {
        padding: 2px 5px;
    }
    
    .header-cta-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    /* Mobile Menu */
    .menu-toggle {
        display: flex;
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: #fff;
        z-index: 1001;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: block;
        box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu-inner {
        height: 100%;
        overflow-y: auto;
        padding: 50px 0 20px;
        -webkit-overflow-scrolling: touch;
    }

    .menu-items {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        height: auto !important;
        padding: 0;
    }

    .menu-items li {
        margin: 0 !important;
        width: 100%;
        height: auto !important;
        display: block;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    .menu-items li a {
        padding: 12px 20px;
        font-size: 15px;
        line-height: 1.4;
        height: auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: #333;
        font-weight: 500;
    }

    .menu-items li a:hover {
        background: none;
        color: #333;
    }

    .menu-items .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        background: #f8f9fa;
        width: 100%;
        padding: 5px 0;
        box-shadow: inset 0 2px 6px rgba(0,0,0,0.02);
        border-radius: 0;
    }

    .menu-items .sub-menu li {
        border-bottom: none;
    }

    .menu-items .sub-menu a {
        padding: 8px 20px 8px 36px;
        font-size: 14px;
        color: #666;
    }

    .menu-item-has-children > a::after {
        content: '';
        width: 16px;
        height: 16px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23999999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
        border: none;
        transform: rotate(0deg);
        transition: transform 0.3s ease;
        margin-left: 10px;
        opacity: 0.8;
        margin-top: 0;
    }

    .menu-item-has-children.expanded > a::after {
        transform: rotate(180deg);
        margin-top: 0;
    }

    .menu-items li:hover > .sub-menu {
        display: none;
    }
    
    .menu-items li.expanded > .sub-menu {
        display: block;
        animation: fadeIn 0.2s ease-out;
    }
}

@media (max-width: 576px) {
    .footer-menu-col {
        flex: 0 0 100%;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
