/* Designsystem: Fargepalett og variabler */
/* Design System & Reset */
:root {
    --bg-dark: #121212;
    --bg-surface: #1E1E1E;
    --primary: #FF6B6B;
    --secondary: #FFD93D;
    --text-main: #F5F5F5;
    --text-muted: #A0A0A0;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Outfit', sans-serif;
    --transition: all 0.3s ease;
}

/* Nullstill standard nettleserstiler */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Typografi: Overskrifter og tekststiler */
/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 4rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
}

/* Hjelpeklasser: Gjenbrukbare stiler */
/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), #FF8E53);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.section-padding {
    padding: 80px 0;
}

/* Glassmorphism: Effekt for glassaktig utseende */
/* Glassmorphism */
.glass-panel {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

/* Page specific styles moved from index.html */
/* Hero-seksjon: Stiler for hovedbanneret */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../assets/hero-bg.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 800px;
    padding: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards 0.5s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Header: Navigasjonsmeny og logo */
/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 600;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 100%;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: var(--transition);
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(18, 18, 18, 0.98);
        backdrop-filter: blur(15px);
        display: flex;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .nav-links a {
        font-size: 2rem;
    }

    /* Hamburger Animation */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .section-padding {
        padding: 60px 0;
    }
}

/* Oppskriftsrutenett: Layout for oppskriftskort */
/* Recipes Grid */
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.recipe-card {
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.recipe-card:hover {
    transform: translateY(-10px);
}

.recipe-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.recipe-card:hover .recipe-img {
    transform: scale(1.05);
}

.recipe-content {
    padding: 20px;
}

.recipe-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.recipe-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--secondary);
}

/* Footer: Stiler for bunnteksten */
footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
    margin-top: 80px;
    color: var(--text-muted);
}

/* Modal Styles */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.recipe-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
    overflow-y: auto;
}

.recipe-modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-surface);
    border-radius: 16px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    margin: auto;
    /* Center vertically if needed */
}

.recipe-modal.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.close-modal:hover {
    background: var(--primary);
}

.modal-header {
    height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.9));
}

.modal-title-content {
    position: relative;
    padding: 30px;
    width: 100%;
    z-index: 1;
}

.modal-body {
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .modal-header {
        height: 200px;
    }
}

.ingredient-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-muted);
}

.instructions p {
    margin-bottom: 15px;
    color: var(--text-muted);
    line-height: 1.8;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    font-family: var(--font-main);
}

.btn-link:hover {
    text-decoration: underline;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-main);
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}