/* Grundläggande stilar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Header */
header {
    background-color: #4285f4;
    color: white;
    text-align: center;
    padding: 1rem;
    position: relative;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Navigation */
.menu-toggle {
    display: none;
    position: absolute;
    top: 1rem;
    left: 1rem;
    cursor: pointer;
    z-index: 100;
    font-size: 1.5rem;
}

nav {
    background-color: #333;
    color: white;
    width: 250px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 2rem 1rem;
    transition: all 0.3s ease;
    overflow-y: auto;
}

nav h2 {
    margin-bottom: 1rem;
    border-bottom: 1px solid #5c5c5c;
    padding-bottom: 0.5rem;
}

nav h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #ddd;
}

nav ul {
    list-style: none;
}

nav ul li {
    margin-bottom: 0.8rem;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
    display: block;
    padding: 0.3rem 0;
}

nav a:hover {
    color: #4285f4;
}

.nav-section {
    margin-bottom: 2rem;
}

/* Main Content */
main {
    margin-left: 250px;
    padding: 2rem;
    min-height: 100vh;
}

.profile-container {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.profile-image {
    max-width: 280px;
    margin-right: 2rem;
    margin-bottom: 1rem;
    border: 2px solid #4285f4;
    border-radius: 5px;
}

.profile-info {
    flex: 1;
    min-width: 300px;
}

section {
    margin-bottom: 3rem;
}

h1, h2 {
    color: #4285f4;
    margin-bottom: 1rem;
}

h2 {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #4285f4;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    margin-left: 250px;
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1.5rem;
}

footer a {
    color: #8ab4f8;
}

/* Sociala media ikoner */
.social-icons {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.social-icons a {
    color: white;
    margin: 0 0.5rem;
    font-size: 1.2rem;
    display: inline-block;
}

/* Animationen för AI-text */
.ai-text {
    animation: pulse 2s infinite;
    display: inline-block;
}

@keyframes pulse {
    0% { color: #000000; }
    50% { color: #4285f4; }
    100% { color: #000000; }
}

/* Responsiv design */
@media (max-width: 768px) {
    nav {
        transform: translateX(-100%);
        z-index: 99;
    }
    
    .menu-toggle {
        display: block;
    }
    
    main, footer {
        margin-left: 0;
    }
    
    .nav-active {
        transform: translateX(0);
    }
    
    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 98;
        display: none;
    }
    
    .overlay-active {
        display: block;
    }
}

/* Separatorer */
.separator {
    display: block;
    width: 100%;
    height: 30px;
    background-image: url('../bilder/birds.gif');
    background-repeat: no-repeat;
    background-position: center;
    margin: 2rem 0;
}

.forest-separator {
    display: block;
    width: 100%;
    height: 30px;
    background-image: url('../bilder/forest.gif');
    background-repeat: no-repeat;
    background-position: center;
    margin: 2rem 0;
}

/* Twitter Feed */
.twitter-feed {
    margin-top: 2rem;
    max-width: 100%;
}

/* Teknikknapp */
.tech-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
}

.tech-button:hover {
    background-color: #3367d6;
    transform: scale(1.05);
}

.tooltip {
    position: absolute;
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    bottom: 70px;
    right: 0;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.tech-button:hover .tooltip {
    opacity: 1;
}

/* Sidopanel teknikknapp */
.sidebar-tech-button {
    display: block;
    background-color: #555;
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    margin-top: 30px;
    transition: background-color 0.3s;
}

.sidebar-tech-button:hover {
    background-color: #4285f4;
    text-decoration: none;
}

/* Laddningsindikator */
.loading-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 1.2rem;
    color: #666;
    position: relative;
    padding-left: 30px;
}

.loading-indicator::before {
    content: '';
    position: absolute;
    left: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4285f4;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Felmeddelande */
.error-message {
    padding: 20px;
    background-color: #ffebee;
    border-left: 5px solid #f44336;
    margin: 20px 0;
}

.error-message h2 {
    color: #d32f2f;
    margin-top: 0;
}

/* PWA-knapp */
.pwa-button {
    position: fixed;
    bottom: 20px;
    right: 90px; /* Placerad bredvid tech-knappen */
    background-color: #34a853; /* Grön färg */
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
}

.pwa-button:hover {
    background-color: #2e7d32;
    transform: scale(1.05);
}

.pwa-button:hover .tooltip {
    opacity: 1;
}

/* PWA info i footern */
.pwa-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.pwa-link {
    display: inline-block;
    background-color: #34a853;
    color: white !important;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none !important;
    transition: background-color 0.3s;
    margin-top: 5px;
}

.pwa-link:hover {
    background-color: #2e7d32;
}

/* Responsivitet för PWA-knappen */
@media (max-width: 768px) {
    .pwa-button {
        bottom: 90px; /* Placera under tech-knappen på mobil */
        right: 20px;
    }
}

/* Installationsbanner för PWA (används i script.js) */
#install-banner {
    background-color: #4285f4;
    color: white;
    padding: 15px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}