/*
Theme Name: Uttar Ganga News
Theme URI: https://uttarganga.com/
Author: Bitbari Tech Pvt. Ltd.
Author URI: https://bitbari.com/
Description: Custom lightweight WordPress news theme for Uttar Ganga.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: uttarganga
*/

:root {
    --ug-blue: #128bd3;
    --ug-blue-dark: #0873b5;
    --ug-red: #df1239;
    --ug-dark: #231f20;
    --ug-grey: #667582;
    --ug-light: #f4f8fb;
    --ug-border: #dce6ee;
    --ug-white: #ffffff;
    --ug-container: 1180px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--ug-white);
    color: var(--ug-dark);
    font-family: "Mukta", Arial, sans-serif;
    font-size: 18px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

body.admin-bar .ug-sticky-header {
    top: 32px;
}

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

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

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.ug-container {
    width: min(calc(100% - 32px), var(--ug-container));
    margin-inline: auto;
}

.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;
}

/* Top bar */

.ug-topbar {
    background: #edf3f7;
    color: #495965;
    font-size: 13px;
}

.ug-topbar-inner {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.ug-top-links,
.ug-social-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ug-top-links > a:not(:last-of-type)::after {
    content: "|";
    color: #a0adb6;
    margin-left: 12px;
}

.ug-social-link {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 5px;
    background: var(--ug-blue);
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
}

.ug-social-link--dark {
    background: #111;
}

.ug-social-link--red {
    background: #e91638;
}

/* Branding */

.ug-branding {
    padding: 19px 0;
}

.ug-branding-inner {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.ug-logo-link {
    display: inline-flex;
    align-items: center;
}

.ug-logo {
    width: auto;
    max-width: 340px;
    max-height: 88px;
}

.ug-header-ad {
    flex: 1 1 280px;
    min-width: 0;
    max-width: 900px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.ug-header-ad .ug-ad-slot {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.ug-ad-slot--center {
    display: flex;
    justify-content: center;
}

.ug-ad {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.ug-ad.is-placeholder {
    flex-direction: column;
    gap: 3px;
    border: 1px solid #d5dee6;
    background: #f4f7f9;
    color: #8d9aa4;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.3;
    text-transform: uppercase;
}

.ug-ad-label {
    font-size: 11px;
}

.ug-ad-size {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.ug-ad--header.is-placeholder,
.ug-ad--incontent.is-placeholder,
.ug-ad--bottom.is-placeholder {
    width: min(100%, 728px);
    height: 90px;
}

.ug-ad--sidebar_top.is-placeholder,
.ug-ad--sidebar_bottom.is-placeholder {
    width: 100%;
    height: 250px;
}

.ug-ad.is-filled {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    background: transparent;
    border: 0;
}

.ug-ad.is-filled img,
.ug-ad.is-filled iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin-inline: auto;
}

/* Navigation */

.ug-navigation {
    position: relative;
    background: #fff;
    border-top: 1px solid #edf1f4;
    border-bottom: 1px solid var(--ug-border);
}

.ug-navigation-inner {
    min-height: 57px;
    display: flex;
    align-items: center;
}

.ug-home-link {
    position: relative;
    min-height: 56px;
    margin-right: 4px;
    padding: 14px 15px 14px 0;
    display: flex;
    align-items: center;
    color: inherit;
    font-family: "Khand", "Mukta", sans-serif;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.ug-home-link:hover,
.ug-home-link.is-active {
    color: var(--ug-blue);
}

.ug-home-link.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 15px;
    bottom: 0;
    height: 3px;
    background: var(--ug-blue);
}

.ug-primary-menu {
    display: flex;
    align-items: stretch;
    flex: 1;
    list-style: none;
    padding: 0;
    margin: 0;
}

.ug-primary-menu li {
    position: relative;
}

.ug-primary-menu a {
    min-height: 56px;
    padding: 14px 15px;
    display: flex;
    align-items: center;
    font-family: "Khand", "Mukta", sans-serif;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.ug-primary-menu a:hover,
.ug-primary-menu .current-menu-item > a,
.ug-primary-menu .current-post-ancestor > a {
    color: var(--ug-blue);
}

.ug-primary-menu .current-menu-item::after,
.ug-primary-menu .current-post-ancestor::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 3px;
    background: var(--ug-blue);
}

.ug-nav-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
    gap: 2px;
}

.ug-search-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.ug-epaper-link {
    padding: 0 8px;
    color: inherit;
    font-family: "Khand", "Mukta", sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.ug-epaper-link:hover {
    color: var(--ug-blue);
}

.ug-icon-button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #19364c;
    font-size: 21px;
}

.ug-icon-button:hover {
    color: var(--ug-blue);
    background: var(--ug-light);
}

.ug-menu-toggle {
    display: grid;
}

.ug-hamburger,
.ug-hamburger::before,
.ug-hamburger::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    content: "";
}

.ug-hamburger {
    position: relative;
}

.ug-hamburger::before,
.ug-hamburger::after {
    position: absolute;
    left: 0;
}

.ug-hamburger::before {
    top: -6px;
}

.ug-hamburger::after {
    top: 6px;
}

.ug-drawer {
    position: fixed;
    inset: 0;
    z-index: 1100;
}

.ug-drawer[hidden] {
    display: none;
}

.ug-drawer-backdrop {
    position: absolute;
    inset: 0;
    padding: 0;
    border: 0;
    background: rgba(14, 36, 54, 0.48);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.ug-drawer.is-open .ug-drawer-backdrop {
    opacity: 1;
}

.ug-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(360px, 88vw);
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: -12px 0 40px rgba(14, 36, 54, 0.18);
    transform: translateX(100%);
    transition: transform 0.28s ease;
    overflow: auto;
}

.ug-drawer.is-open .ug-drawer-panel {
    transform: translateX(0);
}

body.admin-bar .ug-drawer-panel {
    top: 32px;
}

body.ug-drawer-open {
    overflow: hidden;
}

.ug-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--ug-border);
}

.ug-drawer-logo {
    width: auto;
    max-width: 180px;
    max-height: 52px;
}

.ug-drawer-close {
    width: 40px;
    height: 40px;
    position: relative;
    flex-shrink: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #19364c;
}

.ug-drawer-close span,
.ug-drawer-close span::before {
    position: absolute;
    top: 19px;
    left: 10px;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    content: "";
}

.ug-drawer-close span {
    transform: rotate(45deg);
}

.ug-drawer-close span::before {
    top: 0;
    left: 0;
    transform: rotate(90deg);
}

.ug-drawer-close:hover {
    color: var(--ug-blue);
    background: var(--ug-light);
}

.ug-drawer-label {
    margin: 0;
    padding: 16px 22px 6px;
    color: #7b888f;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.ug-drawer-home,
.ug-drawer-menu a {
    min-height: 52px;
    padding: 12px 22px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #edf1f4;
    font-family: "Khand", "Mukta", sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
}

.ug-drawer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ug-drawer-home:hover,
.ug-drawer-menu a:hover,
.ug-drawer-home.is-active,
.ug-drawer-menu .current-menu-item > a,
.ug-drawer-menu .current-post-ancestor > a {
    color: var(--ug-blue);
    background: #f4f9fc;
}

/* Search */

.ug-search-panel {
    display: none;
    padding: 18px 0;
    background: #f6f9fb;
    border-bottom: 1px solid var(--ug-border);
}

.ug-search-panel.is-open {
    display: block;
}

.ug-search-form {
    max-width: 760px;
    display: flex;
    margin-inline: auto;
}

.ug-search-form input {
    flex: 1;
    min-width: 0;
    padding: 12px 15px;
    border: 1px solid #cbd8e1;
    border-right: 0;
    border-radius: 6px 0 0 6px;
    outline: none;
}

.ug-search-form input:focus {
    border-color: var(--ug-blue);
}

.ug-search-form button {
    padding: 0 25px;
    border: 0;
    border-radius: 0 6px 6px 0;
    background: var(--ug-blue);
    color: #fff;
    font-weight: 700;
}

/* Sticky reading header */

.ug-sticky-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 999;
    background: #fff;
    border-bottom: 1px solid var(--ug-border);
    box-shadow: 0 5px 20px rgba(20, 50, 70, 0.1);
    transform: translateY(-110%);
    transition: transform 0.25s ease;
}

.ug-sticky-header.is-visible {
    transform: translateY(0);
}

.ug-sticky-inner {
    min-height: 65px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
}

.ug-sticky-inner > a,
.ug-sticky-header .ug-nav-actions {
    flex-shrink: 0;
}

.ug-sticky-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.ug-sticky-nav::-webkit-scrollbar {
    display: none;
}

.ug-sticky-menu {
    display: flex;
    align-items: stretch;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.ug-sticky-menu li,
.ug-sticky-nav .ug-home-link {
    position: relative;
    flex-shrink: 0;
}

.ug-sticky-nav .ug-home-link,
.ug-sticky-menu a {
    min-height: 64px;
    padding: 8px 12px;
    font-size: 18px;
}

.ug-sticky-menu a {
    display: flex;
    align-items: center;
    font-family: "Khand", "Mukta", sans-serif;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.ug-sticky-menu a:hover,
.ug-sticky-menu .current-menu-item > a,
.ug-sticky-menu .current-post-ancestor > a {
    color: var(--ug-blue);
}

.ug-sticky-menu .current-menu-item::after,
.ug-sticky-menu .current-post-ancestor::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: 3px;
    background: var(--ug-blue);
}

body:has(.ug-sticky-header.is-visible) .ug-search-panel.is-open {
    position: fixed;
    top: 65px;
    right: 0;
    left: 0;
    z-index: 998;
    box-shadow: 0 10px 18px rgba(20, 50, 70, 0.08);
}

body.admin-bar:has(.ug-sticky-header.is-visible) .ug-search-panel.is-open {
    top: 97px;
}

.ug-sticky-logo {
    width: auto;
    max-width: 170px;
    max-height: 45px;
}

.ug-sticky-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 700;
}

.ug-reading-progress {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ug-blue), var(--ug-red));
}

/* Footer */

.ug-footer {
    margin-top: 48px;
    background: #f4f8fb;
    color: #3d4d58;
}

.ug-footer-grid {
    padding: 42px 0 34px;
    display: grid;
    grid-template-columns: 1.35fr 0.9fr 0.9fr 1fr 1.05fr;
    gap: 34px;
}

.ug-footer-logo {
    width: auto;
    max-width: 210px;
    max-height: 64px;
    margin-bottom: 14px;
}

.ug-footer-brand p {
    max-width: 260px;
    margin: 0;
    color: #667582;
    font-size: 14px;
    line-height: 1.7;
}

.ug-footer h3 {
    margin: 0 0 14px;
    color: var(--ug-blue-dark);
    font-size: 16px;
    font-weight: 800;
}

.ug-footer p,
.ug-footer li,
.ug-footer a {
    color: #3d4d58;
    font-size: 14px;
    line-height: 1.45;
}

.ug-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ug-footer li + li {
    margin-top: 8px;
}

.ug-footer a:hover {
    color: var(--ug-blue);
}

.ug-contact-list li {
    padding-left: 0;
}

.ug-footer-bottom {
    background: #fff;
    border-top: 1px solid var(--ug-border);
}

.ug-copyright {
    min-height: 48px;
    padding: 14px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #667582;
    font-size: 12px;
}

/* Responsive */

@media (max-width: 1024px) {
    .ug-primary-menu,
    .ug-sticky-nav {
        display: none;
    }

    .ug-sticky-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .ug-sticky-header .ug-nav-actions {
        margin-left: auto;
    }

    .ug-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px;
    }

    .ug-footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 782px) {
    body.admin-bar .ug-sticky-header {
        top: 46px;
    }

    body.admin-bar:has(.ug-sticky-header.is-visible) .ug-search-panel.is-open {
        top: 111px;
    }

    body.admin-bar .ug-drawer-panel {
        top: 46px;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 16px;
    }

    .ug-top-links > a {
        display: none;
    }

    .ug-topbar-inner {
        justify-content: flex-end;
    }

    .ug-branding {
        padding: 12px 0;
    }

    .ug-branding-inner {
        min-height: 66px;
    }

    .ug-logo {
        max-width: 255px;
        max-height: 65px;
    }

    .ug-header-ad {
        display: none;
    }

    .ug-sticky-inner {
        min-height: 56px;
        gap: 8px;
    }

    .ug-sticky-logo {
        max-width: 128px;
        max-height: 36px;
    }

    .ug-sticky-title {
        font-size: 12px;
    }

    .ug-footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .ug-footer-brand {
        grid-column: auto;
    }

    .ug-copyright {
        flex-direction: column;
    }
}