/* ============================================
   BIO-LINK.SE CUSTOM STYLES
   Uppdaterad struktur - Optimerad 2024
   ============================================ */

/* ============================================
   1. CSS VARIABLES
   ============================================ */
:root {
    /* Colors */
    --primary: #667eea;
    --primary-dark: #5568d3;
    --primary-light: #8193f5;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Text */
    --text-dark: #212529;
    --text-muted: #6c757d;
    --text-light: #ffffff;
    
    /* Backgrounds */
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    
    /* Borders */
    --border-light: #e9ecef;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    
    /* Shadows */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 20px 40px rgba(102, 126, 234, 0.2);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
}

/* ============================================
   2. BASE & TYPOGRAPHY
   ============================================ */
.display-1, .display-2, .display-3, 
.display-4, .display-5, .display-6 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* ============================================
   3. NAVIGATION
   ============================================ */
.navbar {
    transition: var(--transition);
}

.navbar-brand {
    color: var(--primary) !important;
    transition: var(--transition);
}

.navbar-brand:hover {
    color: var(--primary-dark) !important;
}

.navbar-light .navbar-nav .nav-link {
    font-weight: 500;
    transition: var(--transition);
}

.navbar-light .navbar-nav .nav-link:hover {
    color: var(--primary);
}

.navbar-nav {
    margin-left: auto !important;
}

.navbar-collapse {
    transition: none !important;
}

/* ============================================
   4. BUTTONS
   ============================================ */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-outline-light:hover {
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ============================================
   5. HERO SECTION - Extended Styles
   ============================================ */
.hero-text-col {
    min-height: 500px;
}

.hero-buttons {
    min-height: 80px;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Hero Images - Hover Effects */
.hero-image {
    object-fit: cover;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.hero-image:hover {
    animation-play-state: paused;
    transform: scale(1.05) !important;
    z-index: 10;
}

/* Trust Bar - Enhanced */
.trust-bar span {
    border: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
    transition: var(--transition);
}

.trust-bar span:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.trust-bar .stat-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.trust-bar strong,
.stat-number {
    min-width: 5ch;
    font-variant-numeric: tabular-nums;
    display: inline-block;
    text-align: right;
}

#stat-clicks {
    min-width: 6ch;
}

/* Hero Badge */
.hero-badge .badge {
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 50px;
}

.badge-emoji {
    font-size: 1rem;
    margin-right: 0.25rem;
}

/* CTA Group */
.hero-cta-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.cta-subtext {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

/* ============================================
   6. EMOJI STYLES
   ============================================ */
.check-emoji,
.check-emoji-small {
    display: inline-block;
    color: #28a745;
    font-weight: 700;
    margin-right: 0.5rem;
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}

.check-emoji-small {
    font-size: 0.9rem;
    margin-right: 0.25rem;
}

.check-emoji-white {
    color: #4ade80;
}

.arrow-emoji {
    display: inline-block;
    font-size: 1.2rem;
    line-height: 1;
}

.button-emoji {
    display: inline-block;
    font-size: 1rem;
    line-height: 1;
}

.star-emoji {
    color: #FFC107;
    font-size: 1.2rem;
}

.feature-emoji {
    font-size: 2.5rem;
    line-height: 1;
}

.why-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.demo-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

/* ============================================
   7. SECTIONS - Layout Protection
   ============================================ */
section {
    position: relative;
    clear: both;
}

section.py-6 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
    contain: layout style;
}

section .container {
    contain: layout;
}

section .row {
    contain: layout;
}

/* Section Headers */
.text-center.mb-5 {
    min-height: 120px;
    margin-bottom: 3rem !important;
}

.text-center.mb-5 h2 {
    min-height: 60px;
}

.text-center.mb-5 p.lead {
    min-height: 40px;
}

/* Features Section */
#features {
    background-color: var(--bg-light);
    padding: 4rem 0;
}

/* ============================================
   8. PLATFORM BADGES
   ============================================ */
.platform-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
    min-height: 400px;
}

.platform-badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    cursor: pointer;
    height: 120px;
}

.platform-badge-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm);
    border-color: var(--primary);
}

.platform-badge-icon {
    width: 32px;
    height: 32px;
    transition: var(--transition-fast);
}

.platform-badge-item:hover .platform-badge-icon {
    transform: scale(1.15);
}

.platform-badge-item span {
    font-size: 0.85rem;
    font-weight: 500;
    color: #495057;
    text-align: center;
}

/* ============================================
   9. FEATURE CARDS
   ============================================ */
.feature-card {
    padding: 1.5rem;
    height: 100%;
    min-height: 320px;
    transition: var(--transition);
    border-radius: var(--border-radius);
    background: var(--bg-white);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Feature Icons Grid */
.feature-icons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    min-height: 80px;
}

.feature-icon-small {
    width: 32px;
    height: 32px;
    display: block;
    transition: var(--transition-fast);
}

.feature-icon-small:hover {
    transform: scale(1.2);
}

/* Modern Feature Cards */
.feature-card-modern {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    height: 100%;
    min-height: 400px;
    border: 2px solid transparent;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card-modern::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-modern:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-card-modern:hover::before {
    transform: scaleX(1);
}

.feature-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.feature-card-modern h4 {
    color: var(--text-dark);
    margin: 0;
    font-size: 1.25rem;
}

.feature-card-modern p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.feature-arrow {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transform: translateX(-10px);
    transition: var(--transition);
}

.feature-card-modern:hover .feature-arrow {
    opacity: 1;
    transform: translateX(0);
}

a:has(.feature-card-modern) {
    display: block;
    height: 100%;
    text-decoration: none;
}

/* ============================================
   10. WHY SECTION
   ============================================ */
.why-card {
    text-align: center;
    padding: 2rem 1rem;
    height: 100%;
    transition: var(--transition);
}

.why-card:hover {
    transform: translateY(-5px);
}

/* ============================================
   11. COMPARISON TABLE
   ============================================ */
.comparison-table {
    max-width: 800px;
    margin: 0 auto;
}

.comparison-table .table-primary {
    background-color: var(--primary);
    color: white;
}

/* ============================================
   12. TESTIMONIALS
   ============================================ */
.testimonial-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    height: 100%;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.testimonial-text {
    font-style: italic;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.testimonial-author strong {
    color: var(--text-dark);
}

/* ============================================
   13. TRUSTED LOGOS
   ============================================ */
.trusted-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.trusted-logo {
    opacity: 0.6;
    transition: opacity 0.3s ease;
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.trusted-logo:hover {
    opacity: 1;
}

/* ============================================
   14. LIVE DEMO / BROWSER MOCKUP
   ============================================ */
.browser-mockup {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.browser-header {
    background: #f1f3f4;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.browser-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
}

.browser-url {
    flex: 1;
    text-align: center;
    font-size: 0.875rem;
    color: #5f6368;
}

.demo-feature-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* ============================================
   15. CTA SECTION
   ============================================ */
.cta-section {
    background: var(--gradient-primary);
}

.cta-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    display: inline-block;
}

.cta-guarantees {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.guarantee-item {
    color: white;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   16. FOOTER
   ============================================ */
.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.social-icon {
    width: 20px;
    height: 20px;
    opacity: 0.6;
    transition: var(--transition);
}

.social-icon-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.social-icon-link:hover .social-icon {
    opacity: 1;
    filter: brightness(0) invert(1);
}

.footer a.text-muted:hover {
    color: var(--primary) !important;
    padding-left: 5px;
    transition: var(--transition-fast);
}

.heart-icon {
    display: inline-block;
    color: #dc3545;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    10%, 30% { transform: scale(1.1); }
    20%, 40% { transform: scale(1); }
}

/* ============================================
   17. ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
}

/* ============================================
   18. UTILITY CLASSES
   ============================================ */
.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md) !important;
}

.counter {
    font-variant-numeric: tabular-nums;
}

/* ============================================
   19. RESPONSIVE DESIGN
   ============================================ */

/* Large Tablets & Small Desktops (≤991px) */
@media (max-width: 991px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
    
    .navbar-collapse {
        padding-top: 1rem;
    }
    
    .navbar-nav {
        margin-left: 0 !important;
        padding-top: 1rem;
    }
    
    .navbar-nav .nav-item {
        text-align: center;
        padding: 0.5rem 0;
    }
    
    .navbar-nav .btn {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .social-links {
        justify-content: center;
        margin-top: 1.5rem;
    }
}

/* Tablets & Mobile (≤768px) */
@media (max-width: 768px) {
    /* Hero Section */
    .hero-section {
        background: 
            url('assets/images/bio-link-hero.svg') center top / 150% auto no-repeat,
            linear-gradient(180deg, #667eea 0%, #764ba2 100%);
        min-height: 110vh;
        padding-bottom: 4rem;
    }
    
    .hero-section .container {
        min-height: 110vh;
    }
    
    .hero-section .container > .row {
        padding-top: 120px;
        min-height: 110vh;
    }
    
    .hero-text-col {
        text-align: center;
        min-height: 600px;
    }
    
    .hero-text-col h1 {
        font-size: 2rem;
        min-height: 100px;
    }
    
    .hero-text-col .lead {
        font-size: 1rem;
        min-height: 50px;
    }
    
    /* Hero Buttons */
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        min-height: 140px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .hero-section .btn-outline-light {
        background: rgba(255, 255, 255, 0.25) !important;
        backdrop-filter: blur(10px);
        border: 2px solid white !important;
        color: white !important;
    }
    
    /* Hero Images */
    .hero-images-container {
        min-height: 350px;
        max-height: 350px;
        margin: 2rem 0;
    }
    
    .hero-images-container::before {
        width: 320px;
        height: 320px;
    }
    
    @keyframes rotate-orbit {
        0% { transform: translate3d(0, -80px, 0) rotate(0deg) translateX(70px) rotate(0deg); }
        100% { transform: translate3d(0, -80px, 0) rotate(360deg) translateX(70px) rotate(-360deg); }
    }
    
    /* Trust Bar */
    .trust-bar {
        justify-content: center;
        margin-top: 2rem;
        margin-bottom: 2rem;
        min-height: 72px;
    }
    
    .trust-bar span {
        padding: 0.6rem 0.8rem;
        font-size: 0.875rem;
        height: 44px;
    }
    
    /* Navbar */
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        z-index: 1000;
    }
    
    /* CTA */
    .hero-cta-group {
        align-items: center;
    }
    
    /* Other Sections */
    .comparison-table {
        font-size: 0.875rem;
    }
    
    .trusted-logos {
        gap: 1.5rem;
    }
    
    .trusted-logo {
        width: 60px;
        height: 60px;
    }
    
    .cta-guarantees {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Small Mobile (≤576px) */
@media (max-width: 576px) {
    /* Hero */
    .hero-section {
        background: 
            url('assets/images/bio-link-hero.svg') center top / 200% auto no-repeat,
            linear-gradient(180deg, #667eea 0%, #764ba2 100%);
        min-height: 120vh;
    }
    
    .hero-section .container {
        min-height: 120vh;
    }
    
    .hero-section .container > .row {
        padding-top: 100px;
        min-height: 120vh;
    }
    
    .hero-text-col {
        min-height: 650px;
    }
    
    .hero-text-col h1 {
        font-size: 1.75rem;
        min-height: 90px;
    }
    
    .hero-buttons {
        min-height: 160px;
    }
    
    /* Trust Bar */
    .trust-bar {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
        min-height: 180px;
    }
    
    .trust-bar span {
        width: 100%;
        justify-content: center;
    }
    
    /* Typography */
    .display-4 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Platform Badges */
    .platform-badges-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .platform-badge-item {
        padding: 0.75rem 0.5rem;
    }

    .platform-badge-icon {
        width: 28px;
        height: 28px;
    }

    .platform-badge-item span {
        font-size: 0.75rem;
    }
}

/* Extra Small Mobile (≤400px) */
@media (max-width: 400px) {
    .platform-badges-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Extra Small Mobile (≤375px) */
@media (max-width: 375px) {
    .hero-section {
        background: 
            url('assets/images/bio-link-hero.svg') center top / 220% auto no-repeat,
            linear-gradient(180deg, #667eea 0%, #764ba2 100%);
        min-height: 130vh;
    }
}

/* ============================================
   20. ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

a:focus, 
button:focus,
.btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============================================
   21. PRINT STYLES
   ============================================ */
@media print {
    .navbar,
    .hero-images-container,
    .cta-section,
    footer {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
}