/*
Theme Name: Zupo
Theme URI: https://zupoapp.com
Author: Zupo Business Consultants Pvt. Ltd.
Author URI: https://zupoapp.com
Description: Support theme, matching the zupoapp.com marketing site. Shares the same design tokens, header, footer and light/dark theming; every nav entry other than Support links back to zupoapp.com.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zupo
Tags: blog, one-column, two-columns, right-sidebar, custom-logo, featured-images, translation-ready
*/

/* Tokens, layout, header, footer and components come from assets/css/zupo.css.
   Everything below is the Support-only surface that the marketing site has no
   equivalent for. It reuses the same variables so both themes stay in step. */

/* ---------- Post grid ---------- */

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.post-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.post-card-media {
    display: block;
    position: relative;
    z-index: 1;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--paper-2);
}

.post-card-media.is-empty {
    background:
        radial-gradient(circle at 78% 18%, rgba(79, 133, 226, 0.35), transparent 52%),
        linear-gradient(160deg, var(--paper-2), var(--brand-soft));
}

.post-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.post-card:hover .post-card-media img {
    transform: scale(1.04);
}

.post-card-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 1.5rem 1.6rem 1.6rem;
}

.post-card-kicker {
    margin-bottom: 0.5rem;
}

.post-card-kicker a {
    color: inherit;
}

.hero-search {
    max-width: 36rem;
    margin: 1.5rem auto 0;
    text-align: left;
}

.hero-search .form-control {
    border-color: var(--hero-line);
    background: var(--white);
}

.post-topics {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.25rem 0 0;
}

.post-topics a {
    padding: 0.4rem 0.95rem;
    border: 1px solid var(--hero-chip-line);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--hero-faint);
    background: var(--hero-chip);
}

.post-topics a:hover,
.post-topics a.is-current {
    color: var(--brand);
    border-color: var(--brand);
    background: transparent;
}

.post-card-title {
    font-family: var(--font);
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.55rem;
    color: var(--heading);
}

.post-card-title a {
    color: inherit;
}

.post-card-title a:hover {
    color: var(--brand-2);
}

.post-card-excerpt {
    color: var(--muted);
    font-size: 0.94rem;
    margin-bottom: 1.25rem;
}

.post-card-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.9rem;
    border-top: 1px solid var(--line);
}

.feature-link svg {
    width: 1rem;
    height: 1rem;
    margin-left: 0.35rem;
    vertical-align: -0.15em;
    transition: transform 0.25s ease;
}

.post-card-foot .feature-link {
    margin-top: 0;
}

.post-card:hover .feature-link svg {
    transform: translateX(3px);
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

/* Sticky posts get a brand edge rather than a separate colour. */
.post-card.sticky {
    border-color: rgba(79, 133, 226, 0.4);
}

/* ---------- Single post ---------- */

/* Single column until a sidebar widget actually exists. */
.post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
    max-width: 52rem;
    margin: 0 auto;
}

.post-layout.has-sidebar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 20.5rem);
    max-width: none;
    margin: 0;
}

.post-single .entry-meta {
    margin-bottom: 1.5rem;
}

.post-single-media {
    margin: 0 0 1.75rem;
}

.post-single-media img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    display: block;
}

.post-single-media figcaption {
    margin-top: 0.7rem;
    font-size: 0.86rem;
    color: var(--muted);
}

/* The prose rules in zupo.css cover headings, paragraphs, lists and links;
   these fill in the elements only the editor produces. */
.post-content img,
.post-content video,
.post-content iframe {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

.post-content figure {
    margin: 1.75rem 0;
}

.post-content figcaption {
    margin-top: 0.6rem;
    font-size: 0.86rem;
    color: var(--muted);
    text-align: center;
}

.post-content blockquote {
    margin: 1.75rem 0;
    padding: 1.15rem 1.4rem;
    border-left: 3px solid var(--brand);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--paper-2);
    font-family: var(--serif);
    font-size: 1.1rem;
    color: var(--heading);
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

.post-content blockquote cite {
    display: block;
    margin-top: 0.6rem;
    font-family: var(--font);
    font-size: 0.85rem;
    font-style: normal;
    color: var(--muted);
}

.post-content code,
.post-content kbd,
.post-content samp {
    padding: 0.14em 0.4em;
    border-radius: 0.4rem;
    background: var(--paper-2);
    border: 1px solid var(--line);
    font-size: 0.9em;
}

.post-content pre {
    margin: 1.75rem 0;
    padding: 1.2rem 1.35rem;
    overflow-x: auto;
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: #e6edf7;
    font-size: 0.88rem;
    line-height: 1.6;
}

.post-content pre code {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
}

.post-content hr {
    margin: 2.25rem 0;
    border: 0;
    border-top: 1px solid var(--line);
}

.post-content table {
    width: 100%;
    margin: 1.75rem 0;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.post-content th,
.post-content td {
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--line);
    text-align: left;
}

.post-content th {
    background: var(--paper-2);
    color: var(--heading);
    font-weight: 700;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    scroll-margin-top: 6rem;
}

.post-content h4 {
    margin: 1.6rem 0 0.6rem;
    font-family: var(--font);
    font-size: 1.02rem;
    color: var(--heading);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 2rem 0 0;
}

.post-tags a {
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
}

.post-tags a:hover {
    color: var(--brand-2);
    border-color: var(--brand);
    background: var(--brand-soft);
}

.post-single-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.25rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    font-size: 0.92rem;
    font-weight: 600;
}

.post-nav-next {
    margin-left: auto;
    text-align: right;
}

.post-pages {
    display: flex;
    gap: 0.4rem;
    margin-top: 1.75rem;
    font-weight: 700;
}

/* ---------- Sidebar ---------- */

.post-sidebar {
    position: sticky;
    top: 6rem;
}

.post-sidebar-panel {
    padding: 1.35rem 1.35rem 1.5rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 1.2rem;
    box-shadow: var(--shadow-sm);
}

.post-sidebar-block + .post-sidebar-block,
.post-sidebar-cta {
    margin-top: 1.25rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
}

.widget-title {
    margin-bottom: 0.75rem;
    font-family: var(--font);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-2);
}

.post-sidebar .zupo-search {
    flex-direction: column;
}

.post-sidebar .zupo-search .btn {
    width: 100%;
    justify-content: center;
}

.sidebar-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.sidebar-topics a {
    padding: 0.32rem 0.75rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--paper-2);
}

.sidebar-topics a:hover {
    color: var(--brand-2);
    border-color: var(--brand);
    background: var(--brand-soft);
}

.sidebar-posts {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar-posts li + li {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
}

.sidebar-posts a {
    display: grid;
    grid-template-columns: 3.4rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    color: var(--heading);
}

.sidebar-posts a:hover strong {
    color: var(--brand-2);
}

.sidebar-posts img,
.sidebar-posts-thumb {
    width: 3.4rem;
    height: 3.4rem;
    object-fit: cover;
    border-radius: 0.7rem;
    background: var(--paper-2);
}

.sidebar-posts span {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.sidebar-posts strong {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.35;
}

.sidebar-posts time {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.post-sidebar-cta p {
    margin: 0 0 0.85rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.post-sidebar-cta .section-kicker {
    margin-bottom: 0.35rem;
}

.post-sidebar-cta .btn {
    width: 100%;
    justify-content: center;
}

/* ---------- Related ---------- */

.related-posts {
    background: var(--paper);
    border-top: 1px solid var(--line);
}

/* ---------- Pagination ---------- */

.blog-pagination {
    margin-top: 2.75rem;
}

.blog-pagination ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.blog-pagination a,
.blog-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    height: 2.6rem;
    padding: 0 0.8rem;
    border: 1px solid var(--line-strong);
    border-radius: 0.85rem;
    background: var(--white);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}

.blog-pagination a:hover {
    color: var(--brand-2);
    border-color: var(--brand);
    background: var(--brand-soft);
}

.blog-pagination .current {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.blog-pagination .dots {
    border-color: transparent;
    background: none;
}

/* ---------- Search ---------- */

.zupo-search {
    display: flex;
    gap: 0.6rem;
}

.zupo-search .form-control {
    flex: 1 1 auto;
}

.search-bar {
    max-width: 32rem;
    margin: 0 auto 2.5rem;
}

.no-results {
    max-width: 40rem;
    margin: 0 auto;
    text-align: center;
}

.no-results .zupo-search {
    margin: 1.5rem 0;
    text-align: left;
}

.no-results .btn + .btn {
    margin-left: 0.5rem;
}

/* ---------- Comments ---------- */

.post-comments {
    max-width: 52rem;
    margin: 2.5rem auto 0;
}

.comments-title {
    margin-bottom: 1.5rem;
}

.comment-list {
    margin: 0 0 2rem;
    padding: 0;
    list-style: none;
}

.comment-list .children {
    margin: 1rem 0 0 1.5rem;
    padding: 0;
    list-style: none;
}

.comment-body {
    padding: 1.15rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper-2);
}

.comment-list li + li {
    margin-top: 1rem;
}

.comment-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    font-size: 0.82rem;
    color: var(--muted);
}

.comment-author img {
    border-radius: 50%;
    vertical-align: middle;
}

.comment-author .fn {
    font-weight: 700;
    color: var(--heading);
    font-style: normal;
}

.comment-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    color: var(--heading);
}

.comment-form p {
    margin-bottom: 1rem;
}

.comment-form input:not([type="submit"]):not([type="checkbox"]),
.comment-form textarea {
    width: 100%;
    border-radius: 0.85rem;
    border: 1px solid var(--line-strong);
    padding: 0.85rem 1rem;
    background: var(--white);
    color: var(--heading);
}

/* ---------- WordPress core alignment and utility classes ---------- */

.alignleft {
    float: left;
    margin: 0.35rem 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0.35rem 0 1rem 1.5rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignwide {
    width: min(100%, 62rem);
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100%;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    margin-top: 0.6rem;
    font-size: 0.86rem;
    color: var(--muted);
    text-align: center;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* WordPress admin bar sits above the fixed header. */
.admin-bar #topnav {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar #topnav {
        top: 46px;
    }
}

.screen-reader-text:focus {
    display: block;
    top: 5px;
    left: 5px;
    z-index: 100000;
    width: auto;
    height: auto;
    padding: 0.7rem 1rem;
    clip: auto;
    background: var(--white);
    border-radius: 0.6rem;
    box-shadow: var(--shadow);
}

.post-content .wp-block-image,
.post-content .wp-block-embed {
    margin: 1.75rem 0;
}

.post-content .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
}

.post-content ul.wp-block-list,
.post-content ol.wp-block-list {
    padding-left: 1.2rem;
}

/* ---------- Responsive ---------- */

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

@media (max-width: 991.98px) {
    .post-layout.has-sidebar {
        grid-template-columns: minmax(0, 1fr);
    }

    .post-sidebar {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .post-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .zupo-search {
        flex-direction: column;
    }

    .post-single-foot {
        flex-direction: column;
    }

    .post-nav-next {
        margin-left: 0;
        text-align: left;
    }

    .alignleft,
    .alignright {
        float: none;
        margin: 1rem auto;
        display: block;
    }
}
