/* ========================================
   OnePercent Catalog - CSS Styles
   ======================================== */

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    color: #1f2937;
    background: #fafafa;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   Header
   ======================================== */
.catalog-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.catalog-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    border-bottom-color: #e5e7eb;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: #6366f1;
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    color: #1f2937;
    font-size: 18px;
    font-weight: 700;
}

.tagline {
    color: #6b7280;
    font-size: 12px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    color: #4b5563;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link:hover {
    color: #6366f1;
    background: #f5f3ff;
}

.nav-link.active {
    color: #6366f1;
    background: #f5f3ff;
}

.nav-divider {
    width: 1px;
    height: 24px;
    background: #e5e7eb;
    margin: 0 8px;
}

.login-link {
    color: #6366f1;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: #4b5563;
    border-radius: 1px;
    transition: all 0.3s;
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 16px 24px;
    flex-direction: column;
    gap: 8px;
}

.mobile-menu.open {
    display: flex;
}

.mobile-link {
    padding: 12px 16px;
    color: #4b5563;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
}

.mobile-link:hover {
    background: #f5f3ff;
    color: #6366f1;
}

.mobile-link.primary {
    background: #6366f1;
    color: white;
    text-align: center;
}

.mobile-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

/* ========================================
   Breadcrumbs
   ======================================== */
.breadcrumbs-wrapper {
    padding: 16px 0;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
}

.breadcrumbs a {
    color: #6366f1;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: #4f46e5;
}

.breadcrumbs .separator {
    color: #9ca3af;
}

.breadcrumbs .current {
    color: #4b5563;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

.btn-primary:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    transform: translateY(-1px);
}

.btn-primary.green {
    background: #10b981;
    border-color: #10b981;
}

.btn-primary.green:hover {
    background: #059669;
    border-color: #059669;
}

.btn-outline {
    background: transparent;
    color: #6366f1;
    border-color: #6366f1;
}

.btn-outline:hover {
    background: #f5f3ff;
}

.btn-outline.green {
    color: #10b981;
    border-color: #10b981;
}

.btn-outline.green:hover {
    background: #ecfdf5;
}

.btn-outline.orange {
    color: #f59e0b;
    border-color: #f59e0b;
}

.btn-outline.orange:hover {
    background: #fffbeb;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 17px;
}

/* ========================================
   Main Content
   ======================================== */
.catalog-main {
    padding: 0 0 60px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 40px 0 50px;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    margin: 0 -24px 40px;
    padding-left: 24px;
    padding-right: 24px;
    border-radius: 0 0 24px 24px;
}

.hero-section.yellow {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.hero-section.green {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.hero-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 16px;
}

.hero-subtitle {
    font-size: 18px;
    color: #6b7280;
    margin: 0 0 32px;
    line-height: 1.6;
}

/* Search Box */
.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.search-input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    font-size: 16px;
    outline: none;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-btn {
    padding: 16px 20px;
    background: #6366f1;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: #4f46e5;
}

.search-btn.orange {
    background: #f59e0b;
}

.search-btn.orange:hover {
    background: #d97706;
}

.search-btn.green {
    background: #10b981;
}

.search-btn.green:hover {
    background: #059669;
}

/* Section Titles */
.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header .section-title {
    margin: 0;
}

.section-link {
    color: #6366f1;
    font-weight: 500;
    transition: color 0.2s;
}

.section-link:hover {
    color: #4f46e5;
}

/* ========================================
   Section Cards (Catalog Home)
   ======================================== */
.sections-grid {
    margin-bottom: 60px;
}

.sections-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.section-card {
    display: flex;
    flex-direction: column;
    padding: 32px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    transition: all 0.3s;
}

.section-card:hover {
    border-color: #6366f1;
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.15);
    transform: translateY(-4px);
}

.section-card.goals:hover {
    border-color: #6366f1;
}

.section-card.habits:hover {
    border-color: #f59e0b;
}

.section-card.bundles:hover {
    border-color: #10b981;
}

.section-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.section-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px;
}

.section-card p {
    color: #6b7280;
    font-size: 15px;
    margin: 0 0 16px;
    flex: 1;
}

.section-card .section-link {
    font-size: 14px;
}

/* ========================================
   Category Cards
   ======================================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 60px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    text-align: center;
    transition: all 0.2s;
}

.category-card:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.category-card .category-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.category-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px;
}

.category-card .category-count {
    font-size: 13px;
    color: #6b7280;
}

/* ========================================
   Goal Cards
   ======================================== */
.goals-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 60px;
}

.goal-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    transition: all 0.2s;
}

.goal-card:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.goal-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.goal-icon {
    font-size: 28px;
}

.goal-content {
    flex: 1;
}

.goal-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px;
}

.goal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: #6b7280;
}

.goal-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.goal-description {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

.goal-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.goal-rank {
    font-size: 18px;
    font-weight: 700;
    color: #6366f1;
    min-width: 32px;
    padding-top: 20px;
}

.goal-item .goal-card {
    flex: 1;
}

/* ========================================
   Habit Cards
   ======================================== */
.habits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

.habit-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s;
}

.habit-card:hover {
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
}

.habit-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.habit-icon {
    font-size: 20px;
}

.habit-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.habit-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 10px;
}

.habit-category {
    color: #f59e0b;
    font-weight: 500;
}

.habit-difficulty.easy {
    color: #10b981;
}

.habit-difficulty.medium {
    color: #f59e0b;
}

.habit-difficulty.hard {
    color: #ef4444;
}

.habit-description {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 12px;
    line-height: 1.5;
}

.habit-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.habit-tag {
    font-size: 12px;
    color: #f59e0b;
    background: #fffbeb;
    padding: 3px 8px;
    border-radius: 4px;
}

.habit-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.habit-rank {
    font-size: 18px;
    font-weight: 700;
    color: #f59e0b;
    min-width: 32px;
    padding-top: 20px;
}

.habit-card-full {
    flex: 1;
    padding: 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s;
}

.habit-card-full:hover {
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
}

/* ========================================
   Category Blocks (Goals page)
   ======================================== */
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 60px;
}

.category-block {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.2s;
}

.category-block:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.category-info {
    display: flex;
    gap: 16px;
}

.category-text h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 4px;
}

.category-text p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.category-link {
    color: #6366f1;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}

.category-link:hover {
    text-decoration: underline;
}

.subcategories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.subcategories-label {
    font-size: 13px;
    color: #6b7280;
    margin-right: 8px;
}

.subcategories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.subcategory-link {
    display: inline-block;
    padding: 6px 12px;
    background: #f5f3ff;
    color: #6366f1;
    font-size: 13px;
    border-radius: 6px;
    transition: all 0.2s;
}

.subcategory-link:hover {
    background: #ede9fe;
}

/* ========================================
   Filters
   ======================================== */
.filters-section {
    margin-bottom: 40px;
}

.filters-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.filter-label {
    font-size: 14px;
    color: #6b7280;
    min-width: 120px;
}

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

.filter-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #4b5563;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: #f5f3ff;
}

.filter-btn.active {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
}

.filter-btn.active.green {
    background: #10b981;
    border-color: #10b981;
}

/* ========================================
   Tags
   ======================================== */
.tags-section {
    margin-bottom: 40px;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.tag-link {
    padding: 8px 14px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    color: #6366f1;
    font-size: 14px;
    transition: all 0.2s;
}

.tag-link:hover {
    background: #f5f3ff;
    border-color: #6366f1;
}

.tag-link.orange {
    color: #f59e0b;
}

.tag-link.orange:hover {
    background: #fffbeb;
    border-color: #f59e0b;
}

.all-tags-link {
    color: #6366f1;
    font-size: 14px;
    font-weight: 500;
}

/* ========================================
   Collections (Habits page)
   ======================================== */
.collections-section {
    margin-bottom: 60px;
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.collection-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    transition: all 0.2s;
}

.collection-card:hover {
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
    transform: translateY(-2px);
}

.collection-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.collection-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px;
}

.collection-card p {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 12px;
    flex: 1;
}

.collection-count {
    font-size: 12px;
    color: #f59e0b;
    font-weight: 600;
}

/* ========================================
   Bundles
   ======================================== */
.explanation-section {
    margin-bottom: 50px;
}

.explanation-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
}

.formula {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.formula-item {
    background: #f5f3ff;
    padding: 12px 20px;
    border-radius: 10px;
    color: #6366f1;
}

.formula-plus,
.formula-equals {
    color: #9ca3af;
    font-size: 24px;
}

.formula-result {
    background: #d1fae5;
    padding: 12px 20px;
    border-radius: 10px;
    color: #10b981;
}

.explanation-text {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto 32px;
}

.flow-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.flow-box {
    background: #f3f4f6;
    padding: 16px 24px;
    border-radius: 10px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.6;
}

.flow-box.result {
    background: #d1fae5;
    color: #10b981;
    font-weight: 600;
}

.flow-arrow {
    font-size: 24px;
    color: #9ca3af;
}

.bundles-section {
    margin-bottom: 60px;
}

.bundles-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bundle-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 28px;
    transition: all 0.2s;
}

.bundle-card:hover {
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.bundle-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.bundle-icon {
    font-size: 28px;
}

.bundle-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.bundle-goal {
    margin-bottom: 20px;
}

.goal-label {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 6px;
}

.goal-link {
    color: #6366f1;
    font-weight: 500;
}

.goal-link:hover {
    text-decoration: underline;
}

.bundle-habits {
    margin-bottom: 20px;
}

.habits-label {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 10px;
}

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

.habits-list li {
    padding: 8px 0;
    color: #4b5563;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.habits-list li::before {
    content: '•';
    color: #10b981;
    font-weight: bold;
}

.habit-duration {
    color: #9ca3af;
    font-size: 13px;
}

.bundle-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
}

.meta-icon {
    font-size: 16px;
}

.bundle-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.more-bundles-section {
    margin-bottom: 60px;
}

.more-bundles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.more-bundle-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.2s;
}

.more-bundle-card:hover {
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.more-bundle-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
}

.more-bundle-card h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px;
}

.more-bundle-card p {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

/* ========================================
   Related Section
   ======================================== */
.related-section {
    margin-bottom: 40px;
}

.related-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.related-card {
    display: flex;
    flex-direction: column;
    padding: 28px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    transition: all 0.2s;
}

.related-card:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.related-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.related-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px;
}

.related-card p {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 16px;
    flex: 1;
}

.related-link {
    color: #6366f1;
    font-weight: 500;
    font-size: 14px;
}

/* ========================================
   How It Works
   ======================================== */
.how-it-works-section {
    background: white;
    border-radius: 20px;
    padding: 48px;
    text-align: center;
    margin-bottom: 40px;
}

.how-it-works-section .section-title {
    margin-bottom: 32px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 40px;
}

.step-card {
    text-align: center;
}

.step-number {
    width: 48px;
    height: 48px;
    background: #6366f1;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    margin: 0 auto 16px;
}

.step-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px;
}

.step-card p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* ========================================
   Show All
   ======================================== */
.show-all {
    text-align: center;
    margin-top: 24px;
}

/* ========================================
   Footer
   ======================================== */
.catalog-footer {
    background: #1f2937;
    color: #d1d5db;
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo .logo-title {
    color: white;
}

.footer-logo .tagline {
    color: #9ca3af;
}

.footer-description {
    color: #9ca3af;
    font-size: 14px;
    line-height: 1.6;
}

.footer-section h4 {
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.footer-section nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-section a {
    color: #9ca3af;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: #6366f1;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    color: #6b7280;
    font-size: 14px;
}

.footer-contact {
    color: #6b7280;
    font-size: 13px;
}

/* ========================================
   Habits Page Category Cards
   ======================================== */
.habits-categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

.habits-category-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    transition: all 0.2s;
}

.habits-category-card:hover {
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.category-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.habits-category-card .category-count {
    background: #f5f3ff;
    color: #6366f1;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.habits-category-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px;
}

.habits-category-card > p {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 12px;
}

.popular-items {
    font-size: 13px;
    margin-bottom: 16px;
}

.popular-label {
    color: #9ca3af;
}

.popular-list {
    color: #6b7280;
}

.habits-category-card .category-link {
    color: #f59e0b;
    font-weight: 500;
    font-size: 14px;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .header-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .footer-brand {
        grid-column: span 2;
        max-width: none;
    }

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

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

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

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

    .sections-cards {
        grid-template-columns: 1fr;
    }

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

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

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .how-it-works-section {
        padding: 32px 24px;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .category-header {
        flex-direction: column;
        gap: 12px;
    }

    .related-cards {
        grid-template-columns: 1fr;
    }

    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-label {
        min-width: auto;
    }

    .formula {
        flex-direction: column;
        gap: 12px;
    }

    .flow-diagram {
        flex-direction: column;
    }

    .flow-arrow {
        transform: rotate(90deg);
    }

    .collections-grid,
    .more-bundles-grid {
        grid-template-columns: 1fr;
    }

    .bundle-actions {
        flex-direction: column;
    }

    .bundle-actions .btn {
        width: 100%;
    }

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

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-brand {
        grid-column: span 1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* =============================================
   HABITS RANKING LIST (ТОП-10 на главной)
============================================= */
.habits-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.habit-ranking-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.habit-ranking-item:hover {
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
    transform: translateY(-2px);
}

.habit-ranking-item .habit-rank {
    font-size: 24px;
    font-weight: 700;
    color: #f59e0b;
    min-width: 40px;
    text-align: center;
    line-height: 1;
    padding-top: 4px;
}

.habit-ranking-item .habit-card-full {
    flex: 1;
    padding: 0;
    border: none;
    background: transparent;
}

.habit-ranking-item .habit-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.habit-ranking-item .habit-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.habit-ranking-item .habit-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.habit-ranking-item .meta-separator {
    color: var(--border-color);
}

.habit-ranking-item .habit-description {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.habit-ranking-item .habit-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.habit-tag-link {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-radius: 12px;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.habit-tag-link:hover {
    background: #f59e0b;
    color: white;
}

.habit-category-link {
    color: var(--text-muted);
    cursor: pointer;
}

/* =============================================
   ALL HABITS PAGE (Все привычки)
============================================= */
.category-nav-section {
    padding: 16px 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border-color);
}

.category-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--content-padding);
}

.category-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-color);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.category-nav-btn:hover {
    border-color: #f59e0b;
    color: #f59e0b;
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-count {
    font-size: 14px;
    color: var(--text-muted);
}

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

.habit-card-link {
    text-decoration: none;
    color: inherit;
}

.habit-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
    height: 100%;
}

.habit-card:hover {
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
    transform: translateY(-2px);
}

.habit-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.habit-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
}

.habit-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.habit-category-badge {
    padding: 3px 8px;
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.habit-time {
    font-size: 12px;
    color: var(--text-muted);
}

.habit-card-desc {
    flex: 1;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.habit-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
}

.habit-tag-small {
    padding: 2px 6px;
    background: var(--bg-alt);
    color: var(--text-muted);
    border-radius: 4px;
    font-size: 11px;
}

.habit-card-link-text {
    font-size: 14px;
    color: #f59e0b;
    font-weight: 500;
}

/* =============================================
   PAGINATION
============================================= */
.pagination-section {
    padding: 30px 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.pagination-btn {
    padding: 10px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    border-color: #f59e0b;
    color: #f59e0b;
}

.pagination-info {
    font-size: 14px;
    color: var(--text-muted);
}

/* =============================================
   RESPONSIVE for new elements
============================================= */
@media (max-width: 768px) {
    .habit-ranking-item {
        flex-direction: column;
        padding: 12px 16px;
    }

    .habit-ranking-item .habit-rank {
        min-width: auto;
        margin-bottom: 8px;
    }

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

    .category-nav {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }

    .category-nav-btn {
        flex-shrink: 0;
    }
}

/* =============================================
   BUNDLE DETAIL PAGE - Улучшенные стили
============================================= */

/* Section header with count */
.section-header-with-count {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.section-count {
    font-size: 14px;
    color: var(--text-muted);
    padding: 4px 12px;
    background: var(--bg-alt);
    border-radius: 12px;
}

/* Bundle Goal Card */
.bundle-goal-card {
    display: block;
    padding: 24px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.02));
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.bundle-goal-card:hover {
    border-color: #10b981;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
    transform: translateY(-2px);
}

.bundle-goal-header {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.bundle-goal-icon {
    font-size: 40px;
    line-height: 1;
}

.bundle-goal-info {
    flex: 1;
}

.bundle-goal-info h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
}

.bundle-goal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.goal-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--text-muted);
}

.goal-meta-item .meta-icon {
    font-size: 12px;
}

.bundle-goal-desc {
    margin: 0 0 16px 0;
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
}

.bundle-goal-link {
    display: inline-block;
    font-size: 14px;
    color: #10b981;
    font-weight: 500;
}

/* Bundle Habits Grid */
.bundle-habits-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bundle-habit-item {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: all 0.2s ease;
}

.bundle-habit-item:hover {
    border-color: #f59e0b;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.1);
}

.bundle-habit-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 20px;
    font-weight: 700;
    border-radius: 12px;
    flex-shrink: 0;
}

.bundle-habit-content {
    flex: 1;
    min-width: 0;
}

.bundle-habit-header {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.bundle-habit-icon {
    font-size: 28px;
    line-height: 1;
}

.bundle-habit-title-wrap {
    flex: 1;
}

.bundle-habit-title-wrap h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.bundle-habit-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg-alt);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.meta-badge.difficulty-easy {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.meta-badge.difficulty-medium {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.meta-badge.difficulty-hard {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.bundle-habit-desc {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.bundle-habit-why {
    margin-bottom: 16px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.02));
    border-left: 4px solid #f59e0b;
    border-radius: 0 12px 12px 0;
}

.why-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #d97706;
    margin-bottom: 8px;
}

.why-icon {
    font-size: 16px;
}

.why-text {
    margin: 0;
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.5;
}

.bundle-habit-link {
    display: inline-block;
    font-size: 14px;
    color: #f59e0b;
    font-weight: 500;
    text-decoration: none;
}

.bundle-habit-link:hover {
    color: #d97706;
    text-decoration: underline;
}

/* Why Works Section */
.why-works-section {
    margin-top: 40px;
}

.why-works-content {
    padding: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-color);
}

.why-works-content p {
    margin: 0 0 12px 0;
}

.why-works-content p:last-child {
    margin-bottom: 0;
}

/* Results Timeline */
.results-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.result-card {
    padding: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: all 0.2s ease;
}

.result-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.result-card.month-1 {
    border-top: 4px solid #10b981;
}

.result-card.month-3 {
    border-top: 4px solid #3b82f6;
}

.result-card.month-6 {
    border-top: 4px solid #8b5cf6;
}

.result-period {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.period-icon {
    font-size: 28px;
}

.period-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.result-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
}

.result-content p {
    margin: 0 0 8px 0;
}

.result-content p:last-child {
    margin-bottom: 0;
}

/* CTA Section */
.cta-section {
    margin-top: 40px;
}

.cta-card {
    padding: 40px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 20px;
    text-align: center;
    color: white;
}

.cta-card h2 {
    margin: 0 0 12px 0;
    font-size: 28px;
    font-weight: 700;
}

.cta-card p {
    margin: 0 0 24px 0;
    font-size: 16px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-buttons .btn-primary {
    background: white;
    color: #059669;
}

.cta-buttons .btn-primary:hover {
    background: #f0fdf4;
}

.cta-buttons .btn-outline {
    border-color: white;
    color: white;
}

.cta-buttons .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Bundles Grid for Similar */
.bundles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.bundle-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.bundle-card:hover {
    border-color: #10b981;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
    transform: translateY(-2px);
}

.bundle-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.bundle-icon {
    font-size: 32px;
}

.bundle-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.bundle-description {
    flex: 1;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.bundle-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.bundle-goal, .bundle-habits-count {
    font-size: 13px;
    color: var(--text-muted);
}

/* Responsive for bundle detail */
@media (max-width: 768px) {
    .bundle-goal-header {
        flex-direction: column;
        gap: 12px;
    }

    .bundle-habit-item {
        flex-direction: column;
        padding: 16px;
    }

    .bundle-habit-number {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .bundle-habit-header {
        flex-direction: column;
        gap: 8px;
    }

    .results-timeline {
        grid-template-columns: 1fr;
    }

    .cta-card {
        padding: 24px;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn {
        width: 100%;
    }
}

/* ========================================
   Goal Detail Page
   ======================================== */
.goal-detail-page {
    padding-bottom: 60px;
}

/* Goal Hero */
.goal-hero {
    text-align: center;
    padding: 40px 24px;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-radius: 20px;
    margin-bottom: 32px;
}

.goal-hero .hero-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.goal-hero .hero-title {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.goal-category-path {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.goal-category-path a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #6366f1;
    font-weight: 500;
    padding: 6px 12px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 20px;
    transition: all 0.2s;
}

.goal-category-path a:hover {
    background: rgba(99, 102, 241, 0.2);
}

.goal-category-path .path-separator {
    color: #9ca3af;
}

.goal-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.goal-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.goal-stats .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
}

.goal-stats .stat-value.difficulty-easy {
    color: #10b981;
}

.goal-stats .stat-value.difficulty-medium {
    color: #f59e0b;
}

.goal-stats .stat-value.difficulty-hard {
    color: #ef4444;
}

.goal-stats .stat-label {
    font-size: 13px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.goal-cta {
    margin-top: 8px;
}

.goal-cta .btn {
    padding: 14px 32px;
    font-size: 16px;
}

/* Goal Description Section */
.goal-description-section {
    margin-bottom: 32px;
}

.goal-description-card {
    padding: 24px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    font-size: 16px;
    line-height: 1.7;
    color: #374151;
}

.goal-description-card p {
    margin: 0 0 16px 0;
}

.goal-description-card p:last-child {
    margin-bottom: 0;
}

/* Goal Benefits Section */
.goal-benefits-section {
    margin-bottom: 32px;
}

.goal-benefits-card {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.02));
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 16px;
}

.benefits-icon {
    flex-shrink: 0;
    font-size: 40px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.15);
    border-radius: 12px;
}

.benefits-content {
    flex: 1;
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
}

.benefits-content p {
    margin: 0 0 12px 0;
}

.benefits-content p:last-child {
    margin-bottom: 0;
}

/* Goal Steps Section */
.goal-steps-section {
    margin-bottom: 32px;
}

.section-header-with-count {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-header-with-count .section-title {
    margin: 0;
}

.section-count {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    background: #f3f4f6;
    padding: 6px 12px;
    border-radius: 20px;
}

.goal-steps-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.goal-step-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.goal-step-item:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
    transform: translateX(4px);
}

.step-number-badge {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50%;
}

.step-info {
    flex: 1;
    min-width: 0;
}

.step-info h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.step-info p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.step-arrow {
    flex-shrink: 0;
    font-size: 18px;
    color: #9ca3af;
    transition: all 0.2s;
    align-self: center;
}

.goal-step-item:hover .step-arrow {
    color: #6366f1;
    transform: translateX(4px);
}

/* Goal Tags Section */
.goal-tags-section {
    margin-bottom: 32px;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-link {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s;
}

.tag-link:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #4f46e5;
}

.tag-link.orange {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.tag-link.orange:hover {
    background: rgba(245, 158, 11, 0.2);
    color: #d97706;
}

/* Related Habits Section */
.related-habits-section {
    margin-bottom: 32px;
}

.related-habits-section .section-desc {
    font-size: 15px;
    color: #6b7280;
    margin: -12px 0 20px 0;
}

.related-habits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.related-habit-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.related-habit-card:hover {
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.12);
}

.related-habit-icon {
    flex-shrink: 0;
    font-size: 32px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fffbeb;
    border-radius: 12px;
}

.related-habit-info {
    flex: 1;
    min-width: 0;
}

.related-habit-info h3 {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.related-habit-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.related-habit-meta .meta-item {
    font-size: 12px;
    color: #6b7280;
}

.related-habit-meta .meta-item.difficulty-easy {
    color: #10b981;
}

.related-habit-meta .meta-item.difficulty-medium {
    color: #f59e0b;
}

.related-habit-meta .meta-item.difficulty-hard {
    color: #ef4444;
}

/* Bundle Promo Section */
.bundle-promo-section {
    margin-bottom: 32px;
}

.bundle-promo-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #bbf7d0;
    border-radius: 16px;
}

.bundle-promo-icon {
    flex-shrink: 0;
    font-size: 40px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 12px;
}

.bundle-promo-content {
    flex: 1;
}

.bundle-promo-content h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    color: #166534;
}

.bundle-promo-content p {
    margin: 0;
    font-size: 14px;
    color: #15803d;
}

.bundle-promo-card .btn {
    flex-shrink: 0;
}

/* Similar Goals Section */
.similar-goals-section {
    margin-bottom: 32px;
}

.goals-list.compact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.goal-card-compact {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.goal-card-compact:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.goal-card-compact .goal-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.goal-card-compact .goal-info {
    flex: 1;
    min-width: 0;
}

.goal-card-compact .goal-info h3 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.goal-meta-compact {
    font-size: 13px;
    color: #6b7280;
}

/* CTA Box Section */
.cta-box {
    padding: 40px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border-radius: 20px;
    text-align: center;
    color: white;
}

.cta-box h2 {
    margin: 0 0 12px 0;
    font-size: 26px;
    font-weight: 700;
}

.cta-box p {
    margin: 0 0 24px 0;
    font-size: 16px;
    opacity: 0.9;
}

.cta-box .btn-primary {
    background: white;
    color: #6366f1;
    padding: 14px 32px;
    font-size: 16px;
}

.cta-box .btn-primary:hover {
    background: #f5f3ff;
}

/* Other Categories Section */
.other-categories-section {
    margin-bottom: 32px;
}

.categories-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
}

.category-link-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: #f5f3ff;
}

/* Empty State */
.empty-message {
    padding: 32px;
    text-align: center;
    color: #9ca3af;
    font-size: 15px;
    background: #f9fafb;
    border-radius: 12px;
}

/* Responsive for Goal Detail */
@media (max-width: 768px) {
    .goal-hero {
        padding: 32px 20px;
    }

    .goal-hero .hero-title {
        font-size: 24px;
    }

    .goal-stats {
        gap: 20px;
    }

    .goal-stats .stat-value {
        font-size: 20px;
    }

    .goal-benefits-card {
        flex-direction: column;
        text-align: center;
    }

    .benefits-icon {
        margin: 0 auto;
    }

    .goal-step-item {
        padding: 16px;
    }

    .step-number-badge {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .related-habits-grid {
        grid-template-columns: 1fr;
    }

    .bundle-promo-card {
        flex-direction: column;
        text-align: center;
    }

    .cta-box {
        padding: 28px 20px;
    }

    .cta-box h2 {
        font-size: 22px;
    }
}

/* ========================================
   Habit Category Page
   ======================================== */
.habits-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.habit-category-card {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.habit-category-card:hover {
    border-color: #f59e0b;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
    transform: translateY(-2px);
}

.habit-card-link-wrapper {
    display: block;
    padding: 20px;
    text-decoration: none;
    color: inherit;
}

.habit-card-header {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.habit-icon-wrap {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-radius: 14px;
}

.habit-icon-lg {
    font-size: 28px;
}

.habit-card-title {
    flex: 1;
    min-width: 0;
}

.habit-card-title h3 {
    margin: 0 0 6px 0;
    font-size: 17px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

.featured-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #d97706;
    background: #fffbeb;
    padding: 3px 8px;
    border-radius: 10px;
}

.habit-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.habit-card-meta .meta-badge {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #4b5563;
}

.habit-card-meta .meta-badge.subcategory {
    background: #fef3c7;
    color: #92400e;
}

.habit-card-description {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

.habit-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-top: 1px solid #f3f4f6;
    background: #fafafa;
}

.habit-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.habit-tag-link {
    font-size: 12px;
    color: #f59e0b;
    text-decoration: none;
    transition: color 0.2s;
}

.habit-tag-link:hover {
    color: #d97706;
    text-decoration: underline;
}

.habit-detail-link {
    font-size: 13px;
    font-weight: 500;
    color: #f59e0b;
    text-decoration: none;
    transition: color 0.2s;
}

.habit-detail-link:hover {
    color: #d97706;
}

/* Related Goals Section */
.related-goals-section {
    margin-bottom: 32px;
}

.related-goals-section .section-desc {
    font-size: 15px;
    color: #6b7280;
    margin: -12px 0 20px 0;
}

.related-goals-section .section-link {
    display: inline-block;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 500;
    color: #6366f1;
    text-decoration: none;
}

.related-goals-section .section-link:hover {
    text-decoration: underline;
}

/* Responsive for Habit Category */
@media (max-width: 768px) {
    .habits-category-grid {
        grid-template-columns: 1fr;
    }

    .habit-card-header {
        flex-direction: column;
        gap: 12px;
    }

    .habit-icon-wrap {
        width: 48px;
        height: 48px;
    }

    .habit-icon-lg {
        font-size: 24px;
    }

    .habit-card-footer {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

/* ========================================
   Habit Detail Page
   ======================================== */
.habit-detail-page {
    padding-bottom: 60px;
}

/* Habit Hero */
.habit-hero {
    text-align: center;
    padding: 40px 24px;
    border-radius: 20px;
    margin-bottom: 32px;
}

.habit-hero .hero-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.habit-hero .hero-title {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.habit-category-path {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.habit-category-path a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #d97706;
    font-weight: 500;
    padding: 6px 12px;
    background: rgba(245, 158, 11, 0.15);
    border-radius: 20px;
    transition: all 0.2s;
}

.habit-category-path a:hover {
    background: rgba(245, 158, 11, 0.25);
}

.habit-category-path .path-separator {
    color: #9ca3af;
}

.habit-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.habit-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.habit-stats .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.habit-stats .stat-value.difficulty-easy {
    color: #10b981;
}

.habit-stats .stat-value.difficulty-medium {
    color: #f59e0b;
}

.habit-stats .stat-value.difficulty-hard {
    color: #ef4444;
}

.habit-stats .stat-label {
    font-size: 13px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.habit-cta {
    margin-top: 8px;
}

.habit-cta .btn {
    padding: 14px 32px;
    font-size: 16px;
}

/* Habit Description Card */
.habit-description-section {
    margin-bottom: 32px;
}

.habit-description-card {
    padding: 24px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    font-size: 16px;
    line-height: 1.7;
    color: #374151;
}

.habit-description-card p {
    margin: 0 0 16px 0;
}

.habit-description-card p:last-child {
    margin-bottom: 0;
}

/* Habit Info Cards */
.habit-benefits-section,
.habit-how-section,
.habit-tips-section,
.habit-mistakes-section,
.habit-time-section {
    margin-bottom: 32px;
}

.habit-info-card {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
}

.habit-info-card.benefits {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.02));
    border-color: rgba(245, 158, 11, 0.2);
}

.habit-info-card.how-to {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.02));
    border-color: rgba(59, 130, 246, 0.2);
}

.habit-info-card.tips {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.02));
    border-color: rgba(16, 185, 129, 0.2);
}

.habit-info-card.mistakes {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.02));
    border-color: rgba(239, 68, 68, 0.2);
}

.habit-info-card.time {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(139, 92, 246, 0.02));
    border-color: rgba(139, 92, 246, 0.2);
}

.info-card-icon {
    flex-shrink: 0;
    font-size: 36px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
}

.info-card-content {
    flex: 1;
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
}

.info-card-content p {
    margin: 0 0 12px 0;
}

.info-card-content p:last-child {
    margin-bottom: 0;
}

/* Habit Tags Section */
.habit-tags-section {
    margin-bottom: 32px;
}

/* Similar Habits Section */
.similar-habits-section {
    margin-bottom: 32px;
}

.similar-habits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.similar-habit-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.similar-habit-card:hover {
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.12);
}

.similar-habit-icon {
    flex-shrink: 0;
    font-size: 32px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fffbeb;
    border-radius: 12px;
}

.similar-habit-info {
    flex: 1;
    min-width: 0;
}

.similar-habit-info h3 {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.similar-habit-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.similar-habit-meta .meta-item {
    font-size: 12px;
    color: #6b7280;
}

.similar-habit-meta .meta-item.difficulty-easy {
    color: #10b981;
}

.similar-habit-meta .meta-item.difficulty-medium {
    color: #f59e0b;
}

.similar-habit-meta .meta-item.difficulty-hard {
    color: #ef4444;
}

/* Orange CTA Box for Habits */
.cta-box.orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.cta-box.orange .btn-primary {
    background: white;
    color: #d97706;
}

.cta-box.orange .btn-primary:hover {
    background: #fffbeb;
}

/* Button Orange Variant */
.btn.orange,
.btn-primary.orange {
    background: #f59e0b;
    color: white;
}

.btn.orange:hover,
.btn-primary.orange:hover {
    background: #d97706;
}

/* Responsive for Habit Detail */
@media (max-width: 768px) {
    .habit-hero {
        padding: 32px 20px;
    }

    .habit-hero .hero-title {
        font-size: 24px;
    }

    .habit-stats {
        gap: 20px;
    }

    .habit-stats .stat-value {
        font-size: 18px;
    }

    .habit-info-card {
        flex-direction: column;
    }

    .info-card-icon {
        margin: 0 auto;
    }

    .info-card-content {
        text-align: center;
    }

    .similar-habits-grid {
        grid-template-columns: 1fr;
    }
}
