/*
 * Stylesheet for the community template
 *
 * This file defines a layout inspired by the reference site while
 * applying a patriotic red, white and blue colour scheme. The design
 * emphasises readability, clean typography and responsive behaviour on
 * smaller screens.
 */

/* Root colour palette variables */
:root {
  --color-red: #bf0a30;
  --color-blue: #002868;
  --color-white: #ffffff;
  --color-light-gray: #f4f4f4;
  --color-dark-gray: #333333;
  --font-family-base: 'Montserrat', sans-serif;
}

/* Global resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family-base);
  color: var(--color-dark-gray);
  line-height: 1.6;
  background-color: var(--color-light-gray);
}

a {
  color: var(--color-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

/* Navbar */
.navbar {
  background-color: var(--color-blue);
  color: var(--color-white);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
}

.nav-links a {
  margin: 0 0.75rem;
  color: var(--color-white);
  font-weight: 500;
}

.donate-btn {
  background-color: var(--color-red);
  color: var(--color-white);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.donate-btn:hover {
  background-color: #a30927;
}

/* Hero section */
.hero {
  position: relative;
  height: 80vh;
  background-color: var(--color-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
}

/* Dark overlay on hero image for contrast */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-blue);
  overflow: hidden;
  z-index: 1;
}

.hero-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background-image: url('assets/hero.png');
  background-repeat: no-repeat;
  background-position: right center;
  background-size: contain;
  -webkit-mask-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 1) 10%,
    rgba(0, 0, 0, 1) 100%
  );
  mask-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 1) 10%,
    rgba(0, 0, 0, 1) 100%
  );
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.signup-form {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.signup-form input[type='email'] {
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 4px;
  min-width: 240px;
}

.signup-form button {
  background-color: var(--color-red);
  color: var(--color-white);
  border: none;
  padding: 0.7rem 1.25rem;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.signup-form button:hover {
  background-color: #a30927;
}

/* Sections */
.section {
  padding: 4rem 0;
  background-color: var(--color-white);
}

.section:nth-of-type(even) {
  background-color: var(--color-light-gray);
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--color-blue);
  text-align: center;
}

.section p {
  max-width: 700px;
  margin: 0 auto;
  margin-bottom: 2rem;
  text-align: center;
}

.btn {
  background-color: var(--color-blue);
  color: var(--color-white);
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  font-weight: 600;
  display: inline-block;
  transition: background-color 0.2s ease;
}

.btn:hover {
  background-color: #001f4d;
}

.link {
  color: var(--color-red);
  font-weight: 600;
}

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

.issue-card {
  background-color: var(--color-white);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.issue-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.issue-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--color-blue);
}

.issue-card p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  color: var(--color-dark-gray);
  text-align: left;
}

.issue-card a.link {
  font-size: 0.9rem;
}

/* Donation section */
.donate-section {
  background-color: var(--color-blue);
  color: var(--color-white);
  text-align: center;
}

.donate-section h2 {
  color: var(--color-white);
}

.donate-section p {
  color: var(--color-light-gray);
}

.donate-buttons {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.donate-level {
  background-color: var(--color-red);
  color: var(--color-white);
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.donate-level:hover {
  background-color: #a30927;
}

/* Footer */
.footer {
  background-color: var(--color-dark-gray);
  color: var(--color-light-gray);
  padding: 1rem 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
}

.footer-nav a {
  color: var(--color-light-gray);
  margin: 0 0.5rem;
  font-size: 0.85rem;
}

/* Responsive styles */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.25rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .nav-links {
    display: none;
  }
  /* A hamburger menu could be added here for mobile navigation */
}
