/* ============================================
   WEXFORD ANCESTRY — COMPONENTS
   ============================================ */

/* --------------------------------------------
   Cards
   -------------------------------------------- */
.card {
  border-radius: 0.75rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  background-color: #fff;
}
.card:hover {
  transform: translateY(-2px);
  transition: transform 0.2s ease;
}

/* --------------------------------------------
   Services Section
   -------------------------------------------- */
.services {
  background-color: var(--color-bg);
  background-image: var(--texture-parchment);
  background-repeat: repeat;
  background-size: 600px 600px;
}
.services .service-item {
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.services .service-item:hover {
  transform: translateY(-4px);
  border-color: var(--color-green);
}

/* --------------------------------------------
   Testimonials Carousel
   -------------------------------------------- */
#testimonial-section {
  background-size: 600px 600px;
  padding: 3rem 0;
}

#testimonial-section .card {
  border-top: 3px solid var(--color-gold);
  background-color: #fff;
}

#testimonial-section blockquote {
  color: var(--color-text);
  font-size: 0.95rem;
}

#testimonial-section .blockquote-footer {
  color: var(--color-gold);
  font-style: italic;
  font-size: 0.9rem;
}

/* Carousel icon tint */
#testimonial-section .carousel-control-prev-icon,
#testimonial-section .carousel-control-next-icon {
  filter: invert(20%) sepia(100%) saturate(600%) hue-rotate(270deg);
}

/* --- Testimonials carousel layout fix --- */
#testimonial-section .carousel {
  position: relative;
}

/* inner track sized for up to 3 cards */
#testimonial-section .carousel-inner {
  max-width: 960px;   /* ~3 × 320px cards */
  margin: 0 auto;
}

/* arrow buttons placed just outside the track edges */
#testimonial-section .carousel-control-prev,
#testimonial-section .carousel-control-next {
  width: 5%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

#testimonial-section .carousel-control-prev {
  left: calc(50% - 480px);
}

#testimonial-section .carousel-control-next {
  right: calc(50% - 480px);
}

/* responsive adjustment for smaller screens */
@media (max-width: 992px) {
  #testimonial-section .carousel-inner {
    max-width: 640px;
  }
  #testimonial-section .carousel-control-prev {
    left: calc(50% - 320px);
  }
  #testimonial-section .carousel-control-next {
    right: calc(50% - 320px);
  }
}

/* Optional hover feedback for navigation */
#testimonial-section .carousel-control-prev-icon:hover,
#testimonial-section .carousel-control-next-icon:hover {
  filter: brightness(0.8) sepia(40%) saturate(300%) hue-rotate(270deg);
  transform: scale(1.1);
  transition: all 0.25s ease;
}

/* --------------------------------------------
   Toast Messages
   -------------------------------------------- */
.toast {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translate(-50%, 0);
  z-index: 2000;
  background-color: var(--color-gold);
  color: var(--color-purple);
  font-weight: 600;

  display: inline-block;
  max-width: 90vw;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);

  opacity: 0;
  animation: fadeInOut 4s ease forwards;
}

@keyframes fadeInOut {
  0%,100% { opacity: 0; }
  10%,90% { opacity: 1; }
}

/* --------------------------------------------
   Form Styling (Dashboard / Contact / Footer)
   -------------------------------------------- */
.dashboard form,
.contact form,
footer form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Wrapper around each form row */
form .mb-3,
form p {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 90%;
  margin-bottom: 1rem;
}

/* Label / Field balance */
form label {
  flex: 0 0 32%;
  text-align: right;
  margin-right: 1.2rem;
  color: var(--color-purple);
  font-weight: 600;
  font-size: 0.95rem;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="file"],
form textarea,
form select {
  flex: 1 1 60%;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  background-color: #fdfcf9;
}

/* Button centred below */
form button[type="submit"],
form .btn {
  display: block;
  margin: 1.5rem auto 0 auto;
  padding: 0.6rem 1.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* --------------------------------------------
   Articles
   -------------------------------------------- */
.articles img {
  display: block;
  width: 100%;
  max-width: 800px;
  height: auto;
  margin: 0 auto 1.5rem;
  border-radius: 8px;
  object-fit: cover;
}

/* --------------------------------------------
   Input Groups / Search Bars
   -------------------------------------------- */
.input-group .btn,
.input-group-text .btn,
form.d-flex .btn,
form[role="search"] .btn {
  margin-top: 0 !important;
}

.input-group .btn {
  height: 36px;
  display: flex;
  align-items: center;
}

/* consistent height across input group elements */
.input-group .input-group-text,
.input-group .form-control,
.input-group .btn {
  height: 38px;
  line-height: 1.2;
  font-size: 0.9rem;
}

/* input group layout */
.input-group {
  max-width: 650px;
  margin: 0 auto;
}

.input-group .input-group-text {
  background-color: #f8f9fa;
  font-weight: 600;
  border-right: none;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  padding: 0.4rem 0.75rem;
}

.input-group .form-control {
  flex: 1 1 auto;
  min-width: 250px;
  border-left: 1px solid #ced4da;
  border-right: none;
  border-radius: 0;
  padding: 0.4rem 0.75rem;
}

.input-group .btn {
  border-radius: 0;
  padding: 0.4rem 0.9rem;
}

/* rounded outer edges */
.input-group .input-group-text:first-child {
  border-top-left-radius: 0.375rem;
  border-bottom-left-radius: 0.375rem;
}

.input-group .btn:last-child {
  border-top-right-radius: 0.375rem;
  border-bottom-right-radius: 0.375rem;
}

/* --------------------------------------------
   Modal (Confirm Delete)
   -------------------------------------------- */
#confirmDeleteAll .modal-dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  width: min(420px, 90vw);
  pointer-events: none;
}
#confirmDeleteAll .modal-content {
  pointer-events: auto;
  max-height: 90vh;
  overflow: auto;
}
#confirmDeleteAll .modal-backdrop.show {
  opacity: 0.75;
}

#confirmDeleteAll.show .modal-content {
  animation: modalPop 160ms ease-out;
}
@keyframes modalPop {
  from { transform: scale(.98); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}


  /* Increase toggle switch size */
  .form-check-input[type="checkbox"], 
  .form-check-input[type="radio"], 
  .form-check-input[type="switch"], 
  input[type="checkbox"], 
  input[type="radio"] {
    transform: scale(1.5);
    margin-left: 0.5rem;
  }

  /* Ensure CKEditor or textarea expands properly */
  textarea, .django-ckeditor-widget {
    width: 100% !important;
  }

  /* Match button widths */
  .btn-success, .btn-secondary {
    width: 120px;              /* equal width */
    text-align: center;
  }