/* ==========================================
   COMPONENTS.CSS
   PART 1
   Header | Navigation | Hero | Tool Card
========================================== */

/* ========= HEADER ========= */

.header{
    position: sticky;
    top: 0;
    width: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

.header .container{
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

/* ========= LOGO ========= */

.logo{
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -.5px;
}

/* ========= NAVIGATION ========= */

.nav{
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav li{
    list-style: none;
}

.nav a{
    position: relative;
    color: var(--text);
    font-weight: 500;
    transition: var(--transition);
}

.nav a:hover{
    color: var(--primary);
}

.nav a::after{
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: .3s;
}

.nav a:hover::after{
    width: 100%;
}

/* ========= HERO ========= */

.hero{
    padding: 70px 0 50px;
    text-align: center;
    background: linear-gradient(
        180deg,
        #ffffff 0%,
        #f8fafc 100%
    );
}

.hero h1{
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text);
}

.hero p{
    max-width: 720px;
    margin: auto;
    font-size: 1.1rem;
    color: var(--text-light);
}

/* ========= TOOL SECTION ========= */

.tool-section{
    padding: 50px 0;
}

.tool-card{
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

/* ========= TEXTAREA ========= */

.tool-card textarea{
    width: 100%;
    min-height: 320px;
    resize: vertical;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    font-size: 16px;
    line-height: 1.7;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: .25s ease;
}

.tool-card textarea:focus{
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}

.tool-card textarea::placeholder{
    color: #9ca3af;
}

/* ========= BUTTON GROUP ========= */

.button-group{
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

/* ========= BUTTON ========= */

.button-group button{
    cursor: pointer;
    border: none;
    padding: 12px 22px;
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
    font-size: .95rem;
    font-weight: 600;
    transition: var(--transition);
}

.button-group button:hover{
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.button-group button:active{
    transform: scale(.98);
}

/* ========= SECTION SPACING ========= */

.content{
    padding: 60px 0;
}

.content h2{
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text);
}

.content p{
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.8;
}

.content ul,
.content ol{
    padding-left: 20px;
}

.content li{
    margin-bottom: 12px;
    color: var(--text);
}
/* ==========================================
   COMPONENTS.CSS
   PART 2
   Results | Feature Cards | Related Tools
========================================== */

/* ========= RESULTS GRID ========= */

.results-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:20px;
    margin-top:32px;
}

/* ========= RESULT CARD ========= */

.result-card{
    min-height:160px;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    padding:24px 18px;
    text-align:center;
    box-shadow:var(--shadow);
    transition:var(--transition);
    cursor:default;
    overflow: hidden;
}

.result-card:hover{
    transform:translateY(-6px);
    box-shadow:0 18px 35px rgba(0,0,0,.10);
    border-color:var(--primary);
}

.result-card h3{
   font-size: 2rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-card p{
    color:var(--text-light);
    font-size:.95rem;
    margin:0;
}

/* ========= FEATURE LIST ========= */

.content ul{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:18px;
    margin-top:25px;
    padding:0;
}

.content ul li{
    list-style:none;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:18px;
    box-shadow:0 6px 18px rgba(0,0,0,.05);
    transition:var(--transition);
}

.content ul li:hover{
    transform:translateY(-5px);
    border-color:var(--primary);
}

/* ========= HOW TO USE ========= */

.content ol{
    margin-top:20px;
    display:flex;
    flex-direction:column;
    gap:18px;
}

.content ol li{
    background:var(--surface);
    border-left:5px solid var(--primary);
    border-radius:var(--radius);
    padding:18px 20px;
    box-shadow:0 6px 18px rgba(0,0,0,.05);
}

/* ========= RELATED TOOLS ========= */

.related-tools{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:20px;
    margin-top:30px;
}

.tool-link{
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    min-height:120px;
    padding:20px;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    font-weight:600;
    color:var(--text);
    transition:var(--transition);
}

.tool-link:hover{
    background:var(--primary);
    color:#fff;
    border-color:var(--primary);
    transform:translateY(-6px);
}

/* ========= SMALL INFO BOX ========= */

.info-box{
    margin-top:30px;
    background:#eef6ff;
    border:1px solid #c7defd;
    border-left:5px solid var(--primary);
    padding:20px;
    border-radius:var(--radius);
}

.info-box h3{
    margin-bottom:10px;
}

.info-box p{
    margin:0;
}

/* ========= SECTION DIVIDER ========= */

.section-divider{
    width:80px;
    height:4px;
    background:var(--primary);
    margin:18px auto 40px;
    border-radius:50px;
}
/* ==========================================
   COMPONENTS.CSS
   PART 3
   FAQ | Footer | Responsive | Utilities
========================================== */


/* ===========================
   FAQ
=========================== */

.faq{
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.faq:hover{
    border-color: var(--primary);
    transform: translateY(-2px);
}

.faq h3{
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text);
}

.faq p{
    color: var(--text-light);
    margin: 0;
}

/* Dono text tools ke clickable FAQs Notepad jaise +/− accordion cards hain. */
.qtd-text-tool-page details.faq { padding: 0; margin-bottom: 10px; border-radius: 12px; box-shadow: none; }
.qtd-text-tool-page details.faq:hover { transform: none; }
.qtd-text-tool-page details.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; list-style: none; cursor: pointer; color: var(--text); font-weight: 700; }
.qtd-text-tool-page details.faq summary::-webkit-details-marker { display: none; }
.qtd-text-tool-page details.faq summary::after { content: "+"; flex: none; color: var(--primary-dark); font-size: 1.35rem; line-height: 1; }
.qtd-text-tool-page details.faq[open] summary::after { content: "−"; }
.qtd-text-tool-page details.faq summary:focus-visible { outline: 2px solid var(--primary-dark); outline-offset: 2px; border-radius: 12px; }
.qtd-text-tool-page details.faq > p { padding: 0 18px 16px; }

/* Homepage FAQ ko wahi clear +/− accordion interaction deta hai; rules sirf
   homepage FAQ section par lagte hain aur tool pages ko affect nahi karte. */
.home-faq-section details.faq { padding: 0; margin-bottom: 10px; border-radius: 12px; box-shadow: none; }
.home-faq-section details.faq:hover { transform: none; }
.home-faq-section details.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; list-style: none; cursor: pointer; color: var(--text); font-weight: 700; }
.home-faq-section details.faq summary::-webkit-details-marker { display: none; }
.home-faq-section details.faq summary::after { content: "+"; flex: none; color: var(--primary-dark); font-size: 1.35rem; line-height: 1; }
.home-faq-section details.faq[open] summary::after { content: "−"; }
.home-faq-section details.faq summary:focus-visible { outline: 2px solid var(--primary-dark); outline-offset: 2px; border-radius: 12px; }
.home-faq-section details.faq > p { padding: 0 18px 16px; }


/* ===========================
   FOOTER
=========================== */

footer{
    margin-top: 60px;
    background: #111827;
    color: #fff;
    padding: 40px 0;
}

footer p{
    text-align: center;
    color: rgba(255,255,255,.75);
    font-size: .95rem;
}


/* ===========================
   UTILITIES
=========================== */

.text-center{
    text-align: center;
}

.mt-20{
    margin-top:20px;
}

.mt-40{
    margin-top:40px;
}

.mb-20{
    margin-bottom:20px;
}

.mb-40{
    margin-bottom:40px;
}



/* ===========================
   SCROLLBAR
=========================== */

::-webkit-scrollbar{

    width:10px;

}

::-webkit-scrollbar-track{

    background:#f1f5f9;

}

::-webkit-scrollbar-thumb{

    background:var(--primary);

    border-radius:20px;

}

::-webkit-scrollbar-thumb:hover{

    background:var(--primary-dark);

}


/* ===========================
   ANIMATION
=========================== */

@keyframes fadeUp{

    from{

        opacity:0;

        transform:translateY(25px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

.result-card,
.tool-card,
.faq{

    animation:fadeUp .5s ease;

}


/* ===========================
   RESPONSIVE
=========================== */

@media (max-width:992px){

.hero h1{

    font-size:2.2rem;

}

.nav{

    gap:1rem;

}

}


@media (max-width:768px){

.header .container{

    flex-direction:column;

    gap:15px;

    padding:15px 0;

}

.nav{

    flex-wrap:wrap;

    justify-content:center;

}

.hero{

    padding:50px 0;

}

.hero h1{

    font-size:1.9rem;

}

.hero p{

    font-size:1rem;

}

.button-group{

    flex-direction:column;

}

.button-group button{

    width:100%;

}

.results-grid{

    grid-template-columns:repeat(2,1fr);

}

.tool-card textarea{

    min-height:250px;

}

}


@media (max-width:480px){

.results-grid{

    grid-template-columns:1fr;

}

.logo{

    font-size:1.2rem;

}

.hero h1{

    font-size:1.6rem;

}

.content h2{

    font-size:1.5rem;

}

.container{

    width:94%;

}

}
/* ==========================================
   WORD FREQUENCY TABLE
========================================== */

#wordFrequencyTable{

    width:100%;

    border-collapse:collapse;

}

#wordFrequencyTable th{

    background:var(--primary);

    color:#fff;

    padding:14px;

    text-align:left;

}

#wordFrequencyTable td{

    padding:14px;

    border-bottom:1px solid var(--border);

}

#wordFrequencyTable tbody tr:hover{

    background:#f8fafc;

}

#wordFrequencyBody td{

    color:var(--text);

}
/* ===========================
   CUSTOM MODAL
=========================== */

/* ==========================
   CONFIRM MODAL
========================== */

.modal{
    position: fixed;
    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;

    background: rgba(15, 23, 42, 0.45);

    z-index: 999998;
}

.modal.show{
    display: flex;
}

.modal-box{
    width: 90%;
    max-width: 420px;

    padding: 30px;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 16px;

    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);

    text-align: center;
}

.modal-box h3{
    margin: 0 0 10px;

    color: #111827;

    font-size: 22px;
    font-weight: 700;
}

.modal-box p{
    margin: 0 0 25px;

    color: #6b7280;

    font-size: 15px;
    line-height: 1.6;
}

.modal-buttons{
    display: flex;
    justify-content: center;
    gap: 12px;
}

.modal-buttons button{
    padding: 11px 22px;

    border: none;
    border-radius: 8px;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition: 0.2s ease;
}

/* Cancel */

#cancelClear{
    background: #f3f4f6;
    color: #374151;
}
#cancelClear:hover {
    background: #e5e7eb;
}


/* Clear */

#confirmClear {
    background: #2563eb;
    color: #ffffff;
}

#confirmClear:hover {
    background: #1d4ed8;
}
/* ==========================
   KEYWORD DENSITY TABLE
========================== */

.checkbox{

    display:flex;

    align-items:center;

    gap:10px;

    margin:20px 0;

    font-weight:600;

}

.frequency-table{

    width:100%;

    border-collapse:collapse;

}

.frequency-table th{

    background:#2563eb;

    color:#fff;

    padding:14px;

}

.frequency-table td{

    padding:14px;

    border-bottom:1px solid #ddd;

}

.frequency-table tr:hover{

    background:#f5f5f5;

}
/* ==========================
   TOAST
========================== */

.toast {
    position: fixed;

    top: 90px;
    right: 20px;

    width: fit-content;
    max-width: 320px;

    padding: 14px 20px;

    background: #2563eb;
    color: #fff;

    font-size: 15px;
    font-weight: 600;

    border-radius: 10px;

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);

    opacity: 0;
    visibility: hidden;

    transform: translateY(-10px);

    transition: 0.3s ease;

    z-index: 999999;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
/* ==========================
   TEXT CASE CONVERTER BUTTONS
========================== */

.case-buttons {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.case-buttons .primary-btn {
    min-height: 52px;
    padding: 12px 16px;
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.case-buttons .primary-btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

.case-buttons .primary-btn:active {
    transform: scale(.98);
}

.case-buttons .primary-btn:focus-visible {
    outline: 3px solid var(--primary-dark);
    outline-offset: 3px;
}

@media (max-width: 768px) {
    .case-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile: case conversion buttons ko compact aur neat banata hai */
@media (max-width: 480px) {
    /* Buttons do columns mein, chhote gap ke saath */
    .case-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 16px;
    }

    /* Buttons ki height aur text size kam karta hai */
    .case-buttons .primary-btn {
        min-height: 44px;
        padding: 8px 6px;
        border-radius: 12px;
        font-size: 0.8rem;
        box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
    }
}
/* Compact related tool card */
.content .related-tool-list {
    width: min(100%, 320px);
    grid-template-columns: 1fr;
}

.content .related-tool-list li {
    padding: 0;
}

.content .related-tool-list li a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 72px;
    padding: 18px;
    border-radius: var(--radius);
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
/* Tools navigation dropdown */

.nav .tools-menu {
    position: relative;
}

.tools-trigger {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

.tools-trigger:hover,
.tools-trigger:focus-visible {
    color: var(--primary);
}

.tools-trigger span {
    color: var(--primary);
}

.nav .tools-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: max-content;
    min-width: 220px;
    padding: 10px 0 0;
    z-index: 1100;
}

.nav .tools-dropdown::before {
    content: "";
    position: absolute;
    top: 10px;
    right: 0;
    bottom: 0;
    left: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: -1;
}

.nav .tools-menu.tools-open .tools-dropdown {
    display: block;
}

.nav .tools-dropdown li {
    margin: 0;
}

.nav .tools-dropdown a {
    display: block;
    padding: 10px 16px;
    white-space: nowrap;
}

.nav .tools-dropdown a::after {
    display: none;
}

.nav .tools-dropdown a:hover {
    background: #eff6ff;
}

@media (max-width: 480px) {
    .nav .tools-dropdown {
        left: 50%;
        transform: translateX(-50%);
    }
}
/* Home hero ko soft blue depth deta hai; text aur buttons wahi rehte hain. */
.home-page .home-hero {
    padding: 88px 0;
    background:
        radial-gradient(circle at 88% 20%, rgba(16, 185, 129, .14), transparent 32%),
        radial-gradient(circle at 12% 75%, rgba(59, 130, 246, .14), transparent 38%),
        linear-gradient(135deg, #eff6ff 0%, #ffffff 58%, #f0fdf4 100%);
}

.home-hero-inner {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    align-items: center;
    gap: 64px;
}

.home-eyebrow {
    color: var(--primary);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.home-page h1 {
    font-size: clamp(2.3rem, 5vw, 4.2rem);
    line-height: 1.12;
    letter-spacing: -.04em;
    max-width: 720px;
}

.home-lead {
    color: var(--text-light);
    font-size: 1.12rem;
    max-width: 650px;
    margin-top: 22px;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 20px;
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    transition: var(--transition);
}

.home-button:hover {
    background: var(--primary-dark);
}

.home-button-secondary {
    background: #fff;
    color: var(--primary);
    border: 1px solid #bfdbfe;
}

.home-button-secondary:hover {
    background: #eff6ff;
    color: var(--primary);
}

.home-preview,
.home-card,
.home-feature-note {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

/* Hero ka available-tools card background se zyada clearly alag dikhta hai. */
.home-preview {
    padding: 26px;
    border-color: #bfdbfe;
    box-shadow: 0 18px 45px rgba(30, 64, 175, .12);
}

.home-preview-label {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--text-light);
}

.home-preview-row {
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    padding: 23px 0;
}

.home-preview-row span:first-child {
    color: var(--primary);
    font-weight: 700;
}

.home-preview-row span:last-child {
    margin-left: auto;
    color: var(--primary);
}

.home-preview p {
    color: var(--text-light);
    font-size: .9rem;
    margin-top: 20px;
}

.home-section {
    padding: 72px 0;
}

.home-section h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 25px;
}

.home-section-soft {
    background: #eff6ff;
}

/* Privacy Policy ka long text readable line length aur clear section spacing
   mein rakhta hai; styling sirf isi page ke content par apply hoti hai. */
.qtd-privacy-content .container { max-width: 850px; }
.qtd-privacy-content h2 { margin: 30px 0 10px; font-size: clamp(1.25rem, 2vw, 1.6rem); }
.qtd-privacy-content h2:first-child { margin-top: 0; }
.qtd-privacy-content p { margin: 0 0 16px; line-height: 1.75; }
.qtd-privacy-content a { color: var(--primary-dark); text-decoration: underline; }

.home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

/* Sirf homepage tool cards ko horizontal slider banata hai; guest-post cards
   apne existing grid layout mein rehte hain. Scroll snap touch swipe sambhalta hai. */
.home-tools-slider .home-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 22px) / 2);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 5px 2px 18px;
    scrollbar-width: thin;
}
.home-tools-slider .home-card { scroll-snap-align: start; min-width: 0; }
.home-slider-controls { display: flex; justify-content: flex-end; gap: 9px; margin: 0 0 12px; }
.home-slider-button {
    width: 40px; height: 40px; border: 1px solid var(--border);
    border-radius: 50%; background: var(--surface); color: var(--primary-dark);
    font: inherit; font-size: 1.2rem; cursor: pointer;
}
.home-slider-button:disabled { opacity: .45; cursor: default; }
.home-slider-button:focus-visible, .home-tools-slider .home-grid:focus-visible { outline: 2px solid var(--primary-dark); outline-offset: 2px; }
/* Phone par ek card poora aur agle card ka hissa dikhta hai, taaki swipe ka hint mile. */
@media (max-width: 700px) {
    .home-tools-slider .home-grid { grid-auto-columns: min(84%, 340px); gap: 14px; }
    .home-slider-controls { margin: 0 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .home-tools-slider .home-grid { scroll-behavior: auto; }
}

.home-card {
    padding: 30px;
}

.home-card-icon {
    display: inline-flex;
    padding: 8px 12px;
    background: #eff6ff;
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 24px;
}

.home-card h3 {
    font-size: 1.35rem;
    margin-bottom: 10px;
}

.home-card p,
.home-feature p,
.home-bottom p,
.guest-guidelines p {
    color: var(--text-light);
    margin-bottom: 22px;
}

.home-card a,
.home-bottom a {
    color: var(--primary);
    font-weight: 700;
}

.home-card a:hover,
.home-bottom a:hover {
    text-decoration: underline;
}

.home-feature,
.guest-guidelines {
    display: grid;
    grid-template-columns: 1.4fr .6fr;
    gap: 45px;
    align-items: center;
}

.home-feature-note {
    padding: 28px;
}

.home-feature-note strong,
.home-feature-note h3 {
    display: block;
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.home-feature-note p {
    margin: 0;
}

.home-bottom {
    text-align: center;
}

.home-bottom p {
    margin-bottom: 12px;
}

.guest-hero {
    text-align: center;
}

.guest-hero h1,
.guest-hero .home-lead {
    margin-left: auto;
    margin-right: auto;
}

.guest-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 768px) {
    .home-page .home-hero {
        padding: 58px 0;
    }

    .home-hero-inner,
    .home-feature,
    .guest-guidelines {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .home-grid,
    .guest-grid {
        grid-template-columns: 1fr;
    }

    .home-section {
        padding: 50px 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-button {
        transition: none;
    }
}
.modal-buttons button:focus {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}
/* Shared site footer */

.site-footer {
    margin-top: 0;
    padding: 56px 0 20px;
    background: #111827;
    color: #ffffff;
}

.site-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
}

.site-footer-about strong {
    display: block;
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.site-footer-about p {
    max-width: 340px;
    margin: 0;
    text-align: left;
    color: #cbd5e1;
}

.site-footer h2 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: #ffffff;
}

.site-footer ul {
    display: block;
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer li {
    margin-bottom: 10px;
}

.site-footer a {
    color: #cbd5e1;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: #ffffff;
    text-decoration: underline;
}

.site-footer-bottom {
    margin-top: 42px;
    padding-top: 20px;
    border-top: 1px solid #374151;
}

.site-footer-bottom p {
    margin: 0;
    color: #9ca3af;
    text-align: left;
    font-size: .9rem;
}

@media (max-width: 768px) {
    .site-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .site-footer-about {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .site-footer-grid {
        grid-template-columns: 1fr;
    }

    .site-footer-about {
        grid-column: auto;
    }
}

.logo img {
    display: block;
    width: 240px;
    max-width: 100%;
    height: auto;
}
@media (max-width: 480px) {
    .nav {
        width: 100%;
        justify-content: center;
        gap: 6px;
        font-size: 14px;
    }

    .nav a,
    .nav .tools-trigger {
        white-space: nowrap;
    }
}
.menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0;
        min-height: 64px;
        padding: 10px 0;
    }

    .header .logo img {
        width: 200px;
    }

    .menu-toggle {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: var(--surface);
        color: var(--text);
        font-size: 25px;
        cursor: pointer;
        color: var(--primary);
        border-color: var(--primary);
        
    }

    .menu-toggle:focus-visible {
        outline: 3px solid var(--primary);
        outline-offset: 2px;
    }

    .header nav[aria-label="Main navigation"] {
        display: none;
        width: 100%;
        order: 3;
    }

    .header.menu-open nav[aria-label="Main navigation"] {
        display: block;
    }

    .header .nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 0 4px;
        font-size: 16px;
    }

    .header .nav > li > a,
    .header .nav .tools-trigger {
        display: block;
        width: 100%;
        min-height: 44px;
        padding: 10px 8px;
        text-align: left;
    }

    .header .nav .tools-dropdown {
        position: static;
        left: auto;
        transform: none;
        width: 100%;
        min-width: 0;
        padding: 0 0 8px 12px;
    }

    .header .nav .tools-dropdown::before {
        display: none;
    }
}
@media (max-width: 768px) {
    /* WordPress page.php mein hero main ke andar hai; sirf dono tool pages ka gap kam rakho. */
    #site-header[data-page="word-counter"] ~ #main-content > .hero,
    #site-header[data-page="text-case-converter"] ~ #main-content > .hero {
        padding-bottom: 16px;
    }

    /* Hero ke turant baad tool card ko paas rakho, baaki sections ki spacing na badlo. */
    #site-header[data-page="word-counter"] ~ #main-content > .tool-section,
    #site-header[data-page="text-case-converter"] ~ #main-content > .tool-section {
        padding-top: 18px;
    }
}
/* Mobile: sabhi tools ke Copy, Clear aur Download buttons ek line mein */
@media (max-width: 480px) {
    /* Buttons ko ek row mein rakhta hai */
    .tool-card .button-group {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
    }

    /* Teenon buttons ko barabar jagah deta hai */
    .tool-card .button-group button {
        flex: 1;
        min-width: 0;
        width: auto;
        padding: 10px 4px;
        font-size: 0.75rem;
    }
}
/* Mobile: Word Counter ke result boxes compact rakhta hai */
@media (max-width: 480px) {
    /* Har row mein 2 boxes aur chhota gap */
    .results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-top: 20px;
    }

    /* Fixed minimum height hatata hai; box content ke hisaab se banta hai */
    .result-card {
        min-height: 0;
        padding: 10px 6px;
    }

    /* Count aur time poora dikhata hai, neeche ka gap kam karta hai */
    .result-card h3 {
        margin: 0 0 3px;
        font-size: 1rem;
        line-height: 1.2;
        white-space: normal;
        overflow-wrap: anywhere;
        text-overflow: clip;
    }

    /* Words, Reading Time jaise labels ko compact rakhta hai */
    .result-card p {
        margin: 0;
        font-size: 0.75rem;
        line-height: 1.25;
    }
}
/* Mobile: Word Counter ke sections aur tables compact */
@media (max-width: 480px) {
    /* Sections ke beech khaali jagah kam */
    #site-header[data-page="word-counter"] ~ .content {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    /* Section headings mobile par chhoti */
    #site-header[data-page="word-counter"] ~ .content h2 {
        font-size: 1.4rem;
    }

    /* Dono tables ke cells aur text compact */
    #wordFrequencyTable th,
    #wordFrequencyTable td,
    .frequency-table th,
    .frequency-table td {
        padding: 8px;
        font-size: 0.875rem;
    }

    /* Ignore Stop Words checkbox ka text compact */
    #site-header[data-page="word-counter"] ~ .content .checkbox {
        font-size: 0.9rem;
        margin: 12px 0;
    }
}

/* ==================================================
   MOBILE LAYOUT: poori Quick Tool Desk website
   Is block se mobile headings, spacing aur cards set hote hain
================================================== */
@media (max-width: 768px) {
    /* Normal pages ke hero aur content sections ka gap */
    main > .hero {
        padding: 36px 0 24px;
    }

    main > .content {
        padding: 32px 0;
    }

    /* H1 aur H2 ko mobile screen ke hisaab se rakhta hai */
    .hero h1 {
        font-size: 1.9rem;
        line-height: 1.2;
    }

    .content h2,
    .home-section h2 {
        font-size: 1.6rem;
        line-height: 1.25;
    }

    /* H3 aur H4 ka readable mobile size */
    .content h3,
    .home-card h3,
    .home-feature-note h3 {
        font-size: 1.1rem;
        line-height: 1.3;
    }

    main h4 {
        font-size: 1rem;
        line-height: 1.35;
    }

    /* Paragraphs ko readable rakhta hai */
    .hero p,
    .content p,
    .home-lead,
    .home-card p {
        font-size: 1rem;
        line-height: 1.6;
    }

    /* Home aur Guest Post sections compact */
    .home-page .home-hero {
        padding: 44px 0;
    }

    .home-section {
        padding: 36px 0;
    }
}

@media (max-width: 480px) {
    /* Chhote phones par side spacing aur hero */
    .container {
        width: 92%;
    }

    main > .hero {
        padding: 30px 0 20px;
    }

    .hero h1,
    .home-page h1 {
        font-size: 1.65rem;
        line-height: 1.2;
    }

    .content h2,
    .home-section h2 {
        font-size: 1.4rem;
        line-height: 1.25;
    }

    /* Home page aur Guest Post ke cards kam jagah lete hain */
    .home-page .home-hero {
        padding: 36px 0;
    }

    .home-section {
        padding: 28px 0;
    }

    .home-card,
    .home-preview,
    .home-feature-note {
        padding: 18px;
    }

    .home-preview-row {
        padding: 14px 0;
        gap: 8px;
    }

    /* Tool aur information cards ki inner spacing */
    .tool-card {
        padding: 16px;
    }

    .faq,
    .info-box,
    .content ol li {
        padding: 16px;
    }

    /* Dono tools ka text box mobile par manageable height */
    .tool-card textarea {
        min-height: 200px;
    }

    /* Word Counter ke dono tables ka mobile text aur row spacing */
    #wordFrequencyTable th,
    #wordFrequencyTable td,
    .frequency-table th,
    .frequency-table td {
        padding: 8px 6px;
        font-size: 0.875rem;
        overflow-wrap: anywhere;
    }

    /* Clear confirmation popup chhoti screen mein fit rahe */
    .modal-box {
        padding: 20px;
    }

    /* Footer ka gap aur text size */
    .site-footer {
        padding-top: 36px;
    }

    .site-footer-bottom {
        margin-top: 28px;
    }
}
/* Mobile: dono tool pages ke information sections ka spacing */
@media (max-width: 768px) {
    /* Tool ke baad pehla information section */
    #site-header[data-page="word-counter"] ~ .content,
    #site-header[data-page="text-case-converter"] ~ .content {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    /* Lagataar sections ke beech extra khaali jagah hatata hai */
    .content + .content {
        padding-top: 8px;
    }

    /* Section heading aur uske content ke beech balanced gap */
    .content h2 {
        margin-bottom: 16px;
    }
}
/* Contact aur Guest Posts ke email links ko clearly dikhata hai */
#site-header[data-page="contact"] ~ main a[href^="mailto:"],
.guest-page a[href^="mailto:"] {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Desktop: dono tools par header aur text box ke beech gap kam */
@media (min-width: 769px) {
    /* WordPress page.php mein hero main ke andar hai; desktop heading ka gap compact rakho. */
    #site-header[data-page="word-counter"] ~ #main-content > .hero,
    #site-header[data-page="text-case-converter"] ~ #main-content > .hero {
        padding: 38px 0 16px;
    }

    /* Heading ke baad dono tools ka text box paas laata hai. */
    #site-header[data-page="word-counter"] ~ #main-content > .tool-section,
    #site-header[data-page="text-case-converter"] ~ #main-content > .tool-section {
        padding-top: 16px;
    }
}
/* Desktop: Word Counter result cards aur sections balanced */
@media (min-width: 993px) {
    /* Cards ko rows mein rakhta hai; aakhri 3 cards center hote hain */
    .results-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
        max-width: none;
        margin-top: 22px;
    }

    /* Card ki height content ke hisaab se; upar-neeche kam space */
.results-grid .result-card {
    flex: 0 1 calc((100% - 48px) / 4);
    min-height: 0;
    padding: 8px 10px;
}

    /* Long values poori dikhata hai */
    .results-grid .result-card h3 {
        font-size: 1.2rem;
        line-height: 1.2;
        white-space: normal;
        overflow-wrap: anywhere;
        text-overflow: clip;
    }

    /* Word Counter ke information sections ke beech gap kam */
    #site-header[data-page="word-counter"] ~ .content {
        padding-top: 36px;
        padding-bottom: 36px;
    }

    /* Section headings ka size aur neeche ka gap */
    #site-header[data-page="word-counter"] ~ .content h2 {
        font-size: 1.65rem;
        margin-bottom: 18px;
    }
}
/* Desktop: dono tools ke text boxes ki default height kam */
@media (min-width: 769px) {
    .tool-card textarea {
        min-height: 240px;
        height: 240px;
    }
}
/* Desktop: dono tool pages ke headings/sections ke beech gap kam */
@media (min-width: 769px) {
    #site-header[data-page="word-counter"] ~ .content,
    #site-header[data-page="text-case-converter"] ~ .content {
        padding-top: 28px;
        padding-bottom: 28px;
    }
}
/* Blog hero ko compact blue section banata hai aur upar ka empty space kam karta hai. */
.blog-page .blog-hero {
    padding: 68px 0 72px;
    background: linear-gradient(135deg, #172554 0%, #1e40af 68%, #2563eb 100%);
    color: #fff;
}

/* Blog hero ke chhote label ko readable accent deta hai. */
.blog-page .blog-eyebrow {
    margin: 0 0 14px;
    color: #bfdbfe;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .12em;
}

/* Blog hero heading ki width aur line spacing control karta hai. */
.blog-page .blog-hero h1 {
    max-width: 900px;
    margin: 0;
    color: #fff;
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    line-height: 1.14;
}

/* Blog hero ke intro ko heading se alag aur readable rakhta hai. */
.blog-page .blog-hero p:last-child {
    max-width: 720px;
    margin: 18px 0 0;
    color: #dbeafe;
    font-size: 1.08rem;
    line-height: 1.65;
}

/* Article listing ko hero se balanced distance deta hai. */
.blog-page .blog-listing {
    padding: 64px 0 80px;
    background: #f8fafc;
}

/* Latest Guides heading aur short intro ko ek row mein rakhta hai. */
.blog-page .blog-listing-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

/* Listing ke label ka color dark background ki jagah light background ke liye set karta hai. */
.blog-page .blog-listing-heading .blog-eyebrow {
    color: #2563eb;
}

/* Listing heading ka extra default gap hatata hai. */
.blog-page .blog-listing-heading h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

/* Listing ke short intro ko secondary text banata hai. */
.blog-page .blog-listing-heading > p {
    max-width: 340px;
    margin: 0;
    color: #64748b;
    line-height: 1.5;
}

/* Dono article cards ko desktop par equal-width columns mein rakhta hai. */
/* Desktop par ek row mein teen equal-width blog cards rakhta hai. */
.blog-page .blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

/* Article card ko clear border, shadow aur vertical layout deta hai. */
/* Blog card ko image aur content ke liye ek clipped container banata hai. */
.blog-page .blog-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dbe4f0;
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 32px rgba(15, 23, 42, .07);
}

/* Cover image link ko poori card width deta hai. */
.blog-page .blog-image-link {
    display: block;
    line-height: 0;
}

/* Cover image ko compact height mein crop karta hai, taaki card lamba na ho. */
.blog-page .blog-image-link img {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: cover;
}

/* Image ke neeche content ki spacing compact rakhta hai. */
/* Image ke neeche card content ko compact rakhta hai. */
.blog-page .blog-card-body {
    display: flex;
    flex-direction: column;
    padding: 18px;
}

/* Category aur number ko ek row mein rakhta hai aur title se gap kam karta hai. */
.blog-page .blog-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

/* Article category ko blue label mein dikhata hai. */
.blog-page .blog-topic {
    padding: 8px 11px;
    background: #eff6ff;
    border-radius: 999px;
    color: #1d4ed8;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
}

/* Decorative article number ko secondary color deta hai. */
.blog-page .blog-number {
    color: #cbd5e1;
    font-size: 1.6rem;
    font-weight: 700;
}

/* Card title ki readable size aur spacing set karta hai. */
/* Teen-column layout mein article title ko readable, compact size deta hai. */
.blog-page .blog-card h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
    line-height: 1.32;
}

/* Clickable title ko heading ka dark color deta hai. */
.blog-page .blog-card h3 a {
    color: inherit;
    text-decoration: none;
}

/* Card summary ko secondary color deta hai. */
/* Summary ka size aur line spacing card ke hisaab se rakhta hai. */
.blog-page .blog-card-body > p:not(.blog-meta) {
    margin: 0 0 12px;
    color: #64748b;
    font-size: .95rem;
    line-height: 1.5;
}

/* Demo author aur date ko chhota, readable metadata banata hai. */
/* Author aur date ko summary ke kareeb, secondary text mein dikhata hai. */
.blog-page .blog-meta {
    margin: 0 0 14px;
    color: #64748b;
    font-size: .82rem;
    line-height: 1.4;
}

/* Read link ko card ke bottom par rakhta hai. */
/* Read link ko metadata ke turant neeche rakhta hai; auto gap hatata hai. */
.blog-page .blog-read-link {
    align-self: flex-start;
    margin-top: 0;
    color: #1d4ed8;
    font-size: .92rem;
    font-weight: 700;
    text-decoration: none;
}

/* Mouse aur keyboard focus par text links ko clearly underline karta hai. */
.blog-page .blog-card h3 a:hover,
.blog-page .blog-card h3 a:focus-visible,
.blog-page .blog-read-link:hover,
.blog-page .blog-read-link:focus-visible {
    text-decoration: underline;
}

/* Mobile par hero compact aur article cards single column rakhta hai. */
@media (max-width: 768px) {
    .blog-page .blog-hero {
        padding: 48px 0 52px;
    }

    /* Mobile par Latest Guides section ke upar-neeche ka space kam karta hai. */
.blog-page .blog-listing {
    padding: 26px 0 42px;
}

/* Heading aur pehle article card ke beech ka gap kam karta hai. */
.blog-page .blog-listing-heading {
    display: block;
    margin-bottom: 18px;
}

/* Short intro ko heading ke kareeb rakhta hai. */
.blog-page .blog-listing-heading > p {
    margin-top: 8px;
}

    .blog-page .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-page .blog-card {
        min-height: 0;
    }

    /* Mobile par image ke neeche card text ki padding kam karta hai. */
    .blog-page .blog-card-body {
    padding: 22px;
    }
    /* Mobile par blog hero ki heading ko compact rakhta hai. */
.blog-page .blog-hero h1 {
    font-size: clamp(1.9rem, 7vw, 2.4rem);
    line-height: 1.18;
}

/* Mobile par hero intro ko comfortable reading size deta hai. */
.blog-page .blog-hero p:last-child {
    font-size: 1rem;
    line-height: 1.55;
}

/* Mobile par hero ke upar-neeche ka empty space kam karta hai. */
.blog-page .blog-hero {
    padding-top: 38px;
    padding-bottom: 42px;
}
}
/* Article page ki width control karta hai; header, image aur content align rehte hain. */
.article-page .article-wrap {
    width: min(1120px, calc(100% - 40px));
    margin-inline: auto;
}

/* Article image aur us par aane wale text ka outer spacing set karta hai. */
/* Cover ke upar ka gap rakhta hai; image ko full screen width milti hai. */
/* Site header ke turant neeche featured image rakhta hai. */
.article-header {
    width: 100%;
    padding: 0 0 38px;
}

/* Sirf article header ka width limit hatata hai; neeche ka content limited rehta hai. */
.article-page .article-header .article-wrap {
    width: 100%;
}
/* Image aur text ko ek hi rounded cover ke andar rakhta hai. */
.article-cover {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    min-height: 440px;
    overflow: hidden;
    border-radius: 0px;
    background: #172554;
}

/* Featured image poore cover ko fill karti hai. */
.article-cover-image {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dark gradient text ko image par readable banata hai. */
.article-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        90deg,
        rgba(10, 22, 49, 0.94) 0%,
        rgba(10, 22, 49, 0.78) 48%,
        rgba(10, 22, 49, 0.20) 100%
    );
}

/* Back link ko upar aur article details ko neeche rakhta hai. */
/* Back link upar aur title/details ko image ke beech mein rakhta hai. */
.article-cover-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 440px;
    padding: 30px max(20px, calc((100vw - 1120px) / 2)) 38px;
}

/* Title, description aur date ko cover ke center mein align karta hai. */
.article-cover-details {
    width: 100%;
    max-width: 800px;
    margin: auto;
    text-align: center;
}

.article-back {
    align-self: flex-start;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.article-back:hover,
.article-back:focus-visible {
    text-decoration: underline;
}

/* Title aur details ko image ke left side mein readable width deta hai. */
.article-cover-details {
    max-width: 730px;
}

.article-category {
    margin: 0 0 12px;
    color: #bfdbfe;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.article-header h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.1rem, 4vw, 3.3rem);
    line-height: 1.16;
    letter-spacing: -0.035em;
}

.article-subtitle {
    max-width: 650px;
    margin: 16px auto 0;
    color: #e2e8f0;
    font-size: 1.08rem;
    line-height: 1.6;
}

.article-meta {
    margin: 18px 0 0;
    color: #dbeafe;
    font-size: 0.88rem;
}

/* Desktop par article left aur related guides box right mein rakhta hai. */
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    align-items: start;
    gap: clamp(24px, 3vw, 36px);
    padding-bottom: 72px;
}

.article-body {
    min-width: 0;
    max-width: 720px;
    color: #35435d;
    font-size: 1rem;
    line-height: 1.85;
}

.article-body p {
    margin: 0 0 22px;
}

.article-body .article-intro {
    color: #24324c;
    font-size: 1.12rem;
    line-height: 1.8;
}

.article-body h2 {
    margin: 38px 0 12px;
    color: #17233f;
    font-size: clamp(1.35rem, 2vw, 1.65rem);
    line-height: 1.35;
}

/* Article ki unordered checklists mein bullets dikhata hai aur unke liye jagah rakhta hai. */
.article-body ul {
    margin: 0 0 24px;
    padding-left: 24px;
    list-style: disc;
}

.article-body li {
    margin-bottom: 9px;
}

/* Article ke andar internal links ko clearly clickable dikhata hai. */
.article-body a {
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* Mouse aur keyboard focus par link ko aur clear karta hai. */
.article-body a:hover,
.article-body a:focus-visible {
    color: #1e40af;
    text-decoration-thickness: 2px;
}

/* Related guides ko article se alag ek readable card mein dikhata hai. */
.article-sidebar {
    position: sticky;
    top: 24px;
    padding: 25px;
    border: 1px solid #e0e7f3;
    border-radius: 18px;
    background: #f7f9fe;
    box-shadow: 0 10px 28px rgba(27, 48, 94, 0.05);
}

.article-sidebar-label {
    margin: 0 0 8px;
    color: #3359bd;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.article-sidebar h2 {
    margin: 0 0 20px;
    color: #17233f;
    font-size: 1.25rem;
    line-height: 1.35;
}

/* Related blog card mein image ko card ki poori width deta hai. */
.article-related-link {
    display: block;
    overflow: hidden;
    border: 1px solid #e3e9f4;
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
}

/* Sidebar ki blog image chhoti aur neatly cropped rakhta hai. */
.article-related-link img {
    display: block;
    width: 100%;
    height: 125px;
    object-fit: cover;
}

/* Image ke neeche category dikhata hai. */
.article-related-link > span:first-of-type {
    display: block;
    margin: 14px 16px 8px;
    color: #647089;
    font-size: 0.75rem;
}

/* Related article ka title card ke andar rakhta hai. */
.article-related-link strong {
    display: block;
    margin: 0 16px;
    color: #1c2b48;
    font-size: 0.98rem;
    line-height: 1.45;
}

/* Read guide link ko card ke bottom mein spacing deta hai. */
.article-related-arrow {
    display: block;
    margin: 13px 16px 16px;
    color: #2854bf;
    font-size: 0.85rem;
    font-weight: 600;
}

.article-related-link span:first-child {
    display: block;
    margin-bottom: 8px;
    color: #647089;
    font-size: 0.75rem;
}

.article-related-link strong {
    display: block;
    color: #1c2b48;
    font-size: 0.98rem;
    line-height: 1.45;
}

.article-related-arrow {
    display: block;
    margin-top: 13px;
    color: #2854bf;
    font-size: 0.85rem;
    font-weight: 600;
}

.article-related-link:hover,
.article-related-link:focus-visible {
    border-color: #8ca9ed;
}

.article-all-guides {
    display: inline-block;
    margin-top: 19px;
    color: #2854bf;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.article-all-guides:hover,
.article-all-guides:focus-visible {
    text-decoration: underline;
}

/* Chhoti screens par sidebar ko article ke neeche laata hai. */
@media (max-width: 800px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 32px;
        padding-bottom: 48px;
    }

    .article-sidebar {
        position: static;
    }
}

/* Mobile par title, image aur outer spacing ko screen ke hisaab se set karta hai. */
@media (max-width: 600px) {
    .article-page .article-wrap {
        width: min(100% - 32px, 1120px);
    }

    .article-header {
        padding: 0px 0 38px;
    }
    /* Mobile par image se poora cover bharta hai, isliye blue khaali space nahi dikhti. */
.article-cover-image {
    object-fit: cover;
    object-position: center;
}
        /* Sirf article header ka width limit hatata hai; neeche ka content limited rehta hai. */
.article-page .article-header .article-wrap {
    width: 100%;
}

    .article-back {
        margin-bottom: 23px;
    }

    .article-subtitle {
        font-size: 1rem;
    }

    .article-featured-image {
        margin: 22px 0 28px;
        border-radius: 12px;
    }

    .article-body .article-intro {
        font-size: 1.05rem;
    }
    
}
/* Contact form: page-scoped width and spacing keep the form readable on mobile. */
.qtd-contact-page .qtd-contact-card{max-width:720px;margin:0 auto;padding:clamp(20px,4vw,36px);background:var(--card, #fff);border:1px solid #dce3ed;border-radius:18px}
.qtd-contact-page .qtd-contact-card h2{margin-top:0}
.qtd-contact-page .qtd-contact-card form{display:grid;gap:10px}
.qtd-contact-page .qtd-contact-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.qtd-contact-page .qtd-contact-grid>div{display:grid;gap:10px;min-width:0}
.qtd-contact-page label{font-weight:600}
.qtd-contact-page input:not([type=hidden]),.qtd-contact-page textarea{box-sizing:border-box;width:100%;max-width:100%;padding:12px;border:1px solid #aebacc;border-radius:9px;font:inherit;background:#fff;color:#17233b}
.qtd-contact-page input:focus-visible,.qtd-contact-page textarea:focus-visible{outline:2px solid #2563eb;outline-offset:2px}
.qtd-contact-page button{justify-self:start;padding:12px 22px;border:0;border-radius:9px;background:#1749ab;color:#fff;font:inherit;font-weight:600;cursor:pointer}
.qtd-contact-page .qtd-contact-notice{padding:12px;border-radius:9px}
.qtd-contact-page .is-success{background:#e8f7ee;color:#14532d}
.qtd-contact-page .is-error{background:#fff1f0;color:#8a1b17}
/* Honeypot is invisible to visitors and helps reject simple automated submissions. */
.qtd-contact-page .qtd-contact-trap{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
/* Contact form: one-column fields fit narrow screens without horizontal scrolling. */
@media(max-width:600px){.qtd-contact-page .qtd-contact-grid{grid-template-columns:1fr}.qtd-contact-page .qtd-contact-card button{width:100%}}

/* Header: keep the listing link and dropdown arrow as separate controls. */
.header .tools-nav-row { display: flex; align-items: center; gap: 4px; }
.header .tools-nav-row .tools-trigger { display: inline-flex; align-items: center; justify-content: center; width: 28px; min-height: 32px; padding: 4px; }
/* Visible keyboard focus helps users distinguish the link from its menu button. */
.header .tools-nav-row .tools-trigger:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 768px) {
    /* Mobile: a full-width listing link plus a 44px touch target for the arrow. */
    .header .tools-nav-row .tools-listing-link { flex: 1; min-height: 44px; padding: 10px 8px; }
    .header .tools-nav-row .tools-trigger { width: 44px; min-height: 44px; padding: 10px; }
}

/* Desktop article: center the reading area; use a fixed 24px gap so the sidebar stays close. */
@media (min-width: 801px) {
    .article-page > .article-wrap {
        max-width: 960px;
    }
    .article-page .article-layout {
        grid-template-columns: minmax(0, 1fr) 290px;
        gap: 24px;
    }
}

/* Missing-page layout: readable spacing and clear recovery links on every screen. */
.qtd-missing-page {
    padding: clamp(48px, 8vw, 96px) 0;
}
.qtd-missing-page .container {
    max-width: 760px;
}
.qtd-missing-page h1 {
    margin: 12px 0 18px;
    font-size: clamp(1.8rem, 5vw, 2.7rem);
    line-height: 1.2;
}
.qtd-missing-page p {
    overflow-wrap: anywhere;
}
.qtd-missing-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 28px;
    margin-top: 26px;
}
.qtd-missing-links a {
    color: var(--primary);
    font-weight: 600;
}
.qtd-missing-links a:hover {
    text-decoration: underline;
}

/* Archive descriptions inherit blog styling without adding extra paragraph gaps. */
.blog-page .qtd-archive-description {
    max-width: 720px;
    margin-top: 16px;
}
