/* =====================================================
   ARCHIVE / BLOG INDEX PAGE STYLES
   Used by: home.php, archive.php
   All rules scoped to .archive-* prefix
===================================================== */

/* ── Hero Section ───────────────────────────────────── */
.archive-hero {
  position: relative;
  min-height: 90vh;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  padding-top: 110px; /* clear fixed navbar */
  overflow: hidden;
  display: flex;
  align-items: center;
}

/*
 * No full-width overlay — the gold gradient lives only inside
 * .archive-hero-panel (the left rounded gold box), matching the Figma.
 */
.archive-hero-overlay {
  display: none;
}

.archive-hero .container-xl {
  position: relative;
  z-index: 2;
}

.archive-hero-inner {
  width: 100%;
  padding: 48px 0;
}

/*
 * Gold rounded panel — Figma: border-radius 2rem, width ~35rem,
 * diagonal gold gradient (167deg), sits on the left side of the hero.
 * The photo shows through on the right; this panel has no inset: 0.
 */
.archive-hero-panel {
  width: clamp(280px, 42%, 560px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: linear-gradient(
    167deg,
    rgba(219, 192, 135, 1)    0%,
    rgba(219, 192, 135, 0.55) 57%,
    rgba(219, 192, 135, 0)    100%
  );
  border-radius: 2rem;
  padding: 36px 32px 40px;
}

/* Category / page badge pill */
.archive-hero-badge {
  display: inline-flex;
  align-items: center;
  background: var(--primary);
  color: var(--white);
  border-radius: 10px;
  padding: 10px;
  font-family: 'Marko One', cursive;
  font-size: clamp(13px, 1.4vw, 16px);
  font-weight: 400;
  width: fit-content;
}

/* White semi-opaque text card (frosted glass) — Figma: rgba(255,255,255,0.8), blur(10px) */
.archive-hero-glass {
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 22px 26px;
}

.archive-hero-text {
  font-family: 'Noto Sans Sinhala', sans-serif;
  font-size: clamp(10px, 1.3vw, 14px);
  color: #777777;
  margin: 0;
}

.archive-hero-text strong {
  font-family: 'Noto Sans Sinhala', sans-serif;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
  line-height: 0;
  color: #777777;
}

/* ── Filter Bar ─────────────────────────────────────── */
.archive-filter-bar {
  background: var(--white);
  padding: 28px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.archive-filter-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Search input — inherits .search-input-wrap from single-styles.css */
.archive-search-wrap {
  flex: 0 1 320px;
  min-width: 200px;
}

/* Category/tag dropdown wrapper */
.archive-select-wrap {
  flex-shrink: 0;
  min-width: 180px;
}

.archive-select-inner {
  position: relative;
  display: flex;
  align-items: center;
}

.archive-select-inner select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  padding: 11px 48px 11px 14px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  font-family: 'Marko One', cursive;
  font-size: 13px;
  color: #8E6B12;
  background: #f9edd1;
  cursor: pointer;
  transition: var(--transition);
}

.archive-select-inner select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 77, 179, 0.1);
}

/* Dropdown arrow — gold bg box on right side, matching search button style */
.archive-select-arrow {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 38px;
  background: #DBC087;
  border-radius: 0 8px 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: #8E6B12;
  font-size: 11px;
}

/* Clear filter button */
.btn-archive-clear {
  background: linear-gradient(90deg, #8E6B12 -49.73%, #EED28B 48.42%, #8E6B12 150.31%);
  color: var(--gold-dark);
  border: 2px solid var(--gold);
  border-radius: 10px;
  font-family: 'Marko One', cursive;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 22px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-archive-clear:hover {
  background: var(--gold-grad);
  color: var(--white);
  border-color: var(--gold-dark);
}

/* ── Posts Grid Section ─────────────────────────────── */
.archive-posts-section {
  padding: 60px 0 80px;
  position: relative;
}

/* Loading overlay */
.archive-loading {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  border-radius: 4px;
}

.archive-loading.is-loading {
  opacity: 1;
  pointer-events: auto;
}

.archive-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(15, 77, 179, 0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: archiveSpin 0.75s linear infinite;
}

@keyframes archiveSpin {
  to { transform: rotate(360deg); }
}

/* No posts message */
.archive-no-posts {
  text-align: center;
  padding: 60px 20px;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  color: var(--text-mid);
  background: rgba(15, 77, 179, 0.04);
  border-radius: 12px;
  border: 1px dashed rgba(15, 77, 179, 0.15);
}

/* Pagination */
.archive-pagination {
  margin-top: 48px;
}

.archive-pagination .nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.archive-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--text-dark);
  background: var(--white);
}

.archive-pagination .page-numbers.current {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.archive-pagination .page-numbers:hover:not(.current) {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.archive-pagination .page-numbers.dots {
  border: none;
  background: transparent;
}

/* ── Contact Section ────────────────────────────────── */
.archive-contact-section {
  padding: 0 0 80px;
}

/* Yellow box — matches Figma comment form background */
.archive-contact-box {
  background: #f9edd1;
  border: 1px solid rgba(142, 107, 18, 0.25);
  border-radius: 16px;
  padding: 48px 40px;
}

/* Decorative divider SVG strip between desc and contact details */
.archive-contact-divider {
  margin-bottom: 24px;
  overflow: hidden;
}

.archive-contact-divider svg {
  max-width: 100%;
  height: auto;
  display: block;
}

.archive-contact-pill {
  display: inline-block;
  background: #8E6B12;
  color: #DBC087;
  font-family: 'Marko One', cursive;
  font-size: 13px;
  font-weight: 400;
  border-radius: var(--radius-pill);
  padding: 8px 22px;
  margin-bottom: 14px;
}

.archive-contact-title {
  font-family: 'Marko One', cursive;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--gold-dark);
  font-weight: 700;
  margin-bottom: 10px;
}

.archive-contact-desc {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: var(--gold-dark);
  line-height: 1.7;
  margin-bottom: 28px;
}

/* CF7 form field overrides */
.archive-cf7-wrap .wpcf7-form,
.archive-cf7-wrap .wpcf7 {
  width: 100%;
}

.archive-cf7-wrap input[type="text"],
.archive-cf7-wrap input[type="email"],
.archive-cf7-wrap input[type="tel"],
.archive-cf7-wrap input[type="url"],
.archive-cf7-wrap input[type="number"],
.archive-cf7-wrap textarea,
.archive-fallback-form .archive-form-field {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(142, 107, 18, 0.3);
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: var(--text-dark);
  background: #c5b692;
  transition: var(--transition);
  margin-bottom: 14px;
  display: block;
}

.archive-cf7-wrap input[type="text"]::placeholder,
.archive-cf7-wrap input[type="email"]::placeholder,
.archive-cf7-wrap input[type="tel"]::placeholder,
.archive-cf7-wrap input[type="url"]::placeholder,
.archive-cf7-wrap input[type="number"]::placeholder,
.archive-cf7-wrap textarea::placeholder {
  font-family: 'Marko One', cursive;
  color: #F9EDD1;
}

.archive-cf7-wrap input[type="text"]:focus,
.archive-cf7-wrap input[type="email"]:focus,
.archive-cf7-wrap input[type="tel"]:focus,
.archive-cf7-wrap input[type="url"]:focus,
.archive-cf7-wrap input[type="number"]:focus,
.archive-cf7-wrap textarea:focus,
.archive-fallback-form .archive-form-field:focus {
  outline: none;
  border-color: var(--primary);
  background: #d4c9a8;
  box-shadow: 0 0 0 3px rgba(15, 77, 179, 0.1);
}

.archive-cf7-wrap textarea,
.archive-fallback-form textarea.archive-form-field {
  min-height: 130px;
  resize: vertical;
}

/* CF7 form field labels */
.archive-cf7-wrap .wpcf7-form p {
  font-family: 'Marko One', cursive;
  color: #111111;
  font-size: 14px;
  margin-bottom: 4px;
}

/* CF7 submit button */
.archive-cf7-wrap input[type="submit"],
.archive-cf7-wrap .wpcf7-submit {
  background: linear-gradient(272deg, #8E6B12 -32.47%, #EED28B 50.26%, #8E6B12 120.4%);
  color: #6C4E00;
  border: 2px solid var(--gold);
  border-radius: var(--radius-pill);
  font-family: 'Marko One', cursive;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 48px 12px 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236C4E00' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 16px 16px;
  cursor: pointer;
  transition: var(--transition);
  width: auto;
  margin-bottom: 0;
}

/* Submit row: button + consent text inline */
.archive-cf7-wrap .wpcf7-submit-wrap,
.archive-cf7-wrap p:has(input[type="submit"]) {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.archive-cf7-wrap .wpcf7-submit-wrap::after,
.archive-cf7-wrap p:has(input[type="submit"])::after {
  content: '*Submitting your information, you consent to the terms of this Privacy Notice.';
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  color: #8E6B12;
  line-height: 1.5;
  flex: 1;
  min-width: 160px;
}

.archive-cf7-wrap input[type="submit"]:hover,
.archive-cf7-wrap .wpcf7-submit:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

/* CF7 validation messages */
.archive-cf7-wrap .wpcf7-not-valid-tip {
  font-size: 12px;
  color: #dc3545;
  margin-top: -10px;
  margin-bottom: 8px;
  display: block;
}

.archive-cf7-wrap .wpcf7-response-output {
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  font-family: 'Poppins', sans-serif;
  margin-top: 16px;
  border: none;
}

.archive-cf7-wrap .wpcf7-mail-sent-ok {
  background: rgba(25, 135, 84, 0.1);
  color: #198754;
}

.archive-cf7-wrap .wpcf7-mail-sent-ng,
.archive-cf7-wrap .wpcf7-spam-blocked {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

/* Fallback submit */
.archive-submit-btn {
  cursor: pointer;
  border: none;
  font-family: 'Marko One', cursive;
  font-size: 15px;
  padding: 12px 32px;
  color: #6C4E00;
}

/* Submit + consent text row (fallback form) */
.archive-submit-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.archive-consent-text {
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  color: #8E6B12;
  line-height: 1.5;
  flex: 1;
  min-width: 160px;
}

/* Contact details (left column) */
.archive-contact-details {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-right: 16px;
}

.archive-contact-detail-item {
  display: flex;
  align-items: center;
  gap: 18px;
}

.archive-contact-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(130deg, #8e6b12 0%, #eed28b 50%, #8e6b12 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(142, 107, 18, 0.25);
}

.archive-contact-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.archive-contact-label {
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-dark);
  margin-bottom: 4px;
}

.archive-contact-value {
  display: block;
  font-family: 'Noto Serif', serif;
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 700;
  color: var(--gold-dark);
  text-decoration: none;
  transition: var(--transition);
}

.archive-contact-value:hover {
  color: var(--gold-dark);
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1199.98px) {
  .archive-hero {
    min-height: 460px;
  }
  .archive-hero-panel {
    width: clamp(280px, 52%, 520px);
  }
}

@media (max-width: 991.98px) {
  .archive-hero {
    min-height: 400px;
    padding-top: 100px;
  }
  .archive-hero-panel {
    width: clamp(280px, 65%, 480px);
    padding: 28px 24px 32px;
  }
  .archive-contact-box {
    padding: 36px 28px;
  }
  .archive-contact-details {
    padding-right: 0;
    gap: 20px;
    margin-top: 8px;
  }
}

@media (max-width: 767.98px) {
  .archive-hero {
    min-height: 340px;
    padding-top: 90px;
  }
  .archive-hero-panel {
    width: 80%;
    border-radius: 1.5rem;
    padding: 24px 20px 28px;
  }
  .archive-hero-glass {
    padding: 18px 20px;
  }
  .archive-filter-form {
    gap: 12px;
  }
  .archive-search-wrap {
    max-width: 100%;
    width: 100%;
    flex: 0 0 100%;
  }
  .archive-select-wrap {
    flex: 1;
    min-width: 140px;
  }
  .archive-contact-box {
    padding: 28px 20px;
  }
  .archive-contact-details {
    flex-direction: column;
  }
}

@media (max-width: 575.98px) {
  .archive-hero {
    padding-top: 80px;
    min-height: 300px;
  }
  .archive-hero-panel {
    width: 100%;
    border-radius: 1rem;
    padding: 20px 16px 24px;
    background: linear-gradient(
      167deg,
      rgba(219, 192, 135, 0.95) 0%,
      rgba(219, 192, 135, 0.6)  60%,
      rgba(219, 192, 135, 0.2)  100%
    );
  }
  .archive-hero-badge {
    font-size: 12px;
    padding: 8px 16px;
  }
  .archive-posts-section {
    padding: 40px 0 60px;
  }
  .archive-filter-form {
    flex-direction: column;
    align-items: center;
  }
  .archive-search-wrap {
    flex: 0 1 100%;
    width: 100%;
  }
  .archive-select-wrap {
    width: 100%;
  }
  .btn-archive-clear {
    width: 100%;
    text-align: center;
  }
}
