/* Do Better Norge - Modern Norwegian-Inspired Design (V2) */
/* Updated for a clean, premium, and textured aesthetic */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Roboto:wght@300;400;500;700&display=swap');

/* ===== COLOR PALETTE ===== */
:root {
    --norway-red: #BA0C2F;
    --norway-blue: #00205B;
    --norway-gold: #FFD700;
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --medium-gray: #E9ECEF;
    --dark-gray: #343A40;
    --text-dark: #1A1A1A;
    --text-light: #6C757D;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.8;
    color: var(--text-dark);
    background: var(--white);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Global Texture Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("https://www.transparenttextures.com/patterns/60-lines.png");
    opacity: 0.04;
    pointer-events: none;
    z-index: 9999;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ===== HEADER ===== */
header {
    background: rgba(0, 32, 91, 0.95); /* Semi-transparent Norway Blue */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--white);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    font-size: 24px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

header #branding a {
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
}

header #branding a::before {
    content: "🇳🇴";
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* ===== HEADER SEARCH ===== */
.header-search {
    display: flex;
    align-items: center;
}

.header-search form {
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-search input[type="text"] {
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 14px;
    width: 200px;
    outline: none;
    transition: all 0.3s ease;
}

.header-search input[type="text"]::placeholder {
    color: rgba(255,255,255,0.7);
}

.header-search input[type="text"]:focus {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
    width: 250px;
}

.header-search button {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.header-search button:hover {
    background: rgba(255,255,255,0.3);
}

/* ===== NAVIGATION ===== */
.main-nav {
    display: flex;
    list-style: none;
    gap: 4px;
    position: relative;
    flex-wrap: wrap;
}

.main-nav > li {
    position: relative;
}

.main-nav a {
    color: var(--white);
    text-decoration: none;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50px; /* Pill style */
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.main-nav .nav-highlight {
    background: var(--norway-red);
    box-shadow: 0 4px 15px rgba(186, 12, 47, 0.3);
}

.main-nav .nav-highlight:hover {
    background: #9a0a26;
}

/* ===== HIERARCHICAL DROPDOWN NAVIGATION ===== */
.nav-dropdown {
    position: relative;
}

.nav-dropdown.no-dropdown .nav-item-wrapper {
    display: block;
}

.nav-item-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-level-2 .nav-toggle,
.nav-level-3 .nav-toggle {
    color: var(--text-dark);
}

.nav-level-2 .nav-toggle:hover,
.nav-level-3 .nav-toggle:hover {
    background: rgba(0, 32, 91, 0.08);
}

.nav-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
    display: inline-block;
}

/* Default state - collapsed (ALWAYS collapsed by default) */
.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    min-width: 250px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 0 !important;
    margin-top: 8px;
    list-style: none;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.05);
    max-height: 0 !important;
    overflow: hidden;
    display: none;
}

/* Expanded state - ONLY on hover or when active (clicked) */
.nav-dropdown:hover > .nav-dropdown-menu,
.nav-dropdown.active > .nav-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
    max-height: 600px !important;
    padding: 8px 0 !important;
    display: block;
}

.nav-dropdown:hover > .nav-item-wrapper .nav-arrow,
.nav-dropdown.active > .nav-item-wrapper .nav-arrow {
    transform: rotate(180deg);
}

.nav-level-2 .nav-dropdown:hover > .nav-item-wrapper .nav-arrow,
.nav-level-2 .nav-dropdown.active > .nav-item-wrapper .nav-arrow {
    transform: rotate(90deg);
}

/* Level 2 Menu (Categories) */
.nav-level-2 .nav-dropdown-menu {
    left: 100%;
    top: 0;
    margin-left: 8px;
    margin-top: 0;
}

.nav-level-2 .nav-dropdown-menu::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 20px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid rgba(255, 255, 255, 0.98);
}

/* Level 3 Menu (Pages) */
.nav-level-3 .nav-dropdown-menu {
    left: 100%;
    top: 0;
    margin-left: 8px;
    margin-top: 0;
}

.nav-level-3 .nav-dropdown-menu::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 20px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid rgba(255, 255, 255, 0.98);
}

/* Navigation Links Styling */
.nav-link-level-1 {
    color: var(--white) !important;
}

.nav-link-level-2,
.nav-link-level-3 {
    color: var(--text-dark) !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    margin: 2px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 500;
}

.nav-link-level-2:hover,
.nav-link-level-3:hover {
    background: rgba(0, 32, 91, 0.08) !important;
    color: var(--norway-blue) !important;
    transform: translateX(4px) !important;
}

.nav-link-level-2 span:first-child,
.nav-link-level-3 span:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Active state */
.nav-link-level-2.active,
.nav-link-level-3.active {
    background: rgba(0, 32, 91, 0.1) !important;
    color: var(--norway-blue) !important;
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    header .container {
        flex-wrap: wrap;
    }
    
    .site-nav {
        width: 100%;
        order: 3;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .site-nav.active {
        max-height: 1000px;
        overflow: visible;
    }
    
    .main-nav {
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding: 10px 0;
        background: rgba(0, 32, 91, 0.98);
        border-radius: 8px;
        margin-top: 10px;
    }
    
    .main-nav > li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .main-nav > li:last-child {
        border-bottom: none;
    }
    
    .main-nav a {
        width: 100%;
        padding: 15px 20px;
        border-radius: 0;
        display: block;
        text-align: left;
    }
    
    .main-nav a:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: none;
    }
    
    .header-search {
        width: 100%;
        margin: 15px 0 0 0;
        padding: 0 20px;
    }
    
    .header-search form {
        width: 100%;
    }
    
    .header-search input[type="text"] {
        flex: 1;
        width: auto;
        min-width: 0;
    }
    
    .header-search input[type="text"]:focus {
        width: auto;
    }
    
    .nav-dropdown-menu {
        position: static;
        opacity: 0 !important;
        visibility: hidden !important;
        transform: none;
        box-shadow: none;
        background: rgba(0, 32, 91, 0.3);
        margin: 0;
        padding: 0 !important;
        border-radius: 0;
        border: none;
        max-height: 0 !important;
        display: none;
        width: 100%;
    }
    
    .nav-dropdown.active > .nav-dropdown-menu {
        opacity: 1 !important;
        visibility: visible !important;
        padding: 8px 0 !important;
        max-height: 600px !important;
        display: block;
    }
    
    .nav-level-2 .nav-dropdown-menu,
    .nav-level-3 .nav-dropdown-menu {
        left: 0;
        margin-left: 0;
        margin-top: 0;
        padding-left: 20px !important;
    }
    
    .nav-level-2 .nav-dropdown-menu::before,
    .nav-level-3 .nav-dropdown-menu::before {
        display: none;
    }
    
    .nav-link-level-2,
    .nav-link-level-3 {
        padding: 12px 20px !important;
        font-size: 14px;
    }
    
    .nav-item-wrapper {
        width: 100%;
    }
    
    .nav-toggle {
        margin-left: auto;
    }
}

/* ===== USER WELCOME BAR ===== */
.user-welcome-bar {
    background: var(--light-gray);
    color: var(--text-dark);
    padding: 12px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--medium-gray);
}

.user-welcome-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-welcome-bar .user-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-welcome-bar .quick-links {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.user-welcome-bar a {
    color: var(--norway-blue);
    text-decoration: none;
    font-weight: 600;
}

.user-welcome-bar a:hover {
    text-decoration: underline;
}

/* ===== GUEST DASHBOARD ===== */
.guest-dashboard-page .container {
    padding: 40px 25px;
}

.guest-dashboard-welcome {
    background: var(--light-gray);
    padding: 30px;
    border-radius: 8px;
    border-left: 6px solid var(--norway-red);
    margin-bottom: 30px;
}

.guest-dashboard-welcome h1 {
    color: var(--norway-blue);
    margin-bottom: 8px;
}

.guest-dashboard-welcome p {
    color: var(--text-dark);
    margin: 0;
}

.guest-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.guest-dashboard-card {
    background: var(--white);
    padding: 20px;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.guest-dashboard-card:hover {
    border-color: var(--norway-blue);
    box-shadow: var(--shadow-soft);
}

.guest-dashboard-card h3 {
    color: var(--norway-blue);
    margin-bottom: 10px;
    font-size: 1.25rem;
}

.guest-dashboard-card p {
    color: var(--text-light);
    margin-bottom: 12px;
    line-height: 1.6;
}

.guest-dashboard-card a {
    color: var(--norway-red);
    font-weight: 600;
    text-decoration: none;
}

.guest-dashboard-card a:hover {
    text-decoration: underline;
}

.guest-dashboard-content {
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
}

.guest-dashboard-content h2 {
    color: var(--norway-blue);
    margin-bottom: 12px;
    font-size: 1.5rem;
}

.guest-dashboard-content p {
    color: var(--text-dark);
    line-height: 1.7;
}

.guest-dashboard-content .guest-welcome-msg {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--medium-gray);
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: radial-gradient(circle at top right, #003d8f, var(--norway-blue));
    color: var(--white);
    padding: 140px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Subtle Glow behind text */
.hero-content::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 500px;
    height: 500px;
    background: var(--norway-red);
    filter: blur(180px);
    opacity: 0.15;
    z-index: -1;
    transform: translate(-50%, -50%);
}

.hero-content h1 {
    font-size: 68px;
    line-height: 1.1;
    margin-bottom: 25px;
}

.hero-subtitle {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 45px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 16px 40px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: var(--norway-red);
    color: var(--white);
    box-shadow: 0 8px 25px rgba(186, 12, 47, 0.4);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(186, 12, 47, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--norway-blue);
    border-color: var(--white);
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
    padding: 100px 0;
}

.content-area h2 {
    color: var(--norway-blue);
    font-size: 42px;
    margin-bottom: 30px;
}

.card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    border: 1px solid var(--medium-gray);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* ===== NEWSLETTER ===== */
.newsletter-section {
    background: var(--light-gray);
    padding: 100px 0;
    border-top: 1px solid var(--medium-gray);
    border-bottom: 1px solid var(--medium-gray);
}

.newsletter-input-group input {
    border-radius: 50px;
    padding: 18px 30px;
    border: 2px solid var(--medium-gray);
    background: var(--white);
}

/* ===== FOOTER ===== */
footer {
    background: var(--norway-blue);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
}

footer strong {
    color: var(--norway-gold);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 42px; }
    .hero-subtitle { font-size: 18px; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}