/*
Theme Name: Bith Theme
Theme URI: https://bithemes.com/bith-theme
Author: Bith Themes
Author URI: https://bithemes.com
Description: A modern, lightweight WordPress theme designed for Elementor. Features full WooCommerce compatibility, responsive design, and seamless integration with Bith Core plugin for extended functionality.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bith-theme
Tags: one-column, two-columns, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-images, footer-widgets, full-width-template, rtl-language-support, theme-options, threaded-comments, translation-ready, blog, e-commerce, portfolio

Bith Theme is designed to work seamlessly with Elementor page builder and requires the Bith Core plugin for full functionality.
*/

/* ==========================================================================
   CSS Variables - Design Tokens
   ========================================================================== */

:root {
    /* Primary Colors */
    --bith-primary: #3B82F6;
    --bith-primary-hover: #2563EB;
    --bith-secondary: #10B981;
    --bith-secondary-hover: #059669;
    --bith-accent: #8B5CF6;
    
    /* Neutral Colors */
    --bith-white: #FFFFFF;
    --bith-black: #000000;
    --bith-gray-50: #F9FAFB;
    --bith-gray-100: #F3F4F6;
    --bith-gray-200: #E5E7EB;
    --bith-gray-300: #D1D5DB;
    --bith-gray-400: #9CA3AF;
    --bith-gray-500: #6B7280;
    --bith-gray-600: #4B5563;
    --bith-gray-700: #374151;
    --bith-gray-800: #1F2937;
    --bith-gray-900: #111827;
    
    /* Typography */
    --bith-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --bith-font-size-base: 16px;
    --bith-line-height-base: 1.6;
    
    /* Spacing */
    --bith-spacing-xs: 0.25rem;
    --bith-spacing-sm: 0.5rem;
    --bith-spacing-md: 1rem;
    --bith-spacing-lg: 1.5rem;
    --bith-spacing-xl: 2rem;
    --bith-spacing-2xl: 3rem;
    
    /* Border Radius */
    --bith-radius-sm: 0.25rem;
    --bith-radius-md: 0.5rem;
    --bith-radius-lg: 1rem;
    --bith-radius-full: 9999px;
    
    /* Shadows */
    --bith-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --bith-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --bith-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Transitions */
    --bith-transition-fast: 150ms ease;
    --bith-transition-normal: 300ms ease;
    --bith-transition-slow: 500ms ease;
    
    /* Container */
    --bith-container-width: 1200px;
    --bith-container-padding: 1rem;
    
    /* Header */
    --bith-header-height: 80px;
    --bith-header-bg: var(--bith-white);
    --bith-header-text: var(--bith-gray-800);
    
    /* Footer */
    --bith-footer-bg: var(--bith-gray-900);
    --bith-footer-text: var(--bith-gray-300);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: var(--bith-font-size-base);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--bith-font-family);
    font-size: 1rem;
    line-height: var(--bith-line-height-base);
    color: var(--bith-gray-800);
    background-color: var(--bith-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: var(--bith-spacing-md);
    font-weight: 600;
    line-height: 1.3;
    color: var(--bith-gray-900);
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

h5 {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
}

h6 {
    font-size: 1rem;
}

p {
    margin-top: 0;
    margin-bottom: var(--bith-spacing-md);
}

a {
    color: var(--bith-primary);
    text-decoration: none;
    transition: color var(--bith-transition-fast);
}

a:hover,
a:focus {
    color: var(--bith-primary-hover);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.bith-container {
    width: 100%;
    max-width: var(--bith-container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--bith-container-padding);
    padding-right: var(--bith-container-padding);
}

.bith-container-fluid {
    width: 100%;
    padding-left: var(--bith-container-padding);
    padding-right: var(--bith-container-padding);
}

/* ==========================================================================
   Header Styles
   ========================================================================== */

.bith-header {
    position: relative;
    width: 100%;
    height: var(--bith-header-height);
    background-color: var(--bith-header-bg);
    color: var(--bith-header-text);
    z-index: 1000;
}

.bith-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    box-shadow: var(--bith-shadow-md);
}

.bith-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.bith-logo img {
    max-height: 50px;
    width: auto;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.bith-nav {
    display: flex;
    align-items: center;
}

.bith-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--bith-spacing-lg);
}

.bith-nav-menu li {
    position: relative;
}

.bith-nav-menu a {
    display: block;
    padding: var(--bith-spacing-sm) 0;
    color: var(--bith-header-text);
    font-weight: 500;
    transition: color var(--bith-transition-fast);
}

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

/* Dropdown Menu */
.bith-nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: var(--bith-white);
    box-shadow: var(--bith-shadow-lg);
    border-radius: var(--bith-radius-md);
    padding: var(--bith-spacing-sm) 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--bith-transition-normal);
}

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

.bith-nav-menu .sub-menu a {
    padding: var(--bith-spacing-sm) var(--bith-spacing-md);
}

/* Mobile Menu Toggle */
.bith-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--bith-spacing-sm);
}

.bith-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--bith-header-text);
    margin: 5px 0;
    transition: all var(--bith-transition-fast);
}

@media (max-width: 991px) {
    .bith-menu-toggle {
        display: block;
    }
    
    .bith-nav-menu {
        position: fixed;
        top: var(--bith-header-height);
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        background-color: var(--bith-white);
        padding: var(--bith-spacing-lg);
        gap: 0;
        transform: translateX(-100%);
        transition: transform var(--bith-transition-normal);
    }
    
    .bith-nav-menu.active {
        transform: translateX(0);
    }
    
    .bith-nav-menu a {
        padding: var(--bith-spacing-md) 0;
        border-bottom: 1px solid var(--bith-gray-200);
    }
    
    .bith-nav-menu .sub-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding-left: var(--bith-spacing-lg);
    }
}

/* ==========================================================================
   Main Content
   ========================================================================== */

.bith-main {
    min-height: calc(100vh - var(--bith-header-height) - 200px);
}

.bith-content {
    padding: var(--bith-spacing-2xl) 0;
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */

.bith-footer {
    background-color: var(--bith-footer-bg);
    color: var(--bith-footer-text);
    padding: var(--bith-spacing-2xl) 0;
}

.bith-footer a {
    color: var(--bith-footer-text);
}

.bith-footer a:hover {
    color: var(--bith-white);
}

.bith-footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--bith-spacing-xl);
    margin-bottom: var(--bith-spacing-xl);
}

.bith-footer-bottom {
    padding-top: var(--bith-spacing-lg);
    border-top: 1px solid var(--bith-gray-700);
    text-align: center;
}

.bith-copyright {
    margin: 0;
    font-size: 0.875rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.bith-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--bith-spacing-sm) var(--bith-spacing-lg);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--bith-radius-md);
    cursor: pointer;
    transition: all var(--bith-transition-fast);
}

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

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

.bith-btn-secondary {
    background-color: var(--bith-secondary);
    color: var(--bith-white);
}

.bith-btn-secondary:hover {
    background-color: var(--bith-secondary-hover);
    color: var(--bith-white);
}

.bith-btn-outline {
    background-color: transparent;
    border-color: var(--bith-primary);
    color: var(--bith-primary);
}

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

/* ==========================================================================
   Forms
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: var(--bith-spacing-sm) var(--bith-spacing-md);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--bith-gray-800);
    background-color: var(--bith-white);
    border: 1px solid var(--bith-gray-300);
    border-radius: var(--bith-radius-md);
    transition: border-color var(--bith-transition-fast), box-shadow var(--bith-transition-fast);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--bith-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ==========================================================================
   Blog Styles
   ========================================================================== */

.bith-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--bith-spacing-xl);
}

.bith-post-card {
    background-color: var(--bith-white);
    border-radius: var(--bith-radius-lg);
    overflow: hidden;
    box-shadow: var(--bith-shadow-md);
    transition: transform var(--bith-transition-normal), box-shadow var(--bith-transition-normal);
}

.bith-post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--bith-shadow-lg);
}

.bith-post-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.bith-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--bith-transition-slow);
}

.bith-post-card:hover .bith-post-thumbnail img {
    transform: scale(1.05);
}

.bith-post-content {
    padding: var(--bith-spacing-lg);
}

.bith-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bith-spacing-md);
    margin-bottom: var(--bith-spacing-sm);
    font-size: 0.875rem;
    color: var(--bith-gray-500);
}

.bith-post-title {
    margin-bottom: var(--bith-spacing-sm);
}

.bith-post-title a {
    color: var(--bith-gray-900);
}

.bith-post-title a:hover {
    color: var(--bith-primary);
}

.bith-post-excerpt {
    color: var(--bith-gray-600);
    margin-bottom: var(--bith-spacing-md);
}

.bith-read-more {
    font-weight: 500;
    color: var(--bith-primary);
}

.bith-read-more:hover {
    color: var(--bith-primary-hover);
}

/* ==========================================================================
   Single Post
   ========================================================================== */

.bith-single-post {
    max-width: 800px;
    margin: 0 auto;
}

.bith-single-header {
    margin-bottom: var(--bith-spacing-xl);
    text-align: center;
}

.bith-single-thumbnail {
    margin-bottom: var(--bith-spacing-xl);
    border-radius: var(--bith-radius-lg);
    overflow: hidden;
}

.bith-single-thumbnail img {
    width: 100%;
    height: auto;
}

.bith-single-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

.bith-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--bith-radius-md);
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.bith-sidebar {
    padding: var(--bith-spacing-lg);
    background-color: var(--bith-gray-50);
    border-radius: var(--bith-radius-lg);
}

.bith-widget {
    margin-bottom: var(--bith-spacing-xl);
}

.bith-widget:last-child {
    margin-bottom: 0;
}

.bith-widget-title {
    font-size: 1.125rem;
    margin-bottom: var(--bith-spacing-md);
    padding-bottom: var(--bith-spacing-sm);
    border-bottom: 2px solid var(--bith-primary);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.bith-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--bith-spacing-sm);
    margin-top: var(--bith-spacing-2xl);
}

.bith-pagination a,
.bith-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--bith-spacing-sm);
    border-radius: var(--bith-radius-md);
    font-weight: 500;
    transition: all var(--bith-transition-fast);
}

.bith-pagination a {
    background-color: var(--bith-gray-100);
    color: var(--bith-gray-700);
}

.bith-pagination a:hover {
    background-color: var(--bith-primary);
    color: var(--bith-white);
}

.bith-pagination .current {
    background-color: var(--bith-primary);
    color: var(--bith-white);
}

/* ==========================================================================
   Comments
   ========================================================================== */

.bith-comments {
    margin-top: var(--bith-spacing-2xl);
}

.bith-comments-title {
    margin-bottom: var(--bith-spacing-xl);
}

.bith-comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bith-comment {
    padding: var(--bith-spacing-lg);
    margin-bottom: var(--bith-spacing-lg);
    background-color: var(--bith-gray-50);
    border-radius: var(--bith-radius-lg);
}

.bith-comment-author {
    display: flex;
    align-items: center;
    gap: var(--bith-spacing-md);
    margin-bottom: var(--bith-spacing-md);
}

.bith-comment-author img {
    border-radius: var(--bith-radius-full);
}

.bith-comment-author-name {
    font-weight: 600;
}

.bith-comment-date {
    font-size: 0.875rem;
    color: var(--bith-gray-500);
}

/* ==========================================================================
   WooCommerce Compatibility
   ========================================================================== */

.woocommerce .bith-container {
    max-width: var(--bith-container-width);
}

.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--bith-spacing-xl);
}

.woocommerce ul.products li.product {
    margin: 0;
    padding: 0;
    width: 100%;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.bith-text-center {
    text-align: center;
}

.bith-text-left {
    text-align: left;
}

.bith-text-right {
    text-align: right;
}

.bith-hidden {
    display: none !important;
}

.bith-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Back to Top Button
   ========================================================================== */

.bith-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--bith-primary);
    color: var(--bith-white);
    border: none;
    border-radius: var(--bith-radius-full);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--bith-transition-normal);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bith-back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.bith-back-to-top:hover {
    background-color: var(--bith-primary-hover);
    transform: translateY(-5px);
}

/* ==========================================================================
   Loading Screen
   ========================================================================== */

.bith-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bith-white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity var(--bith-transition-slow), visibility var(--bith-transition-slow);
}

.bith-loading-screen.loaded {
    opacity: 0;
    visibility: hidden;
}

.bith-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--bith-gray-200);
    border-top-color: var(--bith-primary);
    border-radius: 50%;
    animation: bith-spin 1s linear infinite;
}

@keyframes bith-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Elementor Compatibility
   ========================================================================== */

.elementor-page .bith-content {
    padding: 0;
}

.elementor-page .bith-main {
    min-height: auto;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .bith-header,
    .bith-footer,
    .bith-sidebar,
    .bith-back-to-top,
    .bith-comments {
        display: none !important;
    }
    
    .bith-main {
        width: 100%;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
    }
}