/* ═══════════════════════════════════════════════════════════════════════════
   DentalSoft custom CSS
   Tailwind utilities được load qua CDN (xem functions.php).
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --ds-blue:        #2B4BA5;
    --ds-blue-dark:   #233C84;
    --ds-navy:        #1A2E6B;
    --ds-deep:        #0A1429;   /* dark section bg */
    --ds-deep-card:   #1E2A4A;   /* cards on dark */
    --ds-mid:         #3D5FB8;
    --ds-light:       #EEF2FB;
    --ds-lighter:     #F5F8FD;
    --ds-green:       #3DB870;   /* accent — live/AI/success (đồng bộ app, thay lime cũ) */
    --ds-off:         #F8FAFC;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body, button, input, select, textarea {
    font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
body {
    background: #fff;
    color: #1a1a1a; /* chữ mặc định đen, dễ đọc (trước là navy hơi nhạt) */
    font-feature-settings: "tnum" on; /* tabular nums everywhere */
}

a {
    color: inherit;
    text-decoration: none;
}

/* ───────────────────────── READABLE TEXT — chữ đậm trên nền sáng ─────────────────────────
   Body/caption Tailwind (slate-400→700) hơi xám → đọc mờ.
   Bôi đậm gần như đen trên nền SÁNG; tự KHÔI PHỤC chữ sáng trong khối nền TỐI (.ds-noise). */
.text-slate-700, .text-gray-700 { color: #0f172a !important; }
.text-slate-600, .text-gray-600 { color: #111827 !important; }
.text-slate-500, .text-gray-500 { color: #1f2937 !important; }
.text-slate-400, .text-gray-400 { color: #334155 !important; }
.text-slate-300, .text-gray-300 { color: #475569 !important; }

/* Khối nền tối (footer, numbers-deep, CTA banner, bento tối, testimonial tối…):
   trả lại đúng tông chữ sáng gốc — specificity cao hơn nên thắng rule trên. */
.ds-noise .text-slate-700 { color: #334155 !important; }
.ds-noise .text-slate-600 { color: #475569 !important; }
.ds-noise .text-slate-500 { color: #64748b !important; }
.ds-noise .text-slate-400 { color: #94a3b8 !important; }
.ds-noise .text-slate-300 { color: #cbd5e1 !important; }

/* ───────────────────────── HEADER ───────────────────────── */
[data-ds-header][data-scrolled="true"] {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 1px 24px rgba(26, 46, 107, 0.08);
}

/* ───────────────────────── REVEAL ANIMATION ───────────────────────── */
.ds-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    will-change: opacity, transform;
}
.ds-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ───────────────────────── NAVBAR MEGA-MENU ───────────────────────── */
[data-ds-mega][data-open="true"] .ds-mega-chevron {
    transform: rotate(180deg);
}
[data-ds-mega][data-open="true"] [data-ds-mega-trigger] {
    color: var(--ds-blue);
}
[data-ds-mobile-sub][data-open="true"] .ds-mobile-sub-chevron {
    transform: rotate(180deg);
}

/* ───────────────────────── ADMIN BAR OFFSET ───────────────────────── */
.admin-bar [data-ds-header] { top: 32px; }
@media screen and (max-width: 782px) {
    .admin-bar [data-ds-header] { top: 46px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODERN UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Mesh gradient hero background */
.ds-mesh {
    background:
        radial-gradient(at 18% 22%, rgba(43, 75, 165, 0.18) 0px, transparent 45%),
        radial-gradient(at 82% 18%, rgba(61, 95, 184, 0.14) 0px, transparent 50%),
        radial-gradient(at 30% 88%, rgba(61, 184, 112, 0.06) 0px, transparent 48%),
        radial-gradient(at 78% 78%, rgba(168, 183, 226, 0.20) 0px, transparent 52%),
        linear-gradient(180deg, #fff 0%, #F8FAFC 100%);
}

/* Subtle dot grid pattern */
.ds-dotgrid {
    background-image: radial-gradient(circle, rgba(43, 75, 165, 0.10) 1px, transparent 1px);
    background-size: 24px 24px;
}
.ds-dotgrid-dark {
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 28px 28px;
}

/* Subtle dental tooth pattern — invisible-ish, adds industry feel */
.ds-tooth-pattern {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'><g fill='%232B4BA5' fill-opacity='0.045'><path transform='translate(28 32) rotate(-12)' d='M14 0C8 0 4 4.8 4 10.7c0 3 .7 7.3 2.4 11.4 1.1 2.6 2.5 6.5 4.5 6.5 1.4 0 1.7-1.5 2-3.7.1-1.4.1-2.9.3-3.7.05-.5.45-.95.95-.95s.95.45.95.95c0 .9.1 2.3.3 3.7.3 2.2.6 3.7 2 3.7 2 0 3.4-3.9 4.5-6.5 1.7-4.1 2.4-8.4 2.4-11.4C24 4.8 20 0 14 0z'/><path transform='translate(155 78) rotate(15) scale(1.15)' d='M14 0C8 0 4 4.8 4 10.7c0 3 .7 7.3 2.4 11.4 1.1 2.6 2.5 6.5 4.5 6.5 1.4 0 1.7-1.5 2-3.7.1-1.4.1-2.9.3-3.7.05-.5.45-.95.95-.95s.95.45.95.95c0 .9.1 2.3.3 3.7.3 2.2.6 3.7 2 3.7 2 0 3.4-3.9 4.5-6.5 1.7-4.1 2.4-8.4 2.4-11.4C24 4.8 20 0 14 0z'/><path transform='translate(85 130) rotate(-8) scale(0.85)' d='M14 0C8 0 4 4.8 4 10.7c0 3 .7 7.3 2.4 11.4 1.1 2.6 2.5 6.5 4.5 6.5 1.4 0 1.7-1.5 2-3.7.1-1.4.1-2.9.3-3.7.05-.5.45-.95.95-.95s.95.45.95.95c0 .9.1 2.3.3 3.7.3 2.2.6 3.7 2 3.7 2 0 3.4-3.9 4.5-6.5 1.7-4.1 2.4-8.4 2.4-11.4C24 4.8 20 0 14 0z'/><path transform='translate(180 178) rotate(22) scale(0.7)' d='M14 0C8 0 4 4.8 4 10.7c0 3 .7 7.3 2.4 11.4 1.1 2.6 2.5 6.5 4.5 6.5 1.4 0 1.7-1.5 2-3.7.1-1.4.1-2.9.3-3.7.05-.5.45-.95.95-.95s.95.45.95.95c0 .9.1 2.3.3 3.7.3 2.2.6 3.7 2 3.7 2 0 3.4-3.9 4.5-6.5 1.7-4.1 2.4-8.4 2.4-11.4C24 4.8 20 0 14 0z'/></g></svg>");
    background-size: 220px 220px;
    background-repeat: repeat;
}

/* Dark variant — white teeth on dark bg */
.ds-tooth-pattern-dark {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'><g fill='%23ffffff' fill-opacity='0.025'><path transform='translate(28 32) rotate(-12)' d='M14 0C8 0 4 4.8 4 10.7c0 3 .7 7.3 2.4 11.4 1.1 2.6 2.5 6.5 4.5 6.5 1.4 0 1.7-1.5 2-3.7.1-1.4.1-2.9.3-3.7.05-.5.45-.95.95-.95s.95.45.95.95c0 .9.1 2.3.3 3.7.3 2.2.6 3.7 2 3.7 2 0 3.4-3.9 4.5-6.5 1.7-4.1 2.4-8.4 2.4-11.4C24 4.8 20 0 14 0z'/><path transform='translate(155 78) rotate(15) scale(1.15)' d='M14 0C8 0 4 4.8 4 10.7c0 3 .7 7.3 2.4 11.4 1.1 2.6 2.5 6.5 4.5 6.5 1.4 0 1.7-1.5 2-3.7.1-1.4.1-2.9.3-3.7.05-.5.45-.95.95-.95s.95.45.95.95c0 .9.1 2.3.3 3.7.3 2.2.6 3.7 2 3.7 2 0 3.4-3.9 4.5-6.5 1.7-4.1 2.4-8.4 2.4-11.4C24 4.8 20 0 14 0z'/><path transform='translate(85 130) rotate(-8) scale(0.85)' d='M14 0C8 0 4 4.8 4 10.7c0 3 .7 7.3 2.4 11.4 1.1 2.6 2.5 6.5 4.5 6.5 1.4 0 1.7-1.5 2-3.7.1-1.4.1-2.9.3-3.7.05-.5.45-.95.95-.95s.95.45.95.95c0 .9.1 2.3.3 3.7.3 2.2.6 3.7 2 3.7 2 0 3.4-3.9 4.5-6.5 1.7-4.1 2.4-8.4 2.4-11.4C24 4.8 20 0 14 0z'/><path transform='translate(180 178) rotate(22) scale(0.7)' d='M14 0C8 0 4 4.8 4 10.7c0 3 .7 7.3 2.4 11.4 1.1 2.6 2.5 6.5 4.5 6.5 1.4 0 1.7-1.5 2-3.7.1-1.4.1-2.9.3-3.7.05-.5.45-.95.95-.95s.95.45.95.95c0 .9.1 2.3.3 3.7.3 2.2.6 3.7 2 3.7 2 0 3.4-3.9 4.5-6.5 1.7-4.1 2.4-8.4 2.4-11.4C24 4.8 20 0 14 0z'/></g></svg>");
    background-size: 220px 220px;
    background-repeat: repeat;
}

/* Grain noise overlay (SVG inline) */
.ds-noise {
    position: relative;
    isolation: isolate;
}
.ds-noise::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.035;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.ds-noise > * {
    position: relative;
    z-index: 1;
}

/* Gradient text */
.ds-gradient-text {
    background: linear-gradient(120deg, #2B4BA5 0%, #3D5FB8 50%, #5876C4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Highlight underline (manual SVG-like via box-shadow) */
.ds-underline-marker {
    position: relative;
    display: inline-block;
}
.ds-underline-marker::after {
    content: "";
    position: absolute;
    left: -2px;
    right: -2px;
    bottom: 4px;
    height: 14px;
    background: linear-gradient(90deg, rgba(61, 184, 112, 0.35) 0%, rgba(43, 75, 165, 0.28) 100%);
    z-index: -1;
    border-radius: 4px;
}

/* Glass card on dark bg */
.ds-glass {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

/* Bento cell hover effect */
.ds-bento-cell {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.ds-bento-cell:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px -20px rgba(43, 75, 165, 0.20), 0 0 0 1px rgba(43, 75, 165, 0.10);
}
.ds-bento-cell-dark:hover {
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.50), 0 0 0 1px rgba(61, 184, 112, 0.20);
}

/* Live pulse dot (green accent) */
.ds-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ds-green);
    box-shadow: 0 0 0 0 rgba(61, 184, 112, 0.6);
    animation: ds-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes ds-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(61, 184, 112, 0.6); }
    50%      { box-shadow: 0 0 0 10px rgba(61, 184, 112, 0); }
}

/* Marquee logo bar — infinite scroll */
.ds-marquee {
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
.ds-marquee-track {
    display: flex;
    width: max-content;
    animation: ds-marquee-scroll 28s linear infinite;
    gap: 2.5rem;
}
.ds-marquee:hover .ds-marquee-track {
    animation-play-state: paused;
}
@keyframes ds-marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Floating cards stack — hero right side */
.ds-float-card {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ds-float-stack:hover .ds-float-card {
    transform: translate(0, 0) rotate(0deg) !important;
}

/* Number ticker — count-up monospace look */
.ds-ticker {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" on, "lnum" on;
}

/* Sticky scroll showcase */
.ds-showcase-sticky {
    position: sticky;
    top: 100px;
}

/* Trust badge hover */
.ds-trust-badge {
    transition: all 0.25s ease;
}
.ds-trust-badge:hover {
    transform: translateY(-2px);
    border-color: rgba(43, 75, 165, 0.30);
    background-color: var(--ds-light);
}

/* Comparison table custom */
.ds-cmp-cell-yes {
    background: rgba(61, 184, 112, 0.10);
    color: #1C6E42;
}
.ds-cmp-cell-partial {
    background: rgba(245, 158, 11, 0.08);
    color: #B45309;
}
.ds-cmp-cell-no {
    background: rgba(220, 38, 38, 0.06);
    color: #B91C1C;
}

/* CTA banner mesh animation */
.ds-cta-mesh {
    background:
        radial-gradient(at 20% 30%, rgba(255, 255, 255, 0.18) 0%, transparent 40%),
        radial-gradient(at 80% 70%, rgba(255, 255, 255, 0.12) 0%, transparent 45%),
        linear-gradient(135deg, #2B4BA5 0%, #3D5FB8 50%, #233C84 100%);
}

/* Section eyebrow style */
.ds-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--ds-blue);
}
.ds-eyebrow-dark {
    color: var(--ds-green);
}

/* Reduce motion accessibility */
@media (prefers-reduced-motion: reduce) {
    .ds-marquee-track,
    .ds-live-dot {
        animation: none !important;
    }
    .ds-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   BLOG — typography bài viết (.ds-article) + pagination
   Tailwind CDN không có plugin `prose` → style thủ công.
   ═══════════════════════════════════════════════════════════════════════════ */
.ds-article {
    color: #1f2937;
    font-size: 16.5px;
    line-height: 1.8;
}
.ds-article > * + * { margin-top: 1.15em; }
.ds-article p { color: #1f2937; }
.ds-article h2 {
    font-size: 26px;
    font-weight: 800;
    color: #1A2E6B;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin-top: 1.9em;
    margin-bottom: 0.55em;
    scroll-margin-top: 90px;
}
.ds-article h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1A2E6B;
    margin-top: 1.6em;
    margin-bottom: 0.45em;
    scroll-margin-top: 90px;
}
.ds-article h2:first-child,
.ds-article h3:first-child,
.ds-article p:first-child { margin-top: 0; }
.ds-article a {
    color: #2B4BA5;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(43, 75, 165, 0.3);
}
.ds-article a:hover { text-decoration-color: #2B4BA5; }
.ds-article strong { color: #1A2E6B; font-weight: 700; }
.ds-article ul, .ds-article ol { padding-left: 1.4em; }
.ds-article ul { list-style: disc; }
.ds-article ol { list-style: decimal; }
.ds-article li { margin-top: 0.5em; padding-left: 0.2em; }
.ds-article li::marker { color: #2B4BA5; }
.ds-article blockquote {
    border-left: 4px solid #3DB870;
    background: #F8FAFD;
    padding: 1em 1.25em;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #334155;
    margin: 1.5em 0;
}
.ds-article img {
    border-radius: 16px;
    margin: 1.5em 0;
    box-shadow: 0 20px 50px -20px rgba(26, 46, 107, 0.25);
}
.ds-article code {
    background: #EEF2FB;
    color: #1A2E6B;
    padding: 0.15em 0.4em;
    border-radius: 6px;
    font-size: 0.9em;
}
.ds-article pre {
    background: #0A1429;
    color: #e2e8f0;
    padding: 1.1em;
    border-radius: 14px;
    overflow-x: auto;
    margin: 1.5em 0;
}
.ds-article pre code { background: none; color: inherit; padding: 0; }
.ds-article hr { border: 0; border-top: 1px solid #e2e8f0; margin: 2em 0; }
.ds-article table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 15px; }
.ds-article th, .ds-article td { border: 1px solid #e2e8f0; padding: 0.6em 0.8em; text-align: left; }
.ds-article th { background: #EEF2FB; color: #1A2E6B; font-weight: 700; }

/* Pagination (the_posts_pagination) */
.pagination .nav-links { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; justify-content: center; }
.pagination .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 0.65rem;
    border-radius: 12px; font-size: 14px; font-weight: 600;
    color: #334155; background: #fff; border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}
.pagination a.page-numbers:hover { border-color: #2B4BA5; color: #2B4BA5; }
.pagination .page-numbers.current { background: #2B4BA5; border-color: #2B4BA5; color: #fff; }
.pagination .page-numbers.dots { border: 0; background: transparent; min-width: auto; }
