/*
 Theme Name:   REFA Child Theme
 Theme URI:    https://refahub.org
 Description:  Child theme for Astra, applying REFA visual identity across all WordPress pages
 Author:       REFA Hub
 Author URI:   https://refahub.org
 Template:     astra
 Version:      1.0.0
 Text Domain:  refa-child
*/

/* ============================================================
   REFA GLOBAL STYLES
   Applied to all WordPress pages (Publications, Updates, Network, etc.)
   ============================================================ */

:root {
  --refa-green: #1a4a2e;
  --refa-green-light: #2d6b45;
  --refa-green-dark: #0f2e1b;
  --refa-gold: #c9a84c;
  --refa-gold-light: #e0cc8a;
  --refa-gold-dark: #a68a38;
  --refa-plum: #6B2D5B;
  --refa-plum-light: #8A4275;
  --refa-plum-dark: #522147;
  --refa-plum-soft: #f3eaf0;
  --refa-black: #1a1a1a;
  --refa-cream: #f8f4ec;
  --refa-white: #ffffff;
  --refa-grey: #6b6b6b;
  --refa-grey-light: #e8e4dc;
}

/* ======== TYPOGRAPHY ======== */
body {
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  color: var(--refa-black);
  background: var(--refa-cream);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.ast-archive-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  color: var(--refa-black);
}

a {
  color: var(--refa-green);
  transition: color 0.3s ease;
}
a:hover {
  color: var(--refa-plum);
}

/* ======== HEADER ======== */
.ast-primary-header,
.ast-header-stacked .site-header {
  background: var(--refa-white);
  border-bottom: 1px solid var(--refa-grey-light);
}

.site-title a,
.ast-site-identity .site-title a {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  color: var(--refa-green) !important;
}

/* Nav links */
.main-header-menu a,
.ast-header-sections-navigation a {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--refa-black);
}
.main-header-menu a:hover {
  color: var(--refa-plum);
}

/* ======== DROPDOWN SUBMENU VISIBILITY ========
   Astra's default submenu inherits transparent-header styles on the homepage,
   making dropdown items unreadable. Force white background with dark text. */
.main-header-menu .sub-menu,
.main-header-menu ul.sub-menu,
.ast-desktop .main-header-menu .sub-menu,
#ast-desktop-header .sub-menu,
.main-navigation ul ul,
nav .sub-menu {
  background-color: var(--refa-white) !important;
  border: 1px solid #e5e5e5 !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08) !important;
  min-width: 220px !important;
}
.main-header-menu .sub-menu li a,
.main-header-menu .sub-menu a,
.ast-desktop .main-header-menu .sub-menu a,
#ast-desktop-header .sub-menu a,
.main-navigation ul ul li a,
nav .sub-menu a,
nav .sub-menu a:link,
nav .sub-menu a:visited {
  color: var(--refa-black) !important;
  background-color: var(--refa-white) !important;
  opacity: 1 !important;
  text-shadow: none !important;
  font-weight: 500 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 0.9rem !important;
  padding: 0.75rem 1rem !important;
}
.main-header-menu .sub-menu li a:hover,
.main-header-menu .sub-menu li.current-menu-item > a,
.ast-desktop .main-header-menu .sub-menu a:hover,
#ast-desktop-header .sub-menu a:hover,
nav .sub-menu a:hover,
nav .sub-menu a:focus {
  color: var(--refa-plum) !important;
  background-color: var(--refa-cream) !important;
}

/* ======== PAGE CONTENT AREA ======== */
.ast-container {
  max-width: 1140px;
}

.entry-content {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--refa-black);
}

.entry-content h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.2rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.entry-content h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

/* ======== BLOG / ARCHIVE PAGES (Publications, Updates) ======== */
.ast-archive-description {
  background: var(--refa-cream);
  padding: 3rem 0 2rem;
  text-align: left;
}

.ast-archive-title {
  font-size: 2.2rem;
  color: var(--refa-black);
}

/* Individual post cards in archive */
.ast-article-post {
  background: var(--refa-white);
  border-top: 3px solid var(--refa-gold);
  padding: 1.8rem;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.ast-article-post:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0,0,0,0.05);
}

.ast-article-post .entry-title {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}
.ast-article-post .entry-title a {
  color: var(--refa-black);
}
.ast-article-post .entry-title a:hover {
  color: var(--refa-plum);
}

.ast-article-post .entry-meta {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--refa-plum);
}

/* ======== SINGLE POST ======== */
.single .entry-title {
  font-size: 2.4rem;
  max-width: 800px;
}

.single .entry-meta {
  font-size: 0.82rem;
  color: var(--refa-plum);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* ======== BUTTONS ======== */
.wp-block-button__link,
button[type="submit"],
input[type="submit"] {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 2px;
  padding: 0.75rem 1.8rem;
  transition: all 0.3s ease;
}

.wp-block-button__link {
  background: var(--refa-plum);
  color: var(--refa-white);
}
.wp-block-button__link:hover {
  background: var(--refa-plum-light);
  color: var(--refa-white);
}

/* ======== FOOTER ======== */
.ast-footer,
.site-footer,
.ast-small-footer {
  background: var(--refa-black);
  color: rgba(255,255,255,0.7);
}

.ast-footer a,
.site-footer a {
  color: rgba(255,255,255,0.6);
}
.ast-footer a:hover,
.site-footer a:hover {
  color: var(--refa-gold);
}

/* ======== SECTION LABEL (reusable via custom CSS class in block editor) ======== */
.refa-section-label {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--refa-plum);
  margin-bottom: 0.6rem;
  display: block;
}

.refa-divider {
  width: 60px;
  height: 3px;
  background: var(--refa-gold);
  margin: 1.2rem 0;
  border: none;
}

/* ======== SIDEBAR (if used) ======== */
.widget-title {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--refa-plum);
}

/* ======== PAGINATION ======== */
.ast-pagination a {
  color: var(--refa-green);
  font-weight: 600;
}
.ast-pagination a:hover {
  color: var(--refa-plum);
}

/* ======== FORMS (WPForms if used) ======== */
.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container textarea,
.wpforms-container select {
  font-family: 'Source Sans 3', sans-serif;
  border: 1px solid var(--refa-grey-light);
  border-radius: 2px;
  padding: 0.7rem 0.9rem;
}
.wpforms-container input:focus,
.wpforms-container textarea:focus {
  border-color: var(--refa-plum);
  outline: none;
}
