/* tips-tricks page styles. Extracted from tips-tricks.blade.php. */

/* Hero Section */
.tips-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    padding: 60px 0;
    color: white;
}

.tips-breadcrumb {
    margin-bottom: 20px;
}

.tips-breadcrumb ol {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    flex-wrap: wrap;
}

.tips-breadcrumb a {
    color: white;
    text-decoration: none;
}

.tips-breadcrumb a:hover {
    text-decoration: underline;
}

.tips-hero-title {
    font-size: clamp(24px, 5vw, 42px);
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1.2;
}

.tips-hero-description {
    font-size: clamp(14px, 3vw, 18px);
    margin: 0 0 32px;
    opacity: 0.95;
    line-height: 1.5;
}

.tips-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    max-width: 600px;
}

.tips-stat-card {
    background: rgba(255,255,255,0.15);
    padding: 16px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    text-align: center;
}

.tips-stat-number {
    font-size: clamp(20px, 4vw, 32px);
    font-weight: 700;
}

.tips-stat-label {
    font-size: clamp(11px, 2vw, 14px);
    opacity: 0.9;
    margin-top: 4px;
}

/* Filters Section */
.tips-filters {
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.tips-filters-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tips-filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tips-search-wrapper {
    width: 100%;
}

.tips-search-input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

/* Filter Buttons */
.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    background: white;
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    white-space: nowrap;
}

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

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

/* Tips Content */
.tips-content {
    padding: 40px 0 80px;
    background: var(--bg-light);
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 20px;
}

/* Tip Card */
.tip-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.tip-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.tip-card-header {
    margin-bottom: 16px;
}

.tip-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tip-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tip-category.programming {
    background: #dbeafe;
    color: #1e40af;
}

.tip-category.math {
    background: #dbeafe;
    color: #be123c;
}

.tip-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
}

.tip-badge.popular {
    background: #fff7ed;
    color: #ea580c;
}

.tip-title {
    font-size: clamp(16px, 3vw, 20px);
    font-weight: 700;
    margin: 0;
    color: var(--text-dark);
    line-height: 1.4;
    word-wrap: break-word;
}

.tip-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tip-section {
    padding: 14px;
    background: var(--bg-light);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.tip-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tip-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 0;
    word-wrap: break-word;
}

.tip-benefit {
    font-weight: 500;
    color: #059669;
}

/* Code Block */
.code-block {
    position: relative;
    background: #1e293b;
    border-radius: 12px;
    padding: 16px;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.6;
}

.code-block code {
    color: #e2e8f0;
    white-space: pre;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: rgba(255,255,255,0.2);
}

.copy-btn.copied {
    background: #10b981;
    border-color: #10b981;
}

/* No Results */
.no-results {
    display: none;
    text-align: center;
    padding: 60px 20px;
}

.no-results i {
    font-size: 48px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.no-results h3 {
    font-size: 20px;
    margin: 0 0 8px;
}

.no-results p {
    color: var(--text-light);
}

.no-tips {
    text-align: center;
    padding: 60px 20px;
}

.no-tips i {
    font-size: 48px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.no-tips h3 {
    font-size: 20px;
    margin: 0 0 8px;
}

.no-tips p {
    color: var(--text-light);
}

/* Tablet */
@media (min-width: 768px) {
    .tips-filters-wrapper {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .tips-search-wrapper {
        max-width: 400px;
    }

    .tips-grid {
        gap: 24px;
    }

    .tip-card {
        padding: 24px;
    }

    .tip-section {
        padding: 16px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .tips-hero {
        padding: 30px 0;
    }

    .tips-content {
        padding: 30px 0 60px;
    }

    .filter-btn span {
        display: none;
    }

    .filter-btn {
        padding: 8px 12px;
    }

    .tip-category span,
    .tip-badge span {
        display: none;
    }
}

/* RTL Support */
[dir="rtl"] .tip-section {
    border-left: none;
    border-right: 4px solid var(--primary);
}
