/* TreeVallei Brand Header Fallback CSS */
/* This file provides complete TreeVallei fallback styles when database-driven CSS fails */

/* ===== ESSENTIAL HEADER STRUCTURE ===== */
.header_second_layer_wrapper {
    background-color: #F8F8F8;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    width: 100%;
    position: relative;
    z-index: 999;
    min-height: 50px;
}

.header_second_layer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
    min-height: 50px;
}

/* Brand Switcher - Left Section */
.second_layer_left_section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.second_layer_left_section .brand-switch-link {
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.second_layer_left_section .page_button {
    font-family: "ConneqtRegular", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.second_layer_left_section .page_button.active {
    color: #2c3e50;
    font-weight: 600;
}

.second_layer_left_section .page_button:hover {
    color: #2c3e50;
}

/* Icons Section - Right */
.second_layer_right_section {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-left: auto;
}

.second_layer_right_section a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 8px;
}

.second_layer_right_section a i {
    font-size: 22px !important;
    color: #495057 !important;
    transition: all 0.3s ease !important;
    line-height: 1 !important;
}

.second_layer_right_section a:hover i {
    color: #2c3e50 !important;
}

/* Badge Styling - Basic fallback */
.second_layer_right_section a span {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 7px;
    border-radius: 12px;
    min-width: 20px;
    min-height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    border: 2px solid white;
}

/* ===== HEADER THIRD LAYER STRUCTURE ===== */
.header_third_layer_wrapper {
    background-color: #FEFEFE;
    width: 100%;
}

.header_third_layer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    max-width: 1300px;
    background-color: #FEFEFE;
    margin: 0 auto;
    position: relative;
}

/* Center Section: Logo/Title */
.third_layer_center_section .site_title {
    font-family: 'ConneqtRegular', sans-serif;
    font-size: 26px;
    color: #474344;
    font-weight: bold;
    text-decoration: none !important;
}

/* Right Section: Search Bar */
.third_layer_right_section .search_bar {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 5px 10px;
    background-color: #fff;
}

.third_layer_right_section .search_bar i:first-child {
    color: #474344;
    font-size: 14px;
    margin-right: 0px;
    margin-left: 0px;
}

.third_layer_right_section .search_bar input {
    border: none;
    outline: none;
    font-size: 14px;
    flex-grow: 1;
}

.search_bar button {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
}

.third_layer_right_section .search_bar i:last-child {
    color: #474344;
    font-size: 14px;
    margin-left: 5px;
    cursor: pointer;
}

.header_third_layer .dropdown-container {
    display: flex;
    align-items: center;
}

.flag-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    vertical-align: middle;
}

.separator {
    border-left: 2px solid #474344;
    height: 24px;
    margin: 0 10px;
}

/* ===== TREEVALLEI BRAND COLORS ===== */
:root {
    --treevallei-primary: #08154A;
    --treevallei-secondary: #3e3a3c;
    --treevallei-accent: #4a5568;
    --treevallei-text: #495057;
    --treevallei-light: #f7fafc;
}

/* Brand-specific CSS variables for TreeVallei */
[data-brand="treevallei"] {
    --primary-color: #08154A;
    --secondary-color: #3e3a3c;
    --text-color: #333;
    --light-bg: #f0f2f5;
    --mobile-menu-primary: #08154A;
    --mobile-menu-secondary: #3e3a3c;
    --mobile-menu-text: #333;
    --mobile-menu-bg: #ffffff;
}

[data-brand="tree-vallie"] {
    --primary-color: #08154A;
    --secondary-color: #3e3a3c;
    --text-color: #333;
    --light-bg: #f0f2f5;
    --mobile-menu-primary: #08154A;
    --mobile-menu-secondary: #3e3a3c;
    --mobile-menu-text: #333;
    --mobile-menu-bg: #ffffff;
}

/* ===== HEADER SECOND LAYER - TREEVALLEI STYLE ===== */
.header_second_layer_wrapper[data-brand="tree-vallie"] {
    background-color: #F8F8F8;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.header_second_layer_wrapper[data-brand="tree-vallie"] .page_button.active {
    color: var(--treevallei-primary);
    font-weight: 600;
}

.header_second_layer_wrapper[data-brand="tree-vallie"] .page_button:hover {
    color: var(--treevallei-primary);
}

.header_second_layer_wrapper[data-brand="tree-vallie"] .page_button::after {
    background: linear-gradient(90deg, var(--treevallei-primary) 0%, var(--treevallei-secondary) 100%);
}

.header_second_layer_wrapper[data-brand="tree-vallie"] .second_layer_right_section a span {
    background: linear-gradient(135deg, var(--treevallei-primary) 0%, var(--treevallei-primary) 100%);
    color: white;
    border: 2px solid white;
    box-shadow: 0 3px 8px rgba(37, 51, 80, 0.4);
    animation: treevallei-pulse 2s infinite;
}

@keyframes treevallei-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* ===== HEADER THIRD LAYER - TREEVALLEI STYLE ===== */
.header_third_layer_wrapper[data-brand="tree-vallie"] .site_title {
    color: var(--treevallei-primary);
    font-weight: bold;
}

.header_third_layer_wrapper[data-brand="tree-vallie"] .search_bar {
    border-color: #ddd;
}

.header_third_layer_wrapper[data-brand="tree-vallie"] .search_bar:focus-within {
    border-color: var(--treevallei-primary);
    box-shadow: 0 0 0 2px rgba(37, 51, 80, 0.2);
}

/* ===== HOVER EFFECTS ===== */
.header_second_layer_wrapper[data-brand="tree-vallie"] .brand-switch-link:hover .page_button {
    transform: translateY(-1px);
    text-shadow: 0 2px 4px rgba(37, 51, 80, 0.3);
}

.header_second_layer_wrapper[data-brand="tree-vallie"] .second_layer_right_section a:hover {
    transform: translateY(-2px);
}

.header_second_layer_wrapper[data-brand="tree-vallie"] .second_layer_right_section a:hover i {
    color: var(--treevallei-primary) !important;
    transform: scale(1.15);
}

/* ===== PROFESSIONAL ANIMATIONS ===== */
.header_second_layer_wrapper[data-brand="tree-vallie"] .brand-switch-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header_second_layer_wrapper[data-brand="tree-vallie"] .brand-switch-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 51, 80, 0.1), transparent);
    transition: left 0.5s;
}

.header_second_layer_wrapper[data-brand="tree-vallie"] .brand-switch-link:hover::before {
    left: 100%;
}

/* ===== LOADING ANIMATION ===== */
.header_second_layer_wrapper[data-brand="tree-vallie"].loading::after {
    background: linear-gradient(90deg, transparent, var(--treevallei-primary), transparent);
}

/* ===== RTL SUPPORT ===== */
[dir="rtl"] .header_second_layer {
    direction: rtl !important;
    flex-direction: row-reverse !important;
}

[dir="rtl"] .header_second_layer_wrapper[data-brand="tree-vallie"] {
    direction: rtl !important;
}

/* RTL: Move right section to left side */
[dir="rtl"] .header_second_layer_wrapper[data-brand="tree-vallie"] .second_layer_right_section {
    order: -1 !important;
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* RTL: Move left section to right side */
[dir="rtl"] .header_second_layer_wrapper[data-brand="tree-vallie"] .second_layer_left_section {
    order: 1 !important;
    margin-left: auto !important;
    margin-right: 0 !important;
}

/* RTL: Adjust badge positioning */
[dir="rtl"] .header_second_layer_wrapper[data-brand="tree-vallie"] .second_layer_right_section a span {
    right: auto;
    left: -10px;
}

/* RTL: Reverse icon order within right section */
[dir="rtl"] .header_second_layer_wrapper[data-brand="tree-vallie"] .second_layer_right_section {
    flex-direction: row-reverse !important;
}

/* RTL: Keep same gap spacing as English */
[dir="rtl"] .header_second_layer_wrapper[data-brand="tree-vallie"] .second_layer_right_section {
    gap: 25px !important;
}

/* RTL: Reset any individual margins to let gap handle spacing */
[dir="rtl"] .header_second_layer_wrapper[data-brand="tree-vallie"] .second_layer_right_section a {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* RTL: Ensure proper text alignment */
[dir="rtl"] .header_second_layer_wrapper[data-brand="tree-vallie"] .second_layer_left_section {
    text-align: right !important;
}

/* RTL: Handle rtl-icons class specifically */
[dir="rtl"] .header_second_layer_wrapper[data-brand="tree-vallie"] .rtl-icons {
    justify-content: flex-start !important;
    order: -1 !important;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .header_second_layer {
        padding: 10px 15px;
        gap: 15px;
    }
    
    .second_layer_left_section {
        gap: 5px;
    }
    
    .second_layer_left_section .brand-switch-link {
        padding: 6px 12px;
    }
    
    .second_layer_left_section .page_button {
        font-size: 12px;
    }
    
    .second_layer_right_section {
        gap: 20px;
    }
    
    .second_layer_right_section a {
        padding: 6px;
    }
    
    .second_layer_right_section a i {
        font-size: 20px !important;
    }
    
    .second_layer_right_section a span {
        font-size: 11px;
        min-width: 18px;
        min-height: 18px;
        padding: 3px 6px;
    }
    
    .header_second_layer_wrapper[data-brand="tree-vallie"] .second_layer_right_section a span {
        background: var(--treevallei-primary);
    }
}

@media (max-width: 480px) {
    .header_second_layer {
        padding: 8px 10px;
    }
    
    .second_layer_left_section .page_button {
        font-size: 11px;
    }
    
    .second_layer_right_section {
        gap: 18px;
    }
    
    .second_layer_right_section a {
        padding: 4px;
    }
    
    .second_layer_right_section a span {
        font-size: 10px;
        min-width: 16px;
        min-height: 16px;
        padding: 2px 5px;
    }
}