﻿/* ── Layout: full-viewport vertical centering ── */
html, body {
    height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 30px 15px 15px 15px;
    box-sizing: border-box;
}

#themeToggleArea {
    flex-shrink: 0;
    text-align: right;
    margin-bottom: 10px;
}

#logoArea {
    flex-shrink: 0;
    text-align: center;
    padding: 24px 0 8px 0;
}

#companyLogo {
    height: 64px;
    opacity: 1;
}

#cardsContent {
    flex: 1;
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    align-content: center;
}

/* ── Light mode: keep Fomantic defaults, add subtle card polish ── */
.ui.cards > .card,
.ui.card {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    width: 280px !important;
    height: 115px !important;
    display: flex !important;
    flex-direction: column;
}

.ui.cards > .card > .content,
.ui.card > .content {
    flex: 1;
    overflow: hidden;
}

.ui.cards > .card > .content .description,
.ui.card > .content .description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Clickable cards ── */
.ui.cards > a.card,
a.ui.card {
    cursor: pointer;
    text-decoration: none;
}

.ui.cards > .card:hover,
.ui.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12) !important;
}

/* ── Dark mode: body gradient ── */
body[data-theme="dark"] {
    background: linear-gradient(160deg, #0d1117 0%, #111827 60%, #0f172a 100%) !important;
}

/* ── Dark mode: cards ── */
body[data-theme="dark"] .ui.cards > .card,
body[data-theme="dark"] .ui.card {
    background: linear-gradient(145deg, #161d2e 0%, #1a2236 100%) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45) !important;
}

body[data-theme="dark"] .ui.cards > .card:hover,
body[data-theme="dark"] .ui.card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.65) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    transform: translateY(-2px);
}

body[data-theme="dark"] .ui.card .content,
body[data-theme="dark"] .ui.cards > .card .content {
    background: transparent !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

body[data-theme="dark"] .ui.card .content .header,
body[data-theme="dark"] .ui.cards > .card .content .header {
    color: rgba(255, 255, 255, 0.95) !important;
}

body[data-theme="dark"] .ui.card .content .meta,
body[data-theme="dark"] .ui.card .content .meta a,
body[data-theme="dark"] .ui.cards > .card .content .meta {
    color: rgba(255, 255, 255, 0.45) !important;
}

body[data-theme="dark"] .ui.card .content .description,
body[data-theme="dark"] .ui.cards > .card .content .description {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* ── Dark mode: theme toggle button ── */
body[data-theme="dark"] #themeToggleBtn {
    color: rgba(255, 255, 255, 0.6) !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
}

body[data-theme="dark"] #themeToggleBtn:hover {
    color: rgba(255, 255, 255, 0.9) !important;
}