@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

:root {
    --gap: 32px;
    --gutter: 48px;
    --caption-bg: lightgray;
}

/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.5;
    color: #111;
    background: #fff;
    padding: 20px;
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
}

/* Emphasis */
.emne {
    color: #304f51;
    font-size: small;
}

/* Wrapper for news cards */
.wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 0px;
}

/* News cards horizontal scroll */
.news-container {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}
.news-container::-webkit-scrollbar {
    height: 8px;
}
.news-container::-webkit-scrollbar-track {
    background: transparent;
}
.news-container::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 10px;
}

.news-card, .news-card2 {
    min-width: 250px;
    flex: 0 0 auto;
    border: 1px solid #ccc;
    padding: 15px;
    background: white;
    border-radius: 4px;
}

.news-card2 {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #304f51;
    color: white;
    font-weight: bold;
    text-align: center;
    line-height: 2.825;
}

.news-date {
    font-size: 0.9rem;
    color: #666;
}

.news-title {
    font-weight: bold;
    font-size: 1rem;
}

/* Sidebar title */
.sidebar {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-family: "Comic Sans MS", cursive;
    font-size: 2rem;
    margin-right: 20px;
    text-align: center;
}

/* Page content grid */
.page {
    max-width: 1400px;
    margin: 0 auto;
}

.mag-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--gutter);
}

/* Left column */
.left {
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: var(--gap);
}

.left .small-thumb {
    width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
    display: block;
}

/* Left column gallery */
.left .thumb-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.thumb-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

/* Title blocks */
.title-block h1 {
    font-size: clamp(24px, 4vw, 36px);
    line-height: 1.1;
}
.title-block h3 {
    font-size: clamp(16px, 2.5vw, 20px);
    color: #444;
}
.title-block hr {
    border: none;
    border-top: 1px solid rgba(0,0,0,0.15);
    margin: 6px 0;
}

/* Right column */
.right {
    display: grid;
    grid-template-rows: 1fr auto;
    position: relative;
    min-height: 500px;
    overflow: hidden;
    border-radius: 6px;
}

.hero {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.caption-bar {
    padding: 16px;
    background: var(--caption-bg);
    font-weight: 700;
    font-size: clamp(16px, 2vw, 28px);
}

/* Responsive layout for smaller screens */
@media (max-width: 1000px) {
    .mag-grid {
        grid-template-columns: 1fr;
    }

    .left .thumb-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .thumb-grid img {
        height: 180px;
    }

    .right {
        min-height: 350px;
    }

    .caption-bar {
        font-size: clamp(14px, 3vw, 22px);
    }

    .news-container {
        gap: 8px;
        padding-bottom: 0px;
    }

    .news-card, .news-card2 {
        min-width: 180px;
        padding: 12px;
    }

    .title-block h1 {
        font-size: clamp(20px, 5vw, 28px);
    }

    .title-block h3 {
        font-size: clamp(14px, 3vw, 18px);
    }
}

/* Very small screens */
@media (max-width: 500px) {
    body {
        padding: 10px;
    }
    .news-title {
    font-weight: bold;
    font-size: 10px;
}
    .news-date {
    font-size: 10px;
    color: #666;
    }

     .left .thumb-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns */
        gap: 5px; /* small gap between images */
    }

    .thumb-grid img {
        object-fit: cover;
    }

    .news-card, .news-card2 {
        min-width: 150px;
        padding: 10px;
        font-size: 0.9rem;
    }

    .caption-bar {
        padding: 12px;
    }
    .wrapper {
        flex-direction: column; /* stack vertically */
        align-items: flex-start;
    }

    .news-card2 {
        width: 100%; /* full width above news */
        order: -1;   /* move to the top */
        line-height: 1; /* optional: make it taller */
        text-align: center;
         border-radius: 0px;
    }

    .news-container {
        width: 100%;
        display: flex;
        overflow-x: auto;
    }
}
/* Wrapper: keep news cards in one row with horizontal scroll on small screens */
.wrapper {
    display: flex;
    flex-wrap: nowrap; /* prevents wrapping */
    align-items: flex-start;
    overflow-x: auto;  /* allow horizontal scroll on small screens */
}

/* News cards */
.news-card, .news-card2 {
    flex: 0 0 auto; /* do not shrink or grow */
}

/* Responsive logo */
.navbar-brand img {
    width: auto;
    max-width: 120px; /* desktop max width */
    height: auto;
}

/* On small screens, make logo larger relative to navbar */
@media (max-width: 600px) {
    .navbar-brand img {
        max-width: 20%;  /* increases logo size on phones */
    }
}

.link-block .thumb-grid {
  margin-bottom: 0.5rem;
}

