/* --- RESET & VARIABLER --- */
:root {
    --primary-color: #2C5F2D;    /* Djup skogsgrön */
    --accent-color: #FF9F1C;     /* Prepp-orange */
    --text-dark: #333333;
    --text-light: #f4f4f4;
    --bg-light: #f9fbf9;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

h1, h2, h3 {
    font-family: 'Poppins', sans-serif;
    color: var(--primary-color);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HEADER --- */
header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -1px;
}

.logo .dot { color: var(--accent-color); }

nav ul { display: flex; gap: 20px; align-items: center; }
nav a { font-weight: 600; font-size: 0.95rem; }
nav a:hover { color: var(--accent-color); }

.nav-cta {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 8px 18px;
    border-radius: 50px;
    transition: var(--transition);
}

.nav-cta:hover { background-color: var(--accent-color); color: var(--white); }

/* --- HERO SECTION --- */
#hero {
    /* Tips: Micke, här kan du lägga in en av dina landskapsbilder från Jämtland! */
    background: linear-gradient(rgba(44, 95, 45, 0.85), rgba(44, 95, 45, 0.7)), url('https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe05?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 100px 0;
    text-align: center;
}

#hero h1 {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 20px;
    line-height: 1.2;
}

#hero h1 span { color: var(--accent-color); }
#hero p { font-size: 1.2rem; max-width: 600px; margin: 0 auto 30px; opacity: 0.9; }

/* KNAPPAR */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.primary-btn {
    background-color: var(--accent-color);
    color: var(--white);
}
.primary-btn:hover { background-color: #e08b15; transform: translateY(-2px); }

.secondary-btn {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    margin-left: 10px;
}
.secondary-btn:hover { background-color: var(--white); color: var(--primary-color); }

/* --- FUNKTIONER --- */
#funktioner { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 50px; }

.funktioner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    text-align: center;
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    border-bottom: 4px solid var(--accent-color);
}

.icon-box {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* --- FORMULÄR --- */
#kom-igang {
    background-color: var(--primary-color);
    padding: 80px 0;
    color: var(--white);
}

.form-wrapper {
    background: var(--white);
    max-width: 450px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 12px;
    color: var(--text-dark);
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.input-group {
    position: relative;
    margin-bottom: 15px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

input {
    width: 100%;
    padding: 12px 12px 12px 45px; /* Plats för ikonen */
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.full-width { width: 100%; margin-top: 10px; }
.login-link { margin-top: 15px; font-size: 0.9rem; }
.login-link a { color: var(--primary-color); font-weight: 600; }

/* --- FOOTER --- */
footer {
    background: #222;
    color: #888;
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* --- MOBILANPASSNING --- */
@media (max-width: 768px) {
    #hero h1 { font-size: 2rem; }
    .header-content { flex-direction: column; gap: 15px; }
    nav ul { gap: 15px; }
}

/* --- KUNSKAPSBANK / GUIDER --- */
#guider {
    padding: 80px 0;
    background-color: #f0f4f0; /* Ljusare grön nyans för kontrast */
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.guide-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden; /* Viktigt för att bilden inte ska sticka ut */
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.guide-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.guide-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Kategori-taggen ovanpå bilden */
.category-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.guide-content {
    padding: 25px;
    flex-grow: 1; /* Gör att korten blir lika höga */
    display: flex;
    flex-direction: column;
}

.guide-content h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.guide-content p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
}

.read-more {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--accent-color);
    gap: 12px; /* Pilen flyttar sig lite vid hover */
}

/* --- FORUM / CHATT --- */
.chat-box-input {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.chat-box-input textarea {
    width: 100%;
    height: 80px;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    resize: none; /* Ingen storleksändring */
    font-family: inherit;
    margin-bottom: 10px;
    transition: border 0.3s;
}

.chat-box-input textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.chat-feed {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 60px;
}

.message-wrapper {
    max-width: 75%;
    display: flex;
    flex-direction: column;
}

/* Stil för MINA meddelanden (Högerställda, Gröna) */
.msg-me {
    align-self: flex-end; /* Flytta till höger */
    align-items: flex-end; /* Texten inuti högerställs */
}

.msg-me .message-bubble {
    background-color: var(--primary-color);
    color: white;
    border-bottom-right-radius: 2px; /* Liten "svans" */
}

/* Stil för ANDRAS meddelanden (Vänsterställda, Gråa) */
.msg-other {
    align-self: flex-start; /* Flytta till vänster */
    align-items: flex-start;
}

.msg-other .message-bubble {
    background-color: #e9ecef;
    color: #333;
    border-bottom-left-radius: 2px;
}

/* Gemensam bubbel-stil */
.message-bubble {
    padding: 12px 18px;
    border-radius: 18px;
    line-height: 1.5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    word-wrap: break-word; /* Bryt långa ord */
}

.message-info {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 4px;
    margin-left: 10px;
    margin-right: 10px;
}
