/* CSS BY Kurt Church */

/* IMPORTED FONTS */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

/* CSS REST */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ROOT VARIABLES */
:root {
  --blue: #007BFF;
  --red: #FF4500;
  --white: #EAEAEA;
  --black: #000000;
  --charcoal: #333333;
  --font: "Inter", sans-serif;
}

/* GLOBAL STYLES (mobile first/small) */
body {
  font-family: var(--font);
  background-color: var(--white);
  color: var(--charcoal);
  line-height: 1.6;
  min-width: 400px;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 0;
}

/* HEADER */
header {
  width: 100%;
  background-color: var(--black);
  border-bottom: 2px solid var(--blue);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

header h1 {
  color: var(--blue);
  font-weight: bold;
  font-size: 1.75rem;
}

header h1::before {
  content: "";
  display: inline-block;
  width: 2rem;
  height: 2rem;
  background: url('images/vanguard-logo.svg') no-repeat center/contain;
  margin-right: 0.5rem;
  vertical-align: middle;

  /* Animation */
  animation: bounce 3s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* NAVIGATION */
.nav-wrapper {
  position: relative;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--white);
  cursor: pointer;
}

.nav ul {
  display: flex;
  gap: 1rem;
  list-style: none;
}

.nav a {
  text-decoration: none;
  color: var(--white);
  font-weight: bold;
  text-transform: uppercase;
}

.nav a:hover {
  color: var(--blue);
  text-decoration: underline;
}

/* HERO SECTION */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)),
              url('images/vanguard-hero.jpg') no-repeat center center/cover;
  height: 80vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--white);
  padding: 1rem;
}

.hero h2 {
  font-size: 2rem;
}

.hero button {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--blue);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

button {
  transition: background-color 0.3s ease, transform 0.3s ease;
}

button:hover {
  background-color: var(--red);
  transform: scale(1.05);
}

/* SERVICES GRID */
.services-grid {
  display: grid;
  list-style: none;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.service-card {
  background-color: var(--blue);
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* RESULTS SECTION */
.results-section {
  background-color: var(--blue);
  color: var(--white);
  padding: 3rem 0;
}

.results-section .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.results-section h2,
.results-section h3,
.results-section p,
.results-section th,
.results-section td {
  color: var(--white);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.results-table th,
.results-table td {
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem;
  text-align: left;
}

/* BAR CHART */
#bar-chart {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: flex-end;
  gap: 1rem;
  height: 300px;
  max-width: 800px;
  margin: 2rem auto;
  background-color: var(--blue);
  padding: 1rem;
  border-radius: 8px;
}

.bar {
  width: 50px;
  background-color: #333333;
  border-radius: 10px;
  position: relative;
  height: 0;
  animation: grow 1s forwards;
}

.bar::after {
  content: attr(data-year);
  position: absolute;
  bottom: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--white);
  font-weight: bold;
}

@keyframes grow {
  to {
    height: var(--height);
  }
}

/* FORM STYLING */
.contact-section {
  background-color: var(--black);
  color: var(--white);
  padding: 3rem 0;
}

.contact-section h2,
.contact-section p,
.contact-section label {
  color: var(--white);
}

.contact-section input,
.contact-section textarea {
  background-color: white;
  border: 2px solid var(--blue);
  border-radius: 5px;
  padding: 0.75rem;
  width: 100%;
  color: var(--black);
}

.contact-section form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.contact-section button[type="submit"] {
  background-color: var(--blue);
  color: white;
  padding: 0.75rem;
  border: none;
  font-weight: bold;
  cursor: pointer;
  border-radius: 8px;
  width: 100%;
}

/* FOOTER */
.footer {
  background-color: var(--black);
  color: var(--white);
  padding: 2rem 0;
  text-align: center;
}

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

/* MEDIA QUERY (medium) */
@media (min-width: 600px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .results-section .container {
    grid-template-columns: 1fr 1fr;
  }
}

/* MEDIA QUERY (800px) */
@media (min-width: 800px) {
  .hero h2 {
    font-size: 2.25rem;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bar {
    width: 55px;
  }
}

/* MEDIA QUERY (large) */
@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero h2 {
    font-size: 3rem;
  }

  .bar {
    width: 60px;
  }
}

/* MOBILE NAVIGATION - PURE CSS HOVER MENU */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav ul {
    display: none;
    flex-direction: column;
    background-color: var(--black);
    position: absolute;
    top: 100%;
    right: 0;
    width: 100vw;
    padding: 1rem;
    z-index: 999;
  }

  .nav-wrapper:hover .nav ul {
    display: flex;
    flex-direction: column;
    background-color: var(--black); 
    padding: 1rem;
    gap: 0.5rem; 
  }

  .nav ul li a {
    display: block;
    background-color: var(--black);
    color: var(--white);
    text-align: center;
    padding: 0.5rem 1rem; 
    width: auto; 
  }

  .nav ul li a:hover {
    background-color: var(--blue);
    color: white;
  }
}
