/*
* Filename: cards.css
* Directory: /www/css/
* Description: Mørke kort for listevisninger og Annonse-stiler.
*/

.card {
    background-color: #2c3e50;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    overflow: hidden;
    transition: none;
    color: #ecf0f1;
    display: flex; 
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.card:hover {
    transform: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-color: rgba(255,255,255,0.05);
}

.card img {
    width: 100%;
    height: 150px; /* Fast høyde for thumbnails */
    object-fit: cover; /* Sikrer at bildet fyller plassen uten å strekkes */
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.card-content {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* VIKTIG ENDRING: Overskrifter må være lyse på mørk bakgrunn */
.card h3 { 
    color: #ecf0f1; 
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.card h3 a { 
    color: #ecf0f1; 
    text-decoration: none; 
}

.card h3 a:hover { 
    color: #3498db; /* Blå ved hover */
    text-decoration: none; 
}

.card p { 
    color: #bdc3c7; 
    font-size: 0.9rem;
    line-height: 1.4;
}

.category-tag {
    background-color: #1a252f;
    color: #fff; 
    padding: 2px 8px; 
    border-radius: 4px; 
    font-size: 0.7rem; 
    text-transform: uppercase; 
    font-weight: bold; 
    border: 1px solid rgba(255,255,255,0.1);
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* --- ANNONSE PLASSERING (Ad Zones) --- */

/* Top Banner (Leaderboard) */
.ad-zone-top {
    width: 100%;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ecf0f1; /* Lys grå bakgrunn for kontrast */
    border: 1px dashed #bdc3c7;
    padding: 10px;
    min-height: 100px;
}

/* Sidebar Rectangle */
.ad-zone-sidebar {
    width: 100%;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ecf0f1;
    border: 1px dashed #bdc3c7;
    padding: 10px;
    min-height: 260px;
}

/* Placeholder tekst inni annonseboksen før Google tar over */
.ad-placeholder {
    color: #7f8c8d;
    font-weight: bold;
    text-align: center;
    font-size: 0.9rem;
}
/* --- V5 KORTMOTOR: FELLES STILER FOR CARDRENDERER --- */

.wo-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 40px;
    align-items: stretch;
}

.wo-card-grid--empty {
    color: #777;
    margin-bottom: 40px;
}

.wo-card {
    position: relative;
    min-width: 0;
}

.wo-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(180deg, #171a20 0%, #111318 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(0,0,0,0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.wo-card__link:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(0,0,0,0.30);
}

.wo-card--copper .wo-card__link:hover { border-color: rgba(184,115,51,0.50); }
.wo-card--green .wo-card__link:hover { border-color: rgba(50,168,82,0.50); }
.wo-card--blue .wo-card__link:hover { border-color: rgba(70,130,255,0.50); }
.wo-card--yellow .wo-card__link:hover { border-color: rgba(220,183,34,0.50); }

.wo-card__cover {
    position: relative;
    width: 100%;
    aspect-ratio: 5 / 4;
    background-color: #0e1014;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    overflow: hidden;
}

.wo-card__cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.16) 0%, rgba(0,0,0,0.04) 32%, rgba(0,0,0,0.40) 100%);
    pointer-events: none;
}

.wo-card__overlay {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.wo-card__overlay--top {
    top: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
}

.wo-card__overlay--top .wo-card__type-label {
    flex: 0 0 auto;
}

.wo-card__overlay--top .wo-card__role-badge {
    margin-left: auto;
    flex: 0 1 auto;
    max-width: 100%;
    white-space: normal;
    text-align: right;
}

.wo-card__overlay--bottom {
    bottom: 0;
    justify-content: flex-start;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.wo-card__type-label,
.wo-card__role-badge,
.wo-card__tag,
.wo-card__meta-item {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.wo-card__type-label,
.wo-card__role-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-transform: uppercase;
    color: #f3f4f6;
    background: rgba(9,11,16,0.68);
    border: 1px solid rgba(255,255,255,0.14);
    max-width: 100%;
}

.wo-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 100%;
}

.wo-card__tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1;
    color: #f5f5f5;
    background: rgba(9,11,16,0.58);
    border: 1px solid rgba(255,255,255,0.12);
}

.wo-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px 14px 16px;
}

.wo-card__category {
    color: #9ca3af;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 8px;
}

.wo-card__title {
    margin: 0 0 10px 0;
    color: #ffffff;
    font-size: 0.96rem;
    line-height: 1.38;
}

.wo-card__excerpt {
    margin: 0 0 12px 0;
    color: #c7ccd5;
    font-size: 0.84rem;
    line-height: 1.5;
    flex: 1;
}

.wo-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.wo-card__meta-item {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    color: #d7dce4;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
}

@media (max-width: 950px) {
    .wo-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .wo-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .wo-card-grid {
        grid-template-columns: 1fr;
    }
}
