/*
Theme Name: Easy Cash Loans
Theme URI: https://www.easycashloans.co.za/
Description: Astra child theme for Easy Cash Loans (South Africa). Comparison site layout modelled on EasyPrestamos, in English, with ZAR and NCR context. Rates and lenders are taken from official sources only.
Author: Easy Cash Loans
Template: astra
Version: 1.0.0
Text Domain: easycashloans
*/

/* High-contrast, no light-on-light CTAs. Text #1A1A1A on white meets WCAG AAA. */
:root {
  --ecl-ink: #1a1a1a;
  --ecl-muted: #3d4a45;
  --ecl-bg: #ffffff;
  --ecl-bg-alt: #f3f6f4;
  --ecl-line: #d5ddd8;
  --ecl-brand: #0b3d2e;
  --ecl-brand-2: #0a5c3f;
  --ecl-cta: #0a5c3f;
  --ecl-cta-hover: #083f2c;
  --ecl-cta-text: #ffffff;
  --ecl-footer-bg: #102018;
  --ecl-footer-text: #f4f7f5;
  --ecl-footer-muted: #c5d0ca;
  --ecl-warn: #5c3b00;
  --ecl-warn-bg: #fff6e5;
  --ecl-radius: 10px;
  --ecl-max: 1120px;
}

body.easycashloans,
body {
  color: var(--ecl-ink);
  background: var(--ecl-bg);
  font-family: "Source Sans 3", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
}

.site-content,
.ast-container {
  color: var(--ecl-ink);
}

a {
  color: #085038;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover,
a:focus {
  color: #052e21;
}

/* Header */
.site-header,
.main-header-bar,
.ast-primary-header-bar,
#masthead {
  background: #ffffff;
  border-bottom: 1px solid var(--ecl-line);
  color: var(--ecl-ink);
}
.site-title a,
.site-title a:hover {
  color: var(--ecl-brand);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.main-header-menu a,
.ast-header-menu a,
.main-header-menu .menu-link {
  color: var(--ecl-ink) !important;
  font-weight: 600;
}
.main-header-menu a:hover,
.main-header-menu .current-menu-item > a,
.main-header-menu .current-menu-item > .menu-link {
  color: var(--ecl-brand) !important;
}
.custom-logo {
  height: auto;
  width: auto;
  max-height: 44px;
  max-width: 220px;
}

/* Main landmark spacing */
#content.site-content,
#primary {
  padding-bottom: 2.5rem;
}

/* Buttons — white on #0a5c3f is ~6.7:1 */
.ecl-btn,
a.ecl-btn,
.wp-block-button__link,
button.ecl-btn {
  display: inline-block;
  background: var(--ecl-cta);
  color: var(--ecl-cta-text) !important;
  font-weight: 700;
  padding: 0.85rem 1.35rem;
  border-radius: 8px;
  border: 2px solid var(--ecl-cta);
  text-decoration: none !important;
  line-height: 1.25;
}
.ecl-btn:hover,
a.ecl-btn:hover,
.wp-block-button__link:hover {
  background: var(--ecl-cta-hover);
  border-color: var(--ecl-cta-hover);
  color: #ffffff !important;
}
.ecl-btn--ghost,
a.ecl-btn--ghost {
  background: transparent;
  color: var(--ecl-brand) !important;
  border-color: var(--ecl-brand);
}
.ecl-btn--ghost:hover {
  background: var(--ecl-bg-alt);
  color: var(--ecl-brand) !important;
}

/* Layout helpers used by custom templates */
.ecl-wrap {
  max-width: var(--ecl-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.ecl-hero {
  background: linear-gradient(180deg, #eef5f1 0%, #ffffff 100%);
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--ecl-line);
}
.ecl-hero h1 {
  font-size: clamp(1.85rem, 3.4vw, 2.6rem);
  line-height: 1.2;
  color: var(--ecl-brand);
  margin: 0 0 0.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.ecl-hero p.lead {
  font-size: 1.15rem;
  color: var(--ecl-muted);
  max-width: 40rem;
  margin: 0 0 1.5rem;
}
.ecl-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ecl-section {
  padding: 2.75rem 0;
}
.ecl-section--alt {
  background: var(--ecl-bg-alt);
}
.ecl-section h2 {
  font-size: 1.6rem;
  line-height: 1.25;
  color: var(--ecl-brand);
  margin: 0 0 1.25rem;
  font-weight: 750;
}

.ecl-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.ecl-card {
  background: #fff;
  border: 1px solid var(--ecl-line);
  border-radius: var(--ecl-radius);
  padding: 1.35rem 1.25rem;
}
.ecl-card h3,
.ecl-steps h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--ecl-brand);
}
.ecl-step-num {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  line-height: 2rem;
  text-align: center;
  border-radius: 50%;
  background: var(--ecl-brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.65rem;
}

.ecl-placeholder {
  border: 2px dashed #8aa197;
  background: #fff;
  border-radius: var(--ecl-radius);
  padding: 1.5rem;
  color: var(--ecl-ink);
}
.ecl-placeholder strong {
  color: var(--ecl-brand);
}
.ecl-placeholder p:last-child {
  margin-bottom: 0;
}

.ecl-table-wrap {
  overflow-x: auto;
}
.ecl-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.ecl-table th,
.ecl-table td {
  text-align: left;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--ecl-line);
  vertical-align: top;
}
.ecl-table th {
  background: var(--ecl-brand);
  color: #fff;
  font-weight: 700;
}
.ecl-table caption {
  text-align: left;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--ecl-brand);
}

.ecl-guides {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.ecl-guide {
  background: #fff;
  border: 1px solid var(--ecl-line);
  border-radius: var(--ecl-radius);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ecl-guide a.ecl-guide-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.15rem 1.2rem 1.3rem;
}
.ecl-guide a.ecl-guide-link:hover h3 {
  color: var(--ecl-cta);
}
.ecl-guide h3 {
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  color: var(--ecl-brand);
}
.ecl-guide p {
  color: var(--ecl-muted);
  margin: 0 0 0.75rem;
  flex: 1;
}
.ecl-guide .ecl-read {
  font-weight: 700;
  color: #085038;
}

/* FAQ accordion (native details — no JS) */
.ecl-faq details {
  background: #fff;
  border: 1px solid var(--ecl-line);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  margin: 0 0 0.65rem;
}
.ecl-faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ecl-brand);
}
.ecl-faq details p {
  margin: 0.65rem 0 0.2rem;
}

.ecl-notice {
  background: var(--ecl-warn-bg);
  border-left: 4px solid var(--ecl-warn);
  color: var(--ecl-ink);
  padding: 1rem 1.1rem;
  border-radius: 0 8px 8px 0;
  margin: 1rem 0;
}

.ecl-cta-band {
  background: var(--ecl-brand);
  color: #f4f7f5;
  padding: 2.25rem 0;
  text-align: center;
}
.ecl-cta-band h2 {
  color: #ffffff;
  margin: 0 0 0.5rem;
}
.ecl-cta-band p {
  color: #dce8e2;
  margin: 0 0 1.1rem;
}
.ecl-cta-band .ecl-btn {
  background: #ffffff;
  color: var(--ecl-brand) !important;
  border-color: #ffffff;
}
.ecl-cta-band .ecl-btn:hover {
  background: #eef5f1;
  color: var(--ecl-brand) !important;
}

/* Footer */
.site-footer,
.ast-footer-bar,
#colophon {
  background: var(--ecl-footer-bg) !important;
  color: var(--ecl-footer-text) !important;
}
.site-footer a,
#colophon a {
  color: #d7efe4 !important;
}
.site-footer a:hover {
  color: #ffffff !important;
}
.ecl-footer {
  background: var(--ecl-footer-bg);
  color: var(--ecl-footer-text);
  padding: 2.5rem 0 1.5rem;
}
.ecl-footer h2,
.ecl-footer h3 {
  color: #ffffff;
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
}
.ecl-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}
.ecl-footer p,
.ecl-footer li {
  color: var(--ecl-footer-muted);
  font-size: 0.95rem;
}
.ecl-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ecl-footer li {
  margin: 0 0 0.4rem;
}
.ecl-disclaimer {
  border-top: 1px solid #2a4338;
  margin-top: 1.75rem;
  padding-top: 1.15rem;
  font-size: 0.88rem;
  color: var(--ecl-footer-muted);
  line-height: 1.55;
}
.ecl-copy {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #a8b8b1;
}

/* Content typography */
.entry-content h1,
.entry-title {
  color: var(--ecl-brand);
}
.entry-content h2,
.entry-content h3 {
  color: var(--ecl-brand);
  line-height: 1.3;
}
.entry-content img,
.ecl-wrap img {
  max-width: 100%;
  height: auto;
}
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post {
  box-shadow: none;
  border: 1px solid var(--ecl-line);
}

/* Skip link */
.skip-link,
a.skip-link.screen-reader-text {
  background: var(--ecl-brand);
  color: #fff;
}

@media (max-width: 800px) {
  .ecl-steps,
  .ecl-guides,
  .ecl-footer-grid {
    grid-template-columns: 1fr;
  }
  .ecl-hero {
    padding: 2rem 0 1.75rem;
  }
}


/* Hide the text site title when the logo is present (prevents a second H1 and the mobile letter-wrap). */
.site-header .site-title,
.site-header .site-description,
.ast-site-title-wrap .site-title,
.ast-site-title-wrap .site-description {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.custom-logo-link {
  display: inline-flex;
  align-items: center;
}
.custom-logo-link .custom-logo {
  height: auto;
  width: auto;
  max-height: 44px;
  max-width: 220px;
}

/* In-text links must not rely on colour alone. Buttons and cards keep the solid style. */
.entry-content a:not(.ecl-btn):not(.wp-block-button__link):not(.ecl-guide-link),
.ecl-wrap a:not(.ecl-btn):not(.ecl-guide-link),
.ecl-footer a,
.ecl-disclaimer a,
.ecl-placeholder a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ecl-btn,
.ecl-guide-link,
.wp-block-button__link {
  text-decoration: none !important;
}

/* Header/nav stay high contrast */
.main-header-menu a,
.ast-header-menu a {
  text-decoration: none !important;
}


/* Phase C — lender cards, logos, tables */
.ecl-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1rem 0 1.75rem;
}
.ecl-lender-card {
  background: #fff;
  border: 1px solid var(--ecl-line);
  border-radius: var(--ecl-radius);
  padding: 1.2rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
}
.ecl-lender-card h2,
.ecl-lender-card h3 {
  margin: 0.35rem 0 0.35rem;
  font-size: 1.2rem;
  color: var(--ecl-brand);
}
.ecl-lender-card__logo {
  min-height: 52px;
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}
.ecl-logo,
.ecl-lender-card img,
.ecl-td-logo img {
  max-height: 48px;
  width: auto;
  max-width: 200px;
  height: auto;
  display: block;
}
.ecl-logo--sm,
.ecl-td-logo img {
  max-height: 36px;
  max-width: 140px;
}
.ecl-wordmark {
  font-weight: 800;
  color: var(--ecl-brand);
  font-size: 1.15rem;
}
.ecl-type,
.ecl-ncr {
  color: var(--ecl-muted);
  font-size: 0.95rem;
  margin: 0 0 0.4rem;
}
.ecl-facts {
  margin: 0 0 0.75rem;
  padding-left: 1.1rem;
  color: var(--ecl-ink);
}
.ecl-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.6rem;
}
.ecl-disclosure,
.ecl-review .ecl-disclosure {
  background: var(--ecl-bg-alt);
  border: 1px solid var(--ecl-line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  color: var(--ecl-ink);
}
.ecl-lender-group {
  margin-top: 2.25rem;
}
.ecl-td-logo {
  margin-bottom: 0.25rem;
}
.ecl-review-hero {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  margin: 0 0 1.25rem;
  flex-wrap: wrap;
}
.ecl-review-hero__logo img {
  max-height: 64px;
  max-width: 260px;
  width: auto;
  height: auto;
}
.ecl-crumb {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.ecl-review .ecl-proscons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 800px) {
  .ecl-review .ecl-proscons { grid-template-columns: 1fr; }
  .ecl-table-wrap { font-size: 0.95rem; }
}

/* Compact comparison: table on desktop, cards on mobile */
@media (min-width: 901px) {
  .ecl-compare .ecl-compare-cards { display: none; }
}
@media (max-width: 900px) {
  .ecl-compare .ecl-compare-table { display: none; }
}

.ecl-compare-table caption { display: none; }
