/*
Theme Name: Bridgetastic
Theme URI: https://bridgetastic.com
Author: Bridgetastic
Author URI: https://bridgetastic.com
Description: Custom theme for Bridgetastic - All Things Bridge
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bridgetastic
*/

/* ========== CSS VARIABLES ========== */
:root {
    --bt-green: #1B5E20;
    --bt-green-dark: #0d3d12;
    --bt-gold: #C9A227;
    --bt-ivory: #FFFEF0;
    --bt-black: #000;
    --bt-text: #2D2D2D;
    --bt-font-heading: 'Playfair Display', Georgia, serif;
    --bt-font-body: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ========== RESET & BASE ========== */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    padding: 0;
    font-family: var(--bt-font-body);
    background-color: var(--bt-ivory);
    color: var(--bt-text);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    color: var(--bt-green);
    text-decoration: none;
}

a:hover {
    color: var(--bt-gold);
}

/* ========== HEADER ========== */
.site-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
    padding: 0.75rem 1rem;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.site-logo img {
    height: 40px;
    width: 40px;
    border-radius: 6px;
}

.site-title {
    font-family: var(--bt-font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0;
}

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

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-links {
    display: flex;
    gap: 0.5rem;
}

.social-links a {
    color: #fff;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    color: var(--bt-gold);
}

.search-form {
    display: flex;
}

.search-field {
    background: rgba(255,255,255,0.95);
    border: 2px solid var(--bt-gold);
    border-radius: 8px 0 0 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: #333;
    width: 150px;
}

.search-submit {
    background: var(--bt-gold);
    color: #000;
    border: none;
    border-radius: 0 8px 8px 0;
    padding: 0.5rem 1rem;
    font-weight: 600;
    cursor: pointer;
}

.search-submit:hover {
    background: #d4b44a;
}

/* ========== HERO SECTION ========== */
.hero {
    background: linear-gradient(135deg, var(--bt-green) 0%, var(--bt-green-dark) 100%);
    padding: 3rem 1.5rem;
    text-align: center;
    position: relative;
    margin: 1rem;
    border-radius: 8px;
    border: 2px solid var(--bt-gold);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-conic-gradient(from 0deg, transparent 0deg 10deg, rgba(255,255,255,0.02) 10deg 20deg);
    pointer-events: none;
}

.hero h1 {
    font-family: var(--bt-font-heading);
    font-size: 2.5rem;
    color: var(--bt-gold);
    margin: 0 0 0.5rem 0;
    position: relative;
}

.hero p {
    color: #fff;
    font-size: 1.1rem;
    margin: 0 0 1.5rem 0;
    position: relative;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--bt-gold);
    color: #000;
}

.btn-primary:hover {
    background: #d4b44a;
    color: #000;
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* ========== ARTICLES GRID ========== */
.section-title {
    font-family: var(--bt-font-heading);
    font-size: 1.75rem;
    color: var(--bt-green);
    margin: 2rem 0 0.5rem 0;
    padding: 0 1rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.articles-grid .article-card {
    max-width: 100%;
    min-width: 0;
}

.article-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    z-index: 1;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.article-card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    display: block;
    position: relative;
    z-index: 0;
    border-radius: 8px 8px 0 0;
}

.article-card-image img,
a.article-card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    object-position: center center;
    display: block;
    min-width: 0;
    max-width: 100%;
}

.article-card:hover .article-card-image img {
    transform: scale(1.05);
}

.article-card-content {
    padding: 1rem;
}

.article-card-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--bt-gold);
    margin-bottom: 0.25rem;
}

.article-card-title {
    font-family: var(--bt-font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bt-green);
    margin: 0;
    line-height: 1.3;
}

.article-card-title a {
    color: inherit;
}

.article-card-title a:hover {
    color: var(--bt-gold);
}

/* ========== SINGLE ARTICLE ========== */
.article-header {
    max-width: 800px;
    margin: 2rem auto 0;
    padding: 0 1rem;
}

.article-category {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--bt-gold);
}

.article-title {
    font-family: var(--bt-font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--bt-green);
    margin: 0.5rem 0 1rem;
    line-height: 1.2;
}

.article-featured-image {
    max-width: 800px;
    margin: 0 auto 1.5rem;
    padding: 0 1rem;
}

.article-featured-image img {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    border-radius: 8px;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
    font-size: 1.125rem;
    line-height: 1.7;
}

.article-content h2 {
    font-family: var(--bt-font-heading);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--bt-green);
    margin: 2rem 0 1rem;
}

.article-content h3 {
    font-family: var(--bt-font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--bt-green);
    margin: 1.5rem 0 0.75rem;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content a {
    color: var(--bt-green);
    text-decoration: underline;
    text-decoration-color: var(--bt-gold);
}

.article-content a:hover {
    color: var(--bt-gold);
}

/* Tables */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.article-content th {
    background: var(--bt-green);
    color: #fff;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
}

.article-content td {
    padding: 0.625rem 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.article-content tr:hover td {
    background: #f8f8f8;
}

/* Suit colors */
.suit-spade, .suit-club { color: #000; font-weight: bold; }
.suit-heart { color: #CC0000; font-weight: bold; }
.suit-diamond { color: #0066CC; font-weight: bold; }

/* ========== FOOTER ========== */
.site-footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
    color: #fff;
    padding: 2rem 1.5rem;
    text-align: center;
    margin-top: 3rem;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--bt-gold);
    margin: 0 1rem;
    font-size: 0.9rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-social {
    margin-bottom: 1rem;
}

.footer-social a {
    color: #fff;
    margin: 0 0.5rem;
    display: inline-flex;
}

.footer-social a:hover {
    color: var(--bt-gold);
}

.footer-copyright {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* ========== MOBILE STYLES ========== */
@media (max-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-featured-image img {
        max-height: 200px;
    }
}

@media (max-width: 600px) {
    /* Mobile header */
    .header-inner {
        flex-wrap: wrap;
    }
    
    .header-desktop {
        display: none;
    }
    
    .header-mobile {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: space-between;
        padding: 0 8px;
    }
    
    .header-mobile .site-branding {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 0 1 auto;
        min-width: 0;
    }
    
    .header-mobile .site-logo img {
        height: 32px;
        width: 32px;
        flex-shrink: 0;
    }
    
    .header-mobile .site-title {
        font-family: 'Playfair Display', Georgia, serif !important;
        font-size: 18px !important;
        font-weight: 700 !important;
        color: #C9A227 !important;
        white-space: nowrap;
    }
    
    .header-mobile .mobile-icons {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        gap: 10px;
        margin-left: auto;
    }
    
    .header-mobile .mobile-icons a,
    .header-mobile .mobile-icons button {
        color: #C9A227 !important;
        padding: 6px;
        background: none;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .header-mobile .mobile-icons svg {
        width: 20px;
        height: 20px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .hero {
        margin: 0.5rem;
        padding: 2rem 1rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    /* Table responsive */
    .article-content table {
        display: block;
        overflow-x: auto;
    }
}

/* Desktop: hide mobile header */
@media (min-width: 601px) {
    .header-mobile {
        display: none;
    }
    
    .header-desktop {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: space-between;
    }
}

/* ========== ACCESSIBILITY ========== */
:focus {
    outline: 2px solid var(--bt-gold);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--bt-gold);
    color: #000;
    padding: 0.5rem 1rem;
    z-index: 1000;
}

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

/* ========== MOBILE SEARCH OVERLAY ========== */
.mobile-search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.mobile-search-overlay.active {
    display: flex;
}

.mobile-search-container {
    background: var(--bt-ivory);
    padding: 2rem;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    position: relative;
}

.mobile-search-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-search-input {
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid var(--bt-green);
    border-radius: 8px;
    width: 100%;
}

.mobile-search-submit {
    padding: 1rem;
    background: var(--bt-green);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.mobile-search-submit:hover {
    background: var(--bt-green-dark);
}

.mobile-search-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

/* ========== HEADER OVERRIDES ========== */
/* Force black header everywhere - desktop AND mobile */
.site-header,
header.site-header,
body .site-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #000) !important;
    background-color: #000 !important;
}

/* Mobile-specific header override */
@media (max-width: 600px) {
    .site-header,
    header.site-header,
    body .site-header {
        background: linear-gradient(135deg, #1a1a1a 0%, #000) !important;
        background-color: #000 !important;
    }
}

.header-mobile .site-title {
    color: #C9A227 !important;
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
}

.header-mobile .mobile-icons a,
.header-mobile .mobile-icons button {
    color: #C9A227 !important;
}

/* ========== MAIN NAVIGATION ========== */
.main-nav {
    background: #111;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 0;
}

.nav-menu li a {
    display: block;
    padding: 0.875rem 1.5rem;
    color: #fff;
    font-family: var(--bt-font-body);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: background 0.2s, color 0.2s;
}

.nav-menu li a:hover {
    background: var(--bt-green);
    color: #fff;
}

.nav-social {
    display: none;
}

/* ========== MOBILE HEADER ========== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--bt-gold);
    cursor: pointer;
    padding: 8px;
    margin-left: -8px;
}

.mobile-search {
    color: var(--bt-gold);
    padding: 8px;
}

@media (max-width: 768px) {
    /* Show hamburger, hide desktop nav */
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .header-mobile {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    
    .header-mobile .site-branding {
        flex: 1;
        justify-content: center;
    }
    
    .header-mobile .mobile-icons {
        display: none; /* Remove old icons */
    }
    
    /* Navigation - hidden by default on mobile */
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1000;
        background: #111;
        border-top: 1px solid #333;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }
    
    .main-nav.nav-open {
        display: block;
    }
    
    .nav-menu {
        flex-direction: column;
    }
    
    .nav-menu li a {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #222;
        text-align: left;
    }
    
    .nav-menu li:last-child a {
        border-bottom: none;
    }
    
    .nav-social {
        display: flex;
        justify-content: center;
        gap: 2rem;
        padding: 1rem;
        border-top: 1px solid #333;
    }
    
    .nav-social a {
        color: var(--bt-gold);
    }
    
    .site-header {
        position: relative;
    }
}

@media (min-width: 769px) {
    .header-mobile {
        display: none;
    }
}

/* ===== Desktop Header Layout - Logo Left, Social Right ===== */
@media (min-width: 769px) {
  .site-header .header-desktop {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .site-header .site-logo {
    order: -1;
    margin-left: 0;
    margin-right: auto;
  }
  
  .site-header .nav-social {
    order: 999;
    margin-left: auto;
    margin-right: 0;
  }
  
  /* Alternative selectors in case structure is different */
  .site-header .site-branding {
    order: -1;
    margin-left: 0;
    margin-right: auto;
  }
  
  .site-header .social-navigation,
  .site-header .social-links {
    order: 999;
    margin-left: auto;
    margin-right: 0;
  }
}
/* ===== Desktop Header Layout - Logo Left, Social Right ===== */
@media (min-width: 769px) {
  .header-desktop {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1.5rem !important;
  }
  
  /* Logo comes first (visual left) */
  .header-desktop .site-branding {
    order: 1 !important;
    flex-shrink: 0 !important;
  }
  
  /* Site title */
  .header-desktop .site-title {
    order: 2 !important;
    margin-right: auto !important;
  }
  
  /* Search in middle */
  .header-desktop .search-form {
    order: 3 !important;
  }
  
  /* Social links last (visual right) */
  .header-desktop .social-links {
    order: 4 !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
  }
}





/* Fix spacing - remove negative margin that causes overlap */
@media (min-width: 769px) {
  .header-desktop {
    gap: 0.5rem !important;
  }
  
  .header-desktop .site-branding {
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding-right: 0 !important;
  }
  
  .header-desktop .site-title {
    margin-left: 0 !important;
    padding-left: 0.5rem !important;
  }
}
