/* Base */
body {
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  margin: 0;
  background: #f4f7fa;
  color: #333;
}
h1, h2, h3 { font-weight: 600; margin: 15px 0; }
a { text-decoration: none; color: #2563eb; }
a:hover { text-decoration: underline; }

/* Header */
header {
  background: linear-gradient(135deg, #2563eb, #1e3a8a);
  color: white;
  padding: 0.3rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
header h1 {
  margin: 0;
  font-size: 1.4rem;
}
header input {
  padding: 10px;
  width: 80%;
  max-width: 400px;
  border-radius: 20px;
  border: none;
  margin-top: 10px;
  font-size: 1em;
}

/* Layout */
/* Container */
.container {
  max-width: 1500px;
  margin: 20px auto;
  padding: 15px;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.grid.equal-height {
  align-items: stretch;
}

/* Force 4 columns on large screens */
@media (min-width: 1200px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Card Layout */
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.card:hover { transform: translateY(-2px); }

/* Forms */
label { display: block; margin-top: 10px; font-weight: 500; }
input, select {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1em;
}

/* Results */
.result {
  margin-top: 12px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #047857;
  font-weight: 600;
  text-align: center;
}

/* Example text */
.example {
  font-size: 0.9rem;
  color: #555;
  background: #f1f5ff;
  border-left: 4px solid #3b82f6;
  padding: 5px 10px;
  border-radius: 4px;
  margin-top: 10px;
}

/* Responsive fallback */
@media (max-width: 768px) {
  .card {
    flex: 1 1 100%;
  }
}

footer {
  background: #f0f6ff;        /* very light blue */
  color: #374151;             /* dark gray text */
  text-align: center;
  padding: 25px 15px;
  margin-top: 40px;
  font-size: 0.95em;
  border-top: 3px solid #2563ec;
}

footer nav {
  margin-top: 10px;
}

footer a {
  color: #2563eb;             /* medium blue for links */
  margin: 0 10px;
  text-decoration: none;
  font-weight: 500;
}

footer a:hover {
  text-decoration: underline;
  color: #1e40af;             /* darker blue on hover */
}

/* Input field */
.input-field {
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

/* Output display */
.output-result {
  padding: 10px 12px;
  margin-top: 8px;
  font-weight: bold;
  color: #047857;
  background-color: #ecfdf5;
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
}

footer {
  font-size: 0.9em;
  background: #f2f7fc;
  padding: 20px;
  margin-top: 40px;
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.footer-top nav a {
  margin: 0 8px;
}

.footer-blurb {
  max-width: 800px;
  margin: 15px auto 0;
  text-align: center;
}

@media (min-width: 600px) {
  .footer-top {
    flex-direction: row;
    justify-content: space-between;
  }
}

header h1 a {
  text-decoration: none;
  color: inherit; /* inherits h1 color (usually black or white) */
}
