/* Reset and Base Styles */
.bthf-header *,
.bthf-footer * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Container */
.bthf-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Top Bar */
.bthf-header-top {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 8px 0;
    font-size: 13px;
}

.bthf-header-info {
    display: flex;
    gap: 30px;
    color: #6c757d;
}

.bthf-expert,
.bthf-updated {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Header Main */
.bthf-header-main {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #e9ecef;
}

.bthf-header-row {
    display: flex;
    align-items: center;
    gap: 30px;
}

.bthf-logo {
    flex-shrink: 0;
}

.bthf-logo a {
    display: block;
    text-decoration: none;
    color: #0066cc;
    font-size: 24px;
    font-weight: 700;
}

.bthf-logo img {
    height: 40px;
    width: auto;
}

.bthf-header-info {
    display: flex;
    gap: 30px;
    color: #6c757d;
    flex: 1;
}

.bthf-header-links {
    display: flex;
    gap: 25px;
}

.bthf-header-links a {
    color: #6c757d;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.bthf-header-links a:hover {
    color: #333;
}

.bthf-header-top .bthf-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bthf-expert svg,
.bthf-updated svg {
    vertical-align: middle;
    margin-right: 5px;
}

/* Search Bar */
.bthf-search {
    flex: 1;
    max-width: 600px;
}

.bthf-search form {
    display: flex;
    position: relative;
}

.bthf-search input {
    flex: 1;
    padding: 12px 50px 12px 20px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.bthf-search input:focus {
    outline: none;
    border-color: #0066cc;
}

.bthf-search button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 18px;
}

/* Header Actions */
.bthf-header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.bthf-compare {
    color: #495057;
    font-size: 14px;
    cursor: pointer;
}

.bthf-cta {
    background: #0066cc;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.bthf-cta:hover {
    background: #0056b3;
}

/* Mobile Toggle Button */
.bthf-mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    color: #333;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* Navigation */
.bthf-nav {
    background: #fff;
    border-bottom: 2px solid #e9ecef;
    position: relative;
}

.bthf-nav-list {
    display: flex;
    list-style: none;
    align-items: center;
    height: 50px;
}

.bthf-nav-item {
    position: static;
}

.bthf-nav-item > a {
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 50px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.bthf-nav-item > a:hover {
    background: #f8f9fa;
}

.bthf-nav-item .arrow {
    margin-left: 5px;
    font-size: 10px;
    transition: transform 0.2s;
}

.bthf-nav-item:hover .arrow {
    transform: rotate(180deg);
}

/* Dropdown -- UPDATED FOR MEGA MENU */
.bthf-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    border-top: 1px solid #e9ecef;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1000;
}

.bthf-nav-item:hover .bthf-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown Content -- UPDATED FOR MEGA MENU ALIGNMENT */
.bthf-dropdown-content {
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 30px 20px;
}

.bthf-dropdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.bthf-dropdown-column h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bthf-dropdown-column h4 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.bthf-dropdown-column h4 a:hover {
    color: #0066cc;
}

.bthf-dropdown-column ul {
    list-style: none;
}

.bthf-dropdown-column li {
    margin-bottom: 8px;
}

.bthf-dropdown-column a {
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.bthf-dropdown-column a:hover {
    color: #0066cc;
}

/* Tested Count */
.bthf-tested-count {
    margin-left: auto;
    color: #28a745;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    padding-right: 20px;
}

/* Breadcrumb */
.bthf-breadcrumb {
    padding: 15px 0;
    background: #f8f9fa;
    margin-bottom: 20px;
    position: static !important;
}

.bthf-breadcrumb ul {
    display: flex;
    align-items: center;
    list-style: none;
    flex-wrap: wrap;
}

.bthf-breadcrumb li {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.bthf-breadcrumb li span {
    padding: 0 10px;
    color: #6c757d;
}

.bthf-breadcrumb a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s;
}

.bthf-breadcrumb a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.bthf-breadcrumb .current {
    color: #495057;
    font-weight: 500;
}

/* Footer */
.bthf-footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.bthf-footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.bthf-footer-column h3,
.bthf-footer-column h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 18px;
}

.bthf-footer-column h5 {
    color: #fff;
    margin: 20px 0 10px;
    font-size: 16px;
}

.bthf-footer-column p {
    line-height: 1.6;
    margin-bottom: 15px;
    color: #bdc3c7;
    font-size: 14px;
}

.bthf-footer-column p.small {
    font-size: 12px;
    font-style: italic;
}

.bthf-footer-column ul {
    list-style: none;
}

.bthf-footer-column li {
    margin-bottom: 10px;
}

.bthf-footer-column a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 14px;
}

.bthf-footer-column a:hover {
    color: #fff;
}

/* Footer Logo */
.bthf-footer-logo {
    margin-bottom: 20px;
}

/* Social Icons */
.bthf-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.bthf-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: background 0.2s;
    font-size: 16px;
}

.bthf-social a:hover {
    background: rgba(255,255,255,0.2);
}

/* Newsletter Form */
.bthf-newsletter {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.bthf-newsletter input {
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 5px;
    font-size: 14px;
}

.bthf-newsletter input::placeholder {
    color: rgba(255,255,255,0.5);
}

.bthf-newsletter button {
    padding: 12px 20px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.bthf-newsletter button:hover {
    background: #2980b9;
}

/* Address */
.bthf-address {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Footer Bottom */
.bthf-footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bthf-certifications {
    display: flex;
    gap: 20px;
}

.bthf-certifications img {
    height: 40px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.bthf-certifications img:hover {
    opacity: 1;
}

.bthf-copyright {
    text-align: right;
}

.bthf-copyright p {
    font-size: 13px;
    color: #95a5a6;
    margin-bottom: 5px;
}

.bthf-copyright a {
    color: #3498db;
    text-decoration: none;
}

.bthf-copyright a:hover {
    text-decoration: underline;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .bthf-breadcrumb li {
        font-size: 12px;
    }
    
    .bthf-nav {
        position: relative;
    }
    
    .bthf-nav .bthf-container {
        position: relative;
    }
    
    .bthf-nav-list {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        z-index: 1000;
        height: auto;
    }
    
    .bthf-nav-list.is-open {
        display: flex;
    }
    
    .bthf-mobile-toggle {
        display: block;
        background-color: transparent !important;
        margin: 0px;
        font-size: 50px;
        top: 25px;
        right: 0px;
    }
    .bthf-mobile-toggle:hover {
        display: block;
        color: green;
    }
    
    .bthf-nav-item {
        width: 100%;
        border-bottom: 1px solid #e9ecef;
    }
    
    .bthf-nav-item > a {
        width: 100%;
        padding: 15px 20px;
        height: auto;
        justify-content: space-between;
    }
    
    .bthf-dropdown {
        position: static;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f8f9fa;
        border-top: none;
    }
    
    .bthf-nav-item.is-open .bthf-dropdown {
        display: block;
    }
    
    .bthf-dropdown-grid {
        display: block;
    }
    
    .bthf-dropdown-column {
        margin-bottom: 20px;
        padding: 15px 20px;
    }
    
    .bthf-tested-count {
        display: none;
    }
    
    .bthf-header-row {
        flex-wrap: wrap;
    }
    
    .bthf-search {
        order: 3;
        flex-basis: 100%;
        max-width: 100%;
        margin-top: 15px;
    }
    
    .bthf-footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .bthf-header-top .bthf-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding-top: 5px;
    }
    
    .bthf-header-info {
        flex-direction: row;
        gap: 15px;
        justify-content: flex-start;
        order: 1;
    }
    
    .bthf-header-links {
        flex-direction: row;
        gap: 15px;
        font-size: 12px;
        justify-content: flex-end;
        order: 2;
    }
    
    .bthf-header-actions {
        display: none;
    }
    
    .bthf-footer-content {
        grid-template-columns: 1fr;
    }
    
    .bthf-footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .bthf-copyright {
        text-align: center;
    }
        .bthf-compare,
    .bthf-cta {
        display: none;
    }
    
    .bthf-header-row {
        justify-content: space-between;
        align-items: center;
    }
    
    .bthf-logo {
        flex: 0 0 12%;
    }
    
    .bthf-search {
        flex: 1;
        max-width: 100% !important;
        margin: 0px !important;
        order: 2;
    }
}