/*
Theme Name: WB Helpline
Theme URI: https://wbhelpline.in
Author: Jayanta Jana
Description: Custom WordPress theme for WB Helpline.
Version: 1.1
License: GNU General Public License v2 or later
Text Domain: wbhelpline
*/


/* =====================================================
   ROOT
===================================================== */

:root {

    --primary: #0F4C81;
    --primary-light: #2A6A9F;
    --primary-dark: #0A365C;

    --green: #0AA64F;
    --green-hover: #088C42;

    --orange: #FF9800;

    --bg-color: #F5F7FA;
    --surface: #FFFFFF;
    --surface-hover: #F8FAFC;

    --border-color: #E2E8F0;

    --text-main: #1E293B;
    --text-muted: #64748B;

    --shadow-sm:
        0 1px 3px rgba(0,0,0,0.05);

    --shadow-md:
        0 4px 6px -1px rgba(0,0,0,0.10),
        0 2px 4px -1px rgba(0,0,0,0.06);

    --shadow-lg:
        0 10px 15px -3px rgba(0,0,0,0.10),
        0 4px 6px -2px rgba(0,0,0,0.05);

    --shadow-glow:
        0 0 15px rgba(15,76,129,0.15);

    --radius: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --font-family:
        'Inter',
        sans-serif;

    --transition:
        all 0.3s ease;
}


/* =====================================================
   DARK MODE
===================================================== */

[data-theme="dark"] {

    --primary: #3B82F6;
    --primary-light: #60A5FA;
    --primary-dark: #2563EB;

    --bg-color: #0F172A;
    --surface: #1E293B;
    --surface-hover: #273549;

    --border-color: #334155;

    --text-main: #F8FAFC;
    --text-muted: #94A3B8;

    --shadow-sm:
        0 1px 3px rgba(0,0,0,0.3);

    --shadow-md:
        0 4px 6px -1px rgba(0,0,0,0.4);

    --shadow-lg:
        0 10px 15px -3px rgba(0,0,0,0.5);

    --shadow-glow:
        0 0 15px rgba(59,130,246,0.2);
}


/* =====================================================
   RESET
===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {

    font-family:
        var(--font-family);

    background:
        var(--bg-color);

    color:
        var(--text-main);

    line-height:
        1.6;

    overflow-x:
        hidden;

    transition:
        background-color 0.3s,
        color 0.3s;
}


a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}


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


button,
input {
    font-family:
        var(--font-family);
}


ul {
    list-style: none;
}


/* =====================================================
   CONTAINER
===================================================== */

.container {

    width: 100%;
    max-width: 1280px;

    margin:
        0 auto;

    padding:
        0 20px;
}


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

header {

    background:
        var(--surface);

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

    position:
        sticky;

    top:
        0;

    z-index:
        100;

    box-shadow:
        var(--shadow-sm);
}


.header-top {

    display:
        flex;

    justify-content:
        space-between;

    align-items:
        center;

    padding:
        15px 0;
}


.logo-section {

    display:
        flex;

    align-items:
        center;

    gap:
        12px;
}


.logo-icon {

    width:
        40px;

    height:
        40px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;
}


.logo-text h1 {

    font-size:
        1.25rem;

    font-weight:
        700;

    color:
        var(--text-main);

    line-height:
        1.2;
}


.logo-text p {

    font-size:
        0.75rem;

    color:
        var(--text-muted);
}


.header-actions {

    display:
        flex;

    align-items:
        center;

    gap:
        15px;
}


.header-search {

    display:
        flex;

    align-items:
        center;

    width:
        300px;

    background:
        var(--bg-color);

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

    border-radius:
        var(--radius-full);

    padding:
        5px 15px;
}


.header-search input {

    width:
        100%;

    padding:
        8px;

    background:
        transparent;

    border:
        none;

    outline:
        none;

    color:
        var(--text-main);
}


.icon-btn {

    width:
        40px;

    height:
        40px;

    border-radius:
        50%;

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

    background:
        var(--bg-color);

    color:
        var(--text-main);

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    cursor:
        pointer;
}


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

.main-nav {

    display:
        flex;

    align-items:
        center;

    gap:
        25px;

    overflow-x:
        auto;

    scrollbar-width:
        none;
}


.main-nav::-webkit-scrollbar {
    display: none;
}


.main-nav a {

    color:
        var(--text-main);

    font-weight:
        500;

    font-size:
        0.95rem;

    white-space:
        nowrap;

    padding-bottom:
        5px;

    border-bottom:
        2px solid transparent;
}


.main-nav a:hover,
.main-nav a.active {

    color:
        var(--primary);

    border-bottom-color:
        var(--primary);
}


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

.hero {

    padding:
        60px 0;

    text-align:
        center;

    background:
        linear-gradient(
            to bottom,
            var(--surface),
            var(--bg-color)
        );
}


.hero h2 {

    font-size:
        2.5rem;

    font-weight:
        700;

    margin-bottom:
        15px;

    color:
        var(--text-main);
}


.hero p {

    font-size:
        1.125rem;

    color:
        var(--text-muted);

    max-width:
        600px;

    margin:
        0 auto 30px;
}


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

.hero-search {

    position:
        relative;

    width:
        100%;

    max-width:
        650px;

    margin:
        0 auto 40px;
}


.hero-search .search-form {

    position:
        relative;

    width:
        100%;

    margin:
        0;
}


.hero-search .search-input {

    width:
        100%;

    height:
        58px;

    padding:
        0 25px 0 55px;

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

    border-radius:
        var(--radius-full);

    background:
        var(--surface);

    color:
        var(--text-main);

    font-size:
        1.05rem;

    outline:
        none;

    box-shadow:
        var(--shadow-md);

    transition:
        var(--transition);
}


.hero-search .search-input:focus {

    border-color:
        var(--primary);

    box-shadow:
        var(--shadow-lg),
        var(--shadow-glow);
}


.hero-search .search-icon {

    position:
        absolute;

    left:
        20px;

    top:
        50%;

    transform:
        translateY(-50%);

    width:
        22px;

    height:
        22px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    color:
        var(--text-muted);

    font-size:
        18px;

    z-index:
        5;
}


/* =====================================================
   LIVE SEARCH DROPDOWN
===================================================== */

.live-search-results {

    position:
        absolute;

    top:
        calc(100% + 10px);

    left:
        0;

    width:
        100%;

    background:
        var(--surface);

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

    border-radius:
        16px;

    box-shadow:
        0 15px 40px rgba(0,0,0,0.15);

    overflow:
        hidden;

    z-index:
        99999;

    display:
        none;

    text-align:
        left;
}


.live-search-results.active {
    display:
        block;
}


/* Result */

.live-search-item {

    display:
        flex;

    align-items:
        center;

    gap:
        14px;

    padding:
        13px 16px;

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

    color:
        var(--text-main);

    background:
        var(--surface);

    text-decoration:
        none;

    transition:
        background 0.2s ease;
}


.live-search-item:last-child {
    border-bottom:
        none;
}


.live-search-item:hover {

    background:
        var(--surface-hover);

    color:
        var(--text-main);
}


/* Image */

.live-search-item img,
.live-search-icon {

    width:
        48px;

    height:
        48px;

    flex:
        0 0 48px;

    border-radius:
        10px;

    object-fit:
        cover;
}


.live-search-icon {

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    background:
        rgba(15,82,137,0.08);

    color:
        var(--primary);

    font-size:
        19px;
}


/* Content */

.live-search-content {

    flex:
        1;

    min-width:
        0;
}


.live-search-title {

    font-size:
        15px;

    font-weight:
        700;

    line-height:
        1.35;

    color:
        var(--text-main);

    margin-bottom:
        3px;
}


.live-search-excerpt {

    font-size:
        12px;

    color:
        var(--text-muted);

    white-space:
        nowrap;

    overflow:
        hidden;

    text-overflow:
        ellipsis;
}


/* Arrow */

.live-search-arrow {

    flex:
        0 0 auto;

    color:
        var(--text-muted);

    font-size:
        12px;
}


/* Loading / Empty */

.live-search-loading,
.live-search-empty {

    padding:
        20px;

    text-align:
        center;

    color:
        var(--text-muted);

    font-size:
        14px;
}


.live-search-empty i {
    margin-bottom:
        6px;
}


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

.hero-buttons {

    display:
        flex;

    justify-content:
        center;

    gap:
        15px;

    flex-wrap:
        wrap;
}


.btn {

    padding:
        12px 24px;

    border-radius:
        var(--radius-full);

    font-weight:
        600;

    font-size:
        1rem;

    display:
        inline-flex;

    align-items:
        center;

    gap:
        8px;

    border:
        none;

    cursor:
        pointer;
}


.btn-primary {

    background:
        var(--primary);

    color:
        white;
}


.btn-primary:hover {

    background:
        var(--primary-light);

    color:
        white;

    transform:
        translateY(-2px);
}


.btn-outline {

    background:
        transparent;

    color:
        var(--primary);

    border:
        1px solid var(--primary);
}


.btn-outline:hover {

    background:
        var(--primary);

    color:
        white;
}


/* =====================================================
   SECTIONS
===================================================== */

.section {
    padding:
        50px 0;
}


.section-header {

    display:
        flex;

    justify-content:
        space-between;

    align-items:
        center;

    margin-bottom:
        30px;
}


.section-title {

    font-size:
        1.75rem;

    font-weight:
        700;

    display:
        flex;

    align-items:
        center;

    gap:
        10px;

    color:
        var(--text-main);
}


.section-link {

    display:
        flex;

    align-items:
        center;

    gap:
        5px;

    font-weight:
        500;
}


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

.grid {

    display:
        grid;

    gap:
        20px;
}


.grid-cols-2 {
    grid-template-columns:
        repeat(2, 1fr);
}


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


.grid-cols-4 {
    grid-template-columns:
        repeat(4, 1fr);
}


/* =====================================================
   SERVICE CARDS
===================================================== */

.card {

    position:
        relative;

    background:
        var(--surface);

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

    border-radius:
        var(--radius);

    padding:
        24px;

    transition:
        var(--transition);

    display:
        flex;

    flex-direction:
        column;

    height:
        100%;
}


.card:hover {

    transform:
        translateY(-5px);

    box-shadow:
        var(--shadow-lg);

    border-color:
        var(--primary-light);
}


.card-icon {

    width:
        50px;

    height:
        50px;

    background:
        var(--bg-color);

    border-radius:
        12px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    font-size:
        24px;

    color:
        var(--primary);

    margin-bottom:
        15px;
}


.card-title {

    font-size:
        1.25rem;

    font-weight:
        600;

    margin-bottom:
        8px;

    color:
        var(--text-main);
}


.card-desc {

    font-size:
        0.9rem;

    color:
        var(--text-muted);

    margin-bottom:
        20px;

    flex-grow:
        1;
}


.card-btn {

    font-size:
        0.9rem;

    font-weight:
        600;

    display:
        flex;

    align-items:
        center;

    gap:
        5px;

    color:
        var(--primary);

    margin-top:
        auto;
}


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

.pin-btn {

    position:
        absolute;

    top:
        15px;

    right:
        15px;

    width:
        34px;

    height:
        34px;

    border:
        none;

    border-radius:
        50%;

    background:
        transparent;

    color:
        var(--text-muted);

    cursor:
        pointer;

    z-index:
        10;

    opacity:
        0.55;

    transition:
        var(--transition);
}


.pin-btn:hover {

    background:
        var(--bg-color);

    color:
        var(--primary);

    opacity:
        1;
}


.card[data-pinned="true"] .pin-btn {

    color:
        var(--orange);

    opacity:
        1;

    transform:
        rotate(45deg);
}


/* =====================================================
   NEWS
===================================================== */

.news-grid-custom {

    display:
        grid;

    grid-template-columns:
        2fr 1fr;

    gap:
        30px;
}


.news-side {

    display:
        flex;

    flex-direction:
        column;

    gap:
        30px;
}


.article-card {

    background:
        var(--surface);

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

    border-radius:
        var(--radius);

    overflow:
        hidden;

    transition:
        var(--transition);
}


.article-card:hover {

    transform:
        translateY(-4px);

    box-shadow:
        var(--shadow-lg);
}


.featured-news {

    display:
        flex;

    flex-direction:
        column;

    height:
        100%;
}


.featured-news .article-img {

    width:
        100%;

    height:
        350px;

    object-fit:
        cover;
}


.article-content {
    padding:
        20px;
}


.featured-news .article-content {

    display:
        flex;

    flex-direction:
        column;

    flex:
        1;
}


.badge {

    display:
        inline-block;

    padding:
        4px 10px;

    border-radius:
        var(--radius-full);

    font-size:
        0.75rem;

    font-weight:
        600;

    margin-bottom:
        10px;
}


.badge-central {

    background:
        rgba(15,76,129,0.1);

    color:
        var(--primary);
}


.badge-state {

    background:
        rgba(10,166,79,0.1);

    color:
        var(--green);
}


.article-title {

    font-size:
        1.15rem;

    font-weight:
        600;

    margin-bottom:
        10px;

    line-height:
        1.4;

    color:
        var(--text-main);
}


.featured-news .article-title {

    font-size:
        1.8rem;

    line-height:
        1.3;
}


.article-desc {

    font-size:
        0.9rem;

    color:
        var(--text-muted);

    margin-bottom:
        15px;
}


.featured-news .card-btn {
    margin-top:
        auto;
}


/* Small News */

.small-news {

    display:
        flex;

    flex-direction:
        row;

    gap:
        15px;

    padding:
        15px;
}


.small-news-img {

    width:
        120px;

    height:
        120px;

    object-fit:
        cover;

    border-radius:
        8px;

    flex:
        0 0 120px;
}


.small-news .article-content {

    padding:
        0;

    display:
        flex;

    flex-direction:
        column;

    justify-content:
        space-between;

    min-width:
        0;
}


.small-news .article-title {

    font-size:
        1.1rem;

    margin-top:
        8px;

    margin-bottom:
        5px;
}


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

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


.mt-4 {
    margin-top:
        1.5rem;
}


.mb-4 {
    margin-bottom:
        1.5rem;
}


/* =====================================================
   PROGRESS BAR
===================================================== */

#progress-container {

    position:
        fixed;

    top:
        0;

    left:
        0;

    width:
        100%;

    height:
        4px;

    z-index:
        1001;
}


#progress-bar {

    height:
        100%;

    width:
        0%;

    background:
        var(--green);
}


/* =====================================================
   BACK TO TOP
===================================================== */

#back-to-top {

    position:
        fixed;

    bottom:
        30px;

    right:
        30px;

    width:
        45px;

    height:
        45px;

    border:
        none;

    border-radius:
        50%;

    background:
        var(--primary);

    color:
        white;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    cursor:
        pointer;

    opacity:
        0;

    pointer-events:
        none;

    transition:
        var(--transition);

    z-index:
        99;

    box-shadow:
        var(--shadow-md);
}


#back-to-top.visible {

    opacity:
        1;

    pointer-events:
        auto;
}


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

footer {

    background:
        var(--surface);

    border-top:
        1px solid var(--border-color);

    padding:
        50px 0 20px;

    margin-top:
        60px;
}


.footer-grid {

    display:
        grid;

    grid-template-columns:
        2fr 1fr 1fr 1fr;

    gap:
        30px;

    margin-bottom:
        40px;
}


.footer-col h4 {

    font-size:
        1.1rem;

    margin-bottom:
        20px;
}


.footer-links {

    display:
        flex;

    flex-direction:
        column;

    gap:
        10px;
}


.footer-links a {

    color:
        var(--text-muted);
}


.footer-bottom {

    text-align:
        center;

    padding-top:
        20px;

    border-top:
        1px solid var(--border-color);

    color:
        var(--text-muted);

    font-size:
        0.9rem;
}


/* =====================================================
   MOBILE NAV
===================================================== */

.mobile-nav {

    display:
        none;

    position:
        fixed;

    bottom:
        0;

    left:
        0;

    width:
        100%;

    background:
        var(--surface);

    border-top:
        1px solid var(--border-color);

    z-index:
        1000;
}


.mobile-nav-inner {

    display:
        flex;

    justify-content:
        space-around;

    padding:
        10px 0;
}


.mobile-nav-item {

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    gap:
        4px;

    color:
        var(--text-muted);

    font-size:
        0.75rem;
}


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

@media (max-width: 1024px) {

    .grid-cols-4 {
        grid-template-columns:
            repeat(3, 1fr);
    }

    .news-grid-custom {
        grid-template-columns:
            1fr;
    }

    .footer-grid {
        grid-template-columns:
            2fr 1fr 1fr;
    }
}


@media (max-width: 768px) {

    .grid-cols-3,
    .grid-cols-4 {

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


    .header-search {
        display:
            none;
    }


    .hero-search {
        width:
            92%;
    }


    .hero h2 {
        font-size:
            2rem;
    }


    .section-title {
        font-size:
            1.5rem;
    }


    .footer-grid {
        grid-template-columns:
            1fr 1fr;
    }
}


@media (max-width: 600px) {

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {

        grid-template-columns:
            1fr;
    }


    .footer-grid {
        grid-template-columns:
            1fr;
    }


    .mobile-nav {
        display:
            block;
    }


    body {
        padding-bottom:
            65px;
    }


    .main-nav {
        display:
            none;
    }


    .hero {
        padding:
            45px 0;
    }


    .hero h2 {
        font-size:
            1.8rem;
    }


    .hero p {
        font-size:
            1rem;
    }


    .hero-search .search-input {

        height:
            54px;

        padding:
            0 20px 0 48px;

        font-size:
            15px;
    }


    .hero-search .search-icon {

        left:
            16px;

        width:
            20px;

        height:
            20px;

        font-size:
            17px;
    }


    .live-search-results {

        border-radius:
            14px;
    }


    .live-search-item {

        padding:
            11px 12px;

        gap:
            10px;
    }


    .live-search-item img,
    .live-search-icon {

        width:
            42px;

        height:
            42px;

        flex-basis:
            42px;
    }


    .live-search-title {
        font-size:
            14px;
    }


    .live-search-excerpt {
        font-size:
            11px;
    }


    .featured-news .article-img {

        height:
            220px;
    }


    .featured-news .article-title {

        font-size:
            1.4rem;
    }


    .small-news {

        gap:
            12px;
    }


    .small-news-img {

        width:
            90px;

        height:
            90px;

        flex-basis:
            90px;
    }


    #back-to-top {

        bottom:
            80px;

        right:
            15px;
    }
}