/**
 * Modern Homepage CSS
 *
 * YouTube/Medium-style modern design
 * Card-based layout, responsive, smooth animations
 */

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

.modern-homepage {
    background: #f8f9fa;
    min-height: 100vh;
}

.hero-section {
    background: linear-gradient(135deg, #0052cc 0%, #00c453 100%);
    color: white;
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

/* Animated Background Shapes */
.hero-background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 15%;
    animation-delay: 5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

/* Hero Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 50px;
    margin-bottom: 25px;
    font-size: 14px;
    font-weight: 600;
    animation: slideDown 0.8s ease;
}

.hero-badge i {
    color: #ffd700;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 56px;
    font-weight: 900;
    margin-bottom: 25px;
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-title-highlight {
    display: block;
    background: linear-gradient(90deg, #ffffff 0%, #e0f7fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-description {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.7;
    margin-bottom: 40px;
    opacity: 0.95;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

/* Hero Features */
.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.6s backwards;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 16px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-feature:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: white;
    color: #0052cc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.feature-content {
    text-align: left;
}

.feature-content h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 700;
}

.feature-content p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

/* Hero Actions */
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.8s backwards;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 35px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.hero-btn-primary {
    background: white;
    color: #0052cc;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
}

.hero-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.5);
    background: #f0f0f0;
    color: #0052cc;
}

.hero-btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.hero-btn-secondary:hover {
    background: white;
    color: #0052cc;
    transform: translateY(-3px);
}

/* Stats Counter */
.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 50px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    animation: fadeInUp 0.8s ease 1s backwards;
}

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

.stat-number {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-divider {
    width: 2px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
}

/* Search Bar */
.hero-search {
    position: relative;
    max-width: 600px;
    margin: 40px auto 30px;
    animation: fadeInUp 0.8s ease 1.2s backwards;
}

.search-form {
    position: relative;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    box-shadow: 0 15px 50px rgba(0,0,0,0.25);
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    left: 25px;
    color: #0052cc;
    font-size: 18px;
    z-index: 1;
}

.search-input {
    flex: 1;
    border: none;
    padding: 18px 25px 18px 55px;
    font-size: 16px;
    color: #333;
    outline: none;
}

.search-input::placeholder {
    color: #999;
}

.search-button {
    background: linear-gradient(135deg, #0052cc 0%, #00c453 100%);
    color: white;
    border: none;
    padding: 18px 30px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0 50px 50px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button:hover {
    background: linear-gradient(135deg, #003d99 0%, #009933 100%);
    transform: scale(1.05);
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.search-results-content {
    padding: 10px;
}

.search-result-item {
    display: flex;
    gap: 15px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s ease;
}

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

.search-result-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
}

.search-result-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.search-result-category {
    font-size: 12px;
    color: #0052cc;
    font-weight: 600;
}

/* Trending Keywords */
.trending-keywords {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
    animation: fadeInUp 0.8s ease 1.4s backwards;
}

.trending-label {
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.trending-label i {
    color: #ffd700;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.keyword-chip {
    display: inline-block;
    padding: 10px 18px;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.4);
}

.keyword-chip:hover {
    background: white;
    color: #0052cc;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    border-color: white;
}

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

.content-section {
    margin: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 36px;
    font-weight: 800;
    color: #2d3748;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
}

.section-title i {
    color: #0052cc;
    font-size: 32px;
}

.section-subtitle {
    font-size: 16px;
    color: #718096;
}

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

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

/* ==========================================
   ARTICLE CARD
   ========================================== */

.article-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.2);
}

.article-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-card__image {
    position: relative;
    padding-top: 60%; /* 5:3 aspect ratio */
    overflow: hidden;
    background: #f0f0f0;
}

.article-card__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .article-card__img {
    transform: scale(1.08);
}

.article-card__category {
    position: absolute;
    bottom: 15px;
    left: 15px;
    z-index: 3;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
}

.article-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.4) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-card:hover .article-card__overlay {
    opacity: 1;
}

.article-card__content {
    padding: 24px;
}

.article-card__title {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card__excerpt {
    font-size: 15px;
    color: #718096;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    color: #a0aec0;
    margin-bottom: 10px;
}

.article-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.article-card__meta i {
    font-size: 14px;
}

.article-card__stats {
    display: flex;
    gap: 15px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.article-card__stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #718096;
}

.article-card__stat i {
    color: #0052cc;
}

/* Small Cards */
.article-card--small .article-card__title {
    font-size: 18px;
    -webkit-line-clamp: 2;
}

.article-card--small .article-card__content {
    padding: 20px;
}

/* ==========================================
   HORIZONTAL SCROLL
   ========================================== */

.horizontal-scroll {
    position: relative;
    margin: 0 -15px;
}

.horizontal-scroll__wrapper {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 0 15px 20px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #0052cc #f0f0f0;
}

.horizontal-scroll__wrapper::-webkit-scrollbar {
    height: 8px;
}

.horizontal-scroll__wrapper::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.horizontal-scroll__wrapper::-webkit-scrollbar-thumb {
    background: #0052cc;
    border-radius: 4px;
}

.horizontal-scroll .article-card {
    flex: 0 0 320px;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    color: #0052cc;
    font-size: 18px;
}

.scroll-btn:hover {
    background: #0052cc;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.scroll-btn--left {
    left: -24px;
}

.scroll-btn--right {
    right: -24px;
}

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

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    background: white;
    padding: 30px 20px;
    border-radius: 16px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--category-color, #0052cc);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: var(--category-color, #0052cc);
}

.category-card__icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: var(--category-color, #0052cc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    transition: all 0.3s ease;
}

.category-card:hover .category-card__icon {
    transform: scale(1.1) rotate(10deg);
}

.category-card__name {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.category-card__count {
    font-size: 14px;
    color: #718096;
}

/* ==========================================
   LOAD MORE BUTTON
   ========================================== */

.load-more-wrapper {
    text-align: center;
    margin-top: 40px;
}

.btn-load-more {
    background: linear-gradient(135deg, #0052cc 0%, #00c453 100%);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.btn-load-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.4);
}

.btn-load-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

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

@media (max-width: 768px) {
    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .section-title {
        font-size: 28px;
    }

    .article-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

    .horizontal-scroll .article-card {
        flex: 0 0 280px;
    }

    .scroll-btn {
        display: none;
    }

    .search-input {
        padding: 15px 20px 15px 50px;
        font-size: 14px;
    }

    .search-button {
        padding: 15px 25px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 60px 0 40px;
    }

    .hero-title {
        font-size: 26px;
    }

    .section-title {
        font-size: 24px;
        flex-direction: column;
        gap: 8px;
    }

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

    .article-card__content {
        padding: 20px;
    }

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

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }
.article-card:nth-child(4) { animation-delay: 0.4s; }
.article-card:nth-child(5) { animation-delay: 0.5s; }
.article-card:nth-child(6) { animation-delay: 0.6s; }
.article-card:nth-child(n+7) { animation-delay: 0.7s; }

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

.back-to-top,
#back-to-top,
button.back-to-top {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    width: 50px !important;
    height: 50px !important;
    background: linear-gradient(135deg, #0052cc 0%, #00c453 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    font-size: 20px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
    transition: all 0.3s ease !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(100px) !important;
}

.back-to-top.show,
#back-to-top.show,
button.back-to-top.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.back-to-top:active {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 18px;
    }
}

/* Print styles */
@media print {
    .hero-search,
    .scroll-btn,
    .btn-load-more,
    .search-results,
    .back-to-top {
        display: none !important;
    }
}

/* ==========================================
   HOMEPAGE LAYOUT WITH SIDEBAR
   ========================================== */

.homepage-layout {
    display: grid !important;
    grid-template-columns: 1fr 350px !important;
    gap: 40px;
    margin-top: 40px;
    align-items: start;
}

.homepage-main {
    min-width: 0; /* Prevent grid blowout */
    grid-column: 1;
}

.homepage-sidebar {
    position: sticky;
    top: 20px;
    align-self: start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding-bottom: 20px;
    grid-column: 2;
}

/* Sidebar Widget */
.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
}

.sidebar-widget:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.sidebar-widget__title {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-widget__title i {
    color: #0052cc;
}

/* Sidebar Articles */
.sidebar-articles {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-article {
    display: block;
    transition: transform 0.2s ease;
}

.sidebar-article:hover {
    transform: translateX(4px);
}

.sidebar-article__link {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.sidebar-article__image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
}

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

.sidebar-article:hover .sidebar-article__image img {
    transform: scale(1.1);
}

.sidebar-article__content {
    flex: 1;
    min-width: 0;
}

.sidebar-article__title {
    font-size: 14px;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-article:hover .sidebar-article__title {
    color: #0052cc;
}

.sidebar-article__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: #718096;
}

.sidebar-article__meta i {
    margin-right: 4px;
}

/* Sidebar Categories */
.sidebar-categories {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f7fafc;
    border-radius: 8px;
    text-decoration: none;
    color: #2d3748;
    transition: all 0.2s ease;
    border-left: 3px solid var(--cat-color, #0052cc);
}

.sidebar-category:hover {
    background: var(--cat-color, #0052cc);
    color: white;
    transform: translateX(4px);
}

.sidebar-category__name {
    font-weight: 500;
    font-size: 14px;
}

.sidebar-category__count {
    font-size: 12px;
    opacity: 0.8;
}

/* Responsive - Sidebar */
@media (max-width: 1200px) {
    .homepage-layout {
        grid-template-columns: 1fr 300px;
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .homepage-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .homepage-sidebar {
        position: static;
        max-height: none;
        margin-top: 40px;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 24px;
    }

    .sidebar-widget {
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .homepage-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar-widget {
        padding: 20px;
    }

    .sidebar-article__image {
        width: 70px;
        height: 70px;
    }
}

/* ==========================================
   FLOATING ACTION BUTTON (FAB) MENU
   ========================================== */

.fab-container {
    
    
    
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

/* Main FAB Button */
.fab-main {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0052cc 0%, #00c453 100%);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.fab-main:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.7);
}

.fab-main:active {
    transform: scale(0.95);
}

.fab-close-icon {
    display: none;
}

.fab-container.active .fab-main-icon {
    display: none;
}

.fab-container.active .fab-close-icon {
    display: block;
}

.fab-container.active .fab-main {
    transform: rotate(90deg);
}

/* FAB Menu Items */
.fab-menu {
    position: absolute;
    bottom: 75px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab-container.active .fab-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fab-item {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: none;
    color: #0052cc;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-decoration: none;
}

.fab-item:hover {
    background: linear-gradient(135deg, #0052cc 0%, #00c453 100%);
    color: white;
    transform: scale(1.15);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
}

/* Tooltip */
.fab-item::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 65px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    font-weight: 500;
}

.fab-item::after {
    content: '';
    position: absolute;
    right: 55px;
    border: 6px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.85);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.fab-item:hover::before,
.fab-item:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Animation delays for menu items */
.fab-container.active .fab-item:nth-child(1) {
    transition-delay: 0.05s;
}

.fab-container.active .fab-item:nth-child(2) {
    transition-delay: 0.1s;
}

.fab-container.active .fab-item:nth-child(3) {
    transition-delay: 0.15s;
}

.fab-container.active .fab-item:nth-child(4) {
    transition-delay: 0.2s;
}

/* FAB Modal */
.fab-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}

.fab-modal.active {
    display: flex !important;
    display: flex;
}

.fab-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.fab-modal__content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.fab-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(135deg, #0052cc 0%, #00c453 100%);
    color: white;
}

.fab-modal__header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.fab-modal__header h3 i {
    margin-right: 8px;
}

.fab-modal__close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.fab-modal__close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.fab-modal__body {
    padding: 25px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

/* Categories Grid in Modal */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    color: #2d3748;
    transition: all 0.3s ease;
    border-left: 4px solid var(--cat-color, #0052cc);
}

.category-item:hover {
    background: var(--cat-color, #0052cc);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-item__icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--cat-color, #0052cc);
    flex-shrink: 0;
}

.category-item:hover .category-item__icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.category-item__content h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
}

.category-item__content span {
    font-size: 12px;
    opacity: 0.8;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .fab-container {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
        bottom: 20px;
        right: 20px;
    }

    .fab-main {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }

    .fab-item {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .fab-item::before {
        display: none;
    }

    .fab-item::after {
        display: none;
    }

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

    .fab-modal__content {
        width: 95%;
        max-height: 90vh;
    }
}

@media (max-width: 480px) {
    .fab-main {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .fab-item {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
}

/* DEBUG: Make modal super visible */
.fab-modal.active {
    display: flex !important;
    background: rgba(0, 0, 0, 0.95) !important;
}

.fab-modal__content {
    border: 5px solid red !important;
}

/* Mobile Responsive - Hero Section */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0 50px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-description {
        font-size: 16px;
    }

    .hero-features {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .hero-feature {
        padding: 15px;
    }

    .feature-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .feature-content h3 {
        font-size: 14px;
    }

    .feature-content p {
        font-size: 12px;
    }

    .hero-actions {
        flex-direction: column;
        gap: 10px;
    }

    .hero-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 20px;
        padding: 20px;
    }

    .stat-number {
        font-size: 28px;
    }

    .stat-label {
        font-size: 12px;
    }

    .stat-divider {
        display: none;
    }

    .shape-1 {
        width: 200px;
        height: 200px;
    }

    .shape-2 {
        width: 150px;
        height: 150px;
    }

    .shape-3 {
        width: 100px;
        height: 100px;
    }

    .search-input {
        font-size: 14px;
        padding: 15px 20px 15px 50px;
    }

    .search-button {
        padding: 15px 25px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-badge {
        font-size: 12px;
        padding: 8px 16px;
    }

    .hero-description {
        font-size: 14px;
    }
}
