/*
Theme Name:        K5GVL
Theme URI:         https://k5gvl.com
Description:       Custom theme for the Sabine Valley Amateur Radio Association (K5GVL). Modern, clean design built on Twenty Twenty-Five with the club's navy and gold color palette and Roboto typography.
Author:            K5GVL
Author URI:        https://k5gvl.com
Template:          twentytwentyfive
Version:           1.3.0
Requires at least: 6.4
Tested up to:      6.9
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:       k5gvl
*/

/* ============================================================
   K5GVL CHILD THEME — Custom CSS
   Color palette: Navy #1a237e, Gold #ffd700, Light gray #f5f5f5
   ============================================================ */

:root {
    --k5-primary: #1a237e;
    --k5-primary-dark: #0d1654;
    --k5-secondary: #ffd700;
    --k5-secondary-dark: #d4af00;
    --k5-bg: #f5f5f5;
    --k5-card: #ffffff;
    --k5-text: #333333;
    --k5-muted: #666666;
    --k5-border: #dddddd;
}

/* ---------- Base ---------- */
body {
    font-family: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--k5-text);
    background-color: var(--k5-bg);
    line-height: 1.6;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6,
.wp-block-heading {
    font-family: 'Roboto', sans-serif;
    color: var(--k5-primary);
    font-weight: 700;
    line-height: 1.25;
}

h2.wp-block-heading {
    border-bottom: 2px solid var(--k5-secondary);
    padding-bottom: 0.5rem;
    display: inline-block;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--k5-primary);
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover {
    color: var(--k5-secondary-dark);
    text-decoration: underline;
}

/* ---------- Header (hardcoded, centered, no hamburger) ---------- */
.wp-block-template-part.site-header,
header.wp-block-template-part {
    background-color: var(--k5-primary) !important;
    padding: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.k5-header-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
}

/* Logo block (text only, centered) */
.k5-logo-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    color: #ffffff !important;
}

.k5-logo-link:hover {
    text-decoration: none !important;
}

.k5-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-align: center;
    align-items: center;
}

.k5-logo-callsign {
    font-size: 2.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.k5-logo-subtitle {
    font-size: 0.95rem;
    color: var(--k5-secondary);
    font-weight: 500;
    letter-spacing: 0.3px;
    margin-top: 0.15rem;
}

/* Main nav (centered) */
.k5-main-nav {
    width: 100%;
    display: flex;
    justify-content: center;
}

.k5-nav-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
}

.k5-nav-list li {
    list-style: none !important;
    margin: 0 !important;
    position: relative;
}

.k5-nav-list li::marker {
    content: "" !important;
}

.k5-nav-list > li > a {
    color: #ffffff !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.55rem 0.85rem;
    text-decoration: none !important;
    transition: color 0.2s ease, background-color 0.2s ease;
    display: inline-block;
    border-radius: 4px;
    white-space: nowrap;
}

.k5-nav-list > li > a:hover {
    color: var(--k5-secondary) !important;
    background-color: rgba(255, 255, 255, 0.06);
}

/* Dropdowns (hover on desktop, tap-toggle on mobile via JS) */
.k5-dropdown {
    list-style: none !important;
    margin: 0 !important;
    padding: 0.5rem 0 !important;
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--k5-primary);
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    z-index: 1000;
}

.k5-has-dropdown:hover .k5-dropdown,
.k5-has-dropdown:focus-within .k5-dropdown,
.k5-has-dropdown.k5-open > .k5-dropdown {
    display: block;
}

.k5-dropdown li {
    list-style: none !important;
    margin: 0 !important;
}

.k5-dropdown a {
    display: block;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.k5-dropdown a:hover {
    color: var(--k5-secondary) !important;
    background-color: rgba(255, 255, 255, 0.08);
}

/* Tighter on smaller screens — nav still wraps and stays usable */
@media (max-width: 1100px) {
    .k5-nav-list > li > a {
        padding: 0.45rem 0.6rem;
        font-size: 0.88rem;
    }
}

@media (max-width: 768px) {
    .k5-logo-callsign {
        font-size: 1.6rem;
    }
    .k5-logo-subtitle {
        font-size: 0.8rem;
    }
    .k5-nav-list {
        gap: 0;
    }
    .k5-nav-list > li > a {
        padding: 0.4rem 0.5rem;
        font-size: 0.82rem;
    }
    .k5-dropdown {
        position: static;
        transform: none;
        display: none;
        background: rgba(0, 0, 0, 0.2);
        box-shadow: none;
        min-width: auto;
        width: 100%;
    }
    .k5-has-dropdown.k5-open > .k5-dropdown {
        display: block;
    }
}

/* ---------- Footer ---------- */
.wp-block-template-part.site-footer,
footer.wp-block-template-part {
    background-color: var(--k5-primary);
    color: #ffffff;
    padding: 3rem 0 1rem;
}

.wp-block-template-part.site-footer *,
footer.wp-block-template-part *,
.wp-block-template-part.site-footer p,
footer.wp-block-template-part p,
.wp-block-template-part.site-footer h1,
.wp-block-template-part.site-footer h2,
.wp-block-template-part.site-footer h3,
.wp-block-template-part.site-footer h4,
footer.wp-block-template-part h1,
footer.wp-block-template-part h2,
footer.wp-block-template-part h3,
footer.wp-block-template-part h4 {
    color: #ffffff;
}

.wp-block-template-part.site-footer h4,
footer.wp-block-template-part h4 {
    color: var(--k5-secondary) !important;
    border-bottom: none;
    margin-bottom: 1rem;
}

.wp-block-template-part.site-footer a,
footer.wp-block-template-part a {
    color: #ffffff !important;
    text-decoration: none;
}

.wp-block-template-part.site-footer a:hover,
footer.wp-block-template-part a:hover {
    color: var(--k5-secondary) !important;
    text-decoration: underline;
}

/* ---------- Buttons ---------- */
.wp-block-button__link,
.wp-element-button,
button:not(.wp-block-navigation__responsive-container-open):not(.wp-block-navigation__responsive-container-close) {
    background-color: var(--k5-primary);
    color: #ffffff;
    border: 2px solid var(--k5-primary);
    border-radius: 4px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-block;
}

.wp-block-button__link:hover,
.wp-element-button:hover,
button:hover:not(.wp-block-navigation__responsive-container-open):not(.wp-block-navigation__responsive-container-close) {
    background-color: #ffffff;
    color: var(--k5-primary);
}

.wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent;
    color: var(--k5-primary);
    border: 2px solid var(--k5-primary);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: var(--k5-primary);
    color: #ffffff;
}

/* Primary CTA button on dark backgrounds (footer/CTA boxes) */
.has-background.has-k-5-primary-background-color .wp-block-button__link,
.wp-block-cover .wp-block-button__link {
    background-color: var(--k5-secondary);
    color: var(--k5-primary);
    border-color: var(--k5-secondary);
    font-weight: 700;
}

.wp-block-cover .wp-block-button__link:hover {
    background-color: #ffffff;
    color: var(--k5-primary);
    border-color: #ffffff;
}

/* ---------- Cover blocks (heroes) ---------- */
.wp-block-cover {
    margin-top: 0;
    min-height: 400px;
}

.wp-block-cover h1,
.wp-block-cover h2,
.wp-block-cover h3,
.wp-block-cover p {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    border: none;
}

.wp-block-cover h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.wp-block-cover p {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
}

/* ---------- Content cards (group blocks with backgrounds) ---------- */
.wp-block-group.has-background:not(.has-k-5-primary-background-color):not([style*="background-color"]) {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.entry-content > .wp-block-group {
    margin-bottom: 2rem;
}

/* Default content padding for full-width containers */
.entry-content,
.wp-block-post-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ---------- Lists ---------- */
ul li::marker,
ol li::marker {
    color: var(--k5-secondary);
    font-weight: bold;
}

.entry-content ul,
.wp-block-post-content ul {
    padding-left: 1.5rem;
}

.entry-content ul li,
.wp-block-post-content ul li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* ---------- Quotes ---------- */
blockquote,
.wp-block-quote {
    border-left: 4px solid var(--k5-secondary);
    background-color: var(--k5-card);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    font-style: normal;
}

blockquote p,
.wp-block-quote p {
    margin-bottom: 0.5rem;
}

/* ---------- Images ---------- */
.wp-block-image img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wp-block-image figcaption {
    color: var(--k5-muted);
    font-size: 0.9rem;
    text-align: center;
    margin-top: 0.5rem;
}

/* ---------- Separators ---------- */
hr.wp-block-separator {
    border-color: var(--k5-secondary);
    border-width: 2px 0 0 0;
    max-width: 100px;
    margin: 2rem auto;
}

hr.wp-block-separator.is-style-wide {
    max-width: 100%;
    border-color: var(--k5-border);
    border-width: 1px 0 0 0;
}

/* ---------- Tables ---------- */
.wp-block-table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wp-block-table table {
    border-collapse: collapse;
    width: 100%;
}

.wp-block-table th {
    background-color: var(--k5-primary);
    color: #ffffff;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.wp-block-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--k5-border);
    background-color: var(--k5-card);
}

.wp-block-table tr:last-child td {
    border-bottom: none;
}

/* ---------- Forms (Fluent Forms + native) ---------- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea,
.ff-el-form-control,
.fluentform input,
.fluentform select,
.fluentform textarea {
    border: 1px solid var(--k5-border) !important;
    border-radius: 4px !important;
    padding: 0.75rem !important;
    font-size: 1rem !important;
    font-family: 'Roboto', sans-serif !important;
    background-color: #ffffff !important;
    color: var(--k5-text) !important;
    width: 100%;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus,
.ff-el-form-control:focus,
.fluentform input:focus,
.fluentform select:focus,
.fluentform textarea:focus {
    outline: none !important;
    border-color: var(--k5-primary) !important;
    box-shadow: 0 0 0 2px rgba(26, 35, 126, 0.2) !important;
}

label,
.ff-el-input--label label {
    font-weight: 500;
    color: var(--k5-text);
    margin-bottom: 0.5rem;
    display: block;
}

.fluentform .ff-btn-submit,
.fluentform button[type="submit"] {
    background-color: var(--k5-primary) !important;
    color: #ffffff !important;
    border: 2px solid var(--k5-primary) !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 4px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
}

.fluentform .ff-btn-submit:hover,
.fluentform button[type="submit"]:hover {
    background-color: #ffffff !important;
    color: var(--k5-primary) !important;
}

/* ---------- Page title (the auto-generated H1 above pages) ---------- */
.wp-block-post-title {
    color: var(--k5-primary);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Hide page title on Home page (handled via body class via functions.php) */
.home .wp-block-post-title,
.page-id-home .wp-block-post-title {
    display: none;
}

/* ---------- Card hover effect for officer/membership/event groups ---------- */
.wp-block-columns > .wp-block-column.has-background,
.wp-block-group.has-background:hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wp-block-columns > .wp-block-column.has-background:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .entry-content,
    .wp-block-post-content {
        padding: 1.5rem 1rem;
    }

    .wp-block-cover {
        min-height: 280px;
    }

    .wp-block-template-part.site-header .wp-block-site-logo img,
    header.wp-block-template-part .wp-block-site-logo img {
        height: 48px;
    }
}

/* ---------- Print ---------- */
@media print {
    header,
    footer,
    .wp-block-navigation {
        display: none;
    }
}

/* ---------- Emergency alert signup forms (homepage) ---------- */
.k5-alert-form {
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid var(--k5-secondary);
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}

.k5-alert-form:last-child {
    margin-bottom: 0;
}

.k5-alert-form h4 {
    color: var(--k5-primary) !important;
    margin: 0 0 0.5rem 0 !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
}

.k5-alert-form iframe {
    width: 100%;
    border: none;
    border-radius: 4px;
    background-color: #ffffff;
    display: block;
}

/* ---------- Skywarn / SKYWARN content highlights ---------- */
.skywarn-alert,
.is-style-callout {
    background-color: #fff3cd;
    border-left: 4px solid var(--k5-secondary);
    padding: 1.25rem;
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
}

/* ---------- Repeater info table styling ---------- */
.repeater-info-card {
    background: var(--k5-card);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--k5-primary);
    margin-bottom: 1.5rem;
}

/* ---------- Smooth scrolling ---------- */
html {
    scroll-behavior: smooth;
}

/* ---------- Selection ---------- */
::selection {
    background-color: var(--k5-secondary);
    color: var(--k5-primary);
}
