/* ============================================================
   Friends of Coleraine FC — Brand theme (layered over Bootstrap)
   ============================================================ */

:root {
  --navy-950: #050b18;
  --navy-900: #0a1428;
  --navy-850: #0c1a38;
  --navy-800: #102345;
  --navy-700: #15346b;
  --blue:        #1f6fe0;
  --blue-bright: #2f8bff;
  --red:      #e2231a;
  --red-dark: #b81810;
  --grey:     #9aa7bd;

  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-head: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;

  /* Bootstrap overrides */
  --bs-body-bg: var(--navy-950);
  --bs-body-color: #e7edf7;
  --bs-body-font-family: var(--font-body);
  --bs-link-color-rgb: 47, 139, 255;
  --bs-link-hover-color-rgb: 31, 111, 224;
  --bs-border-color: rgba(255,255,255,0.1);
}

html, body { background: var(--navy-950); }
body { font-family: var(--font-body); color: var(--bs-body-color); }

a { text-decoration: none; }

h1, h2, h3, h4, h5 { font-family: var(--font-head); }
/* Blazor's FocusOnNavigate focuses the first heading on load; hide the focus ring on (non-interactive) headings */
h1:focus, h2:focus { outline: none; }

.font-display { font-family: var(--font-display); }
.text-brand-blue { color: var(--blue-bright) !important; }
.text-brand-red { color: var(--red) !important; }
.bg-navy { background: var(--navy-900) !important; }
.bg-navy-850 { background: var(--navy-850) !important; }

/* ---------- App loading splash ---------- */
.app-loading { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; background: var(--navy-950); }
.app-loading-crest { width: 130px; animation: pulse 1.6s ease-in-out infinite; }
.app-loading-text { font-family: var(--font-head); letter-spacing: 3px; text-transform: uppercase; color: var(--grey); }
@keyframes pulse { 0%,100% { opacity: .55; transform: scale(.96);} 50% { opacity: 1; transform: scale(1);} }

/* ---------- Buttons ---------- */
.btn { font-family: var(--font-head); font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; border-radius: 0; }
.btn-brand-red { background: var(--red); color: #fff; }
.btn-brand-red:hover { background: var(--red-dark); color: #fff; box-shadow: 0 6px 20px rgba(226,35,26,.35); }
.btn-brand-blue { background: var(--blue); color: #fff; }
.btn-brand-blue:hover { background: var(--blue-bright); color: #fff; }
.btn-brand-light { background: #fff; color: var(--navy-900); }
.btn-brand-light:hover { background: #e8eefc; color: var(--navy-900); }
.btn-outline-light { border-radius: 0; }
.btn-lg { padding: .85rem 2.4rem; }

/* ---------- Navbar ---------- */
.navbar.brand-nav {
  background: rgba(5,11,24,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand-nav .navbar-brand { font-family: var(--font-head); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: 1.4rem; display: flex; align-items: center; gap: 12px; color: #fff; }
.brand-nav .navbar-brand img { height: 42px; }
.brand-nav .navbar-brand .of { color: var(--blue-bright); }
.brand-nav .nav-link { font-family: var(--font-head); font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; font-size: .9rem; color: #fff !important; position: relative; }
.brand-nav .nav-link:hover { color: var(--blue-bright) !important; }
.brand-nav .nav-link.active::after { content:''; position:absolute; left:.5rem; right:.5rem; bottom:2px; height:2px; background:#fff; }
.brand-nav .navbar-toggler { border: 1px solid rgba(255,255,255,.7); background: rgba(255,255,255,.10); padding: .4rem .6rem; }
.brand-nav .navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(255,255,255,.35); }
.brand-nav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.95)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 86vh; display: flex; align-items: center; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(115deg, var(--navy-950) 18%, rgba(10,20,40,.78) 50%, rgba(16,35,69,.55) 100%),
    radial-gradient(circle at 78% 40%, rgba(31,111,224,.35), transparent 55%),
    url('../images/dressing-room.jpg') center/cover no-repeat;
}
.hero > .container { position: relative; z-index: 2; }
.hero-title { font-family: var(--font-display); text-transform: uppercase; line-height: 1.12; font-size: clamp(3.2rem, 9vw, 7rem); letter-spacing: 1px; text-shadow: 0 4px 24px rgba(0,0,0,.5); }
.hero-title .blue { color: var(--blue-bright); }
.hero-divider { width: 90px; height: 6px; background: var(--red); margin: 26px 0; }
.hero-sub { font-family: var(--font-head); font-weight: 300; font-size: clamp(1.4rem, 3.2vw, 2.2rem); line-height: 1.25; max-width: 560px; }
.hero-logo { filter: drop-shadow(0 0 30px rgba(47,139,255,.35)); background: #fff; border-radius: 20px; padding: 22px 22px 16px; }
.hero-logo img { width: min(300px, 74%); display: block; margin: 0 auto; }
.hero-est { margin-top: 10px; text-align: center; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 2px; font-weight: 600; color: var(--navy-900); font-size: 1.05rem; }

/* ---------- Values band ---------- */
.values { background: linear-gradient(180deg, var(--navy-700), var(--navy-800)); }
.value { text-align: center; padding: 14px 16px; }
.value svg { width: 60px; height: 60px; stroke: var(--blue-bright); fill: none; margin-bottom: 14px; }
.value h3 { font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; font-size: 1.2rem; margin: 0; }
.value.divider { border-right: 1px solid rgba(255,255,255,.12); }
.values-banner-link { display: block; color: inherit; text-decoration: none; transition: color .15s; }
.values-banner-link:hover .value h3 { color: #fff; }
.values-banner-link:hover .value svg { stroke: #fff; }

/* ---------- Section helpers ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--navy-900); }
.section-kicker { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 3px; color: var(--red); font-weight: 600; font-size: .95rem; margin-bottom: 12px; }
.section-title { font-family: var(--font-display); text-transform: uppercase; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1; letter-spacing: 1px; margin-bottom: 14px; }
.section-title .blue { color: var(--blue-bright); }
.lead-brand { font-size: 1.12rem; color: #d6deec; }
.rule { height: 2px; background: var(--red); border: 0; opacity: 1; }
.banner-heading { text-align: center; font-family: var(--font-display); text-transform: uppercase; font-size: clamp(2rem, 5.5vw, 3.6rem); letter-spacing: 2px; }
.banner-heading .blue { color: var(--blue-bright); }

/* ---------- Cards ---------- */
.brand-card { background: var(--navy-850); border: 1px solid rgba(255,255,255,.06); height: 100%; transition: transform .2s, border-color .2s; }
.brand-card:hover { transform: translateY(-6px); border-color: var(--blue); }
.brand-card .card-strip { height: 6px; background: linear-gradient(90deg, var(--red), var(--blue)); }
.brand-card .card-body h3 { text-transform: uppercase; letter-spacing: 1px; font-size: 1.3rem; }
.brand-card .card-body { color: var(--grey); }
.brand-card .meta { font-family: var(--font-head); color: var(--blue-bright); letter-spacing: 1.5px; font-size: .85rem; text-transform: uppercase; }

/* event listing thumbnail */
.event-thumb { width: 100%; height: 170px; object-fit: cover; border-radius: 8px; margin-bottom: 12px; }

/* ---------- Stats ---------- */
.stat { text-align: center; padding: 30px 16px; background: var(--navy-850); border-top: 4px solid var(--red); height: 100%; }
.stat .num { font-family: var(--font-display); font-size: 3rem; color: var(--blue-bright); line-height: 1; }
.stat .label { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1.5px; margin-top: 8px; }

/* ---------- CTA ---------- */
.cta { background: linear-gradient(120deg, rgba(184,24,16,.9), rgba(31,111,224,.85)); text-align: center; padding: 70px 0; }
.cta h2 { font-family: var(--font-display); text-transform: uppercase; font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: 1px; }

/* ---------- Media frame ---------- */
.media-frame { border: 3px solid var(--blue); box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.media-caption { color: var(--grey); font-size: .9rem; font-style: italic; text-align: center; margin-top: 10px; }

/* ---------- Forms ---------- */
.form-card { background: var(--navy-850); border: 1px solid rgba(255,255,255,.08); padding: 40px; }
.form-card .form-label { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1px; font-size: .85rem; color: #cad4e6; }
.form-card .form-label .req { color: var(--red); }
.form-control, .form-select {
  background: var(--navy-950); border: 1px solid rgba(255,255,255,.14); color: #fff; border-radius: 0; padding: .7rem .9rem;
}
.form-control::placeholder { color: #5d6b85; }
.form-control:focus, .form-select:focus { background: var(--navy-950); color: #fff; border-color: var(--blue); box-shadow: 0 0 0 .25rem rgba(31,111,224,.25); }
.form-select option { background: var(--navy-900); }

/* File upload button — make it visible on the dark theme */
.form-control[type=file] { padding: .45rem .9rem; }
.form-control[type=file]::file-selector-button {
  background: var(--navy-700); color: #fff; border: 1px solid rgba(255,255,255,.2);
  border-radius: 0; padding: .45rem 1rem; margin: -.45rem 1rem -.45rem -.9rem;
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1px; font-size: .82rem; cursor: pointer;
}
.form-control[type=file]::file-selector-button:hover { background: var(--blue); color: #fff; }

/* Date picker — make the calendar icon visible on the dark theme */
.form-control[type=date]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .85; cursor: pointer; }
.form-control[type=date]::-webkit-calendar-picker-indicator:hover { opacity: 1; }

/* contact info */
.info-item { display: flex; gap: 16px; margin-bottom: 26px; }
.info-item svg { width: 28px; height: 28px; stroke: var(--blue-bright); fill: none; flex-shrink: 0; margin-top: 4px; }
.info-item h4 { text-transform: uppercase; letter-spacing: 1px; font-size: 1.05rem; margin: 0 0 2px; }
.info-item .muted, .info-item a { color: var(--grey); }
.info-item a:hover { color: var(--blue-bright); }

/* ---------- Captcha ---------- */
.captcha-box { display: flex; align-items: center; gap: 12px; background: var(--navy-950); border: 1px solid rgba(255,255,255,.14); padding: 8px 14px; }
.captcha-question { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: 3px; color: var(--blue-bright); user-select: none; font-style: italic; padding: 2px 10px; background: repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(255,255,255,.05) 6px, rgba(255,255,255,.05) 7px); }
.captcha-refresh { background: var(--navy-800); border: 1px solid rgba(255,255,255,.14); color: #fff; width: 40px; height: 40px; display: grid; place-items: center; }
.captcha-refresh:hover { background: var(--blue); }
.captcha-refresh svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }

/* ---------- WYSIWYG editor ---------- */
.wysiwyg-toolbar { display: flex; flex-wrap: wrap; gap: 4px; background: var(--navy-800); border: 1px solid rgba(255,255,255,.14); border-bottom: 0; padding: 6px; }
.wysiwyg-toolbar button { background: transparent; color: #cdd7e8; border: 1px solid transparent; min-width: 36px; height: 34px; padding: 0 8px; font-family: var(--font-body); cursor: pointer; }
.wysiwyg-toolbar button:hover { background: var(--navy-700); color: #fff; }
.wysiwyg-toolbar .sep { width: 1px; background: rgba(255,255,255,.14); margin: 4px 4px; }
.wysiwyg-area { min-height: 280px; max-height: 540px; overflow-y: auto; background: var(--navy-950); border: 1px solid rgba(255,255,255,.14); color: #fff; padding: 16px 18px; }
.wysiwyg-area:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 .25rem rgba(31,111,224,.25); }
.wysiwyg-area:empty::before { content: attr(data-placeholder); color: #5d6b85; }
.wysiwyg-area h2 { font-size: 1.6rem; margin: .6em 0 .3em; }
.wysiwyg-area h3 { font-size: 1.3rem; margin: .6em 0 .3em; }
.wysiwyg-area a { color: var(--blue-bright); }
.wysiwyg-area blockquote { border-left: 4px solid var(--red); margin: 1em 0; padding: .2em 1em; color: var(--grey); }
.wysiwyg-area img { max-width: 100%; }

/* Editor "Upload image" toolbar control (styled like the other buttons) */
.wysiwyg-upload { display: inline-flex; align-items: center; height: 34px; padding: 0 8px; min-width: 36px; color: #cdd7e8; cursor: pointer; font-family: var(--font-body); }
.wysiwyg-upload:hover { background: var(--navy-700); color: #fff; }
.wysiwyg-upload input { display: none; }
.wysiwyg-imgsize { display: inline-flex; align-items: center; padding: 0 6px; color: #8595b0; font-size: .78rem; font-family: var(--font-body); }
.wysiwyg-area img.img-selected { outline: 3px solid var(--blue-bright); outline-offset: 2px; }

/* Image + caption (figure) in editor and rendered content */
.wysiwyg-area figure.post-figure, .post-content figure.post-figure { margin: 1rem 0; }
.wysiwyg-area figure.post-figure img, .post-content figure.post-figure img { display: block; max-width: 100%; }
.wysiwyg-area figcaption, .post-content figcaption { color: var(--grey); font-size: .9rem; font-style: italic; margin-top: 6px; text-align: center; }

/* rich content rendered on blog */
.post-content h2 { font-size: 1.8rem; margin: 1em 0 .4em; }
.post-content h3 { font-size: 1.4rem; margin: 1em 0 .4em; }
.post-content p { margin-bottom: 1rem; color: #d6deec; }
.post-content a { color: var(--blue-bright); }
.post-content ul, .post-content ol { margin: 0 0 1rem 1.4rem; color: #d6deec; }
.post-content blockquote { border-left: 4px solid var(--red); margin: 1.2em 0; padding: .4em 1.2em; color: var(--grey); font-style: italic; }
.post-content img { max-width: 100%; margin: 1rem 0; }

/* ---------- In-page editing (admin) ---------- */
.fc-editable {
  cursor: pointer;
  position: relative;
  border-radius: 3px;
  outline: 1px dashed rgba(47, 139, 255, .55);
  outline-offset: 3px;
  transition: background .15s, outline-color .15s;
}
.fc-editable:hover, .fc-editable:focus-visible {
  background: rgba(47, 139, 255, .12);
  outline-color: var(--blue-bright);
  outline-style: solid;
}
.fc-editable-pen {
  font-size: .6em;
  vertical-align: super;
  margin-left: .35em;
  color: var(--blue-bright);
  opacity: .85;
}

.fc-edit-backdrop {
  position: fixed; inset: 0; z-index: 1080;
  background: rgba(5, 11, 24, .72);
  backdrop-filter: blur(3px);
  display: grid; place-items: center;
  padding: 20px;
}
.fc-edit-modal {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--navy-850);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  padding: 28px;
}
.fc-edit-heading {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1.5px;
  font-size: 1.15rem; margin: 0 0 16px;
}
.fc-edit-area { font-family: var(--font-body); resize: vertical; max-height: 45vh; }
.fc-edit-hint { color: var(--grey); font-size: .82rem; margin: 10px 0 0; }
.fc-edit-hint code { color: var(--blue-bright); background: var(--navy-950); padding: 1px 5px; }
.fc-edit-preview {
  margin-top: 14px; padding: 12px 14px; max-height: 25vh; overflow-y: auto;
  background: var(--navy-950); border: 1px solid rgba(255, 255, 255, .1);
}
.fc-edit-preview-label {
  display: block; font-family: var(--font-head); text-transform: uppercase;
  letter-spacing: 1.5px; font-size: .7rem; color: var(--grey); margin-bottom: 6px;
}
.fc-edit-preview .blue { color: var(--blue-bright); }
.fc-edit-actions { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.fc-edit-reset { color: var(--grey); margin-left: auto; text-transform: none; letter-spacing: 0; }
.fc-edit-reset:hover { color: var(--blue-bright); }

/* ---------- Alerts ---------- */
.alert { border-radius: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); border-top: 1px solid rgba(255,255,255,.07); padding: 56px 0 28px; }
.site-footer img { height: 132px; width: auto; margin-bottom: 16px; display: inline-block; border-radius: 18px; }
.site-footer h4 { text-transform: uppercase; letter-spacing: 1.5px; font-size: 1rem; margin-bottom: 16px; }
.site-footer a { color: var(--grey); display: block; padding: 5px 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.site-footer a:hover { color: var(--blue-bright); }
.site-footer .muted { color: var(--grey); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.07); padding-top: 22px; text-align: center; color: #5b6885; font-size: .88rem; margin-top: 36px; }
.footer-credit { margin-top: 4px; }
.footer-bottom a { display: inline; padding: 0; color: var(--blue-bright); }
.footer-bottom a:hover { color: #fff; }

/* error ui */
#blazor-error-ui { background: #b81810; color: #fff; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; left: 0; padding: .6rem 1.25rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* ---------- About prose (History / Future) ---------- */
.about-prose p { color: #d6deec; margin-bottom: 1rem; line-height: 1.7; }
.about-prose a { color: var(--blue-bright); }
.fc-editable-block { display: block; }

/* ---------- Bulletins ---------- */
.bulletin-list { list-style: none; padding: 0; margin: 0; }
.bulletin-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.bulletin-list li a { color: var(--blue-bright); font-family: var(--font-head); letter-spacing: .5px; }
.bulletin-list .meta { min-width: 110px; }
.badge-upcoming { display:inline-block; background: var(--red); color:#fff; font-family: var(--font-head); text-transform: uppercase; letter-spacing:1px; font-size:.7rem; padding:2px 8px; margin-right:8px; }

/* ---------- Accordion (FAQ) ---------- */
.brand-accordion .accordion-item { background: var(--navy-850); border: 1px solid rgba(255,255,255,.08); margin-bottom: 10px; }
.brand-accordion .accordion-button { background: var(--navy-850); color:#fff; font-family: var(--font-head); font-weight:500; letter-spacing:.5px; font-size:1.05rem; }
.brand-accordion .accordion-button:not(.collapsed) { background: var(--navy-800); color:#fff; box-shadow:none; }
.brand-accordion .accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(31,111,224,.25); }
.brand-accordion .accordion-button::after { filter: invert(1) brightness(1.5); }
.brand-accordion .accordion-body { color:#d6deec; line-height:1.7; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.gallery-tile { position: relative; margin:0; cursor: pointer; overflow: hidden; border: 1px solid rgba(255,255,255,.08); background: var(--navy-850); }
.gallery-tile img { width:100%; height: 220px; object-fit: cover; display:block; transition: transform .3s; }
.gallery-tile:hover img { transform: scale(1.06); }
.gallery-tile figcaption { position:absolute; left:0; right:0; bottom:0; padding: 26px 12px 10px; background: linear-gradient(transparent, rgba(5,11,24,.92)); display:flex; flex-direction:column; }
.gallery-tile .g-name { font-family: var(--font-head); font-weight:600; }
.gallery-tile .g-date { font-size:.8rem; color: var(--grey); }
.gallery-tile .g-delete { position:absolute; top:8px; right:8px; width:30px; height:30px; border:0; background: rgba(184,24,16,.92); color:#fff; border-radius:50%; cursor:pointer; line-height:1; }
.gallery-tile .g-edit { position:absolute; top:8px; right:44px; width:30px; height:30px; border:0; background: rgba(31,111,224,.95); color:#fff; border-radius:50%; cursor:pointer; line-height:1; }
.gallery-tile .g-edit:hover { background: var(--blue-bright); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset:0; z-index:1090; background: rgba(5,11,24,.93); display:flex; align-items:center; justify-content:center; padding: 30px; }
.lightbox-figure { margin:0; max-width: 980px; max-height: 90vh; display:flex; flex-direction:column; }
.lightbox-figure img { max-width:100%; max-height: 76vh; object-fit: contain; }
.lightbox-figure figcaption { color:#e7edf7; padding-top: 14px; text-align:center; }
.lightbox-figure .lightbox-date { display:block; color: var(--grey); font-size:.9rem; }
.lightbox-close { position: fixed; top:18px; right:24px; width:44px; height:44px; border:0; background: rgba(255,255,255,.12); color:#fff; font-size:1.2rem; cursor:pointer; }
.lightbox-close:hover { background: rgba(255,255,255,.25); }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .value.divider { border-right: none; }
  .hero-logo img { width: 220px; }
}
