/*
Theme Name: Mabiliscash
Author: Tieumy Network
Description: Custom theme for mabiliscash.org – Philippine loan comparison platform
Version: 2.0
*/

* { margin:0; padding:0; box-sizing:border-box; }
html { overflow-x: hidden; scroll-behavior: smooth; }
body { overflow-x: hidden; }
img { max-width:100%; height:auto; vertical-align:middle; }

:root {
  --primary: #7C3AED;
  --primary-dark: #6D28D9;
  --primary-light: #A78BFA;
  --accent: #F59E0B;
  --accent-light: #FCD34D;
  --bg: #FAF5FF;
  --bg-alt: #F3EEFF;
  --text: #1F1B2E;
  --gray: #6B7280;
  --light: #EDE9FE;
  --white: #FFFFFF;
  --border: #DDD6FE;
  --shadow: 0 4px 20px rgba(124,58,237,0.12);
  --shadow-lg: 0 8px 40px rgba(124,58,237,0.18);
  --radius: 14px;
  --radius-sm: 10px;
}

body {
  font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--primary); text-decoration: none; transition: all .3s; }
a:hover { color: var(--primary-dark); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ============ HEADER ============ */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--primary);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.logo span { color: var(--accent); }
.menu-toggle { display: none; }
.nav-menu { display: flex; gap: 25px; list-style: none; }
.nav-menu a {
  font-weight: 600;
  color: var(--text);
  padding: 5px 0;
  border-bottom: 2px solid transparent;
}
.nav-menu a:hover { color: var(--primary); border-bottom-color: var(--primary); }

/* ============ HERO ============ */
.hero {
  position: relative;
  background: linear-gradient(135deg, #4C1D95 0%, #7C3AED 40%, #6D28D9 70%, #1E0A3A 100%);
  color: var(--white);
  padding: 100px 0 90px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(245,158,11,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(167,139,250,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 {
  font-size: 44px;
  margin-bottom: 18px;
  line-height: 1.2;
  font-weight: 900;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero .hero-sub {
  font-size: 17px;
  opacity: .92;
  max-width: 650px;
  margin: 0 auto 32px;
  line-height: 1.6;
}
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 16px 38px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all .3s;
  border: none;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.btn-primary {
  background: var(--accent);
  color: #1F1B2E;
  box-shadow: 0 0 20px rgba(245,158,11,0.4), 0 4px 15px rgba(245,158,11,0.3);
}
.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(245,158,11,0.6), 0 6px 25px rgba(245,158,11,0.4);
}

.btn-secondary {
  background: rgba(255,255,255,0.12);
  color: var(--white);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255,255,255,0.25);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-3px);
  box-shadow: 0 0 25px rgba(255,255,255,0.2);
}

/* ============ STATS ============ */
.stats-section {
  padding: 50px 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}
.stat-item { padding: 10px; }
.stat-number {
  font-size: 40px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1.1;
}
.stat-number span { color: var(--accent); }
.stat-label {
  font-size: 15px;
  color: var(--gray);
  margin-top: 6px;
  font-weight: 500;
}

/* ============ SECTION COMMON ============ */
section { padding: 70px 0; }
.section-bg-alt { background: var(--bg-alt); }
.section-bg-white { background: var(--white); }

.section-title {
  font-size: 34px;
  color: var(--primary-dark);
  margin-bottom: 10px;
  text-align: center;
  font-weight: 900;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  border-radius: 4px;
  margin: 12px auto 0;
}
.section-sub {
  text-align: center;
  color: var(--gray);
  margin-bottom: 40px;
  font-size: 16px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ============ TIMELINE FEATURES ============ */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 60px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--accent), var(--primary));
  border-radius: 3px;
}
.timeline-item {
  position: relative;
  margin-bottom: 30px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 24px 24px 56px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all .3s;
}
.timeline-item:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-lg);
}
.timeline-icon {
  position: absolute;
  left: -40px;
  top: 22px;
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--white);
  box-shadow: 0 0 0 4px var(--bg), 0 4px 12px rgba(124,58,237,0.3);
  z-index: 2;
}
.timeline-item h3 {
  font-size: 18px;
  color: var(--primary-dark);
  margin-bottom: 6px;
}
.timeline-item p {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.6;
}

/* ============ PARTNER GRID ============ */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.partner-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all .3s;
}
.partner-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}
.partner-card .partner-icon {
  font-size: 42px;
  margin-bottom: 12px;
}
.partner-card h3 {
  font-size: 19px;
  color: var(--primary-dark);
  margin-bottom: 6px;
  font-weight: 800;
}
.partner-card .partner-rate {
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 14px;
}
.partner-card .partner-rate strong { color: var(--accent); }
.partner-card .partner-rate .up { color: #059669; }
.partner-card .partner-rate .check { color: var(--primary); }

.btn-partner {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  border: none;
  cursor: pointer;
  transition: all .3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn-partner:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(124,58,237,0.4);
  color: var(--white);
}

/* ============ ELIGIBILITY ============ */
.eligibility-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 750px;
  margin: 0 auto;
}
.eligibility-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  box-shadow: 0 2px 10px rgba(124,58,237,0.08);
  border: 1px solid var(--border);
  font-size: 15px;
  font-weight: 500;
  transition: all .3s;
}
.eligibility-item:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
}
.eligibility-item .check-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: linear-gradient(135deg, #059669, #10B981);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
}

/* ============ TESTIMONIALS ============ */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  max-width: 900px;
  margin: 0 auto;
}
.testimonial-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
}
.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 10px;
  left: 18px;
  font-size: 60px;
  color: var(--primary-light);
  opacity: 0.25;
  line-height: 1;
  font-family: Georgia, serif;
}
.testimonial-text {
  font-size: 15px;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 16px;
  font-style: italic;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testimonial-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 18px;
}
.testimonial-name {
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
}
.testimonial-location {
  font-size: 12px;
  color: var(--gray);
}

/* ============ FAQ ============ */
.faq-list { max-width: 750px; margin: 0 auto; }
.faq-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(124,58,237,0.08);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all .3s;
}
.faq-item:hover { border-color: var(--primary-light); }
.faq-item.active { border-color: var(--primary); }
.faq-question {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-question .faq-toggle {
  font-size: 20px;
  color: var(--primary);
  transition: transform .3s;
  min-width: 24px;
  text-align: center;
}
.faq-item.active .faq-toggle { transform: rotate(180deg); }
.faq-answer {
  margin-top: 14px;
  font-size: 14px;
  color: var(--gray);
  display: none;
  line-height: 1.7;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.faq-item.active .faq-answer { display: block; }

/* ============ BLOG ============ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
}
.blog-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all .3s;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.blog-card img { width: 100%; height: 210px; object-fit: cover; }
.blog-card-content { padding: 22px; }
.blog-card h3 { font-size: 18px; margin-bottom: 10px; }
.blog-card h3 a { color: var(--text); }
.blog-card h3 a:hover { color: var(--primary); }
.blog-card .meta { font-size: 13px; color: var(--gray); margin-bottom: 10px; }
.blog-card p { font-size: 14px; color: var(--gray); }

/* ============ CONTENT PAGES ============ */
.content-area { padding: 50px 0; }
.content-area h2 { color: var(--primary-dark); margin: 30px 0 15px; font-size: 26px; }
.content-area h3 { font-size: 20px; margin: 25px 0 12px; color: var(--accent); }
.content-area p { margin-bottom: 15px; color: var(--text); }
.content-area ul { margin: 15px 0 15px 25px; }
.content-area ul li { margin-bottom: 8px; }

/* ============ SINGLE POST ============ */
.single-post { max-width: 800px; margin: 0 auto; }
.post-title { font-size: 36px; color: var(--primary-dark); margin-bottom: 10px; font-weight: 800; }
.post-meta { color: var(--gray); font-size: 14px; margin-bottom: 20px; }
.post-thumbnail { margin-bottom: 25px; border-radius: var(--radius); overflow: hidden; }
.post-thumbnail img { width: 100%; height: auto; }
.post-content { line-height: 1.8; font-size: 16px; }
.post-content h2 { color: var(--primary-dark); margin: 30px 0 15px; font-size: 24px; }
.post-content h3 { font-size: 20px; margin: 25px 0 12px; color: var(--accent); }
.post-content p { margin-bottom: 15px; }
.post-content ul { margin: 15px 0 15px 25px; }
.post-content ul li { margin-bottom: 8px; }

/* ============ FOOTER ============ */
.site-footer { background: linear-gradient(135deg, #3B0764, #5B21B6, #4C1D95); color: var(--white); padding: 50px 0 20px; }
.site-footer .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.site-footer h4 { font-size: 18px; margin-bottom: 15px; color: var(--accent-light); }
.site-footer p, .site-footer a { font-size: 14px; color: rgba(255,255,255,.78); line-height: 2; }
.site-footer a:hover { color: var(--accent-light); }
.footer-bottom { text-align: center; padding-top: 25px; margin-top: 25px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; color: rgba(255,255,255,.55); }
.footer-bottom .container { display: block; }

.page-title { font-size: 36px; color: var(--primary-dark); margin-bottom: 25px; font-weight: 800; line-height: 1.2; }
.page-body { font-size: 16px; line-height: 1.8; }

/* Post thumbnail safety */
.post-thumbnail, .article-feat-image, .pg-thumb { overflow: hidden; border-radius: var(--radius); }
.post-thumbnail img, .article-feat-image img, .pg-thumb img { width: 100%; height: auto; max-width: 100%; }
.single-post .post-thumbnail img, .article-single .article-feat-image img, .post-single .pg-thumb img { max-width: 100%!important;width: 100%!important;height: auto!important;display: block; }
.post-content img, .article-content img, .pg-content img { max-width: 100%!important;height: auto!important; }

/* ============ RESPONSIVE ============ */
@media(max-width: 992px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .partner-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid { grid-template-columns: 1fr; }
}

@media(max-width: 768px) {
  .hero h1 { font-size: 30px; }
  .hero { padding: 70px 0 60px; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero .btn { width: 100%; max-width: 320px; text-align: center; }
  
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
  .stat-number { font-size: 32px; }
  
  .timeline { padding-left: 50px; }
  .timeline::before { left: 17px; }
  .timeline-icon { left: -34px; width: 40px; height: 40px; min-width: 40px; font-size: 18px; top: 20px; }
  .timeline-item { padding: 18px 18px 18px 46px; }
  
  .partner-grid { grid-template-columns: 1fr; }
  .eligibility-grid { grid-template-columns: 1fr; }
  
  .section-title { font-size: 28px; }
  section { padding: 50px 0; }
  
  .nav-menu { flex-direction: column; gap: 10px; width: 100%; margin-top: 10px; }
  .features-grid { grid-template-columns: 1fr; }
}

@media(max-width: 480px) {
  .hero h1 { font-size: 26px; }
  .stat-number { font-size: 28px; }
  .single-post, .article-single, .post-single { padding: 0; }
  .post-thumbnail, .article-feat-image, .pg-thumb {
    margin-left: -20px; margin-right: -20px; border-radius: 0;
  }
}

/* Responsive tables */
.table-wrapper, .compare-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrapper table, .compare-table-wrap table { min-width: 500px; }
.apply-cell { white-space: nowrap; }
@media(max-width:768px) {
  .table-wrapper table, .compare-table-wrap table { min-width: 400px; }
  .lender-table th, .lender-table td, .compare-table th, .compare-table td { padding: 8px 6px; font-size: 13px; }
  .btn-sm { padding: 8px 14px; font-size: 13px; }
}

/* Hamburger menu icon via CSS */
.menu-toggle { font-size:0 !important; width:30px; height:24px; position:relative; }
.menu-toggle::before,
.menu-toggle::after,
.menu-toggle span.hamb-line { content:''; position:absolute; left:0; width:100%; height:3px; background:var(--primary-dark); border-radius:2px; transition:all .3s; }
.menu-toggle::before { top:0; }
.menu-toggle::after { bottom:0; }
.menu-toggle .hamb-line { top:50%; transform:translateY(-50%); }
.menu-toggle.active::before { transform:rotate(45deg); top:10px; }
.menu-toggle.active::after { transform:rotate(-45deg); bottom:10px; }
.menu-toggle.active .hamb-line { opacity:0; }
@media(max-width:768px) {
  .menu-toggle { width:28px; height:20px; margin-left:auto; }
}
