/*
Theme Name: Regular Guy Training
Theme URI: https://regularguy.training
Author: Regular Guy Training
Author URI: https://regularguy.training
Description: A bold red, black, and white theme built for regularguy.training — firearms instruction, courses, and range training.
Version: 1.0.23
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: rgt
License: GNU General Public License v2 or later
License URI: LICENSE
Tags: custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* -----------------------------------------------------------
   Design tokens
----------------------------------------------------------- */
:root {
    --rgt-black: #0d0d0d;
    --rgt-black-soft: #171717;
    --rgt-red: #c8102e;
    --rgt-red-dark: #8f0b20;
    --rgt-white: #ffffff;
    --rgt-off-white: #f2f1ef;
    --rgt-gray: #8a8a8a;
    --rgt-border: #2a2a2a;
    --rgt-font-heading: 'Oswald', 'Arial Narrow', sans-serif;
    --rgt-font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --rgt-max-width: 1180px;
}

/* -----------------------------------------------------------
   Reset & base
----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--rgt-off-white);
    color: var(--rgt-black);
    font-family: var(--rgt-font-body);
    font-size: 17px;
    line-height: 1.6;
}

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

a {
    color: var(--rgt-red);
    text-decoration: none;
    transition: color .15s ease;
}
a:hover, a:focus { color: var(--rgt-black); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--rgt-font-heading);
    text-transform: uppercase;
    letter-spacing: .03em;
    line-height: 1.15;
    color: var(--rgt-black);
    margin: 0 0 .5em;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.1rem; }
h3 { font-size: 1.5rem; }

p { margin: 0 0 1.2em; }

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

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px,1px,1px,1px);
}

/* -----------------------------------------------------------
   Buttons
----------------------------------------------------------- */
.btn {
    display: inline-block;
    background: var(--rgt-red);
    color: var(--rgt-white);
    font-family: var(--rgt-font-heading);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .9rem;
    padding: 14px 30px;
    border: 2px solid var(--rgt-red);
    border-radius: 2px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover, .btn:focus {
    background: var(--rgt-black);
    border-color: var(--rgt-black);
    color: var(--rgt-white);
}
.btn-outline {
    background: transparent;
    color: var(--rgt-white);
    border-color: var(--rgt-white);
}
.btn-outline:hover, .btn-outline:focus {
    background: var(--rgt-white);
    color: var(--rgt-black);
    border-color: var(--rgt-white);
}

/* -----------------------------------------------------------
   Site header
----------------------------------------------------------- */
.site-header {
    background: var(--rgt-black);
    border-bottom: 4px solid var(--rgt-red);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 84px;
}
.site-branding { display: flex; align-items: center; gap: 14px; }
.site-branding img { max-height: 56px; }
.site-title {
    margin: 0;
    font-size: 1.5rem;
    color: var(--rgt-white);
}
.site-title a { color: var(--rgt-white); }
.site-title a:hover { color: var(--rgt-red); }
.site-description {
    margin: 0;
    color: var(--rgt-gray);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.primary-menu {
    list-style: none;
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
}
.primary-menu li { position: relative; }
.primary-menu a {
    display: block;
    padding: 10px 16px;
    color: var(--rgt-white);
    font-family: var(--rgt-font-heading);
    text-transform: uppercase;
    font-size: .9rem;
    letter-spacing: .05em;
}
.primary-menu a:hover,
.primary-menu .current-menu-item > a {
    color: var(--rgt-red);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 2px solid var(--rgt-white);
    color: var(--rgt-white);
    padding: 8px 12px;
    font-family: var(--rgt-font-heading);
    text-transform: uppercase;
    cursor: pointer;
}

/* -----------------------------------------------------------
   Hero / banner
----------------------------------------------------------- */
.hero {
    background: linear-gradient(180deg, var(--rgt-black) 0%, var(--rgt-black-soft) 100%);
    color: var(--rgt-white);
    padding: 100px 0;
    text-align: center;
    border-bottom: 4px solid var(--rgt-red);
}
.hero .eyebrow {
    color: var(--rgt-red);
    font-family: var(--rgt-font-heading);
    text-transform: uppercase;
    letter-spacing: .2em;
    font-size: .9rem;
    margin-bottom: 12px;
}
.hero h1 { color: var(--rgt-white); max-width: 820px; margin-left: auto; margin-right: auto; }
.hero p.lead {
    color: var(--rgt-off-white);
    max-width: 620px;
    margin: 0 auto 32px;
    font-size: 1.15rem;
}
.hero .hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* -----------------------------------------------------------
   Sections
----------------------------------------------------------- */
.section { padding: 80px 0; }
.section-dark {
    background: var(--rgt-black);
    color: var(--rgt-off-white);
}
.section-dark h2, .section-dark h3 { color: var(--rgt-white); }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 48px; }
.section-header .eyebrow {
    color: var(--rgt-red);
    font-family: var(--rgt-font-heading);
    letter-spacing: .2em;
    text-transform: uppercase;
    font-size: .85rem;
}

.grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(3, 1fr);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
    background: var(--rgt-white);
    border: 1px solid #e2e0dc;
    border-top: 4px solid var(--rgt-red);
    padding: 30px;
    border-radius: 2px;
}
.card h3 { margin-bottom: 10px; }
.card .price {
    display: block;
    font-family: var(--rgt-font-heading);
    color: var(--rgt-red);
    font-size: 1.2rem;
    margin-top: 14px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}
.stats .stat-number {
    font-family: var(--rgt-font-heading);
    font-size: 2.6rem;
    color: var(--rgt-red);
}
.stats .stat-label {
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: .8rem;
    color: var(--rgt-gray);
}

blockquote.testimonial {
    background: var(--rgt-white);
    color: var(--rgt-black);
    border-left: 4px solid var(--rgt-red);
    padding: 24px 28px;
    margin: 0;
    font-style: italic;
}
blockquote.testimonial cite {
    display: block;
    margin-top: 14px;
    font-style: normal;
    font-family: var(--rgt-font-heading);
    text-transform: uppercase;
    font-size: .85rem;
    color: var(--rgt-red);
}

.cta-band {
    background: var(--rgt-red);
    color: var(--rgt-white);
    text-align: center;
    padding: 60px 0;
}
.cta-band h2, .cta-band p { color: var(--rgt-white); }
.cta-band .btn { background: var(--rgt-black); border-color: var(--rgt-black); }
.cta-band .btn:hover { background: var(--rgt-white); color: var(--rgt-black); border-color: var(--rgt-white); }

/* -----------------------------------------------------------
   Content / single & page
----------------------------------------------------------- */
.content-area { padding: 60px 0; }
.entry-title { margin-bottom: .3em; }
.entry-meta {
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .8rem;
    color: var(--rgt-gray);
    margin-bottom: 2em;
}
.entry-content img { border: 4px solid var(--rgt-black); }

.page-banner {
    background: var(--rgt-black);
    color: var(--rgt-white);
    padding: 60px 0;
    border-bottom: 4px solid var(--rgt-red);
    text-align: center;
}
.page-banner h1 { color: var(--rgt-white); margin: 0; }

/* -----------------------------------------------------------
   Widgets / sidebar
----------------------------------------------------------- */
.widget {
    background: var(--rgt-white);
    border: 1px solid #e2e0dc;
    border-top: 4px solid var(--rgt-black);
    padding: 24px;
    margin-bottom: 24px;
}
.widget-title {
    font-size: 1.1rem;
    border-bottom: 2px solid var(--rgt-red);
    padding-bottom: 8px;
    margin-bottom: 16px;
}

/* -----------------------------------------------------------
   Footer
----------------------------------------------------------- */
.site-footer {
    background: var(--rgt-black);
    color: var(--rgt-gray);
    padding: 60px 0 24px;
    border-top: 4px solid var(--rgt-red);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}
.footer-grid h4 {
    color: var(--rgt-white);
    font-size: 1rem;
    margin-bottom: 16px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--rgt-gray); }
.footer-grid a:hover { color: var(--rgt-red); }
.site-info {
    text-align: center;
    font-size: .8rem;
    padding-top: 24px;
    border-top: 1px solid var(--rgt-border);
}
.site-info a { color: var(--rgt-red); }

/* -----------------------------------------------------------
   Event Espresso (Decaf) integration
   Restyles EE's default event-list/ticket-selector markup to match
   the red/black/white theme instead of its default admin-y styling.

   Note: on the shortcode-rendered homepage list, EE puts the
   "espresso_events" class directly on each <article> (not on a
   wrapping <ul>/<li>), so card styling/colors target that class
   itself. The shortcode also injects its own "Upcoming Events"
   <header> above the list -- hidden below since the homepage
   section already has its own "Classes" heading.
----------------------------------------------------------- */
.ee-event-grid .page-header { display: none; }

.ee-event-list .espresso_events,
.section-dark .espresso-event-single-atts {
    display: block;
    background: var(--rgt-white);
    border: 1px solid #e2e0dc;
    border-top: 4px solid var(--rgt-red);
    border-radius: 2px;
    padding: 26px 30px;
    margin: 0 0 24px;
}

.ee-event-list .espresso_events,
.ee-event-list .espresso_events * {
    color: var(--rgt-black);
}

/* Homepage event preview: lay events out in as many columns as fit the
   available width, instead of a single stacked column. */
.ee-event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.ee-event-grid .espresso_events {
    margin-bottom: 0;
}

.ee-event-list .entry-title,
.ee-event-list .entry-title a {
    font-family: var(--rgt-font-heading);
    text-transform: uppercase;
    color: var(--rgt-black);
    font-size: 1.4rem;
}

.ee-event-list .event-datetimes,
.ee-event-list .event-venue,
.ee-event-list .espresso-venue-details {
    font-family: var(--rgt-font-body);
    color: var(--rgt-gray);
    font-size: .9rem;
    margin: 6px 0;
}

.ee-event-list .ticket-selector-submit-btn,
.ticket-selector-submit-btn-wrap button,
input.ticket-selector-submit-btn,
.event-tickets-content .ticket-selector-submit input,
.espresso-button,
.ee-button {
    background: var(--rgt-red) !important;
    color: var(--rgt-white) !important;
    font-family: var(--rgt-font-heading) !important;
    text-transform: uppercase;
    letter-spacing: .06em;
    border: 2px solid var(--rgt-red) !important;
    border-radius: 2px !important;
    padding: 10px 22px !important;
    transition: background .15s ease, color .15s ease;
}
.ee-event-list .ticket-selector-submit-btn:hover,
.espresso-button:hover,
.ee-button:hover {
    background: var(--rgt-black) !important;
    border-color: var(--rgt-black) !important;
    color: var(--rgt-white) !important;
}

/* EE's "Add to iCal" icon button relies on EE's own frontend CSS, which
   only loads on pages EE recognizes as event pages — not on the homepage,
   where events are embedded via shortcode. Give it a self-contained icon
   so it always renders regardless of EE's page-type detection. */
input.ee-ical-sbmt {
    -webkit-appearance: none;
    appearance: none;
    width: 26px !important;
    height: 26px !important;
    padding: 0 !important;
    border: 1px solid #ccc !important;
    border-radius: 2px !important;
    background-color: var(--rgt-white) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8102e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 16px 16px !important;
    cursor: pointer;
}
input.ee-ical-sbmt:hover {
    background-color: var(--rgt-off-white) !important;
    border-color: var(--rgt-red) !important;
}

table.ticket_selector,
table.event_registration_ticket_selector_table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}
table.ticket_selector th,
table.event_registration_ticket_selector_table th {
    text-align: left;
    text-transform: uppercase;
    font-family: var(--rgt-font-heading);
    font-size: .8rem;
    color: var(--rgt-gray);
    border-bottom: 2px solid var(--rgt-black);
    padding: 8px;
}
table.ticket_selector td,
table.event_registration_ticket_selector_table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e2e0dc;
}

/* -----------------------------------------------------------
   Comments
----------------------------------------------------------- */
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-body {
    background: var(--rgt-white);
    border-left: 3px solid var(--rgt-red);
    padding: 20px;
    margin-bottom: 20px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    margin-bottom: 16px;
    font-family: var(--rgt-font-body);
}

/* -----------------------------------------------------------
   Responsive
----------------------------------------------------------- */
@media (max-width: 900px) {
    .grid, .footer-grid { grid-template-columns: 1fr 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 782px) {
    .menu-toggle { display: inline-block; }
    .primary-menu {
        display: none;
        position: absolute;
        top: 84px; left: 0; right: 0;
        flex-direction: column;
        background: var(--rgt-black);
        border-bottom: 4px solid var(--rgt-red);
        gap: 0;
    }
    .primary-menu.is-open { display: flex; }
    .grid, .grid-2, .footer-grid, .stats { grid-template-columns: 1fr; }
    .hero { padding: 70px 0; }
    h1 { font-size: 2.1rem; }
}
