/*
Theme Name: BK Theme
Theme URI: https://example.com/bk-theme/
Author: Your Name
Author URI: https://example.com/
Description: A WordPress theme compatible with Elementor, designed to be easily configurable.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, elementor
Text Domain: bk-theme
*/

/* Base styles */
:root {
    --primary-color: #4e73df;
    --primary-dark: #3a56b0;
    --secondary-color: #333333;
    --accent-color: #f8a100;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #666666;
    --header-bg: #ffffff;
    --header-top-bg: #4e73df;
    --header-text: #333333;
    --header-light-text: #ffffff;
    --header-height: 120px;
    --header-main-height: 80px;
    --header-top-height: 40px;
    --header-height-mobile: 70px;
    --transition-speed: 0.3s;
    --border-radius: 4px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--secondary-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: #004999;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header styles */
.site-header {
    width: 100%;
    z-index: 1000;
    position: relative;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease;
}

/* Sticky header styles */
.site-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--header-bg);
    animation: slideDown 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-bar .site-header.sticky {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .site-header.sticky {
        top: 46px;
    }
}

.site-header.sticky .header-top {
    display: none;
}

.site-header.sticky .header-main {
    height: 60px;
}

.site-header.sticky .custom-logo-link img {
    max-height: 40px;
}

.site-header.sticky .menu > li > a {
    height: 60px;
}

/* Header hide on scroll down */
.site-header.header-hidden {
    transform: translateY(-100%);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Header Top Bar */
.header-top {
    background-color: var(--header-top-bg);
    color: var(--header-light-text);
    height: var(--header-top-height);
    display: flex;
    align-items: center;
}

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

.header-contact-info {
    display: flex;
    align-items: center;
}

.header-contact-info a {
    color: var(--header-light-text);
    margin-right: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.header-contact-info a i {
    margin-right: 8px;
}

.header-social {
    display: flex;
    align-items: center;
}

.social-icon {
    color: var(--header-light-text);
    margin-left: 15px;
    font-size: 14px;
    transition: opacity var(--transition-speed) ease;
}

.social-icon:hover {
    opacity: 0.8;
}

/* Header Main */
.header-main {
    background-color: var(--header-bg);
    height: var(--header-main-height);
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    position: relative;
}

/* Container for all sections */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Site Branding */
.site-branding {
    display: flex;
    align-items: center;
}

.custom-logo-link {
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.custom-logo-link img {
    max-height: 50px;
    width: auto;
    transition: all var(--transition-speed) ease;
}

.site-identity {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.site-title a {
    color: var(--header-text);
    text-decoration: none;
}

.site-description {
    font-size: 13px;
    margin: 4px 0 0;
    color: var(--dark-gray);
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

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

.menu li {
    position: relative;
}

.menu > li {
    margin: 0 2px;
}

.menu > li > a {
    padding: 0 15px;
    height: var(--header-main-height);
    display: flex;
    align-items: center;
    color: var(--header-text);
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
    transition: color var(--transition-speed) ease;
    position: relative;
}

.menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15px;
    right: 15px;
    height: 3px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform var(--transition-speed) ease;
}

.menu > li > a:hover::after,
.menu > li.current-menu-item > a::after {
    transform: scaleX(1);
}

.menu > li > a:hover,
.menu > li.current-menu-item > a {
    color: var(--primary-color);
}

/* Submenu */
.menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--header-bg);
    min-width: 220px;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-speed) ease;
    z-index: 100;
    list-style: none;
}

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

.menu .sub-menu a {
    padding: 10px 20px;
    display: block;
    color: var(--header-text);
    font-size: 14px;
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

.menu .sub-menu a:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

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

.header-actions > a {
    margin-left: 15px;
    color: var(--header-text);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.search-toggle, .cart-contents {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-gray);
    transition: all var(--transition-speed) ease;
}

.search-toggle:hover, .cart-contents:hover {
    background-color: var(--medium-gray);
}

.cart-contents {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent-color);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 500;
    margin-left: 20px;
    transition: background-color var(--transition-speed) ease;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
}

/* Search Form */
.header-search {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--header-bg);
    padding: 20px 0;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    z-index: 99;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.header-search.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Search overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 98;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
}

.search-form {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-field {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-size: 16px;
    outline: none;
}

.search-submit, .search-close {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--dark-gray);
}

.search-submit {
    right: 20px;
}

.search-close {
    right: 50px;
}

/* Menu Toggle for Mobile */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    position: relative;
    cursor: pointer;
    padding: 0;
}

.toggle-icon, .toggle-icon::before, .toggle-icon::after {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--header-text);
    position: absolute;
    transition: all var(--transition-speed) ease;
}

.toggle-icon {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.toggle-icon::before, .toggle-icon::after {
    content: '';
    left: 0;
}

.toggle-icon::before {
    top: -8px;
}

.toggle-icon::after {
    bottom: -8px;
}

.menu-toggle.active .toggle-icon {
    background-color: transparent;
}

.menu-toggle.active .toggle-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-toggle.active .toggle-icon::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* Site branding */
.site-branding {
    display: flex;
    align-items: center;
    z-index: 10;
    position: relative;
}

.custom-logo-link {
    margin-right: 15px;
    max-height: calc(var(--header-height) - 20px);
    display: flex;
    align-items: center;
}

.custom-logo-link img {
    max-height: calc(var(--header-height) - 20px);
    width: auto;
    transition: max-height var(--transition-speed) ease;
}

.site-title-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.site-title a {
    color: var(--header-text);
}

.site-description {
    font-size: 14px;
    margin: 5px 0 0;
    opacity: 0.7;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.menu-wrapper {
    display: flex;
}

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

.primary-menu li {
    position: relative;
}

.primary-menu a {
    display: block;
    padding: 0 15px;
    color: var(--header-text);
    font-weight: 500;
    line-height: var(--header-height);
    transition: color var(--transition-speed) ease, background-color var(--transition-speed) ease;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a {
    color: var(--primary-color);
}

/* Submenu styling */
.primary-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--header-bg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity var(--transition-speed) ease, visibility var(--transition-speed) ease, transform var(--transition-speed) ease;
    z-index: 100;
    list-style: none;
    padding: 0;
}

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

.primary-menu .sub-menu a {
    padding: 10px 15px;
    line-height: 1.5;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.primary-menu .sub-menu li:last-child a {
    border-bottom: none;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.menu-icon-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--header-text);
    margin: 5px 0;
    transition: transform var(--transition-speed) ease, opacity var(--transition-speed) ease;
}

/* Dropdown toggle button for mobile submenus */
.dropdown-toggle {
    display: none;
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    position: absolute;
    right: 0;
    top: 5px;
    cursor: pointer;
    z-index: 10;
}

.dropdown-toggle::before {
    content: '+';
    font-size: 20px;
    color: var(--header-text);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform var(--transition-speed) ease;
}

.menu-item-has-children.active > .dropdown-toggle::before {
    content: '-';
}

/* Submenu toggle button for mobile */
.submenu-toggle {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    position: absolute;
    right: 0;
    top: 0;
    display: none;
    cursor: pointer;
    color: var(--header-text);
    font-size: 12px;
}

@media (max-width: 768px) {
    .submenu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Content area - minimal styling to allow Elementor to take over */
.site-content {
    padding: 20px 0;
    flex: 1 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Main content container */
.site-content .container {
    padding-top: 20px;
    padding-bottom: 40px;
}

/* Sticky header padding adjustments */
.sticky-header-padding #content {
    padding-top: 0; /* Will be set dynamically by JS */
    transition: padding-top var(--transition-speed) ease;
}

/* Ensure content is properly positioned when admin bar is present */
.admin-bar.sticky-header-padding #content {
    padding-top: 0; /* Will be set dynamically by JS */
}

/* Fix for Elementor sections */
.elementor-section.elementor-section-boxed > .elementor-container {
    max-width: 1200px;
    padding: 0 20px;
}

/* Fix for Elementor full width sections */
.elementor-section.elementor-section-full_width {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* Responsive styles */
@media (max-width: 1200px) {
    .btn-primary {
        padding: 8px 15px;
        font-size: 14px;
    }
}

@media (max-width: 992px) {
    :root {
        --header-main-height: 70px;
        --header-top-height: 35px;
        --header-height: 105px;
    }
    
    .site-title {
        font-size: 18px;
    }
    
    .site-description {
        font-size: 12px;
    }
    
    .menu > li > a {
        padding: 0 10px;
        font-size: 14px;
    }
    
    .header-actions .btn-primary {
        margin-left: 10px;
    }
}

@media (max-width: 850px) {
    .header-contact-info a:not(:first-child) {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-main {
        padding: 10px 0;
        height: auto;
        min-height: 60px;
    }
    
    .header-main .container {
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }
    
    .site-branding {
        order: 1;
        flex: 1;
        max-width: 70%;
    }
    
    .main-navigation {
        order: 3;
        width: 100%;
        margin-top: 15px;
        display: none;
        background-color: var(--header-bg);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    
    .main-navigation.toggled {
        display: block;
    }
    
    .menu-toggle {
        display: block;
        order: 2;
        margin-left: 15px;
        z-index: 10;
    }
    
    .header-actions {
        order: 2;
        margin-left: auto;
    }
    
    .menu {
        flex-direction: column;
        width: 100%;
        padding: 10px 0;
    }
    
    .menu > li {
        margin: 0;
        border-bottom: 1px solid var(--medium-gray);
        position: relative;
    }
    
    .menu > li > a {
        height: auto;
        padding: 12px 15px;
        width: calc(100% - 40px);
        display: block;
    }
    
    .menu > li > a::after {
        display: none;
    }
    
    .menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-speed) ease;
        background-color: var(--light-gray);
        width: 100%;
        padding: 0;
        border-radius: 0;
    }
    
    .menu li.menu-item-has-children.active > .sub-menu {
        max-height: 1000px;
        padding: 5px 0;
    }
    
    .menu .sub-menu a {
        padding: 8px 15px 8px 30px;
        font-size: 13px;
    }
    
    .btn-primary {
        display: none;
    }
    
    /* Ensure search form is properly displayed on mobile */
    .header-search {
        position: fixed;
        top: 60px;
        z-index: 1001;
    }
    
    .search-field {
        padding: 10px 50px 10px 15px;
    }
}

@media (max-width: 576px) {
    .header-top {
        display: none;
    }
    
    :root {
        --header-height: var(--header-main-height);
    }
    
    .site-description {
        display: none;
    }
    
    .custom-logo-link img {
        max-height: 40px;
    }
    
    .search-toggle, .cart-contents {
        width: 35px;
        height: 35px;
    }
    
    .search-field {
        padding: 10px 45px 10px 15px;
        font-size: 14px;
    }
}

/* Skip link - accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 15px;
    z-index: 1001;
    transition: top var(--transition-speed) ease;
}

.skip-link:focus {
    top: 0;
}

/* Elementor compatibility */
.elementor-section.elementor-section-boxed > .elementor-container {
    max-width: 1200px;
}