/*
Theme Name: AVA Virtual Support
Theme URI: https://example.com/
Author: AVA
Description: WordPress theme wrapper for the AVA Virtual Support React website.
Version: 1.0.2
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: ava-virtual-support
*/

html,
body,
#root {
  min-height: 100%;
  margin: 0;
}

html,
body {
  overflow-x: hidden;
}

body {
  background: #f8fafc;
  color: #122131;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

a {
  color: inherit;
}

#root .ava-react-header a,
#root .ava-react-header a:link,
#root .ava-react-header a:visited {
  color: #ffffff !important;
}

#root .ava-react-header a:hover,
#root .ava-react-header a:focus {
  color: #e5e7eb !important;
}

.ava-seo-fallback {
  max-width: 1120px;
  margin: 0 auto;
  padding: 112px 24px 48px;
  color: #122131;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
}

.ava-seo-fallback h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1;
}

.ava-seo-fallback h2 {
  margin: 28px 0 8px;
  font-size: 24px;
}

.ava-seo-fallback p {
  max-width: 860px;
  margin: 0 0 16px;
  font-size: 18px;
}

.ava-seo-fallback ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 18px;
  max-width: 900px;
  margin: 12px 0 0;
  padding-left: 20px;
}

.ava-site-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 50;
  border-bottom: 1px solid #1f2937;
  background: #111827;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.18);
}

body.admin-bar .ava-site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .ava-site-header {
    top: 46px;
  }
}

.ava-site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100%, 1280px);
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 16px;
}

.ava-site-header__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  min-width: 0;
}

.ava-site-header__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 160ms ease;
}

.ava-site-header__brand:hover {
  opacity: 0.9;
}

.ava-site-header__logo {
  display: block;
  width: auto;
  height: 56px;
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.35));
  object-fit: contain;
}

.ava-site-header__nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 32px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
}

.ava-site-header__nav a {
  color: #ffffff !important;
  text-decoration: none;
  transition: color 160ms ease;
}

.ava-site-header__nav a:hover {
  color: #e5e7eb !important;
}

.ava-site-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 6px;
  background: #2563eb;
  color: #ffffff !important;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 160ms ease;
}

.ava-site-header__cta:hover {
  background: #1d4ed8;
  color: #ffffff !important;
}

.ava-site-header__toggle {
  display: none;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0;
}

.ava-site-header__toggle-line {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.ava-blog-page,
.ava-single-post {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 24px 72px;
}

.ava-blog-hero {
  overflow: hidden;
  max-width: none;
  margin-bottom: 36px;
  border: 1px solid #e7edf5;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(239, 246, 255, 0.88));
  box-shadow: 0 24px 70px rgba(18, 33, 49, 0.12);
  padding: clamp(36px, 7vw, 72px);
}

.ava-article__header {
  max-width: 820px;
  margin-bottom: 36px;
}

.ava-eyebrow {
  margin: 0 0 10px;
  color: #b98d2d;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ava-blog-hero h1,
.ava-article__header h1 {
  margin: 0 0 16px;
  color: #122131;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
}

.ava-blog-hero h1,
.ava-blog-hero p {
  max-width: 690px;
}

.ava-blog-hero p,
.ava-archive-description,
.ava-article__meta {
  color: #4b5563;
  font-size: 18px;
  line-height: 1.7;
}

.ava-post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.ava-post-card {
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(18, 33, 49, 0.08);
}

.ava-post-card__image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f3f4f6;
}

.ava-post-card__image img,
.ava-article__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ava-post-card__body {
  padding: 24px;
}

.ava-post-card time,
.ava-article__meta {
  color: #6b7280;
  font-size: 14px;
}

.ava-post-card h2 {
  margin: 10px 0 10px;
  color: #122131;
  font-size: 24px;
  line-height: 1.2;
}

.ava-post-card h2 a,
.ava-text-link,
.ava-back-link,
.ava-post-navigation a,
.ava-article__tags a {
  text-decoration: none;
}

.ava-post-card h2 a:hover,
.ava-text-link:hover,
.ava-back-link:hover,
.ava-post-navigation a:hover,
.ava-article__tags a:hover {
  color: #2563eb;
}

.ava-post-card p {
  margin: 0 0 18px;
  color: #4b5563;
  font-size: 16px;
  line-height: 1.65;
}

.ava-text-link,
.ava-back-link {
  color: #b98d2d;
  font-weight: 800;
}

.ava-pagination {
  margin-top: 36px;
}

.ava-pagination .nav-links,
.ava-pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.ava-pagination a,
.ava-pagination span {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 14px;
  text-decoration: none;
}

.ava-pagination .current {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.ava-empty-state {
  max-width: 760px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(18, 33, 49, 0.08);
  padding: 36px;
}

.ava-empty-state h2 {
  margin: 0 0 10px;
  color: #122131;
  font-size: 30px;
  line-height: 1.2;
}

.ava-empty-state p {
  margin: 0;
  color: #4b5563;
}

.ava-article {
  max-width: 860px;
}

.ava-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ava-article__image {
  overflow: hidden;
  max-height: 460px;
  margin: 0 0 34px;
  border-radius: 8px;
  background: #f3f4f6;
}

.ava-article__content {
  color: #24364a;
  font-size: 18px;
  line-height: 1.8;
}

.ava-article__content h2,
.ava-article__content h3 {
  color: #122131;
  line-height: 1.2;
}

.ava-article__content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.ava-article__tags {
  margin-top: 32px;
  color: #4b5563;
}

.ava-post-navigation {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  max-width: 860px;
  margin-top: 40px;
}

.ava-post-navigation span {
  display: block;
}

.ava-post-navigation a {
  display: block;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 18px;
  color: #122131;
  font-weight: 700;
}

.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.search-form label {
  flex: 1 1 260px;
}

.search-field {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 12px 14px;
  font: inherit;
}

.search-submit {
  border: 0;
  border-radius: 8px;
  background: #2563eb;
  color: #ffffff;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ava-entry-popup {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 33, 49, 0);
  opacity: 0;
  padding: 24px;
  transition: background 650ms ease, opacity 650ms ease;
  pointer-events: none;
}

.ava-entry-popup.is-visible {
  background: rgba(18, 33, 49, 0.46);
  opacity: 1;
  pointer-events: auto;
}

.ava-entry-popup__content {
  position: relative;
  overflow: hidden;
  width: min(430px, 100%);
  border: 1px solid #dbe4f0;
  border-left: 5px solid #b98d2d;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(18, 33, 49, 0.22);
  padding: 22px 22px 20px;
  opacity: 0;
  transform: translateY(28px) scale(0.94);
  transition: opacity 650ms cubic-bezier(0.22, 1, 0.36, 1), transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ava-entry-popup.is-visible .ava-entry-popup__content {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.ava-entry-popup__delay-badge {
  position: absolute;
  top: 14px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #b98d2d;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(185, 141, 45, 0.28);
}

.ava-entry-popup__close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #122131;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.ava-entry-popup__close:hover,
.ava-entry-popup__close:focus {
  background: #e2e8f0;
}

.ava-entry-popup__eyebrow {
  margin: 0 42px 8px 44px;
  color: #b98d2d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ava-entry-popup__title {
  margin: 0 42px 8px 0;
  color: #122131;
  font-size: 24px;
  line-height: 1.18;
}

.ava-entry-popup__text {
  margin: 0 0 16px;
  color: #4b5563;
  font-size: 15px;
  line-height: 1.55;
}

.ava-entry-popup__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  background: #2563eb;
  color: #ffffff !important;
  padding: 10px 16px;
  font-weight: 800;
  text-decoration: none;
}

.ava-entry-popup__cta:hover,
.ava-entry-popup__cta:focus {
  background: #1d4ed8;
}

@media (max-width: 767px) {
  .ava-site-header__inner {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .ava-site-header__topline {
    width: 100%;
  }

  .ava-site-header__toggle {
    display: inline-flex;
  }

  .ava-site-header__nav {
    display: none;
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
    gap: 16px;
    border-top: 1px solid #1f2937;
    padding: 16px 0 4px;
  }

  .ava-site-header.is-open .ava-site-header__nav {
    display: flex;
  }

  .ava-site-header__cta {
    width: 100%;
  }

  .ava-blog-page,
  .ava-single-post {
    padding-top: 20px;
  }

  .ava-blog-hero {
    background: linear-gradient(135deg, #ffffff, #eff6ff);
    padding: 32px 24px;
  }

  .ava-blog-hero h1,
  .ava-article__header h1 {
    font-size: 32px;
    overflow-wrap: break-word;
  }

  .ava-blog-hero p,
  .ava-archive-description,
  .ava-article__meta {
    font-size: 17px;
  }

  .ava-entry-popup {
    padding: 16px;
  }

  .ava-entry-popup__content {
    padding: 20px 18px 18px;
  }

  .ava-entry-popup__title {
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ava-entry-popup,
  .ava-entry-popup__content {
    transition: none;
  }
}
