/*
Theme Name: Tijus Theme
Theme URI: https://example.com/tijus-theme
Author: Tijus
Author URI: https://example.com
Description: A custom WordPress theme automatically generated from the static Edule template. Fully compatible with Elementor page builder.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tijus-theme
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* Custom Elementor overrides if needed */
body.elementor-page .elementor-section {
    position: relative;
    z-index: 1;
}

/* ── Navigation active indicator ───────────────────────────────────────────
   The theme's JS adds .active to menu items, which can mark multiple items.
   Disable the JS-driven active style and rely on WordPress's current-menu-item
   class instead so only the current page shows the underline indicator.
   ───────────────────────────────────────────────────────────────────────── */
.header-menu ul li.active > a {
    color: inherit;
}
.header-menu ul li.active > a:before {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Current page / ancestor: show the underline */
.header-menu ul li.current-menu-item > a,
.header-menu ul li.current-menu-ancestor > a,
.header-menu ul li.current-page-ancestor > a {
    color: var(--bs-primary);
}
.header-menu ul li.current-menu-item > a:before,
.header-menu ul li.current-menu-ancestor > a:before,
.header-menu ul li.current-page-ancestor > a:before {
    opacity: 1 !important;
    visibility: visible !important;
}

/* ── Blog Card Alignment Fixes ─────────────────────────────────────────── */
.single-blog .blog-author .tag {
    min-width: 0;           /* Allow flex item to shrink below content size */
    max-width: 50%;         /* Ensure it leaves room for the author name */
}
.single-blog .blog-author .tag a {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* ── Inner Page Meta & Share ───────────────────────────────────────────── */
.blog-details-admin-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; 
    gap: 15px;
}
.blog-details-admin-meta .blog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px; /* Better spacing between date, heart, and tag */
}
.blog-details-admin-meta .blog-meta .tag {
    margin-left: 0;
}
.blog-details-admin-meta .blog-meta .tag a,
.single-blog .blog-author .tag a {
    display: inline-block !important; /* Ensure block model applies */
    width: auto !important;           /* Override fixed width constraints */
    min-width: max-content;           /* Expands strictly to text length */
    white-space: nowrap;
    padding-left: 15px;               /* Keep comfortable pill padding */
    padding-right: 15px;              /* Keep comfortable pill padding */
    text-align: center;
}
.single-blog .blog-author .tag a {
    min-width: 0;                     /* Let grid items truncate */
    max-width: 100% !important;
    overflow: hidden;
    text-overflow: ellipsis;
}
.blog-details-label ul.social.small-social li a {
    width: 35px;
    height: 35px;
    line-height: 35px;
    font-size: 14px;
}

/* ── Course Category Filter Buttons ───────────────────────────────────────
   Override fixed 160px width so multi-word names stay on one line.       */
.courses-category-wrapper .category-menu li a {
    width: auto !important;
    white-space: nowrap !important;
    padding: 0 22px !important;
}

/* ── Courses Mega-Menu Dropdown ────────────────────────────────────────── */
.header-menu ul li.has-mega-menu {
    position: relative;
}
.courses-mega-menu {
    position: fixed;   /* JS sets top each open */
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 10px 50px rgba(0,0,0,0.1);
    padding: 30px 0;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    pointer-events: none;
    border-top: 1px solid #f5f5f5;
}
@media only screen and (max-width: 991px) {
    .courses-mega-menu {
        display: none !important;
    }
}
.courses-mega-menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.courses-mega-inner {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr 0.8fr 2fr;
    gap: 30px;
    align-items: start;
}
.courses-mega-col {
    padding: 0 15px;
    border-right: 1px solid #f0f0f0;
}
.courses-mega-col:last-child {
    border-right: none;
}
.courses-mega-special {
    background: #fcfcfc;
    padding-left: 30px !important;
}
.courses-mega-special {
    background: #fafafa;
}
.courses-mega-heading {
    font-size: 24px;
    font-weight: 800;
    color: #000;
    margin: 0 0 15px;
    line-height: 1.1;
    border: none !important;
    text-transform: none;
}
.courses-mega-heading a {
    color: inherit !important;
}
.courses-mega-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.courses-mega-col ul li a {
    display: block;
    padding: 8px 0;
    font-size: 16px;
    color: #1a1a1a;
    font-weight: 500;
    transition: color 0.2s;
    line-height: 1.3;
}
.courses-mega-col ul li a:hover {
    color: var(--bs-primary);
}

/* Banner section on the right */
.courses-mega-banner {
    width: 300px;
    min-width: 300px;
    position: relative;
    background: #1a1a2e;
    overflow: hidden;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
}
.courses-mega-banner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}
.courses-mega-banner .banner-content {
    position: relative;
    z-index: 2;
}
.courses-mega-banner h3 {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
    line-height: 1;
}
.courses-mega-banner p {
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    color: rgba(255,255,255,0.8);
    margin: 0;
}

/* ── m1.png Course Filter Style (Stacked Layout) ─────────────────────── */
.courses-category-wrapper.m1-style-wrapper {
    background: transparent !important;
    display: flex !important;
    flex-direction: column !important; /* Stack vertically */
    align-items: center !important;
    justify-content: center !important;
    gap: 25px !important; /* Gap between menu and search */
    margin: 0 0 60px 0 !important;
    border: none !important;
    width: 100% !important;
    padding: 0 !important;
}

.m1-style-wrapper .category-menu {
    background-color: #e6f7ff !important;
    padding: 12px 20px !important;
    border-radius: 100px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important; /* Allow wrapping if many categories */
    justify-content: center !important;
    gap: 10px !important;
    margin: 0 !important;
    list-style: none !important;
    border: none !important;
    align-items: center !important;
}

.m1-style-wrapper .category-menu li {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.m1-style-wrapper .category-menu li a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 25px !important;
    height: 52px !important;
    background: #fff !important;
    color: #343e8a !important;
    border-radius: 100px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    border: none !important;
    width: auto !important;
    white-space: nowrap !important;
    text-decoration: none !important;
}

.m1-style-wrapper .category-menu li a.active {
    background: #00a0e3 !important;
    color: #fff !important;
    box-shadow: 0 5px 15px rgba(0, 160, 227, 0.3) !important;
}

.m1-style-wrapper .category-menu li a:hover:not(.active) {
    background: #f0f0f0 !important;
}

.m1-search-style {
    display: flex !important;
    align-items: center !important;
    background: #fff !important;
    border-radius: 100px !important;
    padding: 5px 5px 5px 30px !important;
    border: 1px solid #e0f4ff !important;
    height: 64px !important;
    width: 450px !important; /* Wider search bar since it's now on its own row */
    max-width: 90% !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05) !important;
}

.m1-search-style input {
    border: none !important;
    padding: 0 !important;
    height: 100% !important;
    font-size: 15px !important;
    color: #333 !important;
    background: transparent !important;
    flex-grow: 1 !important;
    box-shadow: none !important;
    outline: none !important;
    margin: 0 !important;
}

.m1-search-style button {
    background: #00a0e3 !important;
    color: #fff !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    cursor: pointer !important;
    transition: background 0.3s ease !important;
}

.m1-search-style button:hover {
    background: #008cc7 !important;
}

.m1-search-style button {
    background: #00a0e3 !important;
    color: #fff !important;
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important; /* Circular button */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    margin-left: 5px !important;
    padding: 0 !important;
    cursor: pointer !important;
}

@media (max-width: 1200px) {
    .m1-style-wrapper {
        border-radius: 20px !important;
        padding: 15px !important;
    }
    .m1-style-wrapper .category-menu {
        flex-wrap: wrap !important;
    }
}


.m1-search-style button i {
    font-size: 18px;
    line-height: 1;
}

@media (max-width: 991px) {
    .m1-style-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    .m1-search-style {
        margin-left: 0;
        width: 100%;
    }
    .m1-search-style input {
        width: 100%;
    }
}

