/*
Theme Name: Victory Fencing Gear
Theme URI: https://www.victoryfencinggear.com
Author: Breaking Orbit LLC
Author URI: https://www.breakingorbit.com
Version: 1.2.0
License: GNU General Public License v2 or later
Text Domain: victory-fencing
*/

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

:root {
    --nav-width:      226px;
    --title-width:    574px;
    --content-width:  800px;
    --header-height:  250px;
    --breadcrumb-bg:  #1d252c;
    --breadcrumb-h:   45px;
    --nav-red-top:    #bd1d23;
    --nav-red-bottom: #731013;
    --color-primary:  #990000;
    --color-gold:     #c8a951;
    --color-text:     #222222;
    --color-text-muted: #666666;
    --color-border:   #cccccc;
    --color-border-light: #e5e5e5;
    --color-link:     #990000;
    --color-link-hover: #cc0000;
    --color-bg:       #ffffff;
    --color-bg-alt:   #f2f2f2;
    --color-sidebar-bg: #f9f9f9;
    --color-footer-bg: #1a1a2e;
    --color-footer-text: #cccccc;
    --color-announcement-bg: #fef9ec;
    --color-announcement-border: #c8a951;
    --font-heading:   Georgia, 'Times New Roman', serif;
    --font-body:      Arial, Helvetica, sans-serif;
    --font-size-base: 14px;
    --font-size-nav:  13px;
    --font-size-sm:   12px;
    --font-size-xs:   11px;
    --line-height:    1.6;
    --radius:         3px;
    --transition:     0.18s ease;
}

html { font-size: var(--font-size-base); }

body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    color: var(--color-text);
    background-color: #555555;
    min-height: 100vh;
}

a { color: var(--color-link); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-link-hover); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); font-weight: bold; line-height: 1.3; color: var(--color-text); }
p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* ============================================================
   PAGE SHELL — 800px centred, white
   ============================================================ */
#page {
    width: var(--content-width);
    margin: 0 auto;
    background: var(--color-bg);
    box-shadow: 0 0 24px rgba(0,0,0,0.55);
}

/* ============================================================
   HEADER — 800 × 250px, two columns side-by-side
   Left:  226px  nav background image
   Right: 574px  title graphic
   ============================================================ */
.site-header {
    width: 100%;
    height: var(--header-height);   /* 250px */
    display: flex;
    flex-shrink: 0;
    overflow: hidden;
}

/* LEFT NAV COLUMN — 226px, background image */
.header-nav-col {
    width: var(--nav-width);       /* 226px */
    height: var(--header-height);  /* 250px */
    flex-shrink: 0;
    position: relative;
    /* Nav background image set via Customizer; fallback gradient */
    background-image: var(--nav-bg-image, linear-gradient(to bottom left, #bd1d23 0%, #731013 100%));
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Overlay the nav menu on top of the background image */
.header-nav-col nav {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 0;
}

/* RIGHT TITLE COLUMN — 574px, title graphic */
.header-title-col {
    width: var(--title-width);     /* 574px */
    height: var(--header-height);  /* 250px */
    flex-shrink: 0;
    /* Title image set via Customizer; fallback dark bg */
    background-image: var(--title-bg-image, none);
    background-color: #1a1a2e;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* If an actual <img> tag is used instead of CSS bg */
.header-title-col img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ============================================================
   PRIMARY NAV MENU (inside header-nav-col)
   Vertical, left-aligned, »» prefix, hover = white underline
   ============================================================ */
.primary-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.primary-nav-menu li { margin: 0; }

.primary-nav-menu > li > a {
    display: block;
    padding: 5px 10px 5px 16px;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: var(--font-size-nav);   /* 13px */
    font-weight: bold;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: text-decoration var(--transition);
}

/* ▶▶ triangle prefix — inline-block breaks it out of the underline */
.primary-nav-menu > li > a::before {
    content: '\25B6\25B6\00A0'; /* ▶▶  */
    display: inline-block;        /* excludes ::before from text-decoration */
    font-size: 8px;               /* smaller triangles */
    color: rgba(255,255,255,0.75);
    vertical-align: middle;
    text-decoration: none;
}

/* Hover: underline the link text only, not the triangles */
.primary-nav-menu > li > a:hover,
.primary-nav-menu > li.current-menu-item > a,
.primary-nav-menu > li.current-page-ancestor > a {
    color: #ffffff;
    text-decoration: underline;
    text-decoration-color: #ffffff;
    text-underline-offset: 3px;
    text-decoration-skip-ink: none;
}

/* Sub-menus (dropdown panels, hidden until hover/open) */
.primary-nav-menu .sub-menu {
    display: none;
    padding-left: 24px;
}
.primary-nav-menu li:hover > .sub-menu,
.primary-nav-menu li.open > .sub-menu { display: block; }

.primary-nav-menu .sub-menu a {
    display: block;
    padding: 3px 8px;
    color: rgba(255,255,255,0.85);
    font-size: var(--font-size-sm);
    text-decoration: none;
}
.primary-nav-menu .sub-menu a::before { content: '\00BB\00A0'; font-size: 10px; }
.primary-nav-menu .sub-menu a:hover { text-decoration: underline; color: #fff; }

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    width: 100%;
    background: var(--nav-red-bottom);
    color: #fff;
    border: none;
    padding: 10px 16px;
    font-size: var(--font-size-base);
    font-family: var(--font-body);
    font-weight: bold;
    text-align: left;
    cursor: pointer;
}

/* ============================================================
   BREADCRUMBS BAR — full 800px, 45px, #1d252c
   ============================================================ */
.breadcrumbs-bar {
    width: 100%;
    height: var(--breadcrumb-h);     /* 45px */
    background-color: var(--breadcrumb-bg);  /* #1d252c */
    display: flex;
    align-items: center;
    padding: 0 16px;
    overflow: hidden;
}

/* Breadcrumb text: 12px, not bold, white */
.breadcrumbs-bar,
.breadcrumbs-bar .breadcrumbs,
.breadcrumbs-bar .breadcrumb-home,
.breadcrumbs-bar .bc-home,
.breadcrumbs-bar span {
    font-size: var(--font-size-sm);
    font-weight: normal;
    color: #ffffff;
}

.breadcrumbs-bar a {
    color: #ffffff;
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: normal;
}
.breadcrumbs-bar a:hover { color: #ffffff; text-decoration: underline; }

.breadcrumbs-bar .sep {
    margin: 0 6px;
    color: rgba(255,255,255,0.50);
}

/* ============================================================
   BODY ROW — sidebar (226px) + main content
   ============================================================ */
.body-row {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* ============================================================
   SIDEBAR WIDGETS (226px, below nav col)
   ============================================================ */
.sidebar {
    width: var(--nav-width);   /* 226px */
    flex-shrink: 0;
    background: var(--color-sidebar-bg);
    border-right: 1px solid var(--color-border-light);
    padding: 14px 10px;
}

.widget { margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--color-border-light); }
.widget:last-child { border-bottom: none; margin-bottom: 0; }

.widget-title {
    font-family: var(--font-heading);
    font-size: var(--font-size-sm);
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 7px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--color-border);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.widget ul li { border-bottom: 1px dotted var(--color-border); padding: 4px 0; }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--color-link); font-size: var(--font-size-sm); display: flex; justify-content: space-between; align-items: center; }
.widget ul li a:hover { color: var(--color-primary); text-decoration: underline; }
.widget ul li .count { color: var(--color-text-muted); font-size: var(--font-size-xs); }

.widget-info-links li a::before,
.widget-follow li a::before { content: '\00BB\00A0'; color: var(--color-primary); font-size: var(--font-size-xs); }

/* Search widget */
.widget-search .search-form { display: flex; gap: 4px; }
.widget-search input[type="search"],
.widget-search input[type="text"] { flex: 1; padding: 4px 7px; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: var(--font-size-sm); font-family: var(--font-body); }
.widget-search button { padding: 4px 9px; background: var(--color-primary); color: #fff; border: none; border-radius: var(--radius); cursor: pointer; font-size: var(--font-size-sm); }
.widget-search button:hover { background: var(--nav-red-bottom); }

/* ============================================================
   MAIN CONTENT COLUMN
   ============================================================ */
.main-content {
    flex: 1;
    min-width: 0;
    padding: 18px 18px 24px;
    background: var(--color-bg);
}

/* ============================================================
   ANNOUNCEMENT BLOCK (editable in WP admin via Customizer or ACF)
   ============================================================ */
.home-announcement {
    background: #e8e8e8;
    border: 1px solid #c0c0c0;
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.65;
    color: #000000;
}
.home-announcement strong { color: var(--color-primary); }
.home-announcement a { color: var(--color-link); }
.home-announcement hr { border: none; border-top: 1px solid #c0c0c0; margin: 10px 0; }
.home-announcement p { margin: 0 0 0.75em; }
.home-announcement p:last-child { margin-bottom: 0; }
.home-announcement ul, .home-announcement ol { margin: 0 0 0.75em 1.4em; }
.home-announcement li { margin-bottom: 0.25em; }

.home-news {
    background: #e8e8e8;
    border: 1px solid #c0c0c0;
    border-left: 4px solid #3a3a3a;
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.65;
    color: #000000;
}
.home-news h3 { font-size: 14px; color: #3a3a3a; margin-bottom: 6px; }
.home-news a { color: var(--color-link); }
.home-news p { margin: 0 0 0.75em; }
.home-news p:last-child { margin-bottom: 0; }
.home-news ul, .home-news ol { margin: 0 0 0.75em 1.4em; }
.home-news li { margin-bottom: 0.25em; }

.hours-block {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-primary);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 13px;
}
.hours-block h3 { font-size: 14px; font-family: var(--font-heading); color: var(--color-primary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.4px; }
.hours-block address { font-style: normal; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--color-border); color: var(--color-text-muted); }
.hours-block address a { color: var(--color-link); }

.site-tagline-banner { font-size: var(--font-size-xs); color: var(--color-text-muted); font-style: italic; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--color-border); }

/* Main content expands full width when sidebar is absent */
.body-row .main-content:only-child {
    width: 100%;
}

/* ============================================================
   INTERIOR PAGE CONTENT
   ============================================================ */
.page-header { margin-bottom: 18px; padding-bottom: 8px; border-bottom: 2px solid var(--color-primary); }
.page-header h1 { font-size: 22px; color: var(--color-primary); }

.entry-content { font-size: 13px; line-height: var(--line-height); }
.entry-content h2 { font-size: 17px; color: var(--color-primary); margin: 18px 0 8px; padding-bottom: 5px; border-bottom: 1px solid var(--color-border); }
.entry-content h3 { font-size: 15px; color: var(--color-text); margin: 14px 0 6px; }
.entry-content p { margin-bottom: 1em; }
.entry-content ul, .entry-content ol { margin: 0 0 1em 22px; list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 3px; }
.entry-content table { width: 100%; border-collapse: collapse; margin-bottom: 1em; font-size: 12px; }
.entry-content table th { background: var(--color-primary); color: #fff; padding: 7px 10px; text-align: left; }
.entry-content table td { padding: 7px 10px; border-bottom: 1px solid var(--color-border-light); }
.entry-content table tr:nth-child(even) td { background: var(--color-bg-alt); }

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-form label { display: block; font-size: 12px; font-weight: bold; margin-bottom: 3px; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea { width: 100%; padding: 7px 9px; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 13px; font-family: var(--font-body); color: var(--color-text); background: #fff; margin-bottom: 12px; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--color-primary); }
.contact-form textarea { height: 130px; resize: vertical; }
.contact-form button, .btn-primary { padding: 8px 20px; background: var(--color-primary); color: #fff; border: none; border-radius: var(--radius); font-size: 13px; font-weight: bold; cursor: pointer; transition: background var(--transition); }
.contact-form button:hover, .btn-primary:hover { background: var(--nav-red-bottom); }

/* ============================================================
   FOOTER
   Nav links: horizontal row
   Copyright: separate line below
   ============================================================ */
.site-footer {
    background: var(--color-footer-bg);
    border-top: 3px solid var(--color-primary);
    padding: 14px 0 12px;
    text-align: center;
}

/* Horizontal nav links */
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-bottom: 10px;
}

.footer-nav a {
    color: var(--color-footer-text);
    font-size: var(--font-size-sm);
    font-family: var(--font-body);
    padding: 2px 10px;
    border-right: 1px solid #444;
    transition: color var(--transition);
    white-space: nowrap;
}
.footer-nav a:first-child { padding-left: 0; }
.footer-nav a:last-child { border-right: none; }
.footer-nav a:hover { color: #ffffff; text-decoration: underline; }

/* Copyright line — separate row below nav */
.footer-copyright {
    border-top: 1px solid #2e2e2e;
    padding-top: 10px;
    margin-top: 2px;
    font-size: var(--font-size-xs);   /* 11px */
    color: rgba(255,255,255,0.45);
    font-family: var(--font-body);
}
.footer-copyright a { color: var(--color-gold); }
.footer-copyright a:hover { color: #fff; }

/* ============================================================
   WP ALIGNMENT & UTILITY
   ============================================================ */
.alignleft  { float: left;  margin: 0 18px 14px 0; }
.alignright { float: right; margin: 0 0 14px 18px; }
.aligncenter { margin: 0 auto 14px; display: block; }
.wp-caption-text { font-size: var(--font-size-xs); color: var(--color-text-muted); text-align: center; margin-top: 3px; }
.clearfix::after { content: ""; display: table; clear: both; }
.screen-reader-text { position: absolute; left: -9999em; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 820px) {
    #page { width: 100%; box-shadow: none; }
}

@media (max-width: 768px) {
    .site-header { flex-direction: column; height: auto; }
    .header-nav-col { width: 100%; height: auto; position: relative; background-image: none !important; background-color: #000000 !important; }
    .header-nav-col nav { position: relative; }
    .header-title-col { width: 100%; height: 120px; }

    .nav-toggle { display: block; }
    .primary-nav-menu { display: none; }
    .primary-nav-menu.open { display: block; background: rgba(0,0,0,0.65); }

    .body-row { flex-direction: column; }
    .sidebar { width: 100%; border-right: none; border-top: 2px solid var(--color-primary); }

    .footer-nav { flex-direction: column; gap: 2px; }
    .footer-nav a { border-right: none; padding: 4px 0; }
}

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