/* Custom styles to match zainrizvi.io navbar */
.navbar-custom {
    background-color: #fff;
    border-bottom: 1px solid #eaeaea;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

.navbar-custom .site-header-inside {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    width: 100%;
}

.navbar-custom .site-branding {
    padding: 0;
}

.navbar-custom .site-title {
    font-size: 18px;
    margin: 0;
    line-height: 1.25;
    font-weight: 700;
    text-rendering: optimizeLegibility;
    text-transform: uppercase;
    color: #000000;
}

.navbar-custom .navbar-brand {
    color: #33383f;
    font-weight: 700;
    height: auto;
    padding: 20px 0;
}

.navbar-custom .navbar-brand:hover,
.navbar-custom .navbar-brand:focus {
    color: #2c2e31;
}

.navbar-custom .nav li a {
    color: #5c6773;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 15px; /* Reduced from 20px to 10px for top/bottom padding */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar-custom .nav li a:hover,
.navbar-custom .nav li a:focus {
    color: #33383f;
    background-color: #ffeb3b; /* Bright yellow background on hover */
}

.navbar-custom .nav li.current-menu-item a:hover {
    color: #33383f; /* Change text color when current menu item is hovered */
}

/* Mobile menu styles */
@media (max-width: 767px) {
    .navbar-custom .site-header-inside {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .navbar-custom .navbar-header {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .navbar-custom .nav li a {
        padding: 10px 15px;
    }
}

/* Enhanced Mobile Menu Styles with explicit hamburger icon styling */
.navbar-toggle {
    border: none;
    background: transparent !important;
    margin-right: 0;
    padding: 9px 10px;
    margin-top: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    display: block; /* Ensure it's always displayed */
    float: right;
}

.visible-xs-block {
    display: none !important;
}

@media (max-width: 767px) {
    .visible-xs-block {
        display: block !important;
    }
    
    .navbar-toggle {
        display: block;
        position: absolute;
        right: 15px;
        top: 15px;
        z-index: 100;
    }
}

.navbar-toggle:focus {
    outline: none;
}

/* Make the hamburger icon more visible with stronger styling */
.navbar-toggle .icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 1px;
    background-color: #333;
    transition: all 0.3s;
    margin-top: 4px;
}

.navbar-toggle .icon-bar:first-child {
    margin-top: 0;
}

/* Hamburger animation */
.navbar-toggle.active .icon-bar:nth-child(2) {
    transform: rotate(45deg) translate(5px, 4px);
}

.navbar-toggle.active .icon-bar:nth-child(3) {
    opacity: 0;
}

.navbar-toggle.active .icon-bar:nth-child(4) {
    transform: rotate(-45deg) translate(5px, -4px);
}

/* Mobile menu dropdown - the rest remains the same */
@media (max-width: 767px) {
    .navbar-custom .site-header-inside {
        padding: 0 15px;
        flex-direction: row;
        align-items: center;
    }
    
    .navbar-custom .navbar-header {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }
    
    /* Make sure navbar brand and toggle have proper spacing */
    .navbar-custom .navbar-brand {
        padding-left: 0;
    }
    
    #huxblog_navbar {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        z-index: 100;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        width: 100%;
    }
    
    #huxblog_navbar.in {
        max-height: 500px;
        overflow: visible;
    }
    
    #huxblog_navbar .navbar-collapse {
        padding: 0;
        border: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    #huxblog_navbar .navbar-collapse.in {
        max-height: 500px;
        overflow: visible;
    }
    
    #huxblog_navbar .nav {
        margin: 0;
        padding: 0;
        width: 100%;
        float: none !important;
    }
    
    #huxblog_navbar .nav li {
        display: block;
        width: 100%;
        border-bottom: 1px solid #eee;
        float: none;
    }
    
    #huxblog_navbar .nav li:last-child {
        border-bottom: none;
    }
    
    #huxblog_navbar .nav li a {
        padding: 15px;
        display: block;
        width: 100%;
        text-align: left;
    }
}

header.intro-header {
    position: relative;
    background-size: cover;
    background-position: center;
  }
  
  header.intro-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
  }
  
  header.intro-header .container {
    position: relative;
    z-index: 2; /* Place the content above the overlay */
  }

  .homepage-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 576px) {
    .homepage-container {
        padding: 0 15px;
    }
}

/* Grid Layout for Tag Pages - Modified for exactly 2 columns */
.post-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Changed to exactly 2 columns */
    grid-gap: 30px;
    margin-bottom: 30px;
}

/* Make it responsive - switch to 1 column on smaller screens */
@media (max-width: 768px) {
    .post-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
    }
}

.grid-item {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.post-content {
    padding: 20px;
}

.post-excerpt {
    margin-bottom: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.post-header {
    padding: 15px 20px 0;
}

.read-more .button.light {
    background-color: #ffea00;
    color: #0c0000;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.read-more .button.light:hover {
    background-color: #fff681;
}

.cover.archive-header {
    position: relative;
    height: 300px;
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.cover-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.7);
}

.cover-content {
    position: relative;
    z-index: 2;
}

.post-tags {
    margin-bottom: 10px;
}

.post-tags a {
    display: inline-block;
    background: #ffea00;
    color: #0c0000;
    padding: 3px 10px;
    margin-right: 5px;
    border-radius: 3px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
}

.square {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: #ffea00;
    color: #0c0000;
    border-radius: 3px;
}

.post-title {
    font-size: 30px;
    font-weight: 700;
    margin: 10px 0 15px;
    line-height: 1.3;
}

.post-title a {
    color: #2c2e31;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-title a:hover {
    color: #2c2e31;
    position: relative;
    text-decoration: none;
}

.post-title a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -3px;
    left: 0;
    background-color: #ffea00;
    transition: width 0.3s ease;
}

.post-title a:hover::after {
    width: 100%;
}

.post-date {
    font-size: 14px;
    color: #777;
    margin-bottom: 15px;
}

/* Modern Blog List Layout */
.blog-header {
    background-color: #f5f5f7;
    padding: 60px 0;
    margin-bottom: 50px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.blog-header .site-heading h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.blog-header .subheading {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    display: block;
}

.blog-grid {
    margin-bottom: 50px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.blog-card-image {
    position: relative;
    height: 220px;
    background-color: #f5f5f7;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.03);
}

.blog-card-image-link.no-image {
    display: block;
    height: 100%;
}

.blog-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: #f5f5f7;
}

.blog-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-tags {
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.blog-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #333;
    background-color: #ffea00;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.blog-tag:hover {
    background-color: #ffe100;
    text-decoration: none;
}

.blog-card-title {
    margin: 0 0 10px;
    font-size: 22px;
    line-height: 1.3;
}

.blog-card-title a {
    color: #1a1a1a;
    text-decoration: none;
    position: relative;
}

.blog-card-title a:hover {
    color: #1a1a1a;
}

.blog-card-title a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #ffea00;
    transition: width 0.3s ease;
}

.blog-card-title a:hover::after {
    width: 100%;
}

.blog-card-meta {
    font-size: 14px;
    color: #777;
    margin-bottom: 15px;
}

.blog-card-excerpt {
    color: #555;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.pagination-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #ffea00;
    color: #1a1a1a;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.pagination-button:hover {
    background-color: #ffe100;
    text-decoration: none;
    color: #1a1a1a;
}

.pagination-info {
    color: #777;
    font-size: 14px;
}

/* Mobile responsiveness for blog list */
@media (max-width: 768px) {
    .blog-header {
        padding: 40px 0;
    }
    
    .blog-header .site-heading h1 {
        font-size: 32px;
    }
    
    .pagination-container {
        flex-direction: column;
        gap: 15px;
    }
}

/* Author box styling */
.author-list {
    margin-top: 60px;
    padding: 30px;
    border: 2px solid #000;
    border-radius: 2px;
    position: relative;
}

.author-list-title {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffea00;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #000;
    letter-spacing: 0.5px;
}

figure figcaption {
    position: relative;
    text-align: center;
    margin-top: 10px;
    font-size: 12px;
    color: #8f8f7f; 
    font-weight: normal;
    letter-spacing: 2px; 
    text-transform: uppercase;
    padding-bottom: 0; 
}

figure figcaption::after {
    display: none;
}

.author-box {
    display: flex;
    align-items: flex-start;
}

.author-avatar {
    flex-shrink: 0;
    margin-right: 20px;
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid #000;
}

.author-details {
    flex-grow: 1;
}

.author-title {
    font-size: 18px;
    margin: 0 0 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #000;
}

.author-title a {
    text-decoration: none;
    color: #000;
}

.author-description {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #000;
}

.author-links {
    font-size: 14px;
    margin-bottom: 0;
}

.author-twitter {
    display: inline-flex;
    align-items: center;
}

.author-twitter svg {
    width: 16px;
    height: 16px;
    margin-right: 5px;
    fill: #000;
}

.author-twitter a {
    color: #000;
    font-weight: 600;
    text-decoration: underline;
}

.author-twitter a:hover {
    color: #007acc;
}

/* Responsive styling */
@media (max-width: 600px) {
    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .author-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

/* Link styling with animated underline */
a {
    color: inherit;
    text-decoration: none;
    position: relative;
}

/* Remove default browser styling for links on hover */
a:hover, a:focus {
    color: inherit;
    text-decoration: none;
}

a:not(.navbar-brand):not(.blog-card-title a):not(.post-title a):not(.button):not(.pagination-button):not(.blog-tag):not(.navbar-custom .nav li a):not(.blog-card-image a):not(.blog-card-image-link):not(.read-more-link):not(.post-preview a)::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #000000;
    transition: background-color 0.3s ease, height 0.3s ease;
}

a:not(.navbar-brand):not(.blog-card-title a):not(.post-title a):not(.button):not(.pagination-button):not(.blog-tag):not(.navbar-custom .nav li a):not(.blog-card-image a):not(.blog-card-image-link):not(.read-more-link):not(.post-preview a):hover::after {
    background-color: #ffea00;
    height: 2px;
}