/* Tools Index Page Styles */

/* Hero Section */
.guides-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.guides-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Ccircle cx='50' cy='50' r='2'/%3E%3Ccircle cx='25' cy='25' r='1.5'/%3E%3Ccircle cx='75' cy='75' r='1.5'/%3E%3Ccircle cx='25' cy='75' r='1'/%3E%3Ccircle cx='75' cy='25' r='1'/%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 1;
    animation: backgroundMove 20s ease-in-out infinite;
}

.guides-hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite;
}

@keyframes backgroundMove {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(20px, 20px);
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-30px, 30px) scale(1.1);
    }
}

.guides-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    animation: fadeInUp 0.8s ease-out;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.hero-badge:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.hero-badge svg {
    width: 18px;
    height: 18px;
    animation: pulse 2s ease-in-out infinite;
}

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

.guides-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.guides-hero p {
    font-size: 1.3rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
    line-height: 1.6;
}

/* Filter Section */
.guides-filter-section {
    padding: 3rem 0 2rem;
}

.filter-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.filter-header h2 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 2rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.filter-btn.active {
    background: var(--gradient);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.filter-btn i {
    font-size: 1rem;
}

/* Search Box */
.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #94a3b8;
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 1rem 1.25rem 1rem 3.5rem;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.search-box input::placeholder {
    color: #94a3b8;
}

/* Tools Grid */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.guide-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.guide-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.guide-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.guide-image {
    height: 180px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.guide-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2364748b' fill-opacity='0.03' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
}

.guide-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.guide-card:hover .guide-icon {
    transform: scale(1.1) rotate(5deg);
}

.guide-icon i {
    font-size: 2.5rem;
    color: white;
}

.gradient-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.gradient-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 8px 20px rgba(240, 147, 251, 0.4);
}

.gradient-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 8px 20px rgba(79, 172, 254, 0.4);
}

.gradient-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    box-shadow: 0 8px 20px rgba(67, 233, 123, 0.4);
}

.guide-content {
    padding: 1.75rem;
}

.guide-category {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: var(--primary-color);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.guide-content h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
}

.guide-content p {
    color: #64748b;
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.no-results svg {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.no-results h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.no-results p {
    font-size: 1rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .guides-hero h1 {
        font-size: 2.8rem;
    }

    .guides-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .guides-hero {
        padding: 4rem 0 3rem;
    }

    .guides-hero h1 {
        font-size: 2.2rem;
    }

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

    .filter-header h2 {
        font-size: 1.6rem;
    }

    .filter-buttons {
        gap: 0.75rem;
    }

    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .guides-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .guide-image {
        height: 160px;
    }

    .guide-icon {
        width: 70px;
        height: 70px;
    }

    .guide-icon i {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .guides-hero h1 {
        font-size: 1.8rem;
    }

    .guides-hero p {
        font-size: 1rem;
    }

    .filter-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-btn {
        justify-content: center;
    }

    .guide-content {
        padding: 1.5rem;
    }

    .guide-content h3 {
        font-size: 1.15rem;
    }
}

/* Animation for filtered items */
.guide-card {
    animation: fadeIn 0.4s ease;
}

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

/* Category specific colors */
.guide-card[data-category="basic"] .guide-category {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #4f46e5;
}

.guide-card[data-category="geometry"] .guide-category {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #db2777;
}

.guide-card[data-category="statistics"] .guide-category {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}

.guide-card[data-category="conversion"] .guide-category {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
}

.guide-card[data-category="finance"] .guide-category {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.guide-card[data-category="education"] .guide-category {
    background: linear-gradient(135deg, #e9d5ff 0%, #d8b4fe 100%);
    color: #9333ea;
}
