/* css/style.css - VAPENLAMPOR.SE (Final Fix) */

:root {
    --primary: #fbbf24; /* Amber/Yellow */
    --primary-hover: #d97706;
    --dark-bg: #111827; 
    --card-bg: #1f2937; 
    --text-light: #f3f4f6;
    --text-dim: #9ca3af;
    --success: #10b981;
}

/* STOPPA GLID I SIDLED */
html, body {
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* BASE */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body { 
    font-family: 'Inter', sans-serif; 
    line-height: 1.6; 
    background-color: var(--dark-bg); 
    color: var(--text-light); 
    display: flex; flex-direction: column; min-height: 100vh;
    width: 100%;
    position: relative;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
img { max-width: 100%; display: block; border-radius: 8px; }
ul { list-style: none; padding: 0; margin: 0; }

/* TYPOGRAPHY - FIX FÖR LÅNGA RUBRIKER */
h1, h2, h3 { color: #ffffff; font-weight: 800; line-height: 1.2; margin-bottom: 1rem; }

h1 { 
    font-size: clamp(2rem, 5vw, 3.5rem); 
    text-transform: uppercase; 
    letter-spacing: -1px;
    
    /* FIX: Detta gör att långa ord (Integritetspolicy) bryts om de inte får plats */
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto; 
}

h2 { font-size: 2rem; color: var(--primary); margin-top: 3rem; }
main { flex: 1; }

/* UTILS - FIX FÖR TEXT I KANTEN */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.narrow { 
    max-width: 800px; 
    margin: 0 auto;
    /* FIX: Tvinga in luft på sidorna även för smala layouter */
    padding-left: 20px;
    padding-right: 20px;
    width: 100%;
}

.section { padding: 80px 0; border-bottom: 1px solid #374151; }
.text-center { text-align: center; }

/* HEADER */
.site-header { 
    background: rgba(17, 24, 39, 0.95); 
    backdrop-filter: blur(10px); 
    padding: 20px 0; 
    position: sticky; 
    top: 0; 
    z-index: 2000; 
    border-bottom: 1px solid #374151; 
}
.site-header .container { display: flex; justify-content: space-between; align-items: center; }

.logo { font-size: 1.5rem; font-weight: 900; letter-spacing: -0.5px; color: var(--text-light); }
.logo span { color: var(--primary); }

.site-nav ul { display: flex; gap: 30px; }
.site-nav a { font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-light); }
.site-nav a:hover, .site-nav a.active { color: var(--primary); }

/* HERO */
.hero { 
    background: linear-gradient(to bottom, rgba(17,24,39,0.7), var(--dark-bg)), url('../img/hero-light.jpg'); 
    background-size: cover; background-position: center; 
    padding: 120px 0; text-align: center; 
}
.hero p { font-size: 1.25rem; color: var(--text-dim); max-width: 600px; margin: 0 auto 40px; }

/* BUTTONS */
.btn { 
    display: inline-block; 
    padding: 14px 35px; 
    border-radius: 4px; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    font-size: 0.9rem; 
    cursor: pointer;
}
.btn-primary { background: var(--primary); color: var(--dark-bg); border: 2px solid var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

.btn-outline { border: 2px solid var(--text-dim); color: var(--text-light); margin-left: 10px; background: transparent; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* CARDS */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }
.card { background: var(--card-bg); padding: 30px; border-radius: 12px; border: 1px solid #374151; position: relative; transition: transform 0.3s; }
.card:hover { transform: translateY(-5px); border-color: var(--primary); }

.badge { 
    position: absolute; 
    top: 20px; right: 20px; 
    background: var(--primary); 
    color: var(--dark-bg); 
    padding: 5px 12px; 
    font-weight: bold; font-size: 0.8rem; 
    border-radius: 4px; text-transform: uppercase; 
}
.specs { display: flex; justify-content: space-between; margin: 20px 0; border-top: 1px solid #374151; border-bottom: 1px solid #374151; padding: 15px 0; }
.specs div { text-align: center; }
.specs span { display: block; font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; }
.specs strong { display: block; font-size: 1.1rem; color: var(--text-light); }
.price { font-size: 1.5rem; font-weight: 700; color: var(--primary); margin-top: 20px; display: block; text-align: center; }

/* ARTICLE CONTENT */
.content { font-size: 1.1rem; color: #d1d5db; }
.content p { margin-bottom: 1.5rem; }
.content ul { margin: 1.5rem 0; padding-left: 1.5rem; }
.content li { margin-bottom: 0.5rem; }
.highlight-box { background: rgba(251, 191, 36, 0.1); border-left: 4px solid var(--primary); padding: 20px; margin: 30px 0; }

/* FOOTER */
footer { margin-top: auto; background: #000; padding: 40px 0; text-align: center; color: var(--text-dim); border-top: 1px solid #374151; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 20px; }


/* --- MOBIL OCH MENY --- */

.mobile-menu-btn { display: none; } 

@media (max-width: 768px) {
    .hero { padding: 60px 0; }
    h1 { font-size: 2.5rem; }

    /* KNAPPAR STAPLAS PÅ MOBIL */
    .hero .btn {
        display: block;      
        width: 100%;         
        margin: 10px 0;      
        margin-left: 0;      
    }

    /* MENY KNAPP */
    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        z-index: 2002;
        position: relative;
    }
    .mobile-menu-btn span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--primary); 
        margin: 5px 0;
        transition: 0.3s;
        border-radius: 2px;
    }
    
    .mobile-menu-btn.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
    .mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
    .mobile-menu-btn.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

    /* MENY UTFÄLLD */
    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--dark-bg);
        border-bottom: 2px solid var(--primary);
        box-shadow: 0 10px 20px rgba(0,0,0,0.9);
        display: none; 
        flex-direction: column;
        padding: 20px 0;
        text-align: center;
        z-index: 2001;
    }
    
    .site-nav.open { display: flex; animation: slideDown 0.3s ease-out; }
    .site-nav ul { flex-direction: column; gap: 20px; }
    .site-nav a { display: block; padding: 15px; font-size: 1.1rem; color: var(--text-light); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}