/*
Theme Name: Lexington Blueberry Festival
Theme URI: https://lexblueberryfest.com
Author: Lexington Blueberry Festival
Author URI: https://lexblueberryfest.com
Description: Custom Elementor-powered theme for the Lexington Blueberry Festival. Fully compatible with LBF custom plugins via shortcodes.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
Text Domain: lbf-theme
Tags: elementor, festival, custom
*/

/* ============================================================
   BASE RESET & GLOBAL STYLES
   ============================================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--lbf-font-body, 'Nunito', sans-serif);
    color: var(--lbf-color-text, #1a1a2e);
    background-color: var(--lbf-color-bg, #ffffff);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--lbf-color-primary, #3a7bd5);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--lbf-color-primary-dark, #2c5ea8);
}

/* ============================================================
   CSS CUSTOM PROPERTIES (overridden by theme.json / Elementor)
   ============================================================ */

:root {
    /* Brand Colors */
    --lbf-color-primary:        #3a7bd5;
    --lbf-color-primary-dark:   #2c5ea8;
    --lbf-color-secondary:      #5bb5e8;
    --lbf-color-accent:         #f0c040;
    --lbf-color-blueberry:      #4a2c6e;
    --lbf-color-blueberry-light:#7b5ea7;
    --lbf-color-berry-bg:       #f4f0fa;
    --lbf-color-text:           #1a1a2e;
    --lbf-color-text-light:     #5a5a7a;
    --lbf-color-bg:             #ffffff;
    --lbf-color-bg-alt:         #f8f6fb;
    --lbf-color-white:          #ffffff;
    --lbf-color-success:        #27ae60;
    --lbf-color-warning:        #e67e22;

    /* Typography */
    --lbf-font-heading:         'Playfair Display', serif;
    --lbf-font-body:            'Nunito', sans-serif;
    --lbf-font-accent:          'Dancing Script', cursive;

    /* Spacing */
    --lbf-spacing-xs:   0.5rem;
    --lbf-spacing-sm:   1rem;
    --lbf-spacing-md:   2rem;
    --lbf-spacing-lg:   4rem;
    --lbf-spacing-xl:   8rem;

    /* Border Radius */
    --lbf-radius-sm:    6px;
    --lbf-radius-md:    12px;
    --lbf-radius-lg:    24px;
    --lbf-radius-pill:  999px;

    /* Shadows */
    --lbf-shadow-sm:    0 2px 8px rgba(74, 44, 110, 0.08);
    --lbf-shadow-md:    0 4px 20px rgba(74, 44, 110, 0.12);
    --lbf-shadow-lg:    0 8px 40px rgba(74, 44, 110, 0.18);

    /* Transitions */
    --lbf-transition:   0.25s ease;
}

/* ============================================================
   ELEMENTOR COMPATIBILITY
   ============================================================ */

/* Remove default Elementor margins on full-width pages */
.elementor-section-wrap,
.elementor-inner,
#elementor-inner {
    width: 100%;
}

/* Full-width section support */
.elementor-section.elementor-section-stretched {
    width: 100% !important;
    max-width: none !important;
}

/* ============================================================
   UTILITY CLASSES
   (Available inside Elementor via custom CSS class field)
   ============================================================ */

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

.lbf-bg-primary   { background-color: var(--lbf-color-primary); }
.lbf-bg-blueberry { background-color: var(--lbf-color-blueberry); }
.lbf-bg-alt       { background-color: var(--lbf-color-bg-alt); }
.lbf-bg-white     { background-color: var(--lbf-color-white); }

.lbf-text-white   { color: var(--lbf-color-white); }
.lbf-text-primary { color: var(--lbf-color-primary); }
.lbf-text-accent  { color: var(--lbf-color-accent); }

.lbf-rounded      { border-radius: var(--lbf-radius-md); }
.lbf-rounded-lg   { border-radius: var(--lbf-radius-lg); }
.lbf-pill         { border-radius: var(--lbf-radius-pill); }

.lbf-shadow       { box-shadow: var(--lbf-shadow-md); }
.lbf-shadow-lg    { box-shadow: var(--lbf-shadow-lg); }

.lbf-section-pad  {
    padding-top: var(--lbf-spacing-lg);
    padding-bottom: var(--lbf-spacing-lg);
}

/* ============================================================
   BUTTON STYLES
   (Used by Elementor button widget + plugin outputs)
   ============================================================ */

.lbf-btn,
.elementor-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--lbf-radius-pill);
    font-family: var(--lbf-font-body);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--lbf-transition);
    text-decoration: none;
}

.lbf-btn-primary {
    background: var(--lbf-color-primary);
    color: var(--lbf-color-white);
    border-color: var(--lbf-color-primary);
}
.lbf-btn-primary:hover {
    background: var(--lbf-color-primary-dark);
    border-color: var(--lbf-color-primary-dark);
    color: var(--lbf-color-white);
    transform: translateY(-2px);
    box-shadow: var(--lbf-shadow-md);
}

.lbf-btn-outline {
    background: transparent;
    color: var(--lbf-color-primary);
    border-color: var(--lbf-color-primary);
}
.lbf-btn-outline:hover {
    background: var(--lbf-color-primary);
    color: var(--lbf-color-white);
    transform: translateY(-2px);
}

.lbf-btn-accent {
    background: var(--lbf-color-accent);
    color: var(--lbf-color-blueberry);
    border-color: var(--lbf-color-accent);
}
.lbf-btn-accent:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: var(--lbf-shadow-md);
    color: var(--lbf-color-blueberry);
}

/* ============================================================
   SHORTCODE OUTPUT WRAPPERS
   These style the output of your custom LBF plugins
   ============================================================ */

/* Generic shortcode container */
.lbf-shortcode-wrap {
    width: 100%;
}

/* Schedule output */
.lbf-schedule-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--lbf-font-body);
}
.lbf-schedule-wrap th {
    background: var(--lbf-color-blueberry);
    color: var(--lbf-color-white);
    padding: 0.75rem 1rem;
    text-align: left;
}
.lbf-schedule-wrap td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid rgba(74,44,110,0.1);
}
.lbf-schedule-wrap tr:nth-child(even) td {
    background: var(--lbf-color-berry-bg);
}

/* Sponsor grid output */
.lbf-sponsors-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
}
.lbf-sponsors-wrap img {
    max-height: 60px;
    width: auto;
    filter: grayscale(20%);
    transition: filter var(--lbf-transition), transform var(--lbf-transition);
}
.lbf-sponsors-wrap img:hover {
    filter: none;
    transform: scale(1.05);
}

/* Attractions grid output */
.lbf-attractions-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

/* Form outputs */
.lbf-form-wrap input,
.lbf-form-wrap select,
.lbf-form-wrap textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(74,44,110,0.15);
    border-radius: var(--lbf-radius-sm);
    font-family: var(--lbf-font-body);
    font-size: 1rem;
    transition: border-color var(--lbf-transition);
}
.lbf-form-wrap input:focus,
.lbf-form-wrap select:focus,
.lbf-form-wrap textarea:focus {
    outline: none;
    border-color: var(--lbf-color-primary);
}

/* ============================================================
   HEADER
   ============================================================ */

#lbf-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: var(--lbf-color-white);
    box-shadow: var(--lbf-shadow-sm);
    transition: box-shadow var(--lbf-transition);
}

#lbf-header.scrolled {
    box-shadow: var(--lbf-shadow-md);
}

.lbf-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    gap: 2rem;
}

.lbf-header-logo img {
    height: 56px;
    width: auto;
}

.lbf-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.lbf-nav a {
    display: block;
    padding: 0.5rem 0.85rem;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--lbf-color-text);
    border-radius: var(--lbf-radius-sm);
    transition: all var(--lbf-transition);
}

.lbf-nav a:hover,
.lbf-nav li.current-menu-item a {
    color: var(--lbf-color-primary);
    background: var(--lbf-color-berry-bg);
}

.lbf-nav-cta a {
    background: var(--lbf-color-primary);
    color: var(--lbf-color-white) !important;
    border-radius: var(--lbf-radius-pill);
    padding: 0.5rem 1.25rem;
}
.lbf-nav-cta a:hover {
    background: var(--lbf-color-primary-dark) !important;
    color: var(--lbf-color-white) !important;
}

/* Mobile menu toggle */
.lbf-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.5rem;
    background: none;
    border: none;
}
.lbf-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--lbf-color-text);
    border-radius: 2px;
    transition: all var(--lbf-transition);
}

/* Mobile nav */
@media (max-width: 900px) {
    .lbf-menu-toggle { display: flex; }

    .lbf-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--lbf-color-white);
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 1.5rem 1.5rem;
        box-shadow: var(--lbf-shadow-md);
        gap: 0.125rem;
    }
    .lbf-nav.open { display: flex; }
    .lbf-nav a { padding: 0.7rem 1rem; }
}

/* ============================================================
   FOOTER
   ============================================================ */

#lbf-footer {
    background: var(--lbf-color-blueberry);
    color: rgba(255,255,255,0.85);
    padding: var(--lbf-spacing-lg) 0 var(--lbf-spacing-md);
}

.lbf-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.lbf-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.lbf-footer-logo img {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
}

.lbf-footer-tagline {
    font-size: 0.9rem;
    opacity: 0.75;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.lbf-footer-social {
    display: flex;
    gap: 0.75rem;
}
.lbf-footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: var(--lbf-radius-sm);
    font-size: 1rem;
    transition: background var(--lbf-transition);
}
.lbf-footer-social a:hover {
    background: var(--lbf-color-primary);
    color: white;
}

.lbf-footer-col h4 {
    font-family: var(--lbf-font-heading);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--lbf-color-accent);
    margin-bottom: 1rem;
}

.lbf-footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.lbf-footer-col ul a {
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    transition: color var(--lbf-transition);
}
.lbf-footer-col ul a:hover {
    color: var(--lbf-color-white);
}

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

@media (max-width: 768px) {
    .lbf-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 480px) {
    .lbf-footer-grid {
        grid-template-columns: 1fr;
    }
    .lbf-footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================================
   PAGE LAYOUT
   ============================================================ */

/* Remove default WP page title on Elementor pages */
.elementor-page .entry-title,
.elementor-page .page-header {
    display: none;
}

/* Main content area */
#lbf-main {
    min-height: 60vh;
}

/* ============================================================
   ELEMENTOR KIT OVERRIDES
   These allow Elementor's Global Colors/Fonts to map to LBF vars
   ============================================================ */

.e-global__color--primary   { background-color: var(--lbf-color-primary); }
.e-global__color--secondary { background-color: var(--lbf-color-secondary); }
.e-global__color--text      { background-color: var(--lbf-color-text); }
.e-global__color--accent    { background-color: var(--lbf-color-accent); }

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    #lbf-header,
    #lbf-footer,
    .lbf-menu-toggle { display: none; }
    body { color: #000; background: #fff; }
}
