/*
Theme Name: VibeFix
Theme URI: https://vibefix.vn
Author: VibeFix Team
Author URI: https://vibefix.vn
Description: Theme chuyên biệt cho dịch vụ sửa chữa điện thoại tại Nha Trang. Tối ưu Local SEO, tốc độ cao, chuẩn Core Web Vitals và đa ngôn ngữ.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: vibefix
*/

:root {
  /* VibeFix design tokens: keep aliases for legacy theme selectors. */
  --vf-primary: 37 99 235;
  --vf-primary-strong: 29 78 216;
  --vf-primary-soft: 239 246 255;
  --vf-action: 194 65 12;
  --vf-action-strong: 154 52 18;
  --vf-action-soft: 255 247 237;
  --vf-success: 4 120 87;
  --vf-warning: 180 83 9;
  --vf-danger: 220 38 38;
  --vf-ink: 15 23 42;
  --vf-text: 51 65 85;
  --vf-text-muted: 100 116 139;
  --vf-border: 226 232 240;
  --vf-surface: 255 255 255;
  --vf-surface-muted: 248 250 252;
  --vf-surface-raised: 255 255 255;
  --primary: rgb(var(--vf-primary));
  --primary-dark: rgb(var(--vf-primary-strong));
  --primary-light: rgb(var(--vf-primary-soft));
  --secondary: rgb(var(--vf-action));
  --secondary-hover: rgb(var(--vf-action-strong));
  --accent: rgb(var(--vf-success));
  --dark: rgb(var(--vf-ink));
  --slate: rgb(var(--vf-text));
  --muted: rgb(var(--vf-text-muted));
  --border: rgb(var(--vf-border));
  --bg-light: rgb(var(--vf-surface-muted));
  --white: rgb(var(--vf-surface));
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --vf-radius-control: 12px;
  --vf-radius-card: 16px;
  --vf-shadow-sm: 0 1px 2px rgb(15 23 42 / 0.05);
  --vf-shadow-md: 0 8px 24px rgb(15 23 42 / 0.07);
  --vf-shadow-lg: 0 18px 48px rgb(15 23 42 / 0.12);
  --shadow-sm: var(--vf-shadow-sm);
  --shadow-md: var(--vf-shadow-md);
  --shadow-lg: var(--vf-shadow-lg);
  --vf-content-width: 80rem;
  --vf-reading-width: 44rem;
  --vf-duration-fast: 150ms;
  --vf-duration-base: 200ms;
  --vf-ease: cubic-bezier(0.2, 0, 0, 1);
  --font-sans: 'Be Vietnam Pro', 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--dark);
  background-color: var(--bg-light);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography & Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
}
.badge-primary { background: #dbeafe; color: #1e40af; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-success { background: #d1fae5; color: #065f46; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  min-height: 44px;
  transition: color var(--vf-duration-base) var(--vf-ease), background-color var(--vf-duration-base) var(--vf-ease), border-color var(--vf-duration-base) var(--vf-ease), box-shadow var(--vf-duration-base) var(--vf-ease), transform var(--vf-duration-base) var(--vf-ease);
  border: none;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-secondary { background: var(--secondary); color: var(--white); }
.btn-secondary:hover { background: var(--secondary-hover); transform: translateY(-1px); }
.btn-outline { border: 1.5px solid var(--border); background: var(--white); color: var(--dark); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* Header & Navigation */
.site-topbar {
  background: var(--dark);
  color: #94a3b8;
  font-size: 0.82rem;
  padding: 6px 0;
}
.site-topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-info { display: flex; gap: 20px; align-items: center; }
.topbar-info span { display: inline-flex; align-items: center; gap: 6px; }
.topbar-lang { display: flex; gap: 8px; }
.topbar-lang a { color: #cbd5e1; font-weight: 600; padding: 2px 6px; border-radius: 4px; }
.topbar-lang a.active, .topbar-lang a:hover { background: rgba(255,255,255,0.15); color: #fff; }

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}
.site-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-logo span { color: var(--secondary); }
.site-nav { display: flex; gap: 24px; list-style: none; align-items: center; }
.site-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--slate);
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--primary); }
.header-actions { display: flex; gap: 12px; align-items: center; }

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: var(--white);
  padding: 70px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}
.hero-content h1 {
  font-size: 2.6rem;
  line-height: 1.2;
  font-weight: 800;
  margin: 16px 0;
}
.hero-content h1 span {
  color: #38bdf8;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-content p {
  color: #94a3b8;
  font-size: 1.1rem;
  margin-bottom: 28px;
  max-width: 580px;
}
.hero-features {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.hero-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #e2e8f0;
}
.hero-feature-item svg { color: var(--accent); }

/* Quick Quote Card */
.quote-card {
  background: var(--white);
  color: var(--dark);
  padding: 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.quote-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.quote-card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 20px;
}
.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--slate);
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-control:focus {
  border-color: var(--primary);
}

/* Silo Categories Section */
.section { padding: 70px 0; }
.section-title {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 45px;
}
.section-title h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
}
.section-title p {
  color: var(--muted);
  font-size: 1rem;
}
.silo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.silo-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  border: 1.5px solid var(--border);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}
.silo-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.silo-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
}
.silo-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.silo-card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
  flex-grow: 1;
}
.silo-models {
  list-style: none;
  border-top: 1px dashed var(--border);
  padding-top: 14px;
  margin-bottom: 18px;
}
.silo-models li {
  font-size: 0.85rem;
  color: var(--slate);
  padding: 4px 0;
  display: flex;
  justify-content: space-between;
}

/* Process Section */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.process-step {
  background: var(--white);
  padding: 26px;
  border-radius: var(--radius-md);
  position: relative;
  border: 1px solid var(--border);
}
.step-number {
  font-size: 2.4rem;
  font-weight: 900;
  color: #e2e8f0;
  position: absolute;
  top: 12px;
  right: 18px;
}
.process-step h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 16px 0 8px;
}
.process-step p {
  color: var(--muted);
  font-size: 0.88rem;
}

/* Service Detail Page Layout */
.service-header {
  background: var(--white);
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
}
.breadcrumbs a { color: var(--primary); }
.service-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  padding: 40px 0 80px;
}
.service-main {
  background: var(--white);
  padding: 36px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.service-main h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 28px 0 14px;
  color: var(--dark);
}
.service-main p {
  margin-bottom: 16px;
  color: var(--slate);
}
.price-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}
.price-table th, .price-table td {
  padding: 12px 16px;
  border: 1px solid var(--border);
  text-align: left;
  font-size: 0.95rem;
}
.price-table th {
  background: var(--bg-light);
  font-weight: 700;
}
.price-highlight {
  color: var(--secondary);
  font-weight: 700;
}
.service-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.sidebar-box {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
}
.sidebar-box h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 8px;
}

/* Footer */
.site-footer {
  background: var(--dark);
  color: #cbd5e1;
  padding: 60px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-col h4 {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; font-size: 0.9rem; }
.footer-col ul li a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* Mobile Sticky Action Bar */
.mobile-action-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  z-index: 999;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.08);
}
.mobile-action-bar .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Responsive */
@media (max-width: 992px) {
  .hero-grid { grid-template-columns: 1fr; }
  .silo-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .service-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .site-topbar { display: none; }
  .site-nav { display: none; }
  .hero-content h1 { font-size: 1.9rem; }
  .silo-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .mobile-action-bar { display: block; }
  body { padding-bottom: 64px; }
}

/* ========================================================
   VIBEFIX SYSTEM DESIGN CHO THE_CONTENT (WordPress Content)
   ======================================================== */
.prose-vibefix,
.vibefix-content {
  color: #334155;
  font-size: 0.9375rem;
  line-height: 1.75;
}
@media (min-width: 640px) {
  .prose-vibefix,
  .vibefix-content {
    font-size: 1rem;
    line-height: 1.8;
  }
}
.prose-vibefix h1,
.vibefix-content h1 {
  color: #0f172a;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.prose-vibefix h2,
.vibefix-content h2,
.prose-vibefix .wp-block-heading:is(h2),
.vibefix-content .wp-block-heading:is(h2) {
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.35;
  margin-top: 2rem;
  margin-bottom: 0.875rem;
  padding-left: 0.875rem;
  border-left: 4px solid #2563eb;
}
@media (min-width: 640px) {
  .prose-vibefix h2,
  .vibefix-content h2,
  .prose-vibefix .wp-block-heading:is(h2),
  .vibefix-content .wp-block-heading:is(h2) {
    font-size: 1.45rem;
    margin-top: 2.25rem;
    margin-bottom: 1rem;
  }
}
.prose-vibefix h3,
.vibefix-content h3,
.prose-vibefix .wp-block-heading:is(h3),
.vibefix-content .wp-block-heading:is(h3) {
  color: #1e293b;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 1.5rem;
  margin-bottom: 0.625rem;
}
.prose-vibefix h4,
.vibefix-content h4 {
  color: #1e293b;
  font-size: 1rem;
  font-weight: 700;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}
.prose-vibefix p,
.vibefix-content p {
  margin-bottom: 1.125rem;
  color: #334155;
}
.prose-vibefix strong,
.vibefix-content strong {
  color: #0f172a;
  font-weight: 700;
}
.prose-vibefix a,
.vibefix-content a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #93c5fd;
}
.prose-vibefix ol,
.vibefix-content ol,
.prose-vibefix .wp-block-list:is(ol),
.vibefix-content .wp-block-list:is(ol) {
  counter-reset: vibefix-step-counter;
  list-style: none !important;
  padding-left: 0 !important;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.prose-vibefix ol > li,
.vibefix-content ol > li,
.prose-vibefix .wp-block-list:is(ol) > li,
.vibefix-content .wp-block-list:is(ol) > li {
  counter-increment: vibefix-step-counter;
  position: relative;
  padding-left: 2.25rem;
  color: #334155;
  line-height: 1.65;
}
.prose-vibefix ol > li::before,
.vibefix-content ol > li::before,
.prose-vibefix .wp-block-list:is(ol) > li::before,
.vibefix-content .wp-block-list:is(ol) > li::before {
  content: counter(vibefix-step-counter);
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.prose-vibefix ul,
.vibefix-content ul,
.prose-vibefix .wp-block-list:is(ul),
.vibefix-content .wp-block-list:is(ul) {
  list-style: none !important;
  padding-left: 0 !important;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.prose-vibefix ul > li,
.vibefix-content ul > li,
.prose-vibefix .wp-block-list:is(ul) > li,
.vibefix-content .wp-block-list:is(ul) > li {
  position: relative;
  padding-left: 1.75rem;
  color: #334155;
  line-height: 1.65;
}
.prose-vibefix ul > li::before,
.vibefix-content ul > li::before,
.prose-vibefix .wp-block-list:is(ul) > li::before,
.vibefix-content .wp-block-list:is(ul) > li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: #2563eb;
  box-shadow: 0 0 0 2px #dbeafe;
}
.prose-vibefix table,
.vibefix-content table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.875rem;
}
.prose-vibefix thead,
.vibefix-content thead {
  background: #f8fafc;
}
.prose-vibefix th,
.vibefix-content th {
  padding: 10px 14px;
  font-weight: 700;
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}
.prose-vibefix td,
.vibefix-content td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}
.prose-vibefix blockquote,
.vibefix-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid #2563eb;
  background: #f8fafc;
  border-radius: 0 12px 12px 0;
  color: #1e293b;
  font-style: italic;
}
.prose-vibefix img,
.vibefix-content img {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  margin: 0 auto;
  max-width: 100%;
}

/* ==========================================================================
   Pagination Component (.vf-pagination)
   Standardized via UI/UX Max & EvondevKit Design System
   ========================================================================== */
.vf-pagination {
  margin: 2.25rem 0 1.25rem;
  width: 100%;
}

.vf-pagination .screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.vf-pagination .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.375rem;
}

@media (min-width: 640px) {
  .vf-pagination .nav-links {
    gap: 0.5rem;
  }
}

.vf-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgb(var(--vf-text));
  background-color: rgb(var(--vf-surface));
  border: 1px solid rgb(var(--vf-border));
  border-radius: var(--vf-radius-control);
  box-shadow: var(--vf-shadow-sm);
  text-decoration: none;
  transition: all var(--vf-duration-fast) var(--vf-ease);
  user-select: none;
  line-height: 1;
}

.vf-pagination a.page-numbers:hover {
  color: rgb(var(--vf-primary));
  background-color: rgb(var(--vf-primary-soft));
  border-color: rgb(var(--vf-primary) / 0.5);
  box-shadow: 0 2px 8px rgb(var(--vf-primary) / 0.15);
  transform: translateY(-1px);
}

.vf-pagination a.page-numbers:active {
  transform: translateY(0);
}

.vf-pagination .page-numbers:focus-visible {
  outline: 2px solid rgb(var(--vf-primary));
  outline-offset: 2px;
}

.vf-pagination .page-numbers.current {
  color: #ffffff;
  background-color: rgb(var(--vf-primary));
  border-color: rgb(var(--vf-primary));
  font-weight: 700;
  box-shadow: 0 4px 14px rgb(var(--vf-primary) / 0.25);
  cursor: default;
  pointer-events: none;
  transform: none;
}

.vf-pagination .page-numbers.dots {
  min-width: 2rem;
  height: 2.5rem;
  padding: 0 0.25rem;
  color: rgb(var(--vf-text-muted));
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  cursor: default;
}

.vf-pagination .page-numbers.prev,
.vf-pagination .page-numbers.next {
  gap: 0.375rem;
  padding: 0 0.875rem;
  font-weight: 600;
  color: rgb(var(--vf-text));
}

.vf-pagination .page-numbers.prev i,
.vf-pagination .page-numbers.next i {
  font-size: 1rem;
  line-height: 1;
}

.vf-pagination .page-numbers.prev:hover,
.vf-pagination .page-numbers.next:hover {
  color: rgb(var(--vf-primary));
  border-color: rgb(var(--vf-primary) / 0.5);
}

.vf-pagination .page-numbers.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  background-color: rgb(var(--vf-surface-muted));
  border-color: rgb(var(--vf-border));
}

