/*
Theme Name: FS Europe
Theme URI: https://fseurope.org
Author: FS Europe
Description: Custom theme for FS Europe – the association of European Formula Student competitions.
Version: 1.0.0
Requires PHP: 8.1
License: GNU General Public License v2 or later
Text Domain: fs-europe
*/

:root {
  /* Brand: European Coal and Steel Community blue, per CI definition */
  --fse-blue: #3b84cf;
  --fse-blue-dark: #2a68a8;
  --fse-black: #111111;
  --fse-grey: #c0c0c0;
  --fse-grey-light: #f4f6f8;
  --fse-white: #ffffff;
  --fse-font: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--fse-font);
  color: var(--fse-black);
  background: var(--fse-white);
  line-height: 1.6;
  /* Sticky footer: main grows so the footer never floats mid-screen */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

a {
  color: var(--fse-blue);
}

a:hover {
  color: var(--fse-blue-dark);
}

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

.fse-container {
  /* width needed: auto side margins disable flex stretch on body's column layout */
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.fse-header {
  border-bottom: 4px solid var(--fse-blue);
  background: var(--fse-white);
}

.fse-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  max-width: 1080px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.fse-header__logo img {
  max-height: 56px;
  width: auto;
  display: block;
}

.fse-header__logo a {
  display: block;
  font-size: 1.6rem;
  font-weight: bold;
  text-decoration: none;
  color: var(--fse-black);
}

.fse-header__logo a span {
  color: var(--fse-blue);
}

.fse-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.fse-nav a {
  text-decoration: none;
  font-weight: bold;
  color: var(--fse-black);
}

.fse-nav a:hover,
.fse-nav .current-menu-item > a {
  color: var(--fse-blue);
}

/* Footer */
.fse-footer {
  margin-top: 4rem;
  background: var(--fse-black);
  color: var(--fse-white);
  padding: 2rem 0;
  font-size: 0.9rem;
}

.fse-footer a {
  color: var(--fse-grey);
}

.fse-footer nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.fse-footer nav a {
  font-family: var(--fse-font);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.fse-footer nav a:hover {
  color: var(--fse-white);
}

.fse-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  /* match the footer nav link styling */
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fse-grey);
}

/* Home / hero */
.fse-hero {
  text-align: center;
  padding: 5rem 1.25rem 4rem;
}

.fse-hero__logo img {
  max-width: 480px;
  width: 80%;
  height: auto;
}

.fse-hero__intro {
  max-width: 620px;
  margin: 1.5rem auto 0;
  color: #555;
}

.fse-hero__intro p {
  margin: 0 0 0.75rem;
}

.fse-hero__banner {
  display: inline-block;
  margin-top: 2.5rem;
  padding: 0.9rem 2rem;
  background: var(--fse-blue);
  color: var(--fse-white);
  font-size: 1.4rem;
  font-weight: bold;
  border-radius: 4px;
}

.fse-hero__subtext {
  margin-top: 1.25rem;
  color: #555;
}

/* News under the banner */
.fse-news {
  max-width: 720px;
}

.fse-news h2 {
  border-bottom: 3px solid var(--fse-blue);
  display: inline-block;
  padding-bottom: 0.3rem;
}

.fse-news__item {
  margin-bottom: 2rem;
}

.fse-news__item h3 {
  margin: 0 0 0.25rem;
}

.fse-news__item h3 a {
  text-decoration: none;
  color: var(--fse-black);
}

.fse-news__item h3 a:hover {
  color: var(--fse-blue);
}

.fse-news__date {
  color: #808a94;
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
}

/* Generic page */
.fse-page {
  padding: 3rem 0;
}

.fse-page h1 {
  border-bottom: 3px solid var(--fse-blue);
  display: inline-block;
  padding-bottom: 0.3rem;
}

/* Team grid */
.fse-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.fse-card {
  background: var(--fse-grey-light);
  border-radius: 6px;
  overflow: hidden;
  text-align: center;
}

.fse-card__photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.fse-card__photo--placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--fse-grey);
}

.fse-card__body {
  padding: 1rem 1.25rem 1.5rem;
}

.fse-card__name {
  margin: 0;
  font-size: 1.15rem;
}

.fse-card__role {
  color: var(--fse-blue);
  font-weight: bold;
  margin: 0.25rem 0 0.75rem;
}

.fse-card__bio {
  font-size: 0.92rem;
  color: #444;
}

/* Members map */
.fse-map-wrap {
  margin-top: 2rem;
  position: relative;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.fse-map-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

/* id + class beats the SVG's internal .c rule; some countries are <g> wrappers */
#fse-map .c.fse-has-member,
#fse-map .fse-has-member .c {
  fill: var(--fse-blue);
  cursor: pointer;
  transition: fill 0.15s ease;
}

#fse-map .c.fse-has-member:hover,
#fse-map .fse-has-member:hover .c,
#fse-map .c.fse-active,
#fse-map .fse-active .c {
  fill: var(--fse-blue-dark);
}

/* Observer-only countries: lighter blue */
#fse-map .c.fse-has-member.fse-observer,
#fse-map .fse-has-member.fse-observer .c {
  fill-opacity: 0.45;
}

.fse-map-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--fse-black);
  color: var(--fse-white);
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  transform: translate(-50%, -130%);
  white-space: nowrap;
  display: none;
}

.fse-member-panel {
  margin-top: 1.5rem;
}

.fse-member-panel:empty {
  display: none;
}

/* Members list */
.fse-members-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.fse-member-card {
  display: flex;
  gap: 1rem;
  background: var(--fse-grey-light);
  border-radius: 6px;
  padding: 1.25rem;
  align-items: flex-start;
  /* cards can be links to the competition website */
  color: inherit;
  text-decoration: none;
}

a.fse-member-card:hover {
  outline: 2px solid var(--fse-blue);
}

.fse-member-card__status {
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--fse-blue);
  margin: 0.15rem 0 0;
}

.fse-member-card__status--observer {
  color: #808a94;
}

.fse-member-card--highlight {
  outline: 3px solid var(--fse-blue);
}

.fse-member-card__logo {
  flex: 0 0 72px;
}

.fse-member-card__logo img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: var(--fse-white);
  border-radius: 4px;
}

.fse-member-card__name {
  margin: 0;
  font-size: 1.05rem;
}

.fse-member-card__country {
  /* status label carries the blue accent now */
  color: #444;
  font-size: 0.9rem;
  margin: 0.15rem 0 0.5rem;
}

.fse-member-card__country {
  color: #444;
  font-weight: normal;
}

.fse-member-card__desc {
  font-size: 0.9rem;
  color: #444;
  margin: 0 0 0.5rem;
}

@media (max-width: 640px) {
  .fse-hero {
    padding: 3rem 1rem 2.5rem;
  }

  .fse-hero__banner {
    font-size: 1.1rem;
  }
}
