/*
Theme Name:  Humber Yawl Club
Theme URI:   https://humberyawlclub.com
Author:      Humber Yawl Club
Description: Custom theme for the Humber Yawl Club website.
Version:     1.1.0
License:     GNU General Public License v2 or later
Text Domain: hyc
*/

/* ============================================================
   CSS CUSTOM PROPERTIES — edit colours here
   ============================================================ */
:root {
    --hyc-topbar-bg:       #006944;
    --hyc-topbar-text:     #d4edd9;
    --hyc-topbar-hover:    #ffffff;
    --hyc-social-hover:    #ffc330;

    --hyc-header-bg:       #333333;
    --hyc-header-text:     #ffffff;
    --hyc-header-muted:    #aaaaaa;

    --hyc-accent:          #cc2200;
    --hyc-accent-light:    #fff5f5;

    --hyc-body-bg:         #f8f8f8;
    --hyc-white:           #ffffff;
    --hyc-border:          #e8e8e8;
    --hyc-border-dark:     #e0e0e0;

    --hyc-text:            #222222;
    --hyc-text-muted:      #555555;
    --hyc-text-faint:      #999999;

    --hyc-widget-title-bg: #333333;
    --hyc-footer-bg:       #333333;
    --hyc-footer-text:     #cccccc;
    --hyc-footer-muted:    #aaaaaa;

    --hyc-font:            'Open Sans', Arial, sans-serif;
    --hyc-inner-width:     80%;
}

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

html { font-size: 16px; }

body {
    font-family: var(--hyc-font);
    font-size: 16px;
    background: var(--hyc-body-bg);
    color: var(--hyc-text);
    line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--hyc-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   INNER WRAPPER — 80% centred, used inside every full-width bar
   ============================================================ */
.hyc-inner {
    max-width: var(--hyc-inner-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ============================================================
   UTILITY / TOP BAR
   ============================================================ */
.hyc-topbar {
    background: var(--hyc-topbar-bg);
    padding: 5px 0;
    font-size: 13px;
}

.hyc-topbar__social {
    display: flex;
    gap: 12px;
    align-items: center;
    list-style: none;
}

.hyc-topbar__social a {
    color: var(--hyc-topbar-text);
    font-size: 16px;
    line-height: 1;
    transition: color 0.15s;
}

.hyc-topbar__social a:hover {
    color: var(--hyc-social-hover);
    text-decoration: none;
}

.hyc-topbar__links {
    display: flex;
    list-style: none;
}

.hyc-topbar__links a {
    color: var(--hyc-topbar-text);
    margin-left: 16px;
    font-size: 13px;
    transition: color 0.15s;
}

.hyc-topbar__links a:hover {
    color: var(--hyc-topbar-hover);
    text-decoration: none;
}

/* ============================================================
   SITE HEADER & NAVIGATION
   ============================================================ */
.hyc-header {
    background: var(--hyc-header-bg);
    padding: 0;
}

.hyc-header .hyc-inner {
    height: 100px;
}

.hyc-header__logo img {
    height: 100px;
    width: auto;
    display: block;
}

.hyc-header__logo a {
    display: block;
    line-height: 0;
}



.hyc-nav {
    display: flex;
    align-items: stretch;
    height: 80px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.hyc-nav > li {
    display: flex;
    align-items: stretch;
    position: relative;
}

.hyc-nav > li > a {
    display: flex;
    align-items: center;
    padding: 0 13px;
    font-size: 14px;
    font-weight: 600;
    color: var(--hyc-header-text);
    text-decoration: none;
    transition: color 0.15s;
    white-space: nowrap;
}

.hyc-nav > li > a:hover,
.hyc-nav > li.current-menu-item > a,
.hyc-nav > li.current-menu-ancestor > a {
    color: var(--hyc-header-muted);
    text-decoration: none;
}

.hyc-nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--hyc-header-bg);
    min-width: 200px;
    list-style: none;
    z-index: 100;
    border-top: 2px solid var(--hyc-accent);
}

.hyc-nav li:hover > .sub-menu { display: block; }

.hyc-nav .sub-menu a {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--hyc-header-muted);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: color 0.15s, background 0.15s;
}

.hyc-nav .sub-menu a:hover {
    color: var(--hyc-header-text);
    background: rgba(255,255,255,0.05);
    text-decoration: none;
}

.hyc-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--hyc-header-text);
    font-size: 26px;
    cursor: pointer;
    padding: 8px;
}

/* ============================================================
   HEADER LOGO + TAGLINE
   ============================================================ */
.hyc-header__logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hyc-header__tagline {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}

.hyc-header__tagline-name {
    font-size: 20px;
    font-weight: 700;
    color: #cc2200;
    font-family: var(--hyc-font);
    letter-spacing: 0.3px;
}

.hyc-header__tagline-sub {
    font-size: 12px;
    color: var(--hyc-header-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}


.hyc-header__tagline {
    transition: opacity 0.3s;
}

.hyc-header.is-scrolled .hyc-header__tagline-name {
    font-size: 18px;
}

/* ============================================================
   STICKY HEADER
   ============================================================ */
.hyc-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.3s, box-shadow 0.3s;
}

.hyc-header.is-scrolled {
    background: rgba(51, 51, 51, 0.88);
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Logo fades when scrolled */
.hyc-header__logo img,
.hyc-header .custom-logo-link img {
    transition: opacity 0.3s;
}

.hyc-header.is-scrolled .hyc-header__logo img,
.hyc-header.is-scrolled .custom-logo-link img {
    opacity: 0.35;
}

/* ============================================================
   HOMEPAGE — two-column content + sidebar
   ============================================================ */
.hyc-content-wrap {
    background: var(--hyc-body-bg);
}

.hyc-content-wrap .hyc-inner {
    align-items: flex-start;
    padding: 20px 0;
}

.hyc-main {
    flex: 1;
    padding: 0 24px 0 0;
}

.hyc-sidebar {
    width: 300px;
    flex-shrink: 0;
    background: var(--hyc-white);
    border-left: 1px solid var(--hyc-border-dark);
}



/* ============================================================
   FULL-WIDTH CONTENT — pages & single posts (no sidebar)
   ============================================================ */
.hyc-content-full {
    background: var(--hyc-body-bg);
}

.hyc-content-full .hyc-inner {
    display: block;
    padding: 24px 0;
}

.hyc-content-full .hyc-main {
    width: 100%;
    padding: 0;
    overflow-x: auto;
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.hyc-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--hyc-header-bg);
}

.hyc-section-head h2 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--hyc-header-bg);
    margin: 0;
}

.hyc-section-head a {
    font-size: 13px;
    color: var(--hyc-accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   ARTICLE CARDS
   ============================================================ */
.hyc-article-list { list-style: none; }

.hyc-article-card {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 14px;
    padding: 13px;
    background: var(--hyc-white);
    border-bottom: 1px solid var(--hyc-border);
    margin-bottom: 3px;
    transition: background 0.15s;
}

.hyc-article-card:hover { background: #fafafa; }
.hyc-article-card:last-child { margin-bottom: 0; border-bottom: none; }

.hyc-article-card__thumb {
    width: 90px;
    height: 66px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
    background: #f0e8e8;
    border: 1px solid #e0d0d0;
}

.hyc-article-card__thumb-placeholder {
    width: 90px;
    height: 66px;
    background: #f0e8e8;
    border-radius: 3px;
    border: 1px solid #e0d0d0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hyc-accent);
    font-size: 24px;
    flex-shrink: 0;
}

.hyc-article-card__cat {
    font-size: 11px;
    color: var(--hyc-accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.hyc-article-card__cat a { color: var(--hyc-accent); }

.hyc-article-card__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--hyc-text);
    line-height: 1.35;
    margin-bottom: 5px;
}

.hyc-article-card__title a { color: var(--hyc-text); }
.hyc-article-card__title a:hover { color: var(--hyc-accent); text-decoration: none; }

.hyc-article-card__excerpt {
    font-size: 14px;
    color: var(--hyc-text-muted);
    line-height: 1.5;
}

.hyc-article-card__meta {
    font-size: 13px;
    color: var(--hyc-text-faint);
    margin-top: 5px;
}

/* ============================================================
   SIDEBAR WIDGETS
   ============================================================ */
.hyc-widget {
    padding: 16px;
    border-bottom: 1px solid var(--hyc-border);
}

.hyc-widget:last-child { border-bottom: none; }

.hyc-widget__title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--hyc-white);
    background: var(--hyc-widget-title-bg);
    padding: 7px 12px;
    margin: -16px -16px 14px;
}

.hyc-events-list { list-style: none; }

.hyc-event-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid var(--hyc-border);
}

.hyc-event-item:last-child { border-bottom: none; }

.hyc-event-date {
    background: var(--hyc-header-bg);
    border-radius: 3px;
    padding: 4px 8px;
    text-align: center;
    min-width: 38px;
    flex-shrink: 0;
}

.hyc-event-date__day {
    font-size: 16px;
    font-weight: 700;
    color: var(--hyc-accent);
    line-height: 1;
    display: block;
}

.hyc-event-date__month {
    font-size: 10px;
    color: var(--hyc-header-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.hyc-event-info__name {
    font-size: 14px;
    color: var(--hyc-text);
    font-weight: 700;
    line-height: 1.3;
}

.hyc-event-info__name a { color: var(--hyc-text); }
.hyc-event-info__name a:hover { color: var(--hyc-accent); text-decoration: none; }

.hyc-event-info__type {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.hyc-notice {
    background: var(--hyc-accent-light);
    border-left: 3px solid var(--hyc-accent);
    border-radius: 0 3px 3px 0;
    padding: 9px 12px;
    margin-bottom: 10px;
}

.hyc-notice:last-child { margin-bottom: 0; }

.hyc-notice__title {
    font-size: 13px;
    color: var(--hyc-text);
    font-weight: 700;
    margin-bottom: 3px;
}

.hyc-notice__text {
    font-size: 12px;
    color: var(--hyc-text-muted);
    line-height: 1.4;
}

/* ============================================================
   WEATHER WIDGET
   ============================================================ */
.hyc-wx-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.hyc-wx-location { font-size: 12px; color: var(--hyc-text-muted); font-weight: 600; }
.hyc-wx-updated  { font-size: 11px; color: #bbb; }

.hyc-wx-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.hyc-wx-card {
    background: var(--hyc-body-bg);
    border-radius: 4px;
    padding: 10px;
    text-align: center;
    border: 1px solid var(--hyc-border);
}

.hyc-wx-card i       { font-size: 22px; display: block; margin-bottom: 4px; color: var(--hyc-header-bg); }
.hyc-wx-card.temp i  { color: var(--hyc-accent); }

.hyc-wx-label { font-size: 10px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; display: block; }
.hyc-wx-val   { font-size: 16px; font-weight: 700; color: var(--hyc-text); margin-top: 2px; display: block; }
.hyc-wx-sub   { font-size: 11px; color: #888; margin-top: 2px; display: block; line-height: 1.3; }

.hyc-wx-tide {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f0f5fa;
    border-radius: 4px;
    padding: 9px 11px;
    text-decoration: none;
    border: 1px solid #dde8f0;
    transition: background 0.15s;
}

.hyc-wx-loading { text-align: center; padding: 20px; color: #aaa; font-size: 14px; }
.hyc-wx-error   { padding: 12px; color: var(--hyc-accent); font-size: 13px; background: var(--hyc-accent-light); border-radius: 4px; }

/* ============================================================
   ENTRY CONTENT (single post / page)
   ============================================================ */
.hyc-entry {
    padding: 28px;
    background: var(--hyc-white);
    margin-bottom: 3px;
}

.hyc-entry__header { margin-bottom: 20px; }

.hyc-entry__cat {
    font-size: 12px;
    color: var(--hyc-accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.hyc-entry__title {
    font-size: 28px;
    font-weight: 700;
    color: var(--hyc-text);
    line-height: 1.3;
    margin-bottom: 8px;
}

.hyc-entry__meta {
    font-size: 13px;
    color: var(--hyc-text-faint);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--hyc-border);
}

.hyc-entry__thumbnail {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 3px;
    margin-bottom: 24px;
}

.hyc-entry__content {
    font-size: 16px;
    line-height: 1.75;
    color: var(--hyc-text);
}

.hyc-entry__content h2 { font-size: 22px; margin: 28px 0 12px; }
.hyc-entry__content h3 { font-size: 18px; margin: 22px 0 10px; }
.hyc-entry__content p  { margin-bottom: 18px; }
.hyc-entry__content ul,
.hyc-entry__content ol { margin: 0 0 18px 22px; }
.hyc-entry__content li { margin-bottom: 6px; }
.hyc-entry__content blockquote {
    border-left: 3px solid var(--hyc-accent);
    margin: 22px 0;
    padding: 14px 22px;
    background: var(--hyc-accent-light);
    font-style: italic;
    color: var(--hyc-text-muted);
}

/* ============================================================
   FOOTER
   ============================================================ */
.hyc-footer {
    background: var(--hyc-footer-bg);
    padding: 10px 0;
}

.hyc-footer .hyc-inner { flex-wrap: wrap; gap: 8px; }

.hyc-footer__club  { font-size: 13px; color: var(--hyc-footer-text); }

.hyc-footer__links { display: flex; list-style: none; flex-wrap: wrap; }

.hyc-footer__links a {
    color: var(--hyc-footer-muted);
    font-size: 13px;
    margin-left: 14px;
    transition: color 0.15s;
}

.hyc-footer__links a:hover { color: var(--hyc-white); text-decoration: none; }

.hyc-footer__copy { font-size: 12px; color: #777; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
    .hyc-inner { max-width: 95%; }
    .hyc-content-wrap .hyc-inner { flex-direction: column; }
    .hyc-main { padding: 0 0 20px 0; width: 100%; }
    .hyc-sidebar { width: 100%; border-left: none; border-top: 2px solid var(--hyc-border-dark); }
}

@media (max-width: 768px) {
    .hyc-topbar .hyc-inner { flex-direction: column; gap: 6px; }
    .hyc-header .hyc-inner { height: auto; min-height: 64px; padding: 10px 0; }
    .hyc-header__logo img { height: 50px; }
    .hyc-nav { display: none; flex-direction: column; height: auto; width: 100%; background: var(--hyc-header-bg); position: absolute; top: 100%; left: 0; right: 0; z-index: 200; }
    .hyc-nav.is-open { display: flex; }
    .hyc-nav > li > a { padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 16px; }
    .hyc-nav-toggle { display: block; }
    .hyc-header { position: relative; }
    .hyc-article-card { grid-template-columns: 70px 1fr; }
    .hyc-article-card__thumb,
    .hyc-article-card__thumb-placeholder { width: 70px; height: 52px; }
    .hyc-footer .hyc-inner { flex-direction: column; text-align: center; }
    .hyc-footer__links { justify-content: center; }
    .hyc-footer__links a { margin: 0 8px; }
}

/* ============================================================
   WORDPRESS CORE
   ============================================================ */
.alignleft   { float: left; margin: 0 20px 16px 0; }
.alignright  { float: right; margin: 0 0 16px 20px; }
.aligncenter { display: block; margin: 0 auto 16px; }
.wp-caption-text { font-size: 13px; color: var(--hyc-text-faint); text-align: center; margin-top: 4px; }

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

/* ============================================================
   NOTICES — clickable
   ============================================================ */
.hyc-notice--clickable {
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.hyc-notice--clickable:hover {
    background: #ffe8e8;
    border-left-color: #a01800;
}

.hyc-notice__caret {
    float: right;
    font-size: 18px;
    color: var(--hyc-accent);
    line-height: 1;
    font-weight: 400;
}

/* ============================================================
   MODAL
   ============================================================ */
.hyc-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.hyc-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hyc-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    cursor: pointer;
}

.hyc-modal__box {
    position: relative;
    background: #fff;
    border-radius: 4px;
    padding: 32px;
    max-width: 560px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    border-top: 4px solid var(--hyc-accent);
    z-index: 1;
}

.hyc-modal__close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.15s;
}

.hyc-modal__close:hover { color: var(--hyc-accent); }

.hyc-modal__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--hyc-text);
    margin-bottom: 16px;
    padding-right: 24px;
    line-height: 1.3;
}

.hyc-modal__body {
    font-size: 15px;
    color: var(--hyc-text-muted);
    line-height: 1.7;
}

.hyc-modal__body p { margin-bottom: 12px; }
.hyc-modal__body p:last-child { margin-bottom: 0; }