/* ========================================
   Grundlæggende
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Roboto', sans-serif;
    background-color: #121212;
    color: #f4f4f4;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* ========================================
   Topbar
======================================== */
.topbar {
    margin-top: -3rem;
    background-color: #FFBD59;
    color: #1f1f1f;
    padding: 0.5rem 1rem;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
}

.topbar-content {
    display: inline-block;
    padding-left: 100%;
    animation: ticker 13s linear infinite;
}

.topbar .label {
    font-weight: 600;
    margin-right: 0.5rem;
}

.topbar .latest-article {
    font-weight: 700;
    color: #1f1f1f;
    text-decoration: none;
}

.topbar .latest-article:hover {
    text-decoration: underline;
}

@keyframes ticker {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-100%); }
}

/* ========================================
   Header
======================================== */
header {
    background-color: #1f1f1f;
    padding: 1rem 0;
    text-align: center;
}

header h1 {
    font-weight: 700;
    font-size: 2rem;
    color: #FFBD59;
    margin-bottom: 0.5rem;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0 15px;
    position: relative;
}

nav ul li a {
    font-weight: 600;
    text-decoration: none;
    color: #f4f4f4;
    cursor: pointer;
}

nav ul li a:hover {
    color: #FFBD59;
}

/* Drop-down menu */
nav ul li .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #1f1f1f;
    border-radius: 5px;
    min-width: 160px;
    list-style: none;
    padding: 0;
    z-index: 1000;
}

nav ul li .dropdown-menu li a {
    display: block;
    padding: 0.5rem 1rem;
    font-weight: 500;
    text-decoration: none;
    color: #f4f4f4;
}

nav ul li .dropdown-menu li a:hover {
    background-color: #FFBD59;
    color: #1f1f1f;
}

/* Hover på desktop */
nav ul li.dropdown:hover .dropdown-menu {
    display: block;
}

/* Mobil drop-down */
@media(max-width: 768px) {
    /* Header h1 centreret */
    header h1 {
        text-align: center;
        margin-bottom: 1rem;
    }

    /* Navigation centreret */
    nav ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 0;
        margin: 0 auto;
        text-align: center;
    }

    nav ul li {
        width: 100%;
        text-align: center;
        border-top: 1px solid #242424;
        margin: 0;
    }

    nav ul li a {
        display: block;
        width: 100%;
        padding: 0.8rem 0;
    }

    /* Drop-down menu */
    nav ul li.dropdown .dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        text-align: center;
        margin: 0;
        padding: 0;
    }

    nav ul li.dropdown.active .dropdown-menu {
        display: block;
    }

    /* ========================================
       Kort-sektioner – mobil
    ======================================= */
    .card-section {
        display: flex;
        flex-direction: column; /* en ad gangen */
        align-items: center;
        gap: 1rem;
    }

    .card {
        width: 100%;
        max-width: 350px; /* sørger for at de ikke bliver for brede */
        flex: none;
        text-align: center;
    }

    /* Søgefelt mobil */
    .search-box input {
        width: 70%;
    }

    .search-box button {
        padding: 0.5rem 1rem;
    }
}

/* ========================================
   Hero sektion
======================================== */
.hero {
    background: url('../images_gadgets/White and Blue Modern Esport Facebook Cover.png') center/cover no-repeat;
    color: #fff;
    text-align: center;
    padding: 4rem 1rem;
    margin-bottom: 2rem;
}

.hero h2 {
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #FFBD59;
}

.hero p {
    font-weight: 400;
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

/* ========================================
   Kort-sektioner
======================================== */
.card-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
    justify-content: center;
}

.card {
    display: inline-block;
    background-color: #1f1f1f;
    border-radius: 8px;
    padding: 1rem;
    flex: 1 1 calc(50% - 1rem);
    max-width: 350px;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

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

.card h2 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #FFBD59;
}

.card p {
    font-weight: 400;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* Meta info */
.card .meta {
    font-weight: 500;
    font-size: 0.85rem;
    color: #ffcc00;
}

.card .meta .rating {
    font-weight: 600;
    color: #FFBD59;
}

/* Billeder */
.gadgets-article {
    width: 100%;
    max-width: 300px;
    height: 175px;
    display: block;
    margin: 0 auto 1rem auto;
    border-radius: 5px;
}

/* ========================================
   Knapper
======================================== */
.btn {
    display: inline-block;
    font-weight: 600;
    text-transform: uppercase;
    background-color: #ff9933;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn:hover {
    background-color: #FFBD59;
    color: #121212;
}

/* ========================================
   Søgefelt
======================================== */
.search-box {
    display: flex;
    justify-content: center;
    margin: 2rem 0 4rem;
}

.search-box input {
    padding: 0.5rem;
    border: none;
    border-radius: 5px 0 0 5px;
    width: 60%;
    max-width: 400px;
    font-weight: 500;
}

.search-box button {
    border-radius: 0 8px 8px 0;
    padding: 0.5rem 1.2rem;
    background: linear-gradient(135deg, #ff9933, #ff9933);
    border: none;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.search-box button:hover {
    background: linear-gradient(135deg, #ff9933, #ff6600);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* ========================================
   Nyhedssektion
======================================== */
.news-section {
    margin: 2rem 0;
}

.news-section h2 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #FFBD59;
    text-align: center;
}

.news-section ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

.news-section ul li {
    margin: 0.5rem 0;
}

.news-section ul li a {
    font-weight: 500;
    color: #f4f4f4;
    text-decoration: none;
}

.news-section ul li a:hover {
    color: #FFBD59;
}

/* ========================================
   Footer
======================================== */
footer {
    background-color: #1f1f1f;
    text-align: center;
    padding: 1rem 0;
}

footer p,
footer a {
    font-weight: 400;
}

footer a:hover {
    color: #FFBD59;
}

footer .footer-links, footer .socials {
    margin-top: 0.5rem;
}

#top_button {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 0.5rem 1rem;
    font-size: 1.5rem;
    background-color: #ff9933;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, opacity 0.3s ease;
    opacity: 0;         /* skjult som standard */
    pointer-events: none; /* klik kan ikke registreres, når skjult */
}

#top_button:hover {
    background-color: #FFBD59;
    transform: translateX(-50%) scale(1.1);
}

