/*
Theme Name: FairList Theme
Theme URI: https://fairlist.pro
Author: FairList Team
Author URI: https://fairlist.pro
Description: Professional WordPress theme specially designed for FairList Pro plugin. Features Elementor support, multilingual ready with Polylang, and fully customizable header/footer.
Version: 2.2.0
Requires at least: 5.0
Tested up to: 6.5
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: fairlist-theme
Domain Path: /languages
Tags: trade-fairs, events, elementor, multilingual, polylang, custom-header, custom-menu, translation-ready
*/

/* ==========================================================================
   Base Styles
   ========================================================================== */

* {
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --background-color: #ffffff;
    --background-light: #f9fafb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --header-height: 80px;
    --container-width: 1200px;
    --border-radius: 8px;
    --box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-light);
    margin: 0;
    padding: 0;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--secondary-color);
}

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

.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1.5;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: #ffffff;
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

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

.site-header {
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--box-shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
    padding: 1rem 0;
}

.site-branding {
    display: flex;
    align-items: center;
}

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

.site-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
}

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

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

.site-description {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-light);
}

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

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0;
    display: block;
}

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

/* Dropdown Menu */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    z-index: 100;
}

.nav-menu li:hover > .sub-menu {
    display: flex;
}

.nav-menu .sub-menu a {
    padding: 0.75rem 1.25rem;
}

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.5rem;
    color: var(--text-color);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.language-switcher a {
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.language-switcher a:hover,
.language-switcher a.current-lang {
    background-color: var(--primary-color);
    color: #ffffff;
}

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

.site-footer {
    background-color: var(--text-color);
    color: #ffffff;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-widget h3 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget li {
    margin-bottom: 0.5rem;
}

.footer-widget a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-widget a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.footer-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

.footer-menu a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

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

.site-main {
    padding: 3rem 0;
    min-height: 60vh;
}

.content-area {
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
}

/* ==========================================================================
   Fair Cards (Archive)
   ========================================================================== */

.fairs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.fair-card {
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.fair-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.fair-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--background-light);
}

.fair-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.fair-card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.fair-card-title a {
    color: var(--text-color);
}

.fair-card-title a:hover {
    color: var(--primary-color);
}

.fair-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.fair-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.fair-card-excerpt {
    color: var(--text-light);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.fair-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.fair-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--background-light);
    color: var(--text-color);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.fair-badge.industry {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.fair-badge.country {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

/* ==========================================================================
   Single Fair
   ========================================================================== */

.single-fair .entry-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.entry-title {
    margin-bottom: 0.5rem;
}

.fair-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.fair-detail-box {
    background-color: var(--background-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.fair-detail-box h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-weight: 600;
}

.fair-detail-box p {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
}

.fair-info-section {
    margin: 2rem 0;
}

.fair-info-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

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

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 600;
}

.info-value {
    font-size: 1rem;
    color: var(--text-color);
}

.fair-actions {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

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

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination .page-numbers {
    padding: 0.5rem 1rem;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-weight: 500;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

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

.sidebar {
    padding: 1.5rem;
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.widget {
    margin-bottom: 2rem;
}

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

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.widget li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* ==========================================================================
   Search & Filters
   ========================================================================== */

.search-filters {
    background-color: var(--background-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.filter-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    width: 100%;
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .header-inner {
        flex-wrap: wrap;
    }
    
    .main-navigation {
        display: none;
        width: 100%;
        order: 3;
    }
    
    .main-navigation.active {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    
    .nav-menu .sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-left: 2px solid var(--primary-color);
        padding-left: 1rem;
        margin-top: 0.5rem;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .fairs-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .fair-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .site-main {
        padding: 2rem 0;
    }
    
    .content-area {
        padding: 1.5rem;
    }
    
    .fair-card-content {
        padding: 1rem;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

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

.elementor-page .site-main {
    padding: 0;
}

.elementor-page .content-area {
    padding: 0;
    background: none;
    box-shadow: none;
}

/* Polylang Compatibility */
.lang-item {
    display: inline-block;
}
