﻿body {
  margin: 0;
  font-family: "Inter", "Segoe UI", sans-serif;
  background: #f4f6f8;
  color: #111827;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  background: linear-gradient(120deg, #0b1329 0%, #0f172a 45%, #16233d 100%);
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transform-origin: top center;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: inset 0 -18px 30px rgba(15, 23, 42, 0.35);
  overflow: hidden;
}

.preloader::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% -30%, rgba(148, 163, 184, 0.35), transparent 54%),
    radial-gradient(circle at 86% -20%, rgba(191, 219, 254, 0.22), transparent 52%);
  pointer-events: none;
}

.preloader-logo {
  position: relative;
  z-index: 1;
  width: min(340px, 72vw);
  height: auto;
  filter: brightness(1.42) saturate(1.35) hue-rotate(8deg) contrast(1.06) drop-shadow(0 10px 24px rgba(15, 23, 42, 0.2));
  animation: preloader-logo-in 0.85s ease-out both;
}

.preloader.is-hidden {
  animation: preloader-to-header 2.2s linear forwards;
}

.preloader.is-hidden::before {
  animation: preloader-overlay-fade 1.9s linear 0.05s forwards;
}

.preloader.is-hidden .preloader-logo {
  animation: none;
}

@keyframes preloader-logo-in {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes preloader-logo-out {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(-22px) scale(0.94);
  }
}

@keyframes preloader-overlay-fade {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes preloader-to-header {
  0% {
    inset: 0;
    border-radius: 0;
    background: linear-gradient(120deg, #0b1329 0%, #0f172a 45%, #16233d 100%);
    opacity: 1;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: inset 0 -18px 30px rgba(15, 23, 42, 0.35);
  }

  100% {
    inset: 0 0 calc(100% - 88px) 0;
    border-radius: 0;
    background: linear-gradient(120deg, #0b1329 0%, #0f172a 45%, #16233d 100%);
    opacity: 0;
    visibility: hidden;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: inset 0 -18px 30px rgba(15, 23, 42, 0.35);
  }
}

/* HEADER */

.site-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #0b1329 0%, #0f172a 45%, #16233d 100%);
  color: white;
  padding: 20px 40px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: inset 0 -18px 30px rgba(15, 23, 42, 0.35);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% -30%, rgba(148, 163, 184, 0.35), transparent 54%),
    radial-gradient(circle at 86% -20%, rgba(191, 219, 254, 0.22), transparent 52%);
  pointer-events: none;
}

.header-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.logo {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  filter: brightness(1.42) saturate(1.35) hue-rotate(8deg) contrast(1.06);
}

.upcoming-events {
  position: relative;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  padding: 12px 14px;
}

.event-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 10px;
  border: 1px solid #93c5fd;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e3a8a;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: none;
  box-shadow: none;
}

.upcoming-events h2 {
  margin: 0 0 10px 0;
  font-size: 16px;
  letter-spacing: 1px;
}

.upcoming-events p {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
}

.upcoming-events p + p {
  margin-top: 8px;
}

.upcoming-events .event-when {
  white-space: normal;
}

/* HERO */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    #e2e8f0 0%,
    #cbd5e1 50%,
    #94a3b8 100%
  );
  padding: 120px 40px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      135deg,
      rgba(226, 232, 240, 0.3) 0%,
      rgba(203, 213, 225, 0.25) 50%,
      rgba(148, 163, 184, 0.2) 100%
    ),
    url("hero-jesus.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.2;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}

.hero-copy {
  max-width: 640px;
}

.hero h1 {
  font-size: 56px;
  margin: 0 0 20px 0;
  font-weight: 700;
}

.hero p {
  font-size: 18px;
  max-width: 600px;
}

/* MAIN CONTAINER */

main.content {
  max-width: 1100px;
  margin: 80px auto;
  padding: 0 40px 80px 40px;
}

/* CONTROLS */

.controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 50px;
  font-size: 16px;
}

#status {
  color: #475569;
}

/* TABLE */

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 18px;
}

thead th {
  text-align: left;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #64748b;
  padding: 10px 0;
}

tbody tr {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

tbody td {
  padding: 26px 24px;
  vertical-align: middle;
}

.day-divider-row {
  background: transparent;
  box-shadow: none;
}

.day-divider-cell {
  padding: 6px 0 2px 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #334155;
}

.hour-cell {
  font-weight: 600;
  font-size: 16px;
  width: 200px;
  color: #1e293b;
}

.hour-time {
  font-size: 18px;
  font-weight: 600;
}

.entries {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.entry-box {
  background: #f1f5f9;
  padding: 8px 14px;
  border-radius: 8px;
  border-left: 4px solid #1e40af;
  font-weight: 500;
}

.entry-box.is-new {
  animation: entry-slide-in 0.42s ease-out both;
}

@keyframes entry-slide-in {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.entry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.delete-btn {
  background: #dc2626;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
}

.delete-btn:hover {
  background: #b91c1c;
}

button {
  background: #1e40af;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s ease;
}

button:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

/* FOOTER */

.site-footer {
  background: #e2e8f0;
  border-top: 1px solid #cbd5e1;
  padding: 18px 40px 24px 40px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.footer-support {
  justify-self: start;
  min-width: 260px;
}

.footer-title {
  margin: 0 0 6px 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #334155;
}

.footer-line {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
}

.footer-line + .footer-line {
  margin-top: 2px;
}

.footer-rights {
  grid-column: 2;
  margin: 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.45;
  color: #334155;
}

@media (max-width: 768px) {
  .site-header,
  .hero,
  main.content,
  .site-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .logo {
    width: 180px;
  }

  .hero {
    padding-top: 70px;
    padding-bottom: 70px;
  }

  .hero-inner {
    flex-direction: column;
    gap: 20px;
  }

  .hero h1 {
    font-size: clamp(30px, 8.5vw, 38px);
    line-height: 1.12;
    overflow-wrap: anywhere;
    margin-bottom: 14px;
  }

  .hero p {
    font-size: 16px;
  }

  .upcoming-events {
    max-width: 100%;
  }

  .upcoming-events .event-when {
    font-size: 16px;
  }

  .controls {
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
  }

  tbody td {
    padding: 18px 14px;
  }

  .footer-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .footer-rights {
    width: 100%;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .preloader,
  .preloader-logo,
  .entry-box.is-new,
  .event-badge,
  .event-badge::after {
    animation: none;
  }

  .preloader.is-hidden {
    display: none;
  }
}




