/* public/styles.css — Covenant Systems theme (serif, parchment, dark accents) */

:root {
  --bg: #f4f0e6; /* parchment */
  --text: #1c1c2b;  /* covenant blue */
  --muted: #56565f; /* grey */
  --accent: #7a2c2c; /* covenant red */
  --gold: #c8a951; /* covenant gold */ 
  --container: 1100px;
  --radius: 8px;
  font-family: "Merriweather", serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

/* NEW: slightly smoother scroll + motion respect */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.25rem;
}

/* ---------------- HEADER ---------------- */
.site-header {
  background: #222831; /* keep your original dark background */
  color: #f4efe3;
  padding: 1rem 0; /* a bit more breathing room for large logo */
  border-bottom: 4px solid var(--accent);
  position: relative;
  /* NEW: keep it visible while scrolling on mobile without being sticky forever */
  z-index: 20;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  /* NEW: allow wrapping on small screens so nav can drop under the logo */
  flex-wrap: wrap;
}

/* -------- LOGO -------- */
.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: #fff;
}

.logo-img {
  height: 110px;           /* much larger logo */
  width: auto;
  object-fit: contain;
  margin-left: 0.5rem;
  /*filter: drop-shadow(0 0 2px rgba(255,255,255,0.25));  soft highlight */
  transition: transform 0.5s ease-in-out;
}

.logo-img:hover {
  transform: scale(1.5);
}

/* -------- NAVIGATION -------- */
.nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* UPDATED: bigger tap targets */
.nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

/* === Unified nav buttons (like “Learn More”) === */
.nav a {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  color: var(--gold);                         /* gold text by default */
  border: 2px solid var(--gold);              /* gold border */
  background: transparent;                    /* transparent base */
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius);
  transition: all 0.25s ease-in-out;
}

.nav a:hover,
.nav a.active {
  background: var(--gold);                    /* gold fill on hover */
  color: #222831;                             /* dark text for contrast */
  box-shadow: 0 0 12px rgba(200,169,81,0.3);  /* soft glow */
  transform: translateY(-2px);                /* subtle lift */
}


/* -------- HEADER ACTIONS -------- */
.header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.btn {
  font-weight: 700;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 0;
}

.btn-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: #d9d9df;
}

/* ---------------- HERO ---------------- */
.hero {
  padding: 4rem 1rem;
  background-image: url('https://www.transparenttextures.com/patterns/linen.png');
  background-color: #2b2e33;
  color: #f4efe3;
  text-align: center;
}

.hero h1 {
  /* UPDATED: responsive scale */
  font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.4rem);
  margin: 0 0 0.75rem;
}

.lead {
  max-width: 800px;
  margin: 0 auto 1.25rem;
  color: #e8dfc8;
}

/* === Covenant Systems Cards: white base → burgundy hover === */
.overview .grid,
.services .service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.overview .grid > *,
.services .service-grid > * {
  background: #ffffff;              /* clean white base */
  color: var(--text);               /* dark text for contrast */
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: 0 6px 18px rgba(24,24,24,.06);
  border: 1px solid #edeae2;
  transition: all .25s ease;        /* smooth background & color change */
}

.overview .grid > *:hover,
.services .service-grid > *:hover {
  background: var(--accent);        /* covenant burgundy on hover */
  color: #f4efe3;                   /* switch to light parchment text */
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(24,24,24,.10);
  border-color: rgba(200,169,81,.35);
}

/* Headings: dark when white, gold when hovered */
.overview h3,
.services h3 {
  color: var(--accent);
  transition: color .25s ease;
}

.overview .grid > *:hover h3,
.services .service-grid > *:hover h3 {
  color: var(--gold);
}

/* Ensure any links/buttons stay visible inside cards */
.overview a,
.services a {
  color: var(--accent);
  transition: color .25s ease;
}

.overview .grid > *:hover a,
.services .service-grid > *:hover a {
  color: #f4efe3;
}
/* ---------------- SERVICES ---------------- */
.services .service-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 1rem;
}

/* Remove underlines and keep cards clickable */
.service-card {
  text-decoration: none;
  color: inherit;               /* keep text same color as normal text */
  display: block;
  transition: transform .15s ease, box-shadow .15s ease;
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  text-decoration: none;        /* ensure no underline on hover */
}

/* ---------------- About - Blog ---------------- */
.about-list .post-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 6px 18px rgba(24,24,24,.06);
  margin-bottom: 1rem;
  border: 1px solid #edeae2;         /* NEW */
  transition: box-shadow .2s ease, transform .08s ease, border-color .2s ease; /* NEW */
}
.about-list .post-card:hover {         /* NEW */
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(24,24,24,.10);
  border-color: rgba(200,169,81,.35);
}

.post-card h3 { margin: 0 0 0.25rem; }
.post-card .meta { color: var(--muted); font-size: 0.9rem; }

.read-more {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--accent);
}

/* ---------------- SINGLE POST ---------------- */
.post .post-body {
  margin-top: 1rem;
  background: #fff;
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(24,24,24,.06);
  color: #1b1b1b;
  border: 1px solid #edeae2; /* NEW */
}

.post .meta {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------------- ADMIN ---------------- */
.admin-login, .admin-dash, .admin-edit {
  padding: 2rem 0;
}

.admin-form label, .post-form label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.admin-form input,
.post-form input,
.post-form textarea,
.admin-form textarea {
  width: 100%;
  padding: 0.6rem;
  border-radius: var(--radius);
  border: 1px solid #ddd;
  font-family: inherit;
}

.form-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.error {
  color: #8b1c1c;
  background: #fff1f1;
  padding: 0.5rem;
  border-radius: 6px;
}

/* Posts table */
.posts-table td,
.posts-table th {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid #eee;
  text-align: left;
}

/* ---------------- FOOTER ---------------- */
.site-footer {
  background: #222831; /* keep existing dark footer */
  color: #ddd;
  padding: 1.5rem 0;
  margin-top: 2rem;
  font-size: 0.95rem;
  border-top: 4px solid var(--accent); /* NEW subtle tie-in with header */
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.footer-left {
  line-height: 1.4;
}

.footer-left .contact a {
  color: var(--gold);
  text-decoration: none;
}

.footer-left .contact a:hover {
  color: var(--accent);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--gold);
}

@media (max-width: 700px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------------- RESPONSIVE ---------------- */
/* UPDATED: buttons kept, just consolidated duplicate .btn definition below */
.btn {
  font-weight: 700;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  display: inline-block;
  transition: all 0.2s ease-in-out;
}

/* Solid primary (burgundy) */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  box-shadow: 0 0 0 rgba(0,0,0,0);
}

/* Outline (beige border) */
.btn-outline {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
}

/* Hover effects (kept) */
.btn:hover,
.btn:focus {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 0 10px rgba(255,255,255,0.15);
}

.btn-primary:hover,
.btn-primary:focus {
  background: #8b2f2f; /* darker burgundy tone */
  box-shadow: 0 0 12px rgba(139, 47, 47, 0.4);
}

.btn-outline:hover,
.btn-outline:focus {
  background: var(--gold);
  color: #222831;
  box-shadow: 0 0 12px rgba(200,169,81,0.4);
}

/* === PRICE BUTTON FIXED COLORS === */
.price-btn {
  background: var(--accent);        /* Covenant red background */
  color: #fff !important;           /* force white text */
  border: none;
  font-weight: 700;
  transition: background-color .25s ease, color .25s ease, transform .1s ease, box-shadow .2s ease;
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
}

/* On hover or focus: flip to gold */
.price-btn:hover,
.price-btn:focus,
.services .service-grid > *:hover .price-btn {
  background: var(--gold);
  color: #222831 !important;        /* dark text for contrast */
  box-shadow: 0 0 12px rgba(200,169,81,0.35);
}

/* Active state */
.price-btn:active {
  background: #b99329;              /* darker gold */
  transform: scale(0.97);
}



/* ---------------- SOCIAL BUTTONS ---------------- */
.footer-social {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.footer-social a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  background: #333841;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.footer-social a img {
  height: 18px;
  width: 18px;
}

.footer-social a:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 10px rgba(255,255,255,0.15);
}

/* distinct colors */
.footer-social .fb:hover {
  background: #1877f2;
}

.footer-social .ig:hover {
  background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af, #515bd4);
}

/* Covenant Gold admin link */
.admin-link {
  color: var(--gold)
}
.admin-link:hover {
  color: var(--accent); 
}


/* --- TICKET form modern layout --- */
.page-header { margin-bottom: 1rem; }
.page-subtitle { margin-top: .25rem; opacity: .9; }

.form-card {
  background: #fff;
  border: 1px solid #e6e0d8;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
  overflow: visible;                /* avoid any child clipping */
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;       /* mobile-first */
  gap: 1rem;
}

/* full-width rows should always span both columns (even on mobile) */
.form-grid .span-2 { grid-column: 1 / -1; }

.form-field {
  display: flex;                    /* clean label/input stacking */
  flex-direction: column;
  gap: .4rem;
}

.form-field label span { font-weight: 600; }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  box-sizing: border-box;           /* prevents overflow on small screens */
  padding: .7rem .8rem;
  border: 1px solid #cfc8bf;
  border-radius: 10px;
  font: inherit;
  background: #fff;
}

.form-field textarea { resize: vertical; min-height: 8rem; }

.form-actions { display: flex; gap: .75rem; align-items: center; }

/* Tablet+ gets two columns automatically */
@media (min-width: 720px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
}

/* Alerts (match palette) */
.alert { padding: .75rem 1rem; border-radius: 10px; margin: 0 0 1rem; }
.alert.error { background: #fff2f2; border: 1px solid #f3b7b7; }
.alert.success { background: #eef9f1; border: 1px solid #b7e4c7; }

/* Hide honeypot entirely */
.hp-input {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Consent line: left-aligned, no clipping */
.consent {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;  /* <- keep text on the left */
  gap: .6rem;
  margin: 0;                    /* kill inherited label margins */
  width: auto;                  /* <- don't stretch across the row */
  line-height: 1.4;
  flex-wrap: wrap;              /* mobile: allow wrapping */
  text-align: left;
}

.consent input[type="checkbox"] { margin: 0; }

/* Full-width row in the grid for the consent block container */
.form-grid .span-2 { grid-column: 1 / -1; }

/* Desktop: single line */
@media (min-width: 720px) {
  .consent { flex-wrap: nowrap; }
  .consent span { white-space: nowrap; }
}

/* Fix consent alignment overriding any global label styles */
.form-grid .span-2 { grid-column: 1 / -1; }

.form-field.span-2 {               /* container row */
  display: flex;
  justify-content: flex-start;
}

.form-field.span-2 > label.consent {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin: 0;
  padding: 0;
  text-align: left !important;     /* override global label align */
  width: auto !important;          /* don't stretch across row */
  max-width: 100%;
  align-self: flex-start;          /* pin to left edge */
}

.form-field.span-2 > label.consent input[type="checkbox"] { margin: 0; }

/* Mobile can wrap; desktop stays on one line */
@media (min-width: 720px) {
  .form-field.span-2 > label.consent { white-space: nowrap; }
}


/* Covenant Systems toast */
.cs-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  background: #ffffff;
  border: 1px solid #e6e0d8;    /* matches form card */
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  z-index: 1000;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
}

.cs-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.cs-toast__icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700;
  border: 1px solid #b7e4c7;
  background: #eef9f1;            /* your success alert palette */
  color: #2d6a4f;
  flex: 0 0 28px;
}

.cs-toast__body {
  display: flex; flex-direction: column;
  font-size: .95rem; line-height: 1.3;
}

.cs-toast__body strong {
  font-weight: 700;
  margin-bottom: 2px;
}

.cs-toast__close {
  margin-left: .5rem;
  border: 0; background: transparent;
  font-size: 1.25rem; line-height: 1;
  cursor: pointer;
  color: #6b6b6b;
}

@media (max-width: 560px) {
  .cs-toast {
    width: calc(100% - 24px);
    left: 12px; right: 12px;
    transform: translateY(16px);
  }
  .cs-toast.show {
    transform: translateY(0);
  }
}

/* Admin ticket table */
.admin-tickets .table-wrap {
  background: #fff;
  border: 1px solid #e6e0d8;
  border-radius: 12px;
  overflow: hidden;                 /* round the table edges */
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

.admin-tickets .data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;              /* consistent column widths */
}

.admin-tickets .data-table thead th {
  position: sticky;
  top: 0;
  background: #faf8f4;              /* subtle beige to match your theme */
  border-bottom: 1px solid #e6e0d8;
  text-align: left;
  font-weight: 700;
  padding: .75rem .9rem;
  z-index: 1;
}

.admin-tickets .data-table td {
  padding: .65rem .9rem;
  border-top: 1px solid #eee8df;    /* row lines */
  vertical-align: middle;
  word-wrap: break-word;
}

.admin-tickets .data-table tbody tr:nth-child(odd) {
  background: #fdfcf9;              /* light zebra */
}

.admin-tickets .data-table tbody tr:hover {
  background: #f7f3ec;              /* subtle hover */
}

.admin-tickets .data-table .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* Status badges */
.admin-tickets .badge {
  display: inline-block;
  padding: .2rem .5rem;
  border-radius: 999px;
  font-size: .82rem;
  line-height: 1;
  border: 1px solid transparent;
  text-transform: capitalize;
}
.admin-tickets .badge.new {
  background: #eef3ff;
  border-color: #cdd9ff;
}
.admin-tickets .badge.in-progress {
  background: #fff7e6;
  border-color: #ffe1a8;
}
.admin-tickets .badge.closed {
  background: #eef9f1;
  border-color: #b7e4c7;
}

/* Small action button */
.admin-tickets .btn-sm {
  padding: .35rem .6rem;
  font-size: .85rem;
}

/* Responsive: collapse columns on narrow screens */
@media (max-width: 860px) {
  .admin-tickets .data-table thead { display: none; }
  .admin-tickets .data-table, 
  .admin-tickets .data-table tbody, 
  .admin-tickets .data-table tr, 
  .admin-tickets .data-table td {
    display: block;
    width: 100%;
  }
  .admin-tickets .data-table tr {
    border-top: 1px solid #e6e0d8;
    padding: .5rem 0;
  }
  .admin-tickets .data-table td {
    border: 0;
    padding: .35rem .9rem;
  }
  .admin-tickets .data-table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 600;
    margin-bottom: .15rem;
    opacity: .8;
  }
}




/* -------- MOBILE LAYOUT FIXES (no JS required) -------- */
/* Make the centered nav drop below logo and wrap neatly on phones */
@media (max-width: 920px) {
  .logo-img { height: 72px; }                     /* UPDATED: scale logo down on phones */
  .nav { position: static; left: auto; transform: none; width: 100%; } /* UPDATED */
  .nav ul { justify-content: center; flex-wrap: wrap; gap: .6rem .6rem; } /* NEW */
  .nav a { padding: .5rem .7rem; }                /* keep good tap targets */
  .header-actions { width: 100%; justify-content: center; } /* NEW */
  .hero { padding: 3rem 1rem; }                   /* NEW */
}

/* ==== STICKY FOOTER LAYOUT ==== */
html, body { height: 100%; }                 /* already present, fine to keep */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Make the middle content take up remaining space */
main { flex: 1 0 auto; display: block; }

/* Fallback: if a page doesn’t use <main>, flex the middle child anyway */
body > :not(.site-header):not(.site-footer) { flex: 1 0 auto; }
/* ================================= */

/* === MOBILE HEADER LAYOUT: center logo above nav === */
@media (max-width: 920px) {
  .nav-wrap {
    flex-direction: column;          /* stack elements vertically */
    align-items: center;             /* center horizontally */
    gap: 0.75rem;
  }

  .brand {
    order: -1;                       /* move logo to the top of the stack */
    justify-content: center;
    width: 100%;
  }

  .nav {
    position: static;                /* stop absolute centering */
    transform: none;
    width: 100%;
  }

  .nav ul {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
  }

  .header-actions {
    justify-content: center;
    width: 100%;
  }

  .logo-img {
    height: 80px;                    /* slightly smaller logo for mobile */
    margin: 0 auto;
  }
}

























