/*
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 {
    /* ============================================
       BITH THEME - Design System
       
       NOTE: Primary color variables are injected dynamically
       from Dashboard > Bith > Settings when Bith Core is active.
       The values below are FALLBACK defaults for when Core is not active.
       ============================================ */

    /* Primary Colors - Fallback defaults (Purity UI Teal) */
    /* These are overridden by Dashboard settings when Bith Core is active */
    --bith-primary: #4FD1C5;
    --bith-primary-hover: #38B2AC;
    --bith-primary-light: #81E6D9;
    --bith-primary-dark: #319795;
    --bith-primary-rgb: 79, 209, 197;

    /* Secondary Colors - Fallback defaults */
    --bith-secondary: #6366F1;
    --bith-secondary-hover: #4F46E5;
    --bith-secondary-light: #A5B4FC;
    --bith-secondary-dark: #4338CA;

    /* Accent - Fallback default */
    --bith-accent: #F6AD55;
    --bith-accent-hover: #ED8936;
    --bith-accent-light: #FBD38D;

    /* Gradients - Use CSS variables for consistency */
    --bith-gradient-primary: linear-gradient(135deg, var(--bith-primary, #4FD1C5) 0%, var(--bith-primary-hover, #38B2AC) 100%);
    --bith-gradient-secondary: linear-gradient(135deg, var(--bith-secondary, #6366F1) 0%, #8B5CF6 100%);
    --bith-gradient-accent: linear-gradient(135deg, var(--bith-accent, #F6AD55) 0%, #DD6B20 100%);
    --bith-gradient-dark: linear-gradient(135deg, #1A202C 0%, #171923 100%);
    --bith-gradient-hero: linear-gradient(135deg, rgba(79, 209, 197, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
    --bith-gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);

    /* Neutral Colors - Chakra UI Gray Scale */
    --bith-white: #FFFFFF;
    --bith-black: #000000;
    --bith-gray-50: #F7FAFC;
    --bith-gray-100: #EDF2F7;
    --bith-gray-200: #E2E8F0;
    --bith-gray-300: #CBD5E0;
    --bith-gray-400: #A0AEC0;
    --bith-gray-500: #718096;
    --bith-gray-600: #4A5568;
    --bith-gray-700: #2D3748;
    --bith-gray-800: #1A202C;
    --bith-gray-900: #171923;
    --bith-gray-950: #0D1117;

    /* Status Colors (Chakra UI) */
    --bith-success: #48BB78;
    --bith-success-light: #C6F6D5;
    --bith-warning: #ED8936;
    --bith-warning-light: #FEEBC8;
    --bith-error: #F56565;
    --bith-error-light: #FED7D7;
    --bith-info: #4299E1;
    --bith-info-light: #BEE3F8;

    /* Typography - Plus Jakarta Sans + Inter */
    --bith-font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --bith-font-family-heading: 'Plus Jakarta Sans', 'Inter', sans-serif;
    --bith-font-size-base: 16px;
    --bith-line-height-base: 1.6;

    /* Spacing Scale */
    --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;
    --bith-spacing-3xl: 4rem;

    /* Border Radius - Suaves y redondeados (Purity Style) */
    --bith-radius-sm: 8px;
    --bith-radius-md: 12px;
    --bith-radius-lg: 15px;
    --bith-radius-xl: 20px;
    --bith-radius-2xl: 24px;
    --bith-radius-full: 9999px;

    /* Shadows - Muy suaves (Purity UI Style) */
    --bith-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --bith-shadow-md: 0 2px 5.5px 0 rgba(0, 0, 0, 0.06);
    --bith-shadow-lg: 0 4px 7px -1px rgba(0, 0, 0, 0.08);
    --bith-shadow-xl: 0 8px 16px -3px rgba(0, 0, 0, 0.08);
    --bith-shadow-2xl: 0 20px 27px 0 rgba(0, 0, 0, 0.05);
    --bith-shadow-primary: 0 4px 14px 0 rgba(79, 209, 197, 0.39);
    --bith-shadow-glow: 0 0 30px -5px rgba(79, 209, 197, 0.3);

    /* Transitions - Curvas suaves */
    --bith-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --bith-transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --bith-transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --bith-transition-bounce: 500ms cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* Container */
    --bith-container-width: 1200px;
    --bith-container-narrow: 768px;
    --bith-container-wide: 1400px;
    --bith-container-padding: 1.5rem;

    /* Header */
    --bith-header-height: 80px;
    --bith-header-bg: rgba(255, 255, 255, 0.9);
    --bith-header-text: var(--bith-gray-700);

    /* Footer */
    --bith-footer-bg: var(--bith-gray-900);
    --bith-footer-text: var(--bith-gray-400);
}

/* ==========================================================================
   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) ")";
    }
}