/*
 * Global Stylesheet for the DEItango website.
 *
 * This file defines a simple and elegant visual theme that echoes the warm
 * colours of tango while remaining accessible and easy to read. The
 * variables at the top of the file allow for quick adjustment of the colour
 * palette if the branding evolves in the future. Media queries ensure the
 * layout adapts gracefully to smaller screens. Cards, lists and footnotes
 * share common styling for consistency across the site.
 */

/* Colour palette and design tokens */
:root {
  --primary: #ae2f37;     /* rich red inspired by tango dresses */
  --secondary: #d85c41;   /* warm orange accent */
  --background: #f9f4ef;  /* light beige backdrop */
  --dark: #321714;        /* deep brown for text */
  --light: #ffffff;       /* white for panels */
}

/* Reset some basic elements for consistency */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  background-color: var(--background);
  color: var(--dark);
}

/* Navigation bar */
header {
  background-color: var(--light);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
}

.logo {
  font-weight: bold;
  font-size: 1.6rem;
  color: var(--primary);
  text-decoration: none;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

nav li {
  margin-left: 1.5rem;
}

nav a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

/* Highlight active page link */
.active {
  color: var(--primary) !important;
  font-weight: 600;
}

/* Hero section used on home page */
.hero {
  position: relative;
  height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-left: 10%;
  color: #ffffff;
  overflow: hidden;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 600px;
}

.btn {
  display: inline-block;
  background-color: var(--primary);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.btn:hover,
.btn:focus {
  background-color: var(--secondary);
}

/* Generic section styling */
.section {
  padding: 4rem 10%;
}

.section h2 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 2rem;
}

.section p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Cards grid used on home and events pages */
.cards,
.events-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card,
.event-card,
.value-item {
  background-color: var(--light);
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.card h3,
.event-card h3,
.value-item h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-size: 1.4rem;
}

.card p,
.event-card p,
.value-item p {
  flex-grow: 1;
  margin-bottom: 1rem;
}

.card a {
  margin-top: 1rem;
  color: var(--secondary);
  text-decoration: none;
  font-weight: bold;
}

.card a:hover,
.card a:focus {
  text-decoration: underline;
}

/* Team members layout */
.team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.team-member {
  text-align: center;
}

.team-member img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
}

.team-member h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-size: 1.3rem;
}

.team-member p {
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Values list used on about page */
.values-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.value-item {
  padding: 1.5rem;
}

/* Footnotes */
.footnotes {
  font-size: 0.8rem;
  margin-top: 3rem;
  border-top: 1px solid #ccc;
  padding-top: 1rem;
  color: var(--dark);
}

.footnotes ol {
  margin-left: 1.25rem;
}

.footnotes li {
  margin-bottom: 0.5rem;
}

.footnotes a {
  color: var(--primary);
  text-decoration: none;
}

.footnotes a:hover,
.footnotes a:focus {
  text-decoration: underline;
}

/* Footer styling */
footer {
  background-color: var(--primary);
  color: #ffffff;
  padding: 2rem 10%;
  text-align: center;
  font-size: 0.9rem;
}

footer a {
  color: #ffffff;
  text-decoration: underline;
}

/* Hero background video styles */
.hero .background-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

/* Overlay gradient on top of the video */
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45));
  z-index: -1;
}

/* Timeline styles */
.timeline {
  margin-top: 2rem;
}

.timeline-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

/* Each timeline item will take up 20% of the container on larger screens (five per row). */
.timeline-item {
  flex: 1 1 calc(20% - 1rem);
  max-width: calc(20% - 1rem);
}

.timeline-item img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* Styling for timeline captions */
.timeline-item figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--dark);
  text-align: center;
}

@media (max-width: 768px) {
  .timeline-item {
    flex-basis: calc(50% - 1rem);
    max-width: calc(50% - 1rem);
  }
}

@media (max-width: 480px) {
  .timeline-item {
    flex-basis: 100%;
    max-width: 100%;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero {
    padding: 2rem;
    align-items: center;
    text-align: center;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  nav li {
    margin-left: 1rem;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
  }
  .nav-container {
    flex-direction: column;
    align-items: center;
  }
}