/*
Theme Name: Rising Matters
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: A modern, clean blog theme with featured post carousel and optimized layouts
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: myblog-theme
*/

/* ===============================================
   CSS RESET & BASE STYLES
   =============================================== */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter';
    line-height: 1.5;
    color: #1D1D1F;
    background-color: #FFFFFF;
    font-size: 15px;
}

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

a {
    color: #1A73E8;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #1557b0;
}

ul {
    list-style: none;
}

/* ===============================================
   CONTAINER & LAYOUT
   =============================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-content {
    flex: 1;
    padding: 40px 0;
}

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

.site-header {
    background: linear-gradient(180deg, #BBD9FC 0%, #C4DFFD 100%);
    border-bottom: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: none;
    transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
    background: linear-gradient(180deg, #BBD9FC 0%, #C4DFFD 100%);
    border-bottom: none;
    box-shadow: none;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    max-width: 1200px;
    margin: 0 auto;
    transition: padding 0.3s ease;
}

.site-header.scrolled .header-container {
    padding: 5px 20px;
}

body {
    padding-top: 75px;
    background-color: #FFFFFF;
}

body.scrolled {
    padding-top: 60px;
}

/* Desktop only: adjust carousel pull-up when header shrinks on scroll */
@media (min-width: 769px) {
    body.scrolled .featured-carousel {
        margin-top: -60px;
        padding-top: 55px;
    }
}

.site-logo {
    flex-shrink: 0;
}

.site-logo img {
    height: 40px;
    width: auto;
}

.main-navigation {
    flex: 1;
    margin: 0 30px 0 80px;
}

.main-navigation ul {
    display: flex;
    gap: 29px;
    align-items: center;
}

.main-navigation a {
    color: #1a3a5c;
    font-weight: 500;
    font-size: 15px;
    padding: 8px 0;
    position: relative;
}

.main-navigation a:hover,
.main-navigation a.current {
    color: #1557b0;
}

.main-navigation a::after {
    display: none;
}

/* Dropdown Menu Styles */
.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #FFFFFF;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 220px;
    max-width: 280px;
    z-index: 9999;
    margin-top: 0;
    overflow-x: visible;
    /* Scrollable submenu when items exceed viewport */
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #C8DFFF #F5F9FF;
}

.main-navigation ul ul::-webkit-scrollbar {
    width: 5px;
}

.main-navigation ul ul::-webkit-scrollbar-track {
    background: #F5F9FF;
    border-radius: 4px;
}

.main-navigation ul ul::-webkit-scrollbar-thumb {
    background: #C8DFFF;
    border-radius: 4px;
}

.main-navigation ul ul::-webkit-scrollbar-thumb:hover {
    background: #1A73E8;
}

.main-navigation ul li {
    position: relative;
}

.main-navigation ul li:hover > ul {
    display: block;
}

.main-navigation ul ul li {
    width: 100%;
}

.main-navigation ul ul a {
    padding: 12px 20px;
    display: block;
    border-bottom: 1px solid #F0F0F0;
}

.main-navigation ul ul li:last-child a {
    border-bottom: none;
}

.main-navigation ul ul a::after {
    display: none;
}

.main-navigation ul ul a:hover {
    background: #F9F9F9;
    padding-left: 25px;
}

/* Submenu indicator */
.main-navigation li.menu-item-has-children > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.main-navigation li.menu-item-has-children > a::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    transition: transform 0.3s ease;
    position: relative;
    display: inline-block;
    margin-left: 0;
}

.main-navigation li.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

.main-navigation ul ul li.menu-item-has-children > a::after {
    content: '\f105';
    position: relative;
}

/* Sub-submenu (third level) - opens to the right */
.main-navigation ul ul ul {
    top: 0;
    left: 100%;
    margin-top: 0;
    /* Override parent scroll constraints — let it open freely */
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    overflow-x: visible;
}

/* If sub-submenu would overflow right edge, flip it to the left */
.main-navigation ul ul li:hover > ul {
    left: 100%;
    right: auto;
}

.main-navigation ul ul li.submenu-left > ul,
.main-navigation ul ul ul.open-left {
    left: auto;
    right: 100%;
}

.header-search {
    flex-shrink: 0;
    position: relative;
}

.header-search-form {
    display: flex;
    align-items: center;
    gap: 0;
    transition: all 0.3s ease;
    position: relative;
}

.header-search-form input[type="search"] {
    width: 0;
    padding: 0;
    border: none;
    opacity: 0;
    transition: all 0.3s ease;
}

.header-search-form.active input[type="search"] {
    width: 220px;
    padding: 8px 15px;
    border: 2px solid #1A73E8;
    border-radius: 25px 0 0 25px;
    opacity: 1;
    font-size: 14px;
    outline: none;
}

.search-toggle {
    background: #1A73E8;
    border: none;
    cursor: pointer;
    padding: 10px 15px;
    color: #FFFFFF;
    font-size: 16px;
    border-radius: 25px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search-form.active .search-toggle {
    border-radius: 0 25px 25px 0;
    background: #1557b0;
}

.search-toggle:hover {
    background: #1557b0;
    transform: scale(1.05);
}

/* Live Search Results */
.live-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 350px;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    display: none;
    z-index: 1000;
}

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

.live-search-results::-webkit-scrollbar {
    width: 6px;
}

.live-search-results::-webkit-scrollbar-track {
    background: #F0F0F0;
}

.live-search-results::-webkit-scrollbar-thumb {
    background: #1A73E8;
    border-radius: 3px;
}

.search-result-item {
    display: flex;
    gap: 12px;
    padding: 12px 15px;
    border-bottom: 1px solid #F0F0F0;
    transition: all 0.3s ease;
    align-items: center;
}

.search-result-item:hover {
    background: #F8FBFF;
}

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

.search-result-thumb {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.search-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 14px;
    font-weight: 600;
    color: #1D1D1F;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
}

.search-result-date {
    display: none;
}

.search-no-results {
    padding: 30px;
    text-align: center;
    color: #999;
}

.search-loading {
    padding: 20px;
    text-align: center;
    color: #1A73E8;
}

/* ===============================================
   MOBILE MENU — TOGGLE BUTTON
   =============================================== */

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #1a3a5c;
    padding: 8px;
    position: relative;
    z-index: 1002;
}

/* ===============================================
   MOBILE MENU — CLOSE BUTTON (inside nav panel)
   =============================================== */

.mobile-menu-close {
    display: none;
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 1010;
    background: rgba(255, 255, 255, 0.6);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: #1a3a5c;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s ease;
    backdrop-filter: blur(4px);
    pointer-events: auto;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* ===============================================
   MOBILE OVERLAY
   =============================================== */

.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 998;
    cursor: pointer;
}

.mobile-nav-overlay.active {
    display: block;
}

/* ===============================================
   MOBILE SEARCH BAR
   =============================================== */

.mobile-search-bar {
    display: none;
    position: fixed;
    top: 55px;
    left: 0;
    right: 0;
    z-index: 997;
    padding: 10px 15px;
    background: #F0F7FF;
    border-bottom: 1px solid #D0E4FF;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.10);
    transform: translateY(-110%);
    transition: transform 0.3s ease;
}

.mobile-search-bar.active {
    transform: translateY(0);
}

.mobile-search-bar input[type="search"] {
    width: 100%;
    padding: 10px 18px;
    border: 2px solid #1A73E8;
    border-radius: 25px;
    font-size: 15px;
    outline: none;
    background: #fff;
    color: #1D1D1F;
}

/* Remove old search modal */
.search-modal {
    display: none !important;
}

/* ===============================================
   FEATURED POSTS CAROUSEL
   =============================================== */

.featured-carousel {
    background: linear-gradient(
        180deg,
        #C4DFFD 0%,
        #CDE5FD 14%,
        #D6EAFE 28%,
        #DFF0FE 40%,
        #E7F4FF 50%,
        #EEF6FF 60%,
        #F3F9FF 70%,
        #F6FAFF 80%,
        #FBFDFF 90%,
        #FFFFFF 100%
    );
    margin-top: -75px;
    padding: 70px 0 25px;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.carousel-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    box-shadow:
        0 4px 6px rgba(0,0,0,0.04),
        0 12px 40px rgba(26, 115, 232, 0.14),
        0 30px 80px rgba(0,0,0,0.08);
    background: #08090a;
    border: 1px solid rgba(255,255,255,0.6);
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-item {
    min-width: 100%;
    display: grid;
    grid-template-columns: 56% 44%;
    background: #08090a;
    align-items: stretch;
}

.carousel-image {
    position: relative;
    overflow: hidden;
    background: #08090a;
    display: flex;
    align-items: stretch;
    justify-content: center;
    min-height: 400px;
}

.carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 8s ease-out;
}

.carousel-item:hover .carousel-image img {
    transform: scale(1.02);
}

.carousel-content {
    position: relative;
    padding: 40px 45px;
    background: linear-gradient(160deg, #0d1117 0%, #111827 60%, #0f172a 100%);
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: none;
}

.carousel-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    background: rgba(26, 115, 232, 0.15);
    color: #60a5fa;
    border-radius: 25px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 18px;
    border: 1px solid rgba(26, 115, 232, 0.35);
    align-self: flex-start;
    backdrop-filter: blur(4px);
}

.carousel-category::before {
    content: '●';
    font-size: 7px;
    color: #1A73E8;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.carousel-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 16px;
    color: #FFFFFF;
    letter-spacing: -0.5px;
}

.carousel-title a {
    color: #FFFFFF;
    transition: color 0.3s ease;
}

.carousel-title a:hover {
    color: #60a5fa;
}

.carousel-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 18px;
    font-size: 13px;
    flex-wrap: wrap;
    align-items: center;
}

.carousel-meta span {
    display: flex;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.carousel-meta i {
    color: #1A73E8;
    font-size: 14px;
}

.carousel-meta .meta-separator {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
    margin: 0;
}

.carousel-meta-category a {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    transition: color 0.3s ease;
}

.carousel-meta-category a:hover {
    color: #60a5fa;
}

.carousel-meta-author a {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    transition: color 0.3s ease;
}

.carousel-meta-author a:hover {
    color: #60a5fa;
}

.carousel-excerpt {
    font-size: 15px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.75);
    max-width: 100%;
}

.carousel-read-more {
    display: none;
}

.carousel-controls {
    display: none;
}

.carousel-dots {
    display: flex;
    gap: 10px;
    padding: 18px 0 0;
    justify-content: center;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #C8D8EA;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.carousel-dot:hover {
    background: #1A73E8;
    transform: scale(1.3);
}

.carousel-dot.active {
    background: #1A73E8;
    width: 36px;
    border-radius: 5px;
    box-shadow: 0 3px 12px rgba(26, 115, 232, 0.5);
}

/* ===============================================
   MAIN CONTENT AREA
   =============================================== */

.content-area {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

.main-content {
    flex: 1;
    min-width: 0;
	margin-top: 20px;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.posts-list > .adsbygoogle,
.posts-list > ins,
.posts-list > .ad-unit,
.posts-list > [class*="ad-"],
.posts-list > [id*="google_ads"],
.posts-list > [class*="advert"] {
    display: block !important;
    width: 100% !important;
    float: none !important;
    clear: both !important;
    margin: 5px 0 !important;
    padding: 0 !important;
}

.main-content > .adsbygoogle,
.main-content > ins,
.main-content > .ad-unit,
.main-content > [class*="ad-"] {
    display: block !important;
    width: 100% !important;
    float: none !important;
    clear: both !important;
}

/* ===============================================
   LATEST STORIES SECTION
   =============================================== */

.latest-stories-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    color: #1D1D1F;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    position: relative;
}

.title-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #1A73E8 0%, #1557b0 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3);
}

.title-line {
    flex: 1;
    height: 3px;
    background: linear-gradient(90deg, #1A73E8 0%, transparent 100%);
    margin-left: 15px;
}

/* ===============================================
   POST CARD STYLES
   =============================================== */

.post-card {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 20px;
    padding: 7px;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FBFF 100%);
    border-radius: 7px;
    transition: all 0.3s ease;
    border: 1px solid #E3F0FF;
    box-shadow: 0 2px 10px rgba(26, 115, 232, 0.05);
    overflow: hidden;
    position: relative;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(26, 115, 232, 0.12);
    border-color: #1A73E8;
}

.post-thumbnail {
    width: 100%;
    height: 186px;
    border-radius: 8px;
    overflow: hidden;
    grid-column: 1;
    grid-row: 1;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content-wrapper {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 12px;
    font-size: 13px;
    color: #666;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-meta .meta-separator {
    color: #CCD5DE;
    font-weight: 300;
    font-size: 15px;
    line-height: 1;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
}

.post-meta .post-date {
    padding-right: 14px;
}

.post-meta .post-date::after {
    content: '';
    display: inline-block;
    width: 1px;
    height: 14px;
    background: #CCD5DE;
    margin-left: 14px;
    vertical-align: middle;
}

.post-meta .post-category {
    padding-left: 4px;
}

.post-category {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    color: #1A73E8;
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0;
}

.post-category-top {
    margin-bottom: 8px;
    min-height: 15px;
}

.post-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}

.post-title a {
    color: #1D1D1F;
}

.post-title a:hover {
    color: #1A73E8;
}

.post-meta .post-author a {
    color: #1D1D1F;
    font-weight: 600;
}

.post-meta .post-author a:hover {
    color: #1A73E8;
}

.post-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-top: auto;
}

/* ===============================================
   SIDEBAR STYLES
   =============================================== */

.sidebar {
    width: 350px;
    flex-shrink: 0;
}

.widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(26, 115, 232, 0.12);
    border-color: #1A73E8;
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1D1D1F;
    position: relative;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #1A73E8 0%, #1557b0 100%);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #1A73E8 0%, transparent 100%);
    border-radius: 2px;
}

/* Newsletter Widget in Sidebar */
.widget.newsletter-widget,
.widget:has(.mc4wp-form) {
    background: linear-gradient(135deg, #F8FBF8 0%, #F0F7F0 100%);
    border: 1px solid #E3F0E3;
    color: #1D1D1F;
    box-shadow: 0 8px 30px rgba(76, 142, 76, 0.15);
    padding: 15px;
}

.widget.newsletter-widget .widget-title,
.widget:has(.mc4wp-form) .widget-title {
    color: #1D1D1F;
}

.widget.newsletter-widget .widget-title::before,
.widget:has(.mc4wp-form) .widget-title::before {
    background: #1A73E8;
}

.widget.newsletter-widget .widget-title::after,
.widget:has(.mc4wp-form) .widget-title::after {
    background: linear-gradient(90deg, #1A73E8 0%, transparent 100%);
}

.widget .mc4wp-form {
    margin-top: 10px;
}

.widget .mc4wp-form p {
    margin-bottom: 15px;
    color: #4A4A4A;
    font-size: 14px;
}

.widget .mc4wp-form input[type="email"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #D3E8FF;
    background: #FFFFFF;
    border-radius: 8px;
    color: #1D1D1F;
    margin-bottom: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.widget .mc4wp-form input[type="email"]:focus {
    border-color: #1A73E8;
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.widget .mc4wp-form input[type="email"]::placeholder {
    color: #999;
}

.widget .mc4wp-form input[type="submit"] {
    width: 100%;
    padding: 14px 18px;
    background: linear-gradient(135deg, #1A73E8 0%, #1557b0 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3);
}

.widget .mc4wp-form input[type="submit"]:hover {
    background: linear-gradient(135deg, #1557b0 0%, #0d47a1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.4);
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #E8E8E8;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.search-form button {
    padding: 12px 20px;
    background: #1A73E8;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

/* Recent Posts Widget */
.recent-posts-widget .post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 12px;
    background: #FFFFFF;
    border: 1px solid #F0F0F0;
    transition: all 0.3s ease;
}

.recent-posts-widget .post-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.1);
    border-color: #1A73E8;
}

.recent-posts-widget .post-item:last-child {
    margin-bottom: 0;
}

.recent-posts-widget .post-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.recent-posts-widget .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recent-posts-widget .post-item:hover .post-thumb img {
    transform: scale(1.05);
}

.recent-posts-widget .post-info {
    flex: 1;
}

.recent-posts-widget .post-info h4 {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 5px;
}

.recent-posts-widget .post-info h4 a {
    color: #1D1D1F;
}

.recent-posts-widget .post-info h4 a:hover {
    color: #1A73E8;
}

.recent-posts-widget .post-date {
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 5px;
}

.recent-posts-widget .post-date i {
    color: #1A73E8;
}

/* Categories Widget */
.categories-list li {
    margin-bottom: 10px;
}

.categories-list a {
    display: flex;
    justify-content: space-between;
    padding: 12px 18px;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FBFF 100%);
    border-radius: 8px;
    color: #1D1D1F;
    transition: all 0.3s ease;
    border: 1px solid #F0F0F0;
}

.categories-list a:hover {
    background: linear-gradient(135deg, #1A73E8 0%, #1557b0 100%);
    color: #FFFFFF;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3);
    border-color: #1A73E8;
}

.categories-list .count {
    color: #999;
    background: rgba(26, 115, 232, 0.1);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.categories-list a:hover .count {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.25);
}

/* Tags Widget */
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags-list a {
    padding: 8px 16px;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FBFF 100%);
    border: 2px solid #E3F0FF;
    border-radius: 20px;
    font-size: 13px;
    color: #1D1D1F;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tags-list a:hover {
    background: linear-gradient(135deg, #1A73E8 0%, #1557b0 100%);
    color: #FFFFFF;
    border-color: #1A73E8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

/* ===============================================
   SINGLE POST STYLES
   =============================================== */

.single-post {
    background: #FFFFFF;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #F0F0F0;
}

.single .site-content > *,
.page .site-content > * {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 10px;
    padding-right: 10px;
    box-sizing: border-box;
}

.single .content-area,
.page .content-area {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

.single .entry-content,
.page .entry-content,
.single .post-content,
.page .post-content {
    max-width: 100%;
}

.single article,
.page article {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 10px;
    box-sizing: border-box;
}

.single-post-header {
    margin-bottom: 30px;
}

.single-post-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 20px 0px 20px 0px;
    color: #1D1D1F;
}

.single-post-meta {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #666;
    padding-bottom: 20px;
    border-bottom: 2px solid #F0F0F0;
}

.single-post-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.single-post-meta .author-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.single-post-meta .author-meta a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.single-featured-image {
    margin: 30px 0;
    border-radius: 12px;
    overflow: hidden;
}

.single-featured-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.single-post-content {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
}

.single-post-content h1,
.single-post-content h2,
.single-post-content h3,
.single-post-content h4,
.single-post-content h5,
.single-post-content h6 {
    margin: 30px 0 20px;
    font-weight: 700;
    color: #1D1D1F;
    line-height: 1.3;
}

.single-post-content h2 { font-size: 28px; }
.single-post-content h3 { font-size: 24px; }
.single-post-content h4 { font-size: 20px; }

.single-post-content p {
    margin-bottom: 20px;
}

.single-post-content ul,
.single-post-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.single-post-content li {
    margin-bottom: 10px;
    list-style: disc;
}

.single-post-content ol li {
    list-style: decimal;
}

.single-post-content blockquote {
    margin: 30px 0;
    padding: 20px 30px;
    background: #F9F9F9;
    border-left: 4px solid #1A73E8;
    font-style: italic;
    font-size: 20px;
}

.single-post-content img {
    margin: 30px 0;
    border-radius: 8px;
}

.single-post-content a {
    color: #1A73E8;
    text-decoration: underline;
}

.meta-separator {
    margin: 0 6px;
    color: #aaa;
}

.post-tags {
    margin: 40px 0;
    padding: 25px 0;
    border-top: 2px solid #F0F0F0;
    border-bottom: 2px solid #F0F0F0;
}

.post-tags h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #1D1D1F;
}

/* ===============================================
   PAGINATION STYLES
   =============================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 50px 0;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border: 2px solid #E8E8E8;
    border-radius: 8px;
    color: #1D1D1F;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination span.current {
    background: #1A73E8;
    color: #FFFFFF;
    border-color: #1A73E8;
    transform: translateY(-2px);
}

.pagination .dots {
    border: none;
}

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

.site-footer {
    background: #1D1D1F;
    color: #FFFFFF;
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    margin-bottom: 40px;
}

.footer-widget h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #FFFFFF;
}

.footer-widget p,
.footer-widget .textwidget {
    line-height: 1.8;
    color: #B8B8B8;
    background: transparent;
}

.footer-widget .textwidget p {
    margin-bottom: 15px;
    background: transparent;
}

.footer-widget .mc4wp-form {
    margin-top: 15px;
}

.footer-widget .mc4wp-form input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #FFFFFF;
    margin-bottom: 10px;
    font-size: 14px;
}

.footer-widget .mc4wp-form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.footer-widget .mc4wp-form input[type="submit"] {
    width: 100%;
    padding: 12px 15px;
    background: #1A73E8;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-widget .mc4wp-form input[type="submit"]:hover {
    background: #1557b0;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #FFFFFF;
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #1A73E8;
    transform: translateY(-3px);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #B8B8B8;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: #1A73E8;
    padding-left: 5px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-form input[type="email"] {
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
}

.newsletter-form input[type="email"]::placeholder {
    color: #B8B8B8;
}

.newsletter-form button {
    padding: 12px 20px;
    background: #1A73E8;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background: #1557b0;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #B8B8B8;
    font-size: 14px;
}

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

@media (max-width: 1024px) {
    .carousel-item {
        grid-template-columns: 1fr;
    }

    .carousel-image {
        min-height: 300px;
        height: 300px;
    }

    .carousel-content {
        padding: 35px 30px;
    }

    .carousel-title {
        font-size: 30px;
    }

    .content-area {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

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

@media (max-width: 768px) {

    /* Show hamburger toggle */
    .mobile-menu-toggle {
        display: block;
    }

    /* Hide desktop inline search */
    .header-search {
        display: none;
    }

    /* Show mobile search bar */
    .mobile-search-bar {
        display: block;
    }

    /* -----------------------------------------------
       NAV PANEL
       position:fixed means it escapes the header's
       stacking context entirely — no clipping issue.
       z-index 1001 puts it above:
         - overlay (998)
         - header (1000)
       ----------------------------------------------- */
    .main-navigation {
        position: fixed;
        top: 0;
        left: -100%;
        width: 82%;
        max-width: 300px;
        height: 100vh;
        background: linear-gradient(180deg, #BBD9FC 0%, #C4DFFD 30%, #D6EAFE 60%, #E7F4FF 100%);
        padding: 65px 25px 30px;
        transition: left 0.3s ease;
        box-shadow: 4px 0 24px rgba(26, 115, 232, 0.2);
        z-index: 1001;
        overflow-y: auto;
        overflow-x: hidden;
        /* Reset desktop layout properties */
        flex: none;
        margin: 0;
    }

    .main-navigation.active {
        left: 0;
    }

    /* Close button visible and on top */
    .mobile-menu-close {
        display: flex !important;
        z-index: 1010;
    }

    .main-navigation a {
        color: #1a3a5c !important;
        display: block;
        padding: 13px 0;
        font-size: 15px;
    }

    .main-navigation a:hover,
    .main-navigation a.current {
        color: #1557b0 !important;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }

    .main-navigation li {
        width: 100%;
        border-bottom: 1px solid rgba(26, 115, 232, 0.15);
    }

    .main-navigation li:last-child {
        border-bottom: none;
    }

    /* Mobile submenus — static, toggled by JS */
    .main-navigation ul ul {
        position: static;
        display: none;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.4);
        border-radius: 8px;
        margin: 2px 0 8px 10px;
        padding: 4px 0;
        backdrop-filter: blur(4px);
        overflow: hidden;
        max-height: none;
    }

    .main-navigation ul ul a {
        color: #1a3a5c !important;
        padding: 10px 15px;
        border-bottom: 1px solid rgba(26, 115, 232, 0.08);
    }

    .main-navigation ul ul li:last-child a {
        border-bottom: none;
    }

    .main-navigation li.menu-item-has-children.active > ul {
        display: block;
    }

    /* Spread parent link and arrow apart */
    .main-navigation li.menu-item-has-children > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .main-navigation li.menu-item-has-children > a::after {
        position: static;
        transform: none !important;
        margin-left: auto;
        font-size: 12px;
        content: '\f107';
    }

    /* Chevron flips when submenu is open */
    .main-navigation li.menu-item-has-children.active > a::after {
        content: '\f106' !important;
    }

    /* Post cards */
    .post-card {
        grid-template-columns: 1fr;
    }

    .post-thumbnail {
        width: 100%;
        height: 220px;
        grid-column: 1;
        grid-row: 1;
    }

    .post-content-wrapper {
        grid-column: 1;
        grid-row: 2;
    }

    .single-post {
        padding: 20px 7px;
    }

    .single-post-title {
        font-size: 24px;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .carousel-title {
        font-size: 24px;
    }

    .carousel-content {
        padding: 25px 22px;
    }

    .carousel-excerpt {
        font-size: 14px;
    }

    .featured-carousel {
        padding: 15px 0 20px;
        margin-bottom: 20px;
    }

    .widget {
        padding: 20px;
    }

    .carousel-meta {
        flex-wrap: wrap;
        gap: 10px;
    }

    .search-toggle {
        padding: 8px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .single-post-title {
        font-size: 20px;
    }

    .single-post {
        padding: 20px 5px;
    }

    .post-title {
        font-size: 16px;
    }

    .header-container {
        padding: 12px 15px;
    }

    .site-logo img {
        height: 35px;
    }

    .carousel-title {
        font-size: 20px;
    }

    .carousel-content {
        padding: 20px 18px;
    }

    .carousel-excerpt {
        font-size: 13px;
    }

    .carousel-category {
        font-size: 10px;
        padding: 6px 14px;
    }

    .post-card {
        padding: 20px;
    }

    .container {
        padding: 0 5px;
    }

    .carousel-container {
        padding: 0 5px;
    }

    .header-container {
        padding: 12px 10px;
    }

    .featured-carousel {
        padding: 12px 0 16px;
        margin-bottom: 15px;
    }

    .widget {
        padding: 18px;
    }
}

/* ===============================================
   UTILITY CLASSES
   =============================================== */

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

.mb-0 { margin-bottom: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.mt-0 { margin-top: 0; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
/* ===============================================
   TABLE STYLES
   =============================================== */

.entry-content table,
.single-post table,
.post-content table,
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
    display: table;
}

.entry-content table th,
.single-post table th,
.post-content table th,
table th {
    background-color: #1A73E8;
    color: #ffffff;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    border: 1px solid #1557b0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.entry-content table td,
.single-post table td,
.post-content table td,
table td {
    padding: 11px 16px;
    border: 1px solid #dde3ea;
    color: #333;
    vertical-align: top;
}

.entry-content table tr:nth-child(even),
.single-post table tr:nth-child(even),
.post-content table tr:nth-child(even),
table tr:nth-child(even) {
    background-color: #f4f8ff;
}

.entry-content table tr:nth-child(odd),
.single-post table tr:nth-child(odd),
.post-content table tr:nth-child(odd),
table tr:nth-child(odd) {
    background-color: #ffffff;
}

.entry-content table tr:hover td,
.single-post table tr:hover td,
.post-content table tr:hover td,
table tr:hover td {
    background-color: #e8f0fe;
}

/* Responsive table wrapper */
.entry-content table,
.single-post table,
.post-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    table th,
    table td {
        padding: 9px 12px;
        font-size: 13px;
    }
}

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

#reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #1A73E8, #34A853, #1A73E8);
    background-size: 200% 100%;
    animation: progressShimmer 2s linear infinite;
    z-index: 9999;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

@keyframes progressShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

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

#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    background: #1A73E8;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(26, 115, 232, 0.40);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background 0.2s ease;
    z-index: 999;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    background: #1557b0;
    box-shadow: 0 8px 24px rgba(26, 115, 232, 0.55);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    #back-to-top {
        bottom: 20px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 15px;
    }
}
