/* =====================================================================
   Fisherrow Yacht Club - look for the Cassiopeia child template.
   File: media/templates/site/cassiopeia_fyc/css/user.css
   Colours and layout follow the old Joomla 3 site (protostar_fyc_dm).
   ===================================================================== */

/* ---- Fonts (served from this site: no Google request) ---- */
@font-face {
  font-family: "Roboto Slab";
  src: url("../fonts/roboto-slab-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("../fonts/open-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 800; font-style: normal; font-display: swap;
}

/* ---- Club colours ---- */
:root {
  --fyc-blue: #255698;          /* header, title labels, buttons */
  --fyc-navy: #1a4277;          /* menu bar, tile text panels    */
  --fyc-light: #3668ab;         /* button hover                  */
  --fyc-link: #0088cc;          /* links                         */
  --fyc-pale: #d8e6f7;          /* button text                   */
  --fyc-slab: "Roboto Slab", Rockwell, "DejaVu Serif", Georgia, serif;

  --cassiopeia-color-primary: var(--fyc-blue);
  --cassiopeia-color-hover: var(--fyc-navy);
  --cassiopeia-color-link: var(--fyc-link);
  --link-color: var(--fyc-link);
  --link-color-rgb: 0, 136, 204;
  --link-hover-color: #005580;
  --cassiopeia-font-family-body: "Open Sans", Arial, Helvetica, sans-serif;
  --cassiopeia-font-family-headings: var(--fyc-slab);
  --cassiopeia-font-weight-headings: 400;
}

body { font-family: var(--cassiopeia-font-family-body); }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--fyc-slab);
  font-weight: 400;
  color: var(--fyc-navy);
}

/* Same content width as the old site */
.grid-child { max-width: 960px; }
@supports (display: grid) {
  .wrapper-static .site-grid {
    grid-template-columns:
      [full-start] minmax(0, 1fr)
      [main-start] repeat(4, minmax(0, 228px))
      [main-end] minmax(0, 1fr) [full-end];
  }
}

/* ---- Header: blue band with the skyline picture, then the navy menu bar ---- */
.container-header {
  background-color: var(--fyc-blue);
  background-image: url("../images/header.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 960px 120px;          /* as on the old site */
  box-shadow: none;
}
.container-header .navbar-brand { padding: 12px 0 10px; margin: 0; }
.container-header .brand-logo {
  display: inline-block;
  min-height: 58px;
  padding-left: 110px;
  background: url("../images/fyclogo.png") left center / 100px 58px no-repeat;
  font-family: var(--fyc-slab);
  font-size: 36px;
  line-height: 58px;
  color: #fff;
  text-decoration: none;
}
.container-header .brand-logo:hover { color: #fff; text-decoration: none; }
.container-header .site-description { color: var(--fyc-pale); }

/* Menu bar runs the full window width in navy */
html, body { overflow-x: clip; }
.container-header .container-nav {
  position: relative;
  background: var(--fyc-navy);
  padding: 0;
  align-items: center;
}
.container-header .container-nav::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw);
  background: var(--fyc-navy);
  z-index: -1;
}
.container-header .mod-menu > li::after,
.container-header .mod-menu > li > a::after,
.container-header .mod-menu > li > span::after { display: none; }
/* On a computer, drop-downs open on hover as on the old site (clicking the arrow still works) */
@media (min-width: 992px) {
  .container-header .metismenu.mod-menu .metismenu-item.parent:hover > ul.mm-collapse { display: block; }
}
.container-header nav { margin-top: 0; }
.container-header .mod-menu > li > a,
.container-header .mod-menu > li > span,
.container-header .mod-menu > li > button {
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 14px;
  color: #fff;
}
.container-header .metismenu.mod-menu > li.metismenu-item { padding: 15px 16px; margin: 0; }
.container-header .metismenu.mod-menu > li.metismenu-item:hover,
.container-header .metismenu.mod-menu > li.metismenu-item.active {
  background: var(--fyc-blue);
}
.container-header .metismenu.mod-menu .metismenu-item.active > a,
.container-header .metismenu.mod-menu .metismenu-item > a:hover { text-decoration: none; }
/* Drop-down panels: white with blue hover, as before */
.container-header .metismenu.mod-menu .mm-collapse {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .2);
  border-radius: 6px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
  padding: 5px 0;
  min-width: 12rem;
}
.container-header .metismenu.mod-menu .mm-collapse .metismenu-item { padding: 0; }
.container-header .metismenu.mod-menu .mm-collapse a {
  display: block; width: 100%;
  padding: 4px 20px;
  color: #333;
  font-size: 15px;
  text-transform: none;
  letter-spacing: 0;
}
.container-header .metismenu.mod-menu .mm-collapse a:hover,
.container-header .metismenu.mod-menu .mm-collapse a:focus {
  background: var(--fyc-link);
  color: #fff;
  text-decoration: none;
}
/* Phones and tablets: sub-menus open inside the menu, not on top of it */
@media (max-width: 991.98px) {
  .container-header .metismenu.mod-menu > li.metismenu-item { padding: 10px 16px; width: 100%; }
  .container-header .metismenu.mod-menu .mm-collapse {
    position: static;
    width: 100%;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 4px 0 0 12px;
  }
  .container-header .metismenu.mod-menu .mm-collapse a { color: #fff; padding: 6px 8px; }
}
/* Mobile menu button */
.container-header .navbar-toggler {
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 4px;
  margin: 8px 0 8px 16px;
  padding: 4px 10px;
  font-size: 20px;
  line-height: 1;
}
.container-header .container-nav > nav { margin-top: 0; }
.container-header .navbar-toggler:hover { background: var(--fyc-blue); }
/* no thick white ring after a tap; keep a thin one for keyboard users */
.container-header .navbar-toggler:focus { box-shadow: none; outline: 0; }
.container-header .navbar-toggler:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Social icons (Custom module in position "search") */
.fyc-social { display: flex; gap: 16px; margin: 0; padding: 0 8px; list-style: none; }
.fyc-social a { color: rgba(255, 255, 255, .75); font-size: 22px; line-height: 1; }
.fyc-social a:hover, .fyc-social a:focus { color: #fff; }

/* ---- Home page tiles (classes used in the Home article) ---- */
.fyc-home {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0 0 1rem;
}
.fyc-tile {
  display: flex;
  flex-direction: column;
  background: var(--fyc-navy);
  color: #fff;
}
.fyc-tile--wide { grid-column: 1 / -1; }
.fyc-tile-pic {
  display: flex;
  align-items: flex-end;
  aspect-ratio: 360 / 200;
  padding: 10px;
  background-color: var(--fyc-navy);
  background-size: cover;
  background-position: center;
}
.fyc-tile--wide .fyc-tile-pic { aspect-ratio: 960 / 200; }
.fyc-home .fyc-tile-title {
  margin: 0;
  padding: 2px 8px;
  background: var(--fyc-blue);
  color: #fff;
  font-size: 22px;
  line-height: 1.4;
}
.fyc-tile-text { flex: 1; padding: 10px 20px 12px; font-size: 14px; line-height: 1.45; }
.fyc-tile-text p { margin: 0 0 8px; }
.fyc-tile-text p:last-child { margin-bottom: 0; }
.fyc-tile-text a { color: #fff; }
.fyc-home a.fyc-tile-more {
  display: inline-block;
  padding: 4px 10px;
  background: var(--fyc-blue);
  color: var(--fyc-pale);
  font-size: 12px;
  text-transform: uppercase;
  text-decoration: none;
}
.fyc-home a.fyc-tile-more:hover,
.fyc-home a.fyc-tile-more:focus { background: var(--fyc-light); color: #fff; }
.fyc-charity { text-align: center; font-size: 14px; }

@media (max-width: 767.98px) {
  .fyc-home { grid-template-columns: minmax(0, 1fr); }
  .fyc-tile--wide .fyc-tile-pic { aspect-ratio: 360 / 200; }
  .container-header .brand-logo {
    font-size: 24px; line-height: 40px; min-height: 40px;
    padding-left: 76px; background-size: 66px 38px;
  }
  .container-header { background-size: cover; }
}

/* ---- Footer ---- */
.footer { background: #eee; color: #666; }
.footer a { color: #555; }
.footer a:hover { color: #222; }

/* ---- Pictures in imported articles ----
   Joomla 3 floated pictures with the Bootstrap 2 classes pull-right / pull-left,
   which Cassiopeia (Bootstrap 5) no longer knows. */
.com-content-article__body img.pull-right, .com-content-article__body .pull-right,
.com-content-article__body img.float-end {
  float: right; margin: 4px 0 12px 24px; max-width: 50%; height: auto;
}
.com-content-article__body img.pull-left, .com-content-article__body .pull-left,
.com-content-article__body img.float-start {
  float: left; margin: 4px 24px 12px 0; max-width: 50%; height: auto;
}
.com-content-article__body img { max-width: 100%; height: auto; }
/* headings and lists start below a floated picture's text, not beside its edge */
.com-content-article__body ul, .com-content-article__body ol { overflow: hidden; }
.com-content-article__body h2, .com-content-article__body h3 { clear: both; }
/* phones: pictures go full width between the paragraphs */
@media (max-width: 575.98px) {
  .com-content-article__body img.pull-right, .com-content-article__body img.pull-left,
  .com-content-article__body img.float-end, .com-content-article__body img.float-start,
  .com-content-article__body .pull-right, .com-content-article__body .pull-left {
    float: none; display: block; margin: 8px 0 12px; max-width: 100%;
  }
}

/* ---- Home page: "Coming up" and "Latest News" side by side ----
   In the Home article:
   <div class="fyc-whatson">
   <div class="fyc-whatson-col">{loadposition eventsposition}</div>
   <div class="fyc-whatson-col">{loadposition newsposition}</div>
   </div> */
.fyc-whatson { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 40px; margin-top: 10px; }
.fyc-whatson-col { min-width: 0; }
.fyc-whatson-col > p:empty { display: none; }
@media (max-width: 767.98px) {
  .fyc-whatson { grid-template-columns: 1fr; }
}
