/* RESET & VARIABLER */
:root {
    --primary-color: #1b4332;
    --primary-light: #2d6a4f;
    --accent-color: #d4af37;
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;
    --white: #ffffff;
    --gray: #6c757d;
    --font: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #fff;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* TOP-HEADER (LOGO, SLAGORD & GRASROTANDELEN) */
.top-header {
    background: #ffffff;
    border-bottom: 2px solid #e2e8f0;
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo-box {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-logo {
    max-height: 70px;
    width: auto;
    display: block;
}

.club-title {
    display: flex;
    flex-direction: column;
}

.club-name {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

.club-sub {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray);
}

.slogan-box {
    text-align: center;
    border-left: 3px solid var(--accent-color);
    border-right: 3px solid var(--accent-color);
    padding: 0 20px;
}

.slogan-box h2 {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary-color);
    letter-spacing: 2px;
    line-height: 1;
}

.slogan-box p {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--dark-color);
    letter-spacing: 1px;
}

.grasrot-logo {
    max-height: 55px;
    width: auto;
    display: block;
}

/* NAVIGASJONSLINJE */
.navbar {
    background: var(--primary-color);
    color: var(--white);
    position: relative;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 55px;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 15px 10px;
    display: block;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.btn-kontakt {
    background: var(--accent-color);
    color: var(--dark-color) !important;
    padding: 6px 14px !important;
    border-radius: 4px;
    font-weight: 700 !important;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 10px 0;
}

/* INNLOGGINGSKNAPP I MENYEN */
.btn-login {
    background: transparent;
    color: var(--white) !important;
    border: 1.5px solid var(--accent-color);
    padding: 5px 12px !important;
    border-radius: 4px;
    font-weight: 600 !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-login:hover {
    background: var(--accent-color);
    color: var(--dark-color) !important;
}

.btn-login i {
    font-size: 0.85rem;
}

/* HERO-SEKSJON */
.hero {
    background: linear-gradient(rgba(27, 67, 50, 0.85), rgba(27, 67, 50, 0.95)), 
                url('https://images.unsplash.com/photo-1526676037777-05a232554f77?auto=format&fit=crop&w=1350&q=80') center/cover;
    color: var(--white);
    padding: 60px 0 80px;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 800;
}

.hero-content p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 25px;
}

/* KNAPPER */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s;
    margin: 5px;
}

.btn-primary { background: var(--accent-color); color: var(--dark-color); }
.btn-primary:hover { background: #b89628; }
.btn-secondary { border: 2px solid var(--white); color: var(--white); }
.btn-secondary:hover { background: var(--white); color: var(--primary-color); }

/* GRID LAYOUTS */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* HURTIGFAKTA */
.quick-info { margin-top: -35px; position: relative; z-index: 10; }
.info-card {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
}
.info-card i { font-size: 1.8rem; color: var(--primary-color); margin-bottom: 8px; }

/* SEKSJONER */
.section { padding: 60px 0; }
.bg-light { background-color: var(--light-color); }
.section-title { text-align: center; font-size: 2rem; margin-bottom: 35px; color: var(--primary-color); }

/* OM KLUBBEN */
.highlight-box {
    background: var(--primary-light);
    color: var(--white);
    padding: 25px;
    border-radius: 8px;
}
.highlight-box ul { list-style: none; margin-top: 15px; }
.highlight-box li { margin-bottom: 10px; }
.highlight-box i { color: var(--accent-color); margin-right: 8px; }

/* DYNAMISKE NYHETER OG SKALERING AV BILDER */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.news-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
}

.news-img-wrapper {
    position: relative;
    width: 100%;
    max-height: 220px;
    overflow: hidden;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-img-link {
    display: block;
    width: 100%;
    height: 100%;
}

.news-img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.news-img-link:hover .news-img {
    transform: scale(1.03);
}

.bildetekst {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    font-size: 0.75rem;
    color: #fff;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-meta {
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 10px;
    display: flex;
    gap: 12px;
}

.news-content h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 8px;
    line-height: 1.3;
}

.news-text {
    font-size: 0.92rem;
    color: #444;
    margin-bottom: 15px;
    word-break: break-word;
}

.news-link {
    margin-top: auto;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.88rem;
}

.btn-link:hover {
    text-decoration: underline;
}

/* PAGINERINGS-KNAPPER */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0 35px;
    background: var(--white);
    padding: 12px 18px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.btn-page {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 14px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
}

.btn-page:hover {
    background: var(--primary-light);
}

.btn-page.disabled {
    background: #e2e8f0;
    color: #a0aec0;
    cursor: not-allowed;
}

.page-info {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gray);
}

/* ARKIVBOKS */
.archive-box {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.archive-box h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.archive-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.btn-archive {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
}

.btn-archive:hover {
    background: var(--primary-light);
}

/* CTA & PRISER & STYRE */
.cta-box {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 40px 20px;
    border-radius: 10px;
}

.price-card {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    position: relative;
}

.price-card .price { font-size: 2rem; font-weight: 800; color: var(--primary-color); margin: 10px 0; }
.highlight-price { border: 2px solid var(--accent-color); }

.popular-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
}

.board-card {
    background: var(--white);
    padding: 18px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.board-card i { font-size: 1.6rem; color: var(--primary-light); margin-bottom: 8px; }

/* FOOTER */
footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 35px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* RESPONSIVT DESIGN FOR MOBIL OG NETTBRETT */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .slogan-box {
        border-left: none;
        border-right: none;
        border-top: 2px solid var(--accent-color);
        border-bottom: 2px solid var(--accent-color);
        padding: 8px 0;
    }
    
    .grid-2, .grid-3, .grid-4 { 
        grid-template-columns: 1fr; 
    }
    
    /* Viser burgermeny-knapp */
    .nav-toggle { 
        display: block; 
        margin: 0 auto; 
    }
    
    /* Skjuler meny-lenkene som standard på mobil */
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 10px 0;
        background-color: var(--primary-color);
    }
    
    /* Vises når JavaScript legger til 'active'-klassen */
    .nav-links.active { 
        display: flex; 
    }
    
    .nav-links a { 
        padding: 12px 0; 
        text-align: center; 
        width: 100%;
    }
    
    .footer-content { 
        flex-direction: column; 
        gap: 15px; 
        text-align: center; 
    }
    
    .pagination { 
        flex-direction: column; 
        gap: 10px; 
    }
}