/* External CSS for Five For Fighting Mental Health */

:root {
  --primary-color: #1e2a38;
  --accent-color: #b22222;
  --light-color: #ffffff;
  --neutral-color: #f4f4f4;
}

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

body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--primary-color);
  color: var(--light-color);
  line-height: 1.6;
}

header {
  background-color: var(--primary-color);
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-bottom: 3px solid var(--accent-color);
}

header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-family: 'Staatliches', cursive;
}

nav {
  margin-top: 1rem;
}

nav a {
  color: var(--light-color);
  text-decoration: none;
  margin: 0 0.75rem;
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--accent-color);
}

.hero {
  background-color: var(--primary-color);
  padding: 3rem 2rem;
  text-align: center;
}

.hero h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.crisis {
  background-color: var(--accent-color);
  padding: 1rem;
  margin: 2rem auto;
  max-width: 500px;
  border-radius: 8px;
}

.phrases-intro {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.phrases {
  position: relative;
  height: 1.5em;
  overflow: hidden;
  max-width: 600px;
  margin: 1rem auto 0;
  text-align: center;
}

.phrases p {
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  position: absolute;
  width: 100%;
  left: 0;
  top: 0;
  text-align: center;
}

.phrases p.visible {
  opacity: 1;
}

.section {
  padding: 2rem;
  background-color: var(--neutral-color);
  color: var(--primary-color);
  text-align: center;
}

.section h3 {
  margin-bottom: 1.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.section p,
.check-in-section p,
.hero p,
.info-box p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.7;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  word-break: normal;
  hyphens: auto;
}

.section p,
.info-box p {
  text-wrap: balance;
}

.resource-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  max-width: 1100px;
  margin: 0 auto;
}

.resource-card {
  background-image: url('/images/vintage_paper_texture.jpg');
  background-size: cover;
  background-position: center;
  color: var(--primary-color);
  text-decoration: none;
  padding: 1.5rem 1.25rem;
  flex: 1 1 calc(50% - 2rem);
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
  text-align: center;
  border: 2px solid #d6caaa;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.resource-card strong {
  font-size: 1.2rem;
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.resource-card span {
  font-size: 0.95rem;
  display: block;
  opacity: 0.85;
}

@media (max-width: 700px) {
  .resource-card {
    flex: 1 1 100%;
    max-width: 90%;
  }
}

.check-in-section {
  background-color: #eaf0f6;
  color: var(--primary-color);
  padding: 2rem;
  text-align: center;
}

.check-in-section h3 {
  margin-bottom: 1rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.info-section-bg {
  background-color: var(--primary-color);
  padding: 3rem 1rem;
  display: flex;
  justify-content: center;
}

.info-boxes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 1100px;
  width: 100%;
}

.info-box {
  background-color: var(--light-color);
  color: var(--primary-color);
  border: 1px solid var(--accent-color);
  border-radius: 10px;
  padding: 2rem 1.5rem;
  flex: 1 1 300px;
  max-width: 320px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  text-align: center;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
}

.info-box.visible {
  opacity: 1;
  transform: translateY(0);
}

.info-box:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

footer {
  background-color: var(--primary-color);
  color: var(--light-color);
  padding: 2rem;
  text-align: center;
}
