/* Global reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body styling */
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: #f9f9f9;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  animation: fadeIn 1s ease-in;
}

/* Header */
header {
  background: #2a7a2a;
  color: #fff;
  padding: 1rem 0;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

header h1 {
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  position: relative;
  padding: 0.25rem 0.5rem;
  transition: color 0.3s ease;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: #fff;
  transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

/* Main content */
main {
  flex: 1;
  padding: 2rem;
  max-width: 1000px;
  margin: auto;
  animation: slideUp 1s ease;
}

/* Hero section */
.hero {
  text-align: center;
  padding: 3rem 1rem;
  background: linear-gradient(to right, #2a7a2a, #4caf50);
  color: white;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
  animation: fadeIn 1.2s ease-in;
}

.hero .btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: #fff;
  color: #2a7a2a;
  font-weight: bold;
  text-decoration: none;
  border-radius: 30px;
  transition: transform 0.2s ease, background 0.3s ease, color 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.hero .btn:hover {
  background: #2a7a2a;
  color: white;
  transform: translateY(-2px);
}

/* Forms */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
  background: #fff;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  animation: fadeIn 1.3s ease-in;
}

form label {
  font-weight: bold;
}

form input,
form textarea,
form button {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

form button {
  background: #2a7a2a;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s ease, transform 0.2s ease;
}

form button:hover {
  background: #256225;
  transform: scale(1.03);
}

/* Records table */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  animation: fadeIn 1.4s ease-in;
}

table th,
table td {
  border: 1px solid #eee;
  padding: 0.75rem;
  text-align: left;
}

table th {
  background: #f3f3f3;
}

/* Record card style (extra polish) */
tbody tr {
  transition: background 0.2s ease;
}
tbody tr:hover {
  background: #f9fff9;
}

/* Footer */
footer {
  background: #2a7a2a;
  color: #fff;
  text-align: center;
  padding: 1rem;
  margin-top: auto;
  box-shadow: 0 -4px 6px rgba(0,0,0,0.2);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
  }

  .hero {
    padding: 2rem 1rem;
  }

  table th, table td {
    font-size: 0.9rem;
  }
}

/* Records grid (card layout) */
.records-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.record-card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: fadeIn 1.5s ease-in;
}

.record-card h3 {
  color: #2a7a2a;
  margin-bottom: 0.5rem;
}

.record-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.record-card p {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #444;
}

.record-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* Delete button styling */
.delete-btn {
  margin-top: 0.75rem;
  background: #e63946;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.3s ease, transform 0.2s ease;
}

.delete-btn:hover {
  background: #c1121f;
  transform: scale(1.05);
}
