/* Hero Section */
.hero-section {
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    position: relative;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Breadcrumb Styles - Hero Section */
.hero-section .breadcrumb-nav {
    background: transparent;
    padding: 1rem 0;
}

.hero-section .breadcrumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
}

.hero-section .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.hero-section .breadcrumb-item.active {
    color: white !important;
}

.hero-section .breadcrumb-item + .breadcrumb-item::before {
    color: white !important;
}

/* Breadcrumb Styles - Main Content */
.breadcrumb-nav {
    margin-bottom: 1.5rem;
    background: #f8f9fa;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #0056b3;
}

.breadcrumb-nav .breadcrumb {
    margin: 0;
    background: none;
    padding: 0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.breadcrumb-nav .breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-nav .breadcrumb-item + .breadcrumb-item::before {
    content: "•";
    color: #6c757d;
    margin: 0 0.75rem;
    font-weight: bold;
}

.breadcrumb-nav .breadcrumb-item a {
    color: #000;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.breadcrumb-nav .breadcrumb-item a:hover {
    color: #003d82;
    text-decoration: underline;
}

.breadcrumb-nav .breadcrumb-item.active {
    color: #0056b3;
    font-weight: 600;
}

.breadcrumb-nav .breadcrumb-item i {
    font-size: 0.8rem;
    margin-right: 0.4rem;
    color: #0056b3;
}

/* Card Styles - Common for News and Products */
.news-card, .product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
    border: none;
}

.news-card:hover, .product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.news-card-img, .product-card-img {
    height: 220px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
}

.news-card-img img, .product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    border-radius: 0;
}

.news-card:hover .news-card-img img, .product-card:hover .product-card-img img {
    transform: scale(1.05);
}

.news-card-body, .product-card-body {
    padding: 1.5rem;
}

.news-card-body a, .product-card a {
    text-decoration: none;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.news-card h4, .product-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: var(--text-dark);
}

.news-card p, .product-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Product-specific styles */
.product-card-img::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%23dee2e6" viewBox="0 0 16 16"><path d="M6.002 5.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"/><path d="M2.002 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2h-12zm12 1a1 1 0 0 1 1 1v6.5l-3.777-1.947a.5.5 0 0 0-.577.093l-3.71 3.71-2.66-1.772a.5.5 0 0 0-.63.062L1.002 12V3a1 1 0 0 1 1-1h12z"/></svg>') no-repeat center;
    opacity: 0.3;
    z-index: 1;
}

.product-card-img img:not([src=""]):not([src]) {
    display: none;
}

/* Product image adjustments for 4-column layout */
.col-lg-3 .product-card-img {
    height: 250px;
}

.col-md-6 .product-card-img {
    height: 220px;
}

/* Sidebar */
.sidebar {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    height: fit-content;
}

.sidebar h5 {
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.search-box {
    position: relative;
    margin-bottom: 2rem;
}

.search-box input {
    border: 2px solid #e9ecef;
    border-radius: 50px;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    width: 100%;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.25);
    outline: none;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}


.recent-post {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.recent-post:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.recent-post-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.recent-post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-post-content h6 {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.recent-post-content a {
    color: var(--text-dark);
    text-decoration: none;
}

.recent-post-content a:hover {
    color: var(--primary-color);
}

.recent-post-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Tags Cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    background: var(--secondary-color);
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.tag-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3);
}

/* Pagination */
.pagination-wrapper {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.pagination {
    --bs-pagination-border-radius: 50px;
    --bs-pagination-color: var(--text-dark);
    --bs-pagination-bg: white;
    --bs-pagination-border-color: #e9ecef;
    --bs-pagination-hover-color: white;
    --bs-pagination-hover-bg: var(--primary-color);
    --bs-pagination-hover-border-color: var(--primary-color);
    --bs-pagination-active-color: white;
    --bs-pagination-active-bg: var(--primary-color);
    --bs-pagination-active-border-color: var(--primary-color);
}

.page-link {
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    border-radius: 50px !important;
    font-weight: 500;
}

/* Section Spacing */
.section-padding {
    padding: 2rem 0;
}

/* Sort Controls Bar */
.sort-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.results-info {
    color: #6c757d;
    font-size: 0.95rem;
    font-weight: 500;
}

.controls-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.sort-dropdown {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.sort-dropdown label {
    color: #6c757d;
    font-weight: 600;
    margin: 0;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sort-select {
    padding: 0.5rem 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    color: #495057;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    min-width: 160px;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sort-select:focus {
    outline: none;
    transform: translateY(-1px);
}

.sort-select option {
    padding: 0.5rem;
    background: #fff;
    color: #495057;
}


/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .news-card-body, .product-card-body {
        padding: 1.25rem;
    }

    .sidebar {
        margin-top: 2rem;
    }

    .breadcrumb-nav {
        padding: 0.5rem 1rem;
    }

    .breadcrumb-nav .breadcrumb {
        font-size: 0.8rem;
        flex-wrap: wrap;
    }

    .breadcrumb-nav .breadcrumb-item + .breadcrumb-item::before {
        margin: 0 0.5rem;
    }

    .sort-controls-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        text-align: center;
    }

    .controls-right {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

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


    .sort-dropdown {
        justify-content: center;
    }

    /* Mobile image adjustments */
    .product-card-img {
        height: 180px !important;
    }

    .col-lg-3 .product-card-img,
    .col-md-6 .product-card-img {
        height: 180px !important;
    }

    .product-card h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .product-card p {
        font-size: 0.875rem;
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .pagination {
        --bs-pagination-border-radius: 8px;
    }

    .page-link {
        padding: 0.5rem 0.75rem;
        border-radius: 8px !important;
    }

    .section-padding {
        padding: 2rem 0;
    }

    .hero-section {
        height: 50vh;
    }

    .sort-controls-bar {
        padding: 1rem;
    }

    .controls-right {
        justify-content: center;
    }

    .sort-dropdown {
        justify-content: center;
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }

    .sort-dropdown label {
        font-size: 0.8rem;
        text-align: center;
    }

    .sort-select {
        min-width: 240px;
        text-align: center;
        padding: 0.875rem 2.5rem 0.875rem 1.25rem;
        font-size: 0.95rem;
    }

}

/* Loading Animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.loaded {
    opacity: 1;
    transform: translateY(0);
}
