/* Custom CSS for Video Downloader Hub */

/* Font Variables */
:root {
    --font-inter: 'Inter', sans-serif;
    --primary-color: #22c55e;
    --primary-dark: #16a34a;
    --secondary-color: #6b7280;
    --success-color: #22c55e;
    --info-color: #3b82f6;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-color: #f9fafb;
    --dark-color: #111827;
    --teal-color: #14b8a6;
    --purple-color: #8b5cf6;
    --blue-color: #3b82f6;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --bg-light: #f0fdf4;
}

/* Global Styles */
body {
    font-family: var(--font-inter);
    line-height: 1.6;
    color: var(--gray-800);
    background-color: #ffffff;
}

/* Blog Detail Page Styles */
.blog-content img {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-content img:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* 博客头部图片容器样式 */
.blog-header-img-container {
    width: 100%;
    max-width: 768px; /* 限制最大宽度为768px */
    margin: 0 auto; /* 居中显示 */
    position: relative;
    padding-bottom: 56.25%; /* 强制16:9比例 (9/16 = 0.5625) */
    overflow: hidden; /* 隐藏超出容器的部分 */
    border-radius: 16px; /* 圆角 */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12); /* 阴影 */
    transition: all 0.3s ease; /* 过渡动画 */
}

/* 博客头部图片样式 */
.blog-header-img {
    position: absolute; /* 绝对定位，填充容器 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 确保图片覆盖整个容器，保持比例 */
    border-radius: 16px; /* 图片圆角 */
    transition: all 0.3s ease; /* 过渡动画 */
}

.blog-header-img:hover {
    transform: scale(1.02); /* 悬停放大效果 */
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18); /* 悬停阴影效果 */
}

/* H5移动端适配 */
@media (max-width: 768px) {
    .blog-header-img-container {
        max-width: 100%;
        margin: 0 15px;
        border-radius: 12px;
        padding-bottom: 56.25%; /* 保持16:9比例 */
    }
    
    .blog-header-img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 12px;
    }
}

@media (max-width: 576px) {
    .blog-header-img-container {
        margin: 0 10px;
        border-radius: 8px;
        padding-bottom: 56.25%; /* 保持16:9比例 */
    }
    
    .blog-header-img {
        border-radius: 8px;
    }
    
    /* 小屏幕设备优化 */
    .blog-content {
        padding: 0 15px;
    }
    
    .blog-content h1 {
        font-size: 1.75rem;
    }
    
    .blog-content h2 {
        font-size: 1.5rem;
    }
    
    .blog-content h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .blog-header-img-container {
        margin: 0 5px;
        padding-bottom: 56.25%; /* 保持16:9比例 */
    }
    
    .blog-content {
        padding: 0 10px;
    }
}

/* Sidebar Styles */
.sidebar {
    position: relative;
    top: 0;
}

.popular-post-item {
    transition: all 0.3s ease;
}

.popular-post-item:hover {
    transform: translateX(5px);
}

.popular-post-item h6 a {
    transition: color 0.3s ease;
}

.popular-post-item h6 a:hover {
    color: var(--primary-color) !important;
}

.popular-post-item img {
    transition: transform 0.3s ease;
}

.popular-post-item:hover img {
    transform: scale(1.1);
}

/* Mobile Sidebar */
@media (max-width: 991px) {
    .sidebar {
        position: static;
        margin-top: 2rem;
    }
}

/* Footer Responsive */
@media (max-width: 768px) {
    .footer .col-lg-5,
    .footer .col-lg-2,
    .footer .col-lg-3 {
        text-align: center;
    }
    
    .footer-stats {
        justify-content: center;
    }
    
    .footer-legal {
        justify-content: center;
    }
}

/* Footer Column Spacing */
.footer .row > div {
    padding: 0 1rem;
}

.footer .row > div:first-child {
    padding-left: 0;
}

.footer .row > div:last-child {
    padding-right: 0;
}

/* Ensure equal height columns */
.footer .col-lg-5,
.footer .col-lg-2,
.footer .col-lg-3 {
    display: flex;
    flex-direction: column;
}

.footer .col-lg-5 > *,
.footer .col-lg-2 > *,
.footer .col-lg-3 > * {
    flex: 1;
}

.blog-header img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-inter);
    font-weight: 600;
    color: var(--gray-900);
}

/* Navigation Styles */
.navbar {
    backdrop-filter: blur(10px);
    background: #F5FDF7 !important;
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 0;
}

/* Override Bootstrap navbar background */
.navbar.bg-white,
.navbar.navbar-light {
    background: #F5FDF7 !important;
}

/* Force override for all navbar variations */
.navbar,
.navbar.navbar-expand-lg,
.navbar.navbar-light,
.navbar.fixed-top {
    background: #F5FDF7 !important;
}

/* Custom navbar class for extra specificity */
.custom-navbar {
    background: #F5FDF7 !important;
    background-color: #F5FDF7 !important;
}

/* Unified mobile navigation styles for all pages */
@media (max-width: 991px) {
    .navbar {
        background: #F5FDF7 !important;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .navbar-brand {
        margin-right: 0;
    }
    
    .navbar-brand h1 {
        font-size: 1.25rem !important;
    }
    
    .navbar-brand small {
        font-size: 0.75rem !important;
    }
    
    .navbar-nav {
        margin-top: 1rem;
        text-align: left !important;
        justify-content: flex-start !important;
    }
    /* If UL has align-items-center from desktop, override on mobile */
    .navbar-nav.align-items-center {
        align-items: flex-start !important;
    }
    .navbar-collapse .navbar-nav {
        align-items: flex-start !important;
        width: 100%;
    }
    
    .navbar-nav .nav-item {
        margin: 0.5rem 0;
        text-align: left !important;
        justify-content: flex-start !important;
        width: 100%;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        font-size: 1rem;
        font-weight: 500;
        color: var(--gray-700) !important;
        border-radius: 8px;
        transition: all 0.3s ease;
        text-align: left !important;
        justify-content: flex-start !important;
        display: flex !important;
    }
    
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        background: rgba(34, 197, 94, 0.1);
        color: var(--primary-color) !important;
    }
    
    .navbar-nav .nav-link.active::after {
        display: none;
    }
    
    .navbar-nav .btn {
        margin: 0.5rem 0;
        width: auto;
        min-width: 140px;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        border-radius: 8px;
        text-align: center !important;
        justify-content: center !important;
        display: inline-flex !important;
    }
    
    .navbar-toggler {
        border: 1px solid var(--gray-300);
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(34, 197, 94, 0.25);
    }
}

.brand-icon {
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.brand-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.brand-subtitle {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.navbar-nav .nav-link {
    color: var(--gray-600) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link.active {
    font-weight: 600 !important;
    position: relative;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 1px;
}

/* Hero Section */
.hero-section {
    padding: 120px 0 80px;
    background: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    opacity: 1;
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2rem;
    color: var(--gray-900);
    position: relative;
    z-index: 1;
}

.text-primary {
    color: var(--primary-color) !important;
}

h3 .text-primary,
.section-title .text-primary,
span.text-primary {
    color: var(--primary-color) !important;
}

.hero-title .text-primary {
    background: linear-gradient(135deg, var(--primary-color), #16a34a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.375rem;
    color: var(--gray-600);
    max-width: 700px;
    margin: 0 auto 3.5rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Search Container */
.search-container {
    max-width: 700px;
    margin: 0 auto 4rem;
    position: relative;
    z-index: 1;
}

.search-container .input-group {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.search-container .input-group:focus-within {
    box-shadow: 0 25px 50px rgba(34, 197, 94, 0.15);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.search-container .form-control {
    border: none;
    padding: 1.25rem 2rem;
    font-size: 1.125rem;
    background: transparent;
    color: var(--gray-800);
}

.search-container .form-control::placeholder {
    color: var(--gray-400);
}

.search-container .form-control:focus {
    box-shadow: none;
    background: transparent;
    outline: none;
}

.search-container .btn {
    border-radius: 0 16px 16px 0;
    padding: 1.25rem 2.5rem;
    background: var(--primary-color);
    border: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-container .btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.3);
}

.search-results {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
    padding: 1.5rem 1rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-100);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), #16a34a);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
}

/* Section Styles */
.section-padding {
    padding: 60px 0;
}

/* Override bg-light for specific sections */
.section-padding.bg-light {
    background-color: white !important;
}

/* Category page header background */
.category-page-header {
    background-color: white !important;
}

/* Blog page hero section background */
.blog-hero-section {
    background-color: white !important;
}

/* Category page search bar background */
.category-search-section .input-group {
    background-color: #F5FDF7 !important;
}

.category-search-section .form-control {
    background-color: #F5FDF7 !important;
    border: none;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

/* Cards */
.feature-card,
.about-card,
.audience-card,
.promise-card {
    background: #F5FDF7;
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--gray-200);
}

.feature-card:hover,
.about-card:hover,
.audience-card:hover,
.promise-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.feature-icon,
.about-icon,
.promise-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: white;
}

.feature-icon {
    background: var(--primary-color);
}

.about-icon {
    background: var(--teal-color);
}

.promise-icon {
    background: var(--purple-color);
}

.feature-title,
.about-title,
.audience-title,
.promise-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.feature-description,
.about-description,
.promise-description {
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.feature-tag {
    display: inline-block;
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.audience-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.audience-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.audience-item i {
    color: var(--primary-color);
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.audience-item strong {
    color: var(--gray-900);
    font-weight: 600;
}

.audience-item span {
    color: var(--gray-600);
}

/* Footer */
.footer {
    background: var(--bg-light);
    color: var(--gray-900);
    padding: 4rem 0 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.footer-subtitle {
    color: var(--gray-800);
    font-size: 0.875rem;
}

.footer-description {
    color: var(--gray-900);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-800);
    font-size: 0.875rem;
}

.stat i {
    color: var(--primary-color);
}

/* Footer spacing - high priority */
.footer .footer-heading {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem !important;
    color: var(--gray-900);
}

.footer .footer-links {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.footer .footer-links li {
    margin-bottom: 0.25rem !important;
    padding: 0 !important;
}

/* Override Bootstrap defaults */
.footer h5.footer-heading {
    margin-bottom: 0.25rem !important;
}

.footer ul.footer-links {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.footer ul.footer-links li {
    margin-bottom: 0.25rem !important;
}

.footer-links a {
    color: var(--gray-800);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-divider {
    border-color: var(--gray-300);
    margin: 3rem 0 2rem;
}

.footer-copyright {
    color: var(--gray-800);
    font-size: 0.875rem;
    margin: 0;
}

.footer-legal {
    display: flex;
    gap: 2rem;
    justify-content: flex-end;
}

.footer-legal a {
    color: var(--gray-800);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: var(--primary-color);
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .stat-item {
        padding: 1.25rem 0.75rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
        margin-bottom: 0.375rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
        width: 100%;
    }
    
    .tool-card {
        height: auto;
        min-height: 280px;
        width: 100% !important;
    }
    
    .search-container {
        max-width: 100%;
        margin: 0 auto 3rem;
    }
    
    .search-container .input-group {
        flex-direction: column;
        border-radius: 16px;
    }
    
    .search-container .form-control {
        border-radius: 16px 16px 0 0;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .search-container .btn {
        border-radius: 0 0 16px 16px;
        width: 100%;
    }
    
    .footer-stats {
        gap: 1rem;
    }
    
    .footer-legal {
        justify-content: flex-start;
        margin-top: 1rem;
    }
    
    .hero-section {
        padding: 100px 0 60px;
    }
    
    .section-padding {
        padding: 60px 0;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1rem 0.5rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .stat-label {
        font-size: 0.625rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
        width: 100%;
    }
    
    .tool-card {
        height: auto;
        min-height: 300px;
        width: 100% !important;
    }
    
    .tool-card .card-body {
        padding: 1rem;
    }
    
    .tool-card .card-title {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .tool-platform {
        margin-bottom: 0.25rem;
    }
    
    .tool-rating {
        margin-bottom: 0.125rem;
    }
    
    .tool-users {
        margin-bottom: 0.25rem;
    }
    
    .tool-description {
        margin-bottom: 0.375rem;
    }
    
    .tool-features {
        margin-bottom: 0.375rem;
    }
    
    .tool-card .card-title {
        font-size: 1.125rem;
    }
}

/* Custom Background Gradients */
.bg-gradient-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.bg-teal-100 {
    background-color: #d1f2eb !important;
}

.bg-blue-100 {
    background-color: #d1ecf1 !important;
}

.bg-purple-100 {
    background-color: #e8d5f2 !important;
}

/* Custom Text Colors */
.text-teal-600 {
    color: #0ca678 !important;
}

.text-blue-600 {
    color: #0d6efd !important;
}

.text-purple-600 {
    color: #6f42c1 !important;
}

/* Hover Effects */
.hover-primary:hover {
    color: var(--primary-color) !important;
    text-decoration: none;
}

.card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,.125);
    background: #F5FDF7;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
    border-color: var(--primary-color);
}

/* Custom Button Styles */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(34, 197, 94, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(34, 197, 94, 0.3);
}

/* Custom Badge Styles */
.badge-pill {
    border-radius: 50px;
}

/* Search Bar Styling */
.input-group-lg .form-control {
    border-radius: 8px 0 0 8px;
    border: 1px solid #dee2e6;
}

.input-group-lg .btn {
    border-radius: 0 8px 8px 0;
}

/* Tool Card Styling */
.tool-card {
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    background: #F5FDF7;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.tool-card .card-img-top {
    height: 200px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.tool-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.tool-logo-small {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Blog Post Styling */
.blog-card {
    transition: all 0.3s ease;
    background: #F5FDF7;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.blog-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Feature Icon Styling */
.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon-small {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* FAQ Accordion Styling */
.faq-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    background: #F5FDF7;
}

.faq-header {
    background-color: #F5FDF7;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.faq-header:hover {
    background-color: #e8f5e8;
}

.faq-body {
    padding: 1rem 1.5rem;
    border-top: 1px solid #dee2e6;
    background-color: #F5FDF7;
}

/* Navigation Styling */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-family: var(--font-playfair);
}

/* Footer Styling */
footer {
    background: var(--bg-light);
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
    text-decoration: none;
}

/* Stats Section */
.stats-item {
    text-align: center;
    padding: 1rem;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stats-label {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* Search Results Styling */
.search-highlight {
    background-color: #fff3cd;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .stats-number {
        font-size: 2rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
    }
    
    .tool-logo {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .input-group-lg .form-control {
        font-size: 1rem;
    }
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

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

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

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

/* Utility Classes */
.text-balance {
    text-align: justify;
    text-align-last: center;
}

.text-pretty {
    text-align: justify;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Custom Shadows */
.shadow-custom {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.shadow-custom-lg {
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

/* Border Radius Utilities */
.rounded-xl {
    border-radius: 12px !important;
}

.rounded-2xl {
    border-radius: 16px !important;
}

/* Spacing Utilities */
.py-6 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
}

.py-7 {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

/* Background Utilities */
.bg-muted {
    background-color: #f0fdf4 !important;
}

.bg-muted-30 {
    background-color: rgba(240, 253, 244, 0.3) !important;
}

.bg-light {
    background-color: var(--bg-light) !important;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Enhanced Tool Cards */
.tool-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    /*height: 320px;*/
    display: flex;
    flex-direction: column;
    width: 100%;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}





.tool-card .card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.tool-card .card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-platform {
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.tool-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tool-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.tool-rating .stars {
    color: #fbbf24;
    font-size: 0.75rem;
}

.tool-rating .rating-text {
    color: var(--gray-600);
    font-size: 0.75rem;
    font-weight: 500;
}

.tool-users {
    color: var(--gray-500);
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.tool-description {
    color: var(--gray-600);
    font-size: 0.75rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tool-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    min-height: 1.5em;
    align-items: flex-start;
}

.tool-feature {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 500;
}

.tool-card .btn {
    width: 100%;
    padding: 0.625rem 1rem;
    font-weight: 600;
    border-radius: 6px;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.tool-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 1;
}

/* Enhanced Search Bar */
.search-container {
    background: #F5FDF7 !important;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Search Results Specific Styles */
#searchResultsGrid .tool-card {
    background: white !important;
    border: 1px solid var(--gray-200);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

#searchResultsGrid .tool-card .card-body {
    background: white !important;
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

#searchResultsGrid .tool-card .btn {
    background: transparent !important;
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    margin-top: 1rem !important;
    z-index: 10 !important;
    position: relative !important;
}

/* Ensure search input and button consistency */
.search-container .input-group {
    background: #F5FDF7;
}

.search-container .input-group .form-control {
    background: #F5FDF7 !important;
    border: none;
}

.search-container .form-control {
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    background: #F5FDF7 !important;
}

.search-container .btn {
    border-radius: 0 12px 12px 0;
    padding: 1rem 2rem;
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* H5移动端搜索框优化 */
@media (max-width: 768px) {
    .search-container .input-group {
        flex-direction: row;
        align-items: stretch;
    }
    
    .search-container .form-control {
        flex: 1;
        border-radius: 12px 0 0 12px;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .search-container .btn {
        flex: 0 0 auto;
        width: 60px;
        padding: 1rem 0.5rem;
        border-radius: 0 12px 12px 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .search-container .btn i {
        font-size: 1.2rem;
        margin: 0;
    }
}

/* Enhanced Buttons */
.btn-lg {
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #16a34a);
    border: none;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.4);
}

/* Enhanced Navigation */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
}

.navbar-brand {
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

/* Enhanced Footer */
footer {
    background: var(--bg-light) !important;
}

/* Enhanced Typography */
.display-4 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

.display-5 {
    font-weight: 700;
    letter-spacing: -0.01em;
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.scale-in {
    animation: scaleIn 0.6s ease-out;
}

/* Stagger animations for cards */
.tool-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

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

.stat-item {
    animation: scaleIn 0.6s ease-out;
    animation-fill-mode: both;
}

.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }

/* Enhanced Blog Cards */
.blog-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
    border-color: var(--primary-color);
}

.blog-card .card-img-top {
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .card-img-top {
    transform: scale(1.05);
}

.blog-card .card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #F5FDF7;
}

.blog-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: var(--gray-800);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.6em;
}

.blog-card .card-text {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--gray-600);
    flex: 1;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 3.6em;
}

.blog-card .badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    background: #10b981;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1;
    display: inline-flex;
    align-items: center;
    height: fit-content;
    flex-shrink: 1;
    min-width: 0;
}

.blog-card .btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-weight: 500;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.blog-card .btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.blog-card .card-body .d-flex:last-child {
    margin-top: auto;
    align-items: center;
}

.blog-card .card-body .d-flex:last-child small {
    font-size: 0.75rem;
}

.blog-card .card-body .d-flex:first-child {
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.blog-card-link:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-5px);
}

.blog-card-link:hover .blog-card {
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.blog-card .card-body .d-flex:first-child small {
    font-size: 0.75rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    height: fit-content;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Category Page Styles */
.sidebar {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 16px;
    height: fit-content;
    position: relative;
    top: 0;
}

.sidebar h4 {
    font-weight: bold;
    color: var(--gray-800);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.875rem;
}

.category-item:hover {
    background: rgba(34, 197, 94, 0.05);
    color: var(--primary-color);
    text-decoration: none;
}

.category-item.active {
    background: rgba(34, 197, 94, 0.1);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.category-item .category-name {
    display: flex;
    align-items: center;
    font-weight: 500;
    font-size: 0.875rem;
}

.category-item .category-name i {
    font-size: 0.8rem;
    margin-right: 0.5rem;
    width: 1rem;
    text-align: center;
}

.category-item.active .category-name i {
    color: var(--primary-color);
}

.category-item .category-name::before {
    content: '>';
    margin-right: 0.5rem;
    font-weight: bold;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.category-item.active .category-name::before {
    color: var(--primary-color);
}

.category-item .category-count {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 1.5rem;
    text-align: center;
}

.category-item.active .category-count {
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.search-section .input-group {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-section .form-control {
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
}

.search-section .form-control:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

.search-section .btn {
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.filter-buttons .btn-group {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filter-buttons .btn {
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.filter-buttons .btn-primary {
    background: var(--primary-color);
    color: white;
}

.filter-buttons .btn-outline-success {
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.filter-buttons .btn-outline-success:hover {
    background: var(--primary-color);
    color: white;
}

.filter-buttons .btn-outline-success.active {
    background: var(--primary-color);
    color: white;
}

.tools-count {
    color: var(--gray-800);
    font-size: 0.9rem;
}

/* Category Tools Grid */
.category-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    .category-tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .category-tools-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .sidebar {
        margin-bottom: 2rem;
        position: static;
        padding: 1rem;
    }
    
    .sidebar h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .category-item {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .category-item .category-name {
        font-size: 0.8rem;
    }
    
    .category-item .category-name i {
        font-size: 0.75rem;
        margin-right: 0.4rem;
    }
    
    .category-item .category-count {
        font-size: 0.65rem;
        padding: 0.15rem 0.3rem;
    }
}

/* Footer Link Hover Effects */
footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
    text-decoration: none;
}

/* Blog Grid Layout */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 1200px) {
    .blog-grid {
        grid-template-columns: repeat(3, minmax(260px, 1fr));
        gap: 1.25rem;
        max-width: 1000px;
    }
}

@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
        gap: 1rem;
        max-width: 800px;
    }
}

@media (max-width: 576px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 400px;
    }
    
    .blog-card .card-body {
        padding: 1.25rem;
    }
    
    .blog-card .card-title {
        font-size: 1rem;
    }
}
