/* ============================================================
   Mana Kavali – Custom CSS
   Complements Tailwind CDN; only for things Tailwind can't do
   ============================================================ */

/* ----- Base ----- */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ----- Prose / Content Area ----- */
.prose p        { margin-bottom: 1rem; }
.prose h2       { font-size: 1.5rem; font-weight: 700; margin: 1.5rem 0 0.75rem; color: #111827; }
.prose h3       { font-size: 1.25rem; font-weight: 600; margin: 1.25rem 0 0.5rem; }
.prose ul       { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.prose ol       { list-style: decimal; padding-left: 1.5rem; margin-bottom: 1rem; }
.prose li       { margin-bottom: 0.375rem; }
.prose a        { color: #1d4ed8; text-decoration: underline; }
.prose blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1rem;
    color: #4b5563;
    margin: 1.25rem 0;
    font-style: italic;
}

/* ----- Line Clamp utilities (for older browsers) ----- */
.line-clamp-1 { -webkit-line-clamp: 1; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { -webkit-line-clamp: 3; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }

/* ----- Toggle switch (pure CSS) ----- */
input[type="checkbox"].sr-only + div { transition: background 0.2s; }
input[type="checkbox"].sr-only:checked + div { background: #ef4444; }
input[type="checkbox"].sr-only:checked + div::after { transform: translateX(1rem); }
input[type="checkbox"].sr-only + div::after {
    content: '';
    position: absolute;
    top: 0.125rem;
    left: 0.125rem;
    background: white;
    border-radius: 50%;
    height: 1rem;
    width: 1rem;
    transition: transform 0.2s;
}

/* ----- WordPress pagination ----- */
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: 0.625rem;
    border: 1px solid #e5e7eb;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: all 0.15s;
}
.pagination .page-numbers:hover { background: #eff6ff; color: #1d4ed8; border-color: #93c5fd; }
.pagination .page-numbers.current { background: #1e40af; color: white; border-color: #1e40af; }
.pagination .page-numbers.dots { border: none; cursor: default; }

/* Post pagination (the_posts_pagination) */
.nav-links { display: flex; flex-wrap: wrap; gap: 0.375rem; align-items: center; justify-content: center; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 2.25rem; height: 2.25rem; padding: 0 0.5rem; border-radius: 0.625rem; border: 1px solid #e5e7eb; font-size: 0.875rem; font-weight: 500; color: #374151; text-decoration: none; transition: all 0.15s; }
.page-numbers:hover  { background: #eff6ff; color: #1d4ed8; border-color: #93c5fd; }
.page-numbers.current { background: #1e40af; color: white; border-color: #1e40af; }

/* WP post-navigation */
.nav-previous a, .nav-next a {
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.875rem;
}
.nav-previous a:hover, .nav-next a:hover { text-decoration: underline; }

/* ----- WordPress Search Form ----- */
.search-form { display: flex; gap: 0.5rem; }
.search-field { flex: 1; padding: 0.625rem 1rem; border-radius: 0.75rem; border: 1px solid #e5e7eb; font-size: 0.875rem; outline: none; }
.search-field:focus { box-shadow: 0 0 0 2px #3b82f6; border-color: transparent; }
.search-submit { background: #1e40af; color: white; padding: 0.625rem 1.25rem; border-radius: 0.75rem; border: none; cursor: pointer; font-size: 0.875rem; font-weight: 600; transition: background 0.15s; }
.search-submit:hover { background: #1e3a8a; }

/* ----- Category list in sidebar ----- */
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { margin-bottom: 0.5rem; }
.widget ul li a { font-size: 0.875rem; color: #4b5563; text-decoration: none; transition: color 0.15s; }
.widget ul li a:hover { color: #1d4ed8; }
.cat-item .count { color: #9ca3af; font-size: 0.75rem; }

/* ----- Scrollbar (webkit) ----- */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ----- Language Toggle (EN / Telugu) ----- */
.mk-lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    padding: 2px 3px;
    margin-bottom: 5px;
    user-select: none;
    line-height: 1;
}
.mk-lang-opt {
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-family: 'Inter', system-ui, sans-serif;
}
.mk-lang-opt.active {
    background: #1e40af;
    color: #ffffff;
}
.mk-lang-opt[data-lang="te"] {
    font-family: 'Mallanna', sans-serif;
    font-size: 14px;
}

/* Telugu font applied to inputs / display elements */
.mk-telugu-input,
.mk-telugu-input::placeholder {
    font-family: 'Mallanna', sans-serif !important;
    font-size: 16px !important;
}
.mk-telugu-text {
    font-family: 'Mallanna', sans-serif;
}
.mk-telugu-text:not(h1):not(h2):not(h3) {
    font-size: 20px;
}

/* Telugu article: apply Mallanna font to the full article on the frontend */
body.mk-article-te h1,
body.mk-article-te .prose,
body.mk-article-te .prose * {
    font-family: 'Mallanna', sans-serif;
}
body.mk-article-te p,
body.mk-article-te .prose p {
    font-family: 'Mallanna', sans-serif;
    font-size: 20px;
}

/* Reply content base size (English) */
.mk-reply-content {
    font-size: 18px;
}

/* Per-content Telugu font — only applies to elements marked data-lang="te" */
[data-lang="te"],
[data-lang="te"] p,
[data-lang="te"] li,
[data-lang="te"] span {
    font-family: 'Mallanna', sans-serif !important;
}
[data-lang="te"]:not(h1):not(h2):not(h3) {
    font-size: 20px;
}
[data-lang="te"] h1,
[data-lang="te"] h2,
[data-lang="te"] h3,
[data-lang="te"] h4,
h1[data-lang="te"],
h2[data-lang="te"],
h3[data-lang="te"],
h4[data-lang="te"] {
    font-family: 'Mallanna', sans-serif !important;
    font-size: calc(1em + 7px) !important;
}
/* Preserve icon fonts inside Telugu content */
[data-lang="te"] i[class*="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
    font-size: inherit;
}

/* ----- Animations ----- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.mk-reply-new { animation: fadeIn 0.3s ease; }

/* ----- Avatar images rounding ----- */
.wp-block-avatar img, img.avatar { border-radius: 9999px; display: block; }

/* ----- Comments template basic styling ----- */
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-body { background: #f9fafb; border-radius: 1rem; padding: 1.25rem; margin-bottom: 1rem; border: 1px solid #f3f4f6; }
.comment-meta { font-size: 0.8125rem; color: #6b7280; margin-bottom: 0.5rem; }
.comment-author strong { color: #111827; font-weight: 600; }
#respond { background: #f9fafb; border-radius: 1rem; padding: 1.5rem; border: 1px solid #f3f4f6; }
#respond h3 { font-size: 1.125rem; font-weight: 700; color: #111827; margin-bottom: 1rem; }
#respond input, #respond textarea { width: 100%; padding: 0.625rem 1rem; border-radius: 0.75rem; border: 1px solid #e5e7eb; font-size: 0.875rem; outline: none; margin-bottom: 0.75rem; font-family: inherit; }
#respond input:focus, #respond textarea:focus { box-shadow: 0 0 0 2px #3b82f6; border-color: transparent; }
#respond .submit { background: #1e40af; color: white; padding: 0.75rem 1.5rem; border-radius: 0.75rem; border: none; cursor: pointer; font-size: 0.875rem; font-weight: 600; transition: background 0.15s; }
#respond .submit:hover { background: #1e3a8a; }
