/* ---------- GENERAL STYLING ---------- */
body {
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  padding: 0;

  /* Background image */
  background-image: url('../images/icenter.png'); /* Replace with your image path */
  background-size: cover;      
  background-position: center; 
  background-repeat: no-repeat;
  background-attachment: fixed;

  color: #001f3f; /* Default text color */
}

.container {
  max-width: 1000px;
  margin: 20px auto;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.9); /* Slightly opaque background for readability */
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* ---------- HEADER ---------- */
header.header {
  text-align: center;
  margin-bottom: 30px;
}

header.header h1 {
  font-size: 2.5em;
  color: #001f3f;
}

/* ---------- NAVIGATION ---------- */
nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 50px;
  margin-bottom: 30px;
}

nav a {
  text-decoration: none;
  color: #001f3f;
  font-weight: bold;
  font-size: 1.1em;
  padding: 5px 10px;
  transition: 0.3s;
}

nav a:hover {
  background-color: #001f3f;
  color: #fff;
  border-radius: 5px;
}

/* ---------- TABLE BACKGROUND ---------- */
.table-background, .content-box table {
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 40px;
  background-color: rgba(255, 255, 255, 0.85); /* Slightly transparent table background */
}

/* ---------- TABLE STYLING ---------- */
.table-background table, .content-box table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* Makes column widths controllable */
}

.table-background th, .table-background td,
.content-box th, .content-box td {
  border: 1px solid #001f3f;
  padding: 15px 20px; /* More spacing for readability */
  text-align: left;
  word-wrap: break-word; /* Wrap long text in Reason column */
}

/* Set specific column widths */
.table-background th:nth-child(1), .table-background td:nth-child(1),
.content-box th:nth-child(1), .content-box td:nth-child(1) {
  width: 15%; /* Speaker */
}

.table-background th:nth-child(2), .table-background td:nth-child(2),
.content-box th:nth-child(2), .content-box td:nth-child(2) {
  width: 20%; /* Title */
}

.table-background th:nth-child(3), .table-background td:nth-child(3),
.content-box th:nth-child(3), .content-box td:nth-child(3) {
  width: 15%; /* Location */
}

.table-background th:nth-child(4), .table-background td:nth-child(4),
.content-box th:nth-child(4), .content-box td:nth-child(4) {
  width: 10%; /* Year */
}

.table-background th:nth-child(5), .table-background td:nth-child(5),
.content-box th:nth-child(5), .content-box td:nth-child(5) {
  width: 30%; /* Reason */
}

.table-background th:nth-child(6), .table-background td:nth-child(6),
.content-box th:nth-child(6), .content-box td:nth-child(6) {
  width: 10%; /* Actions */
}

.table-background th {
  background-color: rgba(0, 31, 63, 0.85);
  color: white;
  text-transform: uppercase;
}

.table-background tr:nth-child(even),
.content-box tr:nth-child(even) {
  background-color: rgba(242, 242, 242, 0.85);
}

.table-background tr:hover,
.content-box tr:hover {
  background-color: rgba(224, 224, 224, 0.85);
  transition: 0.3s;
}

/* ---------- FORM STYLING ---------- */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

form label {
  font-weight: bold;
  color: #001f3f;
}

form input[type="text"],
form input[type="number"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

form input:focus {
  border-color: #001f3f;
  outline: none;
  box-shadow: 0 0 5px rgba(0, 31, 63, 0.4);
}

button {
  width: 150px;
  padding: 10px;
  background-color: #001f3f;
  color: white;
  font-size: 1em;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  background-color: #004080;
}

/* ---------- TABLE DELETE BUTTON ---------- */
.content-box td button {
  width: 70px;          /* Smaller width */
  padding: 5px 8px;     /* Less padding */
  font-size: 0.85em;    /* Smaller text */
  background-color: #ff4d4d; /* Red to indicate delete */
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.3s;
}

.content-box td button:hover {
  background-color: #e60000; /* Darker red on hover */
}

/* ---------- SECTION HEADINGS ---------- */
.content-box h2 {
  color: #001f3f;
  border-bottom: 2px solid #001f3f;
  padding-bottom: 5px;
  margin-bottom: 15px;
}

/* ---------- FOOTER ---------- */
footer {
  text-align: center;
  margin-top: 50px;
  padding: 20px 0;
  background-color: #001f3f;
  color: white;
}

footer ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  list-style: none;
  padding: 0;
  margin-bottom: 10px;
}

footer ul a {
  color: white;
  text-decoration: none;
}

footer p {
  margin: 0;
}

/* ---------- RESPONSIVE TABLE ---------- */
@media (max-width: 768px) {
  .table-background th,
  .table-background td,
  .content-box th,
  .content-box td {
    padding: 10px 5px;
    font-size: 0.9em;
  }
  
  .table-background th:nth-child(5),
  .table-background td:nth-child(5),
  .content-box th:nth-child(5),
  .content-box td:nth-child(5) {
    width: 40%; /* Make Reason column wider on small screens */
  }

  .content-box td button {
    width: 60px;       /* Even smaller button on mobile */
    padding: 4px 6px;
    font-size: 0.8em;
  }
}
