/*
 * PolyStation website stylesheet
 *
 * This stylesheet defines the visual design for the PolyStation website.
 * It uses a custom colour palette inspired by the organisation's event
 * poster and implements accessible defaults. Colours are stored in CSS
 * variables for easy reuse and adjustment. The design prioritises
 * readability, high contrast and responsive layout, following
 * recommendations from WebAIM’s accessibility guidelines【563837205549645†L63-L115】.
 */

:root {
  /* Colour palette based on PolyStation's poster */
  --background: #FDF5E6;        /* Creamy background for warmth and readability */
  --text: #222222;             /* Near‑black for high contrast */
  --header-bg: #002E86;        /* Deep blue for header and footer */
  --primary: #C1272D;          /* Rich red for headings and buttons */
  --secondary: #F2721D;        /* Bright orange for highlights and hovers */
  --link: #002E86;             /* Dark blue for standard links */
  --link-hover: #AA1F2F;       /* Dark red for link hover/focus states */
  --surface: #FFFFFF;         /* Light surface for cards */
  --shadow: rgba(0, 0, 0, 0.1); /* Subtle shadow colour for cards */
}

/* Base styles */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
}

/* Skip link for keyboard navigation */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background-color: var(--header-bg);
  color: #ffffff;
  padding: 0.5rem 1rem;
  text-decoration: none;
  z-index: 1000;
}

.skip-link:focus {
  top: 0;
}

/* Header and navigation */
header {
  background-color: var(--header-bg);
  color: #ffffff;
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: 3rem;
  color: #FFF8F0; /* Soft cream */
}

nav {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

nav a {
  color: #ffffff;
  margin: 0 1rem;
  text-decoration: none;
  padding: 0.25rem 0;
}

nav a[aria-current="page"] {
  border-bottom: 2px solid var(--secondary);
}

nav a:hover,
nav a:focus {
  text-decoration: underline;
  color: var(--secondary);
}

/* Main content */
main {
  padding: 2rem 1rem;
  max-width: 1000px;
  margin: 0 auto;
}

section {
  margin-bottom: 3rem;
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--primary);
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.3rem;
}

p, li {
  font-size: 1rem;
  margin-bottom: 0.8rem;
}

/* Links */
a {
  color: var(--link);
  text-decoration: underline;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: var(--link-hover);
}

/* Buttons */
.button {
  background-color: var(--primary);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.button:hover,
.button:focus {
  background-color: var(--secondary);
}
.white-heading {  /* This is the heading of the blue boxes in every page */
  color: #FFFFFF;   /* White */
}

/*
 * Custom sections and components
 *
 * The following classes add more visual interest to the site. They include
 * a hero section with a decorative background, card components for
 * modular content areas, a grid layout for cards, enhanced testimonials
 * styling, and a coloured newsletter call‑to‑action. These changes
 * provide visual identity while respecting accessibility: text is high
 * contrast and backgrounds are subdued or darkened for readability【563837205549645†L97-L103】.
 */

/* Hero section with decorative background image */
.hero {
  position: relative;
  color: #ffffff;
  padding: 6rem 1rem;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('hero.png');
  background-size: cover;
  background-position: center;
  filter: brightness(0.8);
  z-index: -2;
}

.hero h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #ffffff;
}

.hero p {
  color: #f5e9dc;
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 1.5rem auto;
}

.hero .button {
  margin: 0.5rem;
  padding: 0.75rem 1.5rem;
}

/* Card component */
.card {
  background-color: var(--surface);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px var(--shadow);
}

/* Card grid layout */
.card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.card-grid .card {
  flex: 1 1 calc(33% - 2rem);
  min-width: 260px;
}

/* Testimonials styling */
.testimonials blockquote {
  background-color: var(--surface);
  border-left: 4px solid var(--primary);
  box-shadow: 0 2px 6px var(--shadow);
  margin: 1rem 0;
  padding: 1rem 1.5rem;
  color: var(--text);
}

.testimonials blockquote cite {
  display: block;
  margin-top: 0.5rem;
  font-weight: 600;
  color: var(--primary);
}

/* Newsletter section */
.newsletter {
  background-color: var(--header-bg);
  color: #ffffff;
  padding: 2rem 1rem;
  text-align: center;
  border-radius: 8px;
  max-width: 800px;
  margin: 3rem auto;
}

.newsletter h2 {
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.newsletter p {
  color: #f5e9dc;
  margin-bottom: 1rem;
}

/* Targets the EmailOctopus embedded form */
.newsletter div[data-form] {
  display: flex;
  justify-content: center;
}

/* Optional: constrain max width of embedded form */
.newsletter iframe,
.newsletter form,
.newsletter div {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Blockquotes for testimonials */
blockquote {
  border-left: 4px solid var(--secondary);
  margin: 1rem 0;
  padding-left: 1rem;
  font-style: italic;
  color: var(--text);
}

blockquote cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-weight: 600;
}

/* Forms */
form {
  max-width: 600px;
  margin: 0 auto;
}

label {
  display: block;
  margin-top: 1rem;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #cccccc;
  border-radius: 4px;
  margin-top: 0.25rem;
  font-size: 1rem;
}

input:focus,
textarea:focus {
  border-color: var(--primary);
  outline: 2px solid var(--secondary);
}

/* Footer */
footer {
  background-color: var(--header-bg);
  color: #ffffff;
  padding: 1.5rem;
  text-align: center;
}

footer a {
  color: var(--secondary);
  text-decoration: underline;
}

footer a:hover,
footer a:focus {
  color: #ffffff;
  text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  header h1 {
    font-size: 1.75rem;
  }
  nav a {
    margin: 0 0.5rem;
  }
  h2 {
    font-size: 1.5rem;
  }
}
.profile-pic {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 0 auto 1rem auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
/* ===========================
   Footer (Dark Theme) – match header nav style, add underline on hover
   =========================== */
footer {
  background: #002E86;    /* Navy */
  color: #FFFFFF;
  padding: 1.5rem;
  text-align: center;
}

footer nav {
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;   /* ~15px */
  line-height: 1.6;
}

footer a {
  color: #FFFFFF;         /* White links */
  text-decoration: none;  /* No underline by default */
  margin: 0 0.25rem;
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.6;
}

footer p a {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.6;
  margin: 0 0.25rem;
  color: #FFFFFF;
  text-decoration: none;
  transition: all 0.2s ease;
}
footer a:visited {
  color: #E6E6E6;         /* Accessible light grey */
}

footer a:hover,
footer a:focus-visible {
  color: #FFCDD2;               /* Soft light red */
  text-decoration: underline;   /* Underline only on hover/focus */
  text-underline-offset: 3px;   /* A little breathing room */
}


