/* public/css/styles.css */

/* Import Inter font */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap");

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  background-color: #f9f9f9;
  color: #333;
}

header {
  display: flex;
  align-items: center;
  padding: 1rem;
  background-color: #ffffff;
  border-bottom: 1px solid #dddddd;
}

.header-container {
  max-width: 1200px;
  width: 100%;
  display: flex;
  margin: auto;
  align-items: center;
  padding: 0 2rem;
}

header img {
  height: 40px;
}

.logo {
  margin-right: 20px;
}

.admin-button {
  margin-left: auto;
  margin-right: 20px;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
}

.navigation {
  display: flex;
  width: auto;
  gap: 20px;
  align-items: center;
  justify-content: end;
  margin-right: auto;
  margin-left: 100px;
}

.navigation a {
  text-decoration: none;
  color: #0f1bf5;
  /* Edelman blue */
  font-weight: 600;
}

.navigation a:hover {
  color: #02004a;
  /* Edelman dark blue */
}

.navigation a.active {
  color: #02004a;
  /* Edelman dark blue */
  font-weight: bold;
}

main {
  padding: 2rem;
  margin: auto;
  max-width: 1200px;
}

main.container {
  max-width: 800px;
}

h1,
h2 {
  color: #003366;
  /* Edelman navy */
}

p {
  line-height: 1.5;
}

ul {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

ol {
  margin: 0;
  padding: 0;
}

ol li {
  list-style: decimal;
  margin-left: 1.5rem;
  margin-top: 10px;
}

button,
.button {
  background-color: #0f1bf5;
  /* Edelman blue */
  color: #ffffff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  text-decoration: none;
  display: inline-block;
  margin: 5px 0;
  font-size: 14px;
  line-height: 16px;
}

button:hover,
.button:hover {
  background-color: #02004a;
}

input,
label {
  display: block;
  margin-bottom: 1rem;
}

input[type="text"],
input[type="password"],
input[type="file"],
textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #cccccc;
  border-radius: 4px;
  font-family: "Inter", sans-serif;
}

textarea {
  margin-top: 10px;
}

pre {
  font-size: 0.9rem;
  line-height: 1.4;
  background-color: #f4f4f4;
  padding: 0.5rem;
  border-radius: 4px;
  overflow-x: auto;
}

label {
  color: #333;
  font-weight: 600;
}

form {
  margin-top: 1rem;
}

.error {
  color: #c00;
}

.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  padding: 1.5rem;
  border-radius: 4px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  max-height: 90vh;
  overflow-y: auto;
}

#info-modal-backdrop .modal-content {
  max-width: 800px;
}

.modal-content #info-text {
  max-height: calc(90vh - 200px);
  overflow-y: auto;
  margin-bottom: 20px;
}

.modal-content h3 {
  margin-top: 0;
  font-weight: 600;
}

.modal-content input[type="text"] {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: Inter, sans-serif;
}

.modal-content button {
  margin-right: 0.5rem;
  font-family: Inter, sans-serif;
}

.adminview {
  max-width: 1200px;
}

.adminlogin {
  max-width: 400px;
}

.button-holder {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  margin-left: auto;
}

td.stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

td form {
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;

}

th {
  background-color: #170b2f;
  color: #fff;
  font-weight: 600;
}

th,
td {
  text-align: left;
  padding: 0.5rem;
  border: 1px solid #dddddd;
}

th.center,
td.center {
  text-align: center;
}

td button,
td .button {
  margin: 5px;
  white-space: nowrap;
}

#edit-form input {
  margin-top: 10px;
}

#edit-form #current-thumb {
  margin-top: 10px;
}

.admin-button img {
  height: 30px;
}

#admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Search box */
.search-controls {
  margin-bottom: 1.5rem;
}

#searchInput {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Card grid */
.card-holder {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-start;
  /* keep cards left-aligned */
}

.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 0 0 calc(33.33% - 1rem);
  /* fixed width: 25% minus gap */
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.card img {
  border-radius: 4px;
  margin-bottom: 0.75rem;
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.card p {
  flex: 1;
  margin: 0 0 5px 0;
  color: #555;
  line-height: 1.4;
}

.card .button,
.card button {
  width: 100%;
  text-align: center;
}

section {
  margin-bottom: 5rem;
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}

.gallery img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

.gallery p {
  font-weight: bold;
  text-decoration: underline;
}

/* Responsive breakpoints */
@media (max-width: 1024px) {
  .card {
    flex: 0 0 calc(50% - 1rem);
  }
}

@media (max-width: 768px) {
  .card {
    flex: 0 0 100%;
  }
}

/* HTML: <div class="loader"></div> */
.loader-holder {
  display: none;
  justify-content: center;
  align-items: center;
  height: 100vh;
  /* Full viewport height */
  width: 100vw;
  /* Full viewport width */
  position: fixed;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px);
  z-index: 100;
  top: 0;
  left: 0;
  flex-direction: column;
  gap: 30px;
  z-index: 10000;
}

.loader-holder.active {
  display: flex;
}

.loader {
  width: 80px;
  aspect-ratio: 1;
  display: grid;
}

.loader::before,
.loader::after {
  content: "";
  grid-area: 1/1;
  background: #0f1bf5;
  clip-path: polygon(0 0, 50% 50%, 0 100%);
  animation: l11 2s infinite;
}

.loader::after {
  animation-delay: -1.5s;
  --s: 90deg;
}

@keyframes l11 {

  0%,
  12.5% {
    transform: rotate(var(--s, 0deg)) rotate(0deg)
  }

  37.5%,
  62.5% {
    transform: rotate(var(--s, 0deg)) rotate(-180deg)
  }

  87.5%,
  100% {
    transform: rotate(var(--s, 0deg)) rotate(-360deg)
  }
}