/* ============================================
   FEATURES PAGE - Bio-Link.se
   All styles specific to /features page
   ============================================ */

/* ============================================
   1. CSS VARIABLES (Features specific)
   ============================================ */
:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --primary-light: #8b9df8;
    --secondary: #764ba2;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success: #28a745;
    --gray-50: #f8f9fa;
    --gray-100: #e9ecef;
    --gray-600: #6c757d;
    --gray-900: #212529;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0,0,0,0.15);
    --shadow-lg: 0 1rem 3rem rgba(0,0,0,0.175);
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
}

/* ============================================
   2. BASE STYLES
   ============================================ */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* ============================================
   3. NAVBAR ENHANCEMENTS
   ============================================ */
.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary) !important;
    transition: transform 0.2s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after {
    width: 80%;
    left: 10%;
}

/* ============================================
   4. HERO SECTION
   ============================================ */
.features-hero {
    position: relative;
    overflow: hidden;
}

.features-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.features-hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.features-hero p.lead {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: rgba(255,255,255,0.95);
    margin-bottom: 2rem;
    position: relative;
}

/* ============================================
   5. FEATURE NAVIGATION
   ============================================ */
.feature-nav {
    box-shadow: var(--shadow-lg);
    margin-bottom: 3rem;
}

.feature-nav-list {
    justify-content: center;
}

.feature-nav-item a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    background: var(--gray-50);
    color: var(--gray-900);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-nav-item a:hover,
.feature-nav-item a.active {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.feature-nav-item .emoji {
    font-size: 1.2rem;
    line-height: 1;
}

/* ============================================
   6. FEATURE SECTIONS
   ============================================ */
.feature-section {
    padding: 80px 0;
    position: relative;
    scroll-margin-top: 160px;
}

.feature-section:nth-child(even) {
    background: var(--gray-50);
}

.feature-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Feature Badge */
.feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
}

/* Feature Titles */
.feature-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.feature-description {
    font-size: 1.2rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* ============================================
   7. FEATURE CARDS
   ============================================ */
.feature-card {
    height: 100%;
    border: none;
    border-radius: var(--radius-lg);
    background: white;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.feature-card h4 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.feature-card p {
    color: var(--gray-600);
    line-height: 1.7;
    margin: 0;
}

/* ============================================
   8. FEATURE LISTS
   ============================================ */
.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.feature-list li:last-child {
    border-bottom: none;
}

.check-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-top: 2px;
}

/* ============================================
   9. IMAGES & MOCKUPS
   ============================================ */
.feature-image {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
    max-width: 100%;
    height: auto;
}

.feature-image:hover {
    transform: scale(1.02);
}

.mockup-container {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

/* ============================================
   10. STATS & USE CASES
   ============================================ */
.stats-row {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin: 3rem 0;
}

.use-case-item {
    display: flex;
    align-items: start;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.use-case-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.use-case-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

/* ============================================
   11. PLATFORM CARDS
   ============================================ */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.platform-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.platform-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.platform-card h5 {
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   12. FAQ SECTION
   ============================================ */
.faq-item {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-question {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.faq-question::before {
    content: '?';
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1rem;
}

.faq-answer {
    color: var(--gray-600);
    line-height: 1.8;
    padding-left: 2.5rem;
}

/* ============================================
   13. CTA SECTIONS
   ============================================ */
.cta-section {
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin: 4rem 0;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.05)"/></svg>');
    opacity: 0.3;
}

.cta-section h2 {
    color: white;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.cta-section p {
    color: rgba(255,255,255,0.95);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    position: relative;
}

/* ============================================
   14. BUTTONS (Features specific overrides)
   ============================================ */
.btn {
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    color: white;
    text-decoration: none;
}

.btn-light {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--gray-50);
    color: var(--primary);
    text-decoration: none;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* ============================================
   15. ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* ============================================
   16. RESPONSIVE DESIGN
   ============================================ */

/* Tablets (≤991px) */
@media (max-width: 991px) {
    .feature-nav-list {
        gap: 0.25rem;
    }
    
    .feature-nav-item a {
        padding: 0.6rem 1rem;
        font-size: 0.875rem;
    }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 140px;
    }

    .feature-section {
        padding: 60px 0;
        scroll-margin-top: 200px;
    }

    .feature-title {
        margin-top: 2rem;
    }

    .cta-section {
        padding: 3rem 1.5rem;
    }

    .btn {
        width: 100%;
    }

    .platform-grid {
        grid-template-columns: 1fr;
    }
}

/* Small Mobile (≤576px) */
@media (max-width: 576px) {
    .feature-nav-item a {
        width: 100%;
        justify-content: center;
    }
    
    .feature-nav {
        padding: 0.75rem;
    }
}

/* ============================================
   17. ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   18. PRINT STYLES
   ============================================ */
@media print {
    .navbar,
    .feature-nav,
    .cta-section,
    footer {
        display: none;
    }

    .feature-section {
        page-break-inside: avoid;
    }
}