/* ===========================
   style.css — Firm Foundation
   =========================== */

/* ---- RESET ---- */
* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-display: 'Ambroise regular', serif;
  font-weight: 400;
  background: #f5f5f5;
  color: #333;
  display: flex;
  flex-direction: column; /* ensures footer sticks at bottom */
}

/* ---- font style --- */
@font-face {
  font-family: 'Ambroise Regular' ;
  src: url(/static/font/Ambroise\Regular.otf/#444);
  font-weight: 400;
  font-style: normal;
}

/* ---- VARIABLES ---- */
:root {
  --black: #727070;
  --white: #fff;
  --accent: #ffffff;
  --nav-height: 72px;
}

/* ---- LAYOUT ---- */
main {
  flex: 1; /* push footer to bottom */
}

/* ---- NAVBAR ---- */
.navbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  height: var(--nav-height);
  padding: 0 28px;
  background: var(--black);
  box-shadow: 0 8px 22px rgba(0,0,0,0.35);
  position: sticky;
  top: 0;
  z-index: 1200;
}

.nav-left, .nav-right { display: flex; gap: 18px; align-items: center; }
.nav-left { justify-self: start; }
.nav-right { justify-self: end; }
.navbar .logo { justify-self: center; }

.nav-left a, .nav-right a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  padding: 6px 4px;
  transition: color .18s ease;
}

/* Hover underline */
.nav-left a::after, .nav-right a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  height: 2px; width: 0;
  background: var(--accent);
  transition: width .25s ease;
}
.nav-left a:hover::after, .nav-right a:hover::after,
.nav-left a.active::after, .nav-right a.active::after { width: 100%; }
.nav-left a:hover, .nav-right a:hover { transform: translateY(-1px); }

/* Logo */
.logo img {
  height: 90px;
  width: auto;
  display: block;
  filter: drop-shadow(0 8px 22px rgba(0,0,0,0.45));
}

/* ---- SEARCH FORM ---- */
.search-form { display: inline-flex; align-items: center; margin-left: 10px; }
.search-form input {
  padding: 6px 10px;
  border-radius: 4px 0 0 4px;
  border: none;
  min-width: 140px;
}
.search-form button {
  padding: 6px 10px;
  border-radius: 0 4px 4px 0;
  border: none;
  cursor: pointer;
  background: #fff;
}
.search-form button:hover { background:#eee; }

/* ---- HAMBURGER ---- */
.hamburger {
  display: none;
  font-size: 22px;
  color: var(--white);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
}

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 50vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--white);
  background: url("/static/sea_of_galilee_web_ready.jpeg") no-repeat center/cover;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1;
  pointer-events: none;
}
.welcome-overlay {
  position: relative;
  z-index: 2;
  background: rgba(0,0,0,0.6);
  padding: 20px 36px;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  animation: fadeInUp 0.9s ease both;
}
.welcome-overlay h1 { font-size: 2.6rem; margin: 0 0 10px; }
.welcome-overlay p { font-size: 1.15rem; margin: 0 0 18px; }

/* ---- BUTTON ---- */
.btn {
  display: inline-block;
  padding: 10px 18px;
  background: var(--white);
  color: #000;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  transition: transform .18s ease, box-shadow .18s ease, background .18s;
}
.btn:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,0.28); }
.donate { background: #ff4444 !important; color: #fff !important; }
.donate:hover { background: #e63939 !important; }

/* ---- Donate Glow ---- */
.navbar .donate {
  background: #ff4444;
  color: #fff !important;
  padding: 8px 14px;
  border-radius: 6px;
  animation: pulse 2s infinite;
}

/* ---- POSTS ---- */
.posts-section {
  padding: 36px 20px;
  max-width: 1000px;
  margin: 0 auto;
}
.posts-section h2 { text-align: center; margin-bottom: 18px; }
.posts-section ul { list-style: none; padding: 0; display: grid; gap: 14px; }
.posts-section li {
  background: #fff;
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.06);
}

/* ==== RECENT POSTS (PREVIEW) ==== */
.post-preview {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-preview:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.15);
}

.post-preview h3 {
  margin-top: 0;
  font-size: 1.4rem;
}

.post-preview h3 a {
  color: #000;
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-preview h3 a:hover {
  color: #444;
  text-decoration: underline;
}

.post-preview .meta {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 10px;
}

.post-preview .excerpt {
  font-size: 1rem;
  color: #444;
  margin-bottom: 15px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;   /* show only 3 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-preview .read-more {
  font-size: 0.9rem;
  font-weight: bold;
  text-decoration: none;
  color: #000;
  transition: color 0.2s ease;
}

.post-preview .read-more:hover {
  color: #444;
  text-decoration: underline;
}

/* ================= PAGINATION ================= */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 20px 0;
}

.pagination .btn {
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  color: #333;
  background: #f9f9f9;
  transition: all 0.2s ease-in-out;
}

.pagination .btn:hover {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

.pagination .active {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
  cursor: default;
  pointer-events: none;
}

/* ================= POST CARDS ================= */
.post-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  margin: 20px auto;
  max-width: 800px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.post-card h3 {
  margin-top: 0;
  font-size: 1.5rem;
  color: #333;
}

.post-card p {
  color: #555;
  font-size: 1rem;
  margin-bottom: 10px;
}

.post-card a.read-more {
  display: inline-block;
  margin-top: 10px;
  font-weight: bold;
  text-decoration: none;
  color: #007bff;
  transition: color 0.2s ease;
}

.post-card a.read-more:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* ---- CENTER CONTENT ---- */
.center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 36px 20px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  .hero { background-image: url("/static/sea_of_galilee_mobile.jpg"); }
  .welcome-overlay h1 { font-size: 1.9rem; }
  .search-form input { min-width: 90px; }
}
@media (min-width: 601px) and (max-width: 1200px) {
  .hero { background-image: url("/static/sea_of_galilee_tablet.jpeg"); }
}
@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-left, .nav-right { display: none; }
  .nav-left.show, .nav-right.show {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 18px;
    background: #000;
    width: 100%;
  }
}

/* ---- ANIMATIONS ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.fadeInUp { animation: fadeInUp .9s both; }

/* ---- STORE ---- */
.store-section {
  padding: 40px 20px;
  text-align: center;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.product-card {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.15);
}
.product-card img {
  max-width: 100%;
  border-radius: 6px;
  margin-bottom: 12px;
}
.product-card h3 { margin: 10px 0; }
.product-card .price { font-weight: bold; margin-bottom: 12px; }
.product-card form select {
  margin-right: 10px;
  padding: 6px;
}

/* ---- STORE PAGE ---- */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 20px;
}
.store-item {
  background: #fff;
  padding: 18px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.store-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}
.store-img {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}

/* ---- CART LIST ---- */
.cart-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}
.cart-list li {
  background: #fff;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* ---- STORE ---- */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 30px;
  width: 100%;
}

.product-card {
  background: #fff;
  padding: 18px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  transition: transform .2s ease, box-shadow .2s ease;
}

.product-card img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 12px;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(0,0,0,0.2);
}

.product-card h3 {
  margin: 10px 0 6px;
  font-size: 1.2rem;
}

.product-card p {
  font-size: 1rem;
  margin-bottom: 12px;
  font-weight: bold;
}

/* ---- STORE ---- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.product-card {
  background: #fff;
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
  text-align: center;
}
.product-card img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 10px;
}
.product-card .price {
  font-weight: bold;
  margin: 8px 0;
}

/* ---- CART ---- */
.cart-list {
  list-style: none;
  padding: 0;
}
.cart-item {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  background: #fff;
  margin: 10px 0;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* ---- CHECKOUT ---- */
.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}
.checkout-form input {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

/* ==== POST DETAIL PAGE ==== */
.post-detail {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  animation: fadeInUp 0.8s ease both;
}

.post-detail h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
  color: #222;
}

.post-detail .meta {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 20px;
}

.post-detail .post-image {
  margin: 20px 0;
  text-align: center;
}

.post-detail .post-image img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.post-detail .post-body {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #444;
  margin-bottom: 20px;
}

.post-detail .tags {
  font-size: 0.9rem;
  color: #555;
  background: #f5f5f5;
  padding: 8px 12px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 20px;
}

.post-detail .btn {
  display: inline-block;
  background: #000;
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.post-detail .btn:hover {
  background: #333;
  transform: translateY(-3px);
}

/* ---- POST DETAIL PAGE ---- */
.post-detail {
  max-width: 850px;
  margin: 40px auto;
  padding: 28px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
  animation: fadeInUp 0.9s ease both;
}

.post-detail h1 {
  font-size: 2.4rem;
  margin-bottom: 12px;
  color: #111;
  text-align: center;
}

.post-detail .meta {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 20px;
  text-align: center;
}

.post-detail .post-image {
  margin: 20px 0;
  text-align: center;
}

.post-detail .post-image img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.post-detail .post-body {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #333;
  margin-bottom: 24px;
}

.post-detail .tags {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 20px;
  text-align: left;
}

.post-detail .btn {
  display: inline-block;
  margin-top: 12px;
}

/* ---- PAGINATION ---- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 30px 0;
}

.pagination a {
  display: inline-block;
  padding: 8px 16px;
  background: #000;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: background 0.25s ease, transform 0.2s ease;
}

.pagination a:hover {
  background: #333;
  transform: translateY(-2px);
}

.pagination a.active {
  background: #ff4444; /* highlight active page */
}

.pagination a.disabled {
  background: #ccc;
  color: #666;
  pointer-events: none;
  box-shadow: none;
}

/* ---- FOOTER ---- */
footer {
  background:#727070;
  color: white;
  text-align: center;
  padding: 15px;
  margin-top: auto; /* keeps footer at bottom */
}
