/* Modern Kategori-sida Design */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 140px; /* Kompenserar för sticky navbar + alphabet-nav */
}

.category-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero-sektion för kategori */
.category-hero {
    text-align: center;
    padding: 40px 20px 30px;
    margin-top: 80px;
}

.category-hero-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    display: block;
}

.category-hero h1 {
    font-size: 2.5rem;
    color: #1a4d3e;
    margin-bottom: 10px;
    font-weight: 700;
}

.category-hero p {
    font-size: 1.1rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Stats-kort */
.category-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0 40px;
    flex-wrap: wrap;
}

.stat-card {
    background: linear-gradient(135deg, #f8fffe 0%, #e8f5f1 100%);
    padding: 20px 30px;
    border-radius: 16px;
    text-align: center;
    min-width: 150px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4a9d7f;
    display: block;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* Alfabetisk sektion */
.letter-section {
    margin-bottom: 40px;
}

.letter-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #4a9d7f;
}

.letter-bubble {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4a9d7f 0%, #3d8269 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(74, 157, 127, 0.3);
}

.letter-count {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* Plant-lista */
.plants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.plant-link-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
}

.plant-link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #4a9d7f 0%, #3d8269 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.plant-link-card:hover {
    border-color: #4a9d7f;
    box-shadow: 0 8px 20px rgba(74, 157, 127, 0.15);
    transform: translateY(-2px);
    text-decoration: none;
}

.plant-link-card:hover::before {
    transform: scaleY(1);
}

.plant-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a4d3e;
    margin: 0;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plant-link-card:hover .plant-name {
    color: #4a9d7f;
}

.plant-arrow {
    margin-left: auto;
    color: #4a9d7f;
    font-size: 1.2rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.plant-link-card:hover .plant-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Alfabetisk navigation (sticky) */
.alphabet-nav {
    position: sticky;
    top: 80px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    margin-bottom: 30px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 100;
}

.alphabet-nav-inner {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 20px;
}

.alphabet-link {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    color: #666;
    background: #f5f5f5;
    transition: all 0.3s ease;
}

.alphabet-link:hover,
.alphabet-link.active {
    background: linear-gradient(135deg, #4a9d7f 0%, #3d8269 100%);
    color: white;
    transform: scale(1.1);
}

/* Kategori-specifika färger */
.category-buskar .letter-bubble,
.category-buskar .alphabet-link.active {
    background: linear-gradient(135deg, #8b4789 0%, #6d3a6b 100%);
}

.category-trad .letter-bubble,
.category-trad .alphabet-link.active {
    background: linear-gradient(135deg, #5d8a66 0%, #4a6d52 100%);
}

.category-blommor .letter-bubble,
.category-blommor .alphabet-link.active {
    background: linear-gradient(135deg, #d97398 0%, #b85c7a 100%);
}

.category-gronsaker .letter-bubble,
.category-gronsaker .alphabet-link.active {
    background: linear-gradient(135deg, #6ba839 0%, #568730 100%);
}

/* Loading state */
.loading-skeleton {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Responsiv design */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 120px; /* Mindre padding på mobil */
    }
    
    .category-hero {
        padding: 30px 20px 20px;
        margin-top: 70px;
    }
    
    .category-hero-icon {
        font-size: 3rem;
    }
    
    .category-hero h1 {
        font-size: 2rem;
    }
    
    .category-hero p {
        font-size: 1rem;
    }
    
    .category-stats {
        gap: 15px;
    }
    
    .stat-card {
        min-width: 120px;
        padding: 15px 20px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .plants-grid {
        grid-template-columns: 1fr;
    }
    
    .alphabet-nav {
        top: 70px;
    }
    
    .alphabet-nav-inner {
        gap: 5px;
        padding: 0 10px;
    }
    
    .alphabet-link {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .letter-bubble {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .plants-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
