/* Sticky Square Buttons Sidebar */
.sticky-category-nav {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    background: white;
    padding: 15px 10px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-button {
    width: 100px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white !important;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid white;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
    outline: 1px solid #FFFFFF;
    outline-offset: -8px;
}

/* Color rotation for categories - matching your scheme */
.category-button:nth-child(3n+1) {
    background: #f08575;
}

.category-button:nth-child(3n+2) {
    background: #78afb7;
}

.category-button:nth-child(3n+3) {
    background: #9a9685;
}

.category-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    text-decoration: none;
    color: white;
}

.category-button i {
    font-size: 20px;
    margin-bottom: 4px;
}

.category-button-text {
    line-height: 1.1;
    text-align: center;
    font-size: 10px;
}

/* Active state when section is in view */
.category-button.active {
    outline: 1px solid #FFFFFF;
    outline-offset: -8px;
}

.category-button.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.2);
    pointer-events: none;
}

/* Add scroll margin to category sections for better anchor positioning */
.category-section {
    scroll-margin-top: 50px;
    margin-bottom: 60px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Blog container */
.blog-container {
    background-color: #fff;
    min-height: 100vh;
    padding: 0;
}

.category-page {
    background-color: #fff;
    min-height: 100vh;
    padding: 0;
}

/* Hero section with carousel and featured article */
.blog-hero {
    position: relative;
    height: 500px;
    overflow: hidden;
    border-bottom: 1px solid #e0e0e0;
}

.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.hero-date {
    position: absolute;
    top: 30px;
    left: 30px;
    background: #F08575;
    color: white;
    padding: 15px;
    border: 1px solid white;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    line-height: 1.1;
    min-width: 70px;
    z-index: 3;
}

.hero-date .day {
    display: block;
    font-size: 28px;
    font-weight: 800;
}

.hero-date .month {
    display: block;
    font-size: 14px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Featured Article Card - Right side */
.featured-article {
    position: absolute;
    top: 30px;
    right: 30px;
    background: #FFFFFF;
    color: white;
    padding: 25px;
    border: 1px solid white;
    max-width: 350px;
    z-index: 3;
}

.featured-article h3 {
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 15px;
    background: #F08575;
    outline: 1px solid #FFFFFF;
    outline-offset: -5px;
    color: #FFFFFF;
    text-align: center;
}

.featured-article h4 {
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: 400;
    line-height: 1.3;
    color: #9c9887;
}

.featured-article p {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    color: #9c9887;
}

.featured-article .read-more {
   background: #9c9887;
   color: white !important;
   padding: 10px 25px;
   text-decoration: none;
   font-weight: 600;
   text-transform: uppercase;
   letter-spacing: 1px;
   transition: all 0.3s ease;
   display: block;
   font-size: 12px;
   width: 100%;
   text-align: center;
}

.featured-article .read-more:hover {
    background: #757065;
    color: white !important;
}

/* Carousel indicators */
.carousel-indicators {
    position: absolute;
    bottom: 30px;
    display: flex;
    gap: 10px;
    z-index: 3;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background: #F08575;
}

/* Blog intro text */
.blog-intro-text {
    text-align: center;
    padding: 30px 20px;
    font-size: 18px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.category-header {
   background: #F08575;
   color: white;
   padding: 40px 0;
   text-align: center;
   margin-bottom: 40px;
   border-radius: 0;
   outline: 1px solid #FFFFFF;
   outline-offset: -8px;
}

.category-header h1 {
    font-size: 36px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 10px;
    font-family: inherit;
    color: white !important;
}

.category-header h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-family: inherit;
    color: white !important;
}

.category-header p {
    font-size: 16px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

/* Articles grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 30px;
    padding: 0 20px;
}

.articles-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
    padding: 0 20px;
}

.article-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

.article-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Date badge in corner */
.article-date {
   position: absolute;
   top: 4px;
   left: 4px;
   background: #F08575;
   color: white;
   padding: 15px;
   border: 1px solid white;
   font-weight: 700;
   font-size: 16px;
   text-align: center;
   line-height: 1.1;
   min-width: 70px;
   z-index: 3;
   outline: 4px solid #FFFFFF;
}

.article-date .day {
    display: block;
    font-size: 22px;
    font-weight: 800;
}

.article-date .month {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    margin-top: 2px;
    opacity: 0.9;
}

.featured-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #ffd700;
    color: #333;
    padding: 8px 15px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
    color: #333;
    min-height: 50px;
}

.article-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: #F08575;
}

.article-excerpt {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 84px;
    flex-grow: 1;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.read-story-btn {
   background: #656258;
   color: white !important;
   padding: 8px 24px;
   text-decoration: none;
   border-radius: 0;
   font-weight: 600;
   text-transform: uppercase;
   font-size: 12px;
   letter-spacing: 1px;
   transition: all 0.3s ease;
   display: block;
   text-align: center;
   margin: 0 auto;
   margin-top: auto;
}

.read-story-btn:hover {
    background: #494640;
    color: white;
    text-decoration: none;
}

.view-all-posts {
    text-align: center;
    margin-top: 40px;
    padding: 0 20px;
}

.view-all-btn {
    background: #F08575;
    color: white !important;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 14px;
}

.view-all-btn:hover {
    background: #e67762;
    color: white;
    text-decoration: none;
}

/* Blog header */
.blog-intro {
    background: #f8f9fa;
    padding: 40px 20px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.blog-intro h1 {
    font-size: 36px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.blog-intro p {
    font-size: 18px;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.back-to-blog {
    text-align: center;
    margin: 50px 0;
    padding: 0 20px;
}

.back-btn {
    background: #6c757d;
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: inline-block;
}

.back-btn:hover {
    background: #333;
    color: white;
    text-decoration: none;
}

.no-articles {
    text-align: center;
    padding: 100px 20px;
    color: #666;
}

.no-articles h3 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #333;
    font-weight: 400;
}

.no-articles p {
    font-size: 18px;
    margin-bottom: 30px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    /* Sticky nav mobile */
    .sticky-category-nav {
        left: 0;
        padding: 10px 8px;
        gap: 6px;
    }

    .category-button {
        width: 60px;
        height: 60px;
        font-size: 9px;
        margin-bottom: 0;
        border: 2px solid white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        color: white !important;
        outline: 1px solid #FFFFFF;
        outline-offset: -8px;
    }

    .category-button i {
        font-size: 16px;
        margin-bottom: 2px;
    }

    .category-button-text {
        font-size: 8px;
    }

    /* Articles grid mobile */
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    .articles-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 15px;
    }

    .featured-article {
        margin: 20px 15px;
        max-width: none;
    }

    .category-header h1 {
        font-size: 28px;
        letter-spacing: 2px;
    }

    .category-header h2 {
        font-size: 24px;
        letter-spacing: 2px;
    }

    .blog-intro h1 {
        font-size: 28px;
    }

    .blog-intro {
        padding: 30px 15px;
    }

    .article-image {
        height: 200px;
    }

    .article-content {
        padding: 25px 20px;
    }

    .article-title {
        font-size: 18px;
    }

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

@media (max-width: 480px) {
    .sticky-category-nav {
        left: 0;
        padding: 8px 6px;
        gap: 4px;
    }

    .category-button {
        width: 50px;
        height: 50px;
        font-size: 8px;
        margin-bottom: 0;
        border: 1px solid white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        color: white !important;
        outline: 1px solid #FFFFFF;
        outline-offset: -8px;
    }

    .category-button i {
        font-size: 14px;
    }

    .category-button-text {
        font-size: 7px;
    }
}

@media (max-width: 1200px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}
