/* =========================================================
   1. VARIABLES / DESIGN TOKENS
========================================================= */

:root {
    --green-dark: #123D2A;
    --green-main: #1F6F43;
    --green-soft: #DDEFE5;
    --green-bright: #6DBE7F;
    --sand: #E8DCC2;
    --bg: #F4F8F5;
    --white: #FFFFFF;
    --text: #1C2B22;
    --muted: #64746A;
    --border: #D8E5DC;
    --shadow: 0 18px 40px rgba(18, 61, 42, 0.12);
    --radius: 22px;
}


/* =========================================================
   2. BASE / GLOBAL
========================================================= */

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}


/* =========================================================
   3. HEADER / NAVIGATION / LANGUAGE
========================================================= */

.site-header {
    background: rgba(244, 248, 245, 0.92);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--green-dark);
}

.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--green-main);
    color: var(--white);
    display: grid;
    place-items: center;
}

.logo-img {
    height: 120px;
    width: auto;
    display: block;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.language-switcher {
    font-size: 0.9rem;
    color: var(--muted);
}

.language-switcher a.active {
    color: var(--green-main);
    font-weight: 700;
}


/* =========================================================
   4. BUTTONS / ALERTS
========================================================= */

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: 0;
    border-radius: 999px;
    padding: 13px 22px;
    font-weight: 700;
    cursor: pointer;
    min-height: 44px;
    text-align: center;
}

.btn-primary {
    background: var(--green-main);
    color: var(--white);
    box-shadow: 0 10px 24px rgba(31, 111, 67, 0.25);
}

.btn-small {
    background: var(--green-soft);
    color: var(--green-dark);
    padding: 10px 16px;
}

.btn-danger {
    background: #B42318;
    color: #FFFFFF;
    box-shadow: 0 10px 24px rgba(180, 35, 24, 0.22);
}

.btn-danger:hover {
    background: #8F1D14;
}

.full-width {
    width: 100%;
}

.alert {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
    font-weight: 700;
}

.alert-success {
    background: #E5F6EC;
    color: #145A32;
    border: 1px solid #A9DFC0;
}

.alert-error {
    background: #FCE8E6;
    color: #8A1F11;
    border: 1px solid #F4B8B0;
}


/* =========================================================
   5. FORMS
========================================================= */

form {
    display: grid;
    gap: 14px;
}

label {
    font-weight: 700;
    color: var(--green-dark);
}

input,
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: 1rem;
    background: var(--white);
}

textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.55;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid var(--green-soft);
    border-color: var(--green-main);
}

.field-help {
    margin-top: -6px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.form-divider {
    width: 100%;
    border: 0;
    border-top: 1px solid var(--border);
    margin: 12px 0;
}

.form-section-title {
    margin: 8px 0 4px;
    color: var(--green-dark);
    font-size: 1.15rem;
}


/* =========================================================
   6. FRONTPAGE / HERO
========================================================= */

.hero {
    padding: 90px 0 60px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 42px;
    align-items: center;
}

.eyebrow {
    color: var(--green-main);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2.3rem, 5vw, 4.6rem);
    line-height: 1.03;
    margin: 0;
    color: var(--green-dark);
}

.hero-text {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--muted);
    max-width: 680px;
}

.hero-actions {
    margin-top: 30px;
}

.hero-card,
.info-card,
.auth-card,
.admin-panel,
.activity-card,
.activity-detail {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 34px;
}

.hero-card h2 {
    color: var(--green-dark);
    font-size: 2rem;
    margin: 0 0 10px;
}

.feature-list {
    display: grid;
    gap: 14px;
    margin-top: 28px;
    color: var(--green-dark);
    font-weight: 700;
}


/* =========================================================
   7. INFO CARDS
========================================================= */

.info-section {
    padding: 20px 0 48px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.info-card {
    padding: 28px;
}

.info-card h3 {
    margin-top: 0;
    color: var(--green-dark);
}

.info-card p {
    color: var(--muted);
    line-height: 1.6;
}


/* =========================================================
   8. AUTH / LOGIN
========================================================= */

.auth-section {
    min-height: calc(100vh - 150px);
    display: grid;
    place-items: center;
    padding: 60px 16px;
}

.auth-card {
    width: min(440px, 100%);
    padding: 34px;
}

.auth-card h1 {
    margin-top: 0;
    color: var(--green-dark);
}

.auth-links {
    margin-top: 18px;
    display: grid;
    gap: 12px;
    text-align: center;
}

.auth-links a {
    color: var(--green-main);
    font-weight: 700;
}


/* =========================================================
   9. DASHBOARD
========================================================= */

.dashboard-section {
    padding: 70px 0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    margin-bottom: 32px;
}

.dashboard-header h1 {
    margin: 0;
    color: var(--green-dark);
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.dashboard-header p {
    color: var(--muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.dashboard-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    min-height: 180px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 48px rgba(18, 61, 42, 0.16);
}

.dashboard-card h2 {
    margin-top: 0;
    color: var(--green-dark);
}

.dashboard-card p {
    color: var(--muted);
    line-height: 1.6;
}

.institution-label {
    font-weight: 700;
    color: var(--green-main);
    margin-top: 4px;
}


/* =========================================================
   10. ADMIN AREA
========================================================= */

.admin-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 24px;
    align-items: start;
}

.admin-panel {
    padding: 28px;
}

.admin-panel h2 {
    margin-top: 0;
    color: var(--green-dark);
}


/* =========================================================
   11. TABLES
========================================================= */

.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

th,
td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

th {
    color: var(--green-dark);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

td {
    color: var(--text);
}


/* =========================================================
   12. ACTIVITIES / LIST
========================================================= */

.activities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.activity-card {
    padding: 24px;
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.activity-card h2 {
    margin-top: 0;
    color: var(--green-dark);
}

.activity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 48px rgba(18, 61, 42, 0.16);
}

.activity-short {
    color: var(--muted);
    margin: 12px 0;
}

.activity-meta {
    font-size: 0.85rem;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}

.activity-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 12px;
}


/* =========================================================
   13. ACTIVITY DETAIL / EDIT
========================================================= */

.activity-detail {
    padding: 34px;
    display: grid;
    gap: 24px;
}

.activity-detail section {
    border-bottom: 1px solid var(--border);
    padding-bottom: 18px;
}

.activity-detail section:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.activity-detail h2 {
    margin: 0 0 8px;
    color: var(--green-dark);
}

.activity-detail p {
    margin: 0;
    color: var(--text);
    line-height: 1.7;
}

.activity-detail-image img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 20px;
}

.activity-form-preview img {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 14px;
}


/* =========================================================
   14. PROFILE
========================================================= */

.profile-info-list {
    display: grid;
    gap: 18px;
}

.profile-info-list div {
    display: grid;
    gap: 4px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.profile-info-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.profile-info-list strong {
    color: var(--green-dark);
}

.profile-info-list span {
    color: var(--muted);
}


/* =========================================================
   15. SUPERADMIN / FILTERS
========================================================= */

.filter-form {
    margin-bottom: 22px;
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
}


/* =========================================================
   16. CHECKBOX
========================================================= */

.checkbox-list {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--white);
}

.checkbox-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.checkbox-list input[type="checkbox"] {
    width: auto;
}


/* =========================================================
   17. BADGES
========================================================= */

.activity-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    background: var(--green-soft);
    color: var(--green-dark);
    font-size: 0.85rem;
    font-weight: 700;
}

.badge-department {
    background: var(--sand);
}


/* =========================================================
   18. FOOTER
========================================================= */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 28px 0;
    color: var(--muted);
    text-align: center;
}


/* =========================================================
   19. RESPONSIVE / TABLET
========================================================= */

@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .activities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 980px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .activities-grid {
        grid-template-columns: 1fr;
    }

    .admin-panel,
    .activity-detail,
    .auth-card {
        padding: 24px;
    }
}

@media (max-width: 820px) {
    .header-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 16px 0;
        gap: 14px;
    }

    .logo {
        justify-content: center;
    }

    .main-nav {
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px;
    }

    .hero {
        padding: 56px 0 36px;
    }

    .hero-grid,
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .hero-card {
        order: -1;
    }

    .dashboard-section {
        padding: 46px 0;
    }

    .dashboard-header {
        align-items: flex-start;
    }
}


/* =========================================================
   20. RESPONSIVE / MOBILE
========================================================= */

@media (max-width: 620px) {
    .container {
        width: min(100% - 20px, 1120px);
    }

    .site-header {
        position: sticky;
    }

    .header-inner {
        min-height: auto;
    }

    .logo {
        font-size: 1.15rem;
    }

    .logo-mark {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .logo-img {
        height: 70px;
    }

    .main-nav {
        font-size: 0.95rem;
    }

    .language-switcher {
        width: 100%;
        text-align: center;
    }

    .btn {
        width: 100%;
        padding: 13px 18px;
    }

    .btn-small {
        width: auto;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .dashboard-header h1 {
        font-size: clamp(2rem, 12vw, 2.8rem);
        word-break: break-word;
    }

    .dashboard-header > div:last-child,
    .dashboard-header > a {
        width: 100%;
    }

    .dashboard-header div[style*="display:flex"] {
        width: 100%;
        flex-direction: column;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-card {
        min-height: auto;
        padding: 22px;
    }

    .auth-section {
        min-height: calc(100vh - 120px);
        padding: 34px 10px;
        place-items: start center;
    }

    .auth-card {
        padding: 24px;
        border-radius: 18px;
    }

    .admin-panel {
        padding: 22px;
        border-radius: 18px;
    }

    .activity-card {
        padding: 20px;
        border-radius: 18px;
    }

    .activity-detail {
        padding: 22px;
        border-radius: 18px;
    }

    .activity-image img {
        height: 160px;
    }

    .activity-detail-image img {
        max-height: 240px;
        border-radius: 14px;
    }

    .activity-meta {
        flex-direction: column;
        gap: 6px;
    }

    .checkbox-list {
        padding: 14px;
    }

    .checkbox-list label {
        align-items: flex-start;
        line-height: 1.4;
    }

    .filter-row {
        grid-template-columns: 1fr;
    }

    table {
        min-width: 680px;
        font-size: 0.92rem;
    }

    th,
    td {
        padding: 12px 10px;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }

    .hero h1 {
        font-size: clamp(2.2rem, 12vw, 3.2rem);
    }

    .hero-text {
        font-size: 1.05rem;
    }

    .site-footer {
        padding: 22px 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 420px) {
    .container {
        width: min(100% - 16px, 1120px);
    }

    .admin-panel,
    .activity-detail,
    .activity-card,
    .auth-card {
        padding: 18px;
    }

    .dashboard-header h1 {
        font-size: 2rem;
    }

    .form-section-title {
        font-size: 1.05rem;
    }

    .badge {
        font-size: 0.78rem;
    }
}



/* =========================================================
   21. MOBILE TABLES AS CARDS
========================================================= */

@media (max-width: 620px) {
    .table-wrap {
        overflow-x: visible;
    }

    table {
        min-width: 0;
        width: 100%;
    }

    table thead {
        display: none;
    }

    table,
    table tbody,
    table tr,
    table td {
        display: block;
        width: 100%;
    }

    table tr {
        background: var(--white);
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 14px;
        margin-bottom: 14px;
        box-shadow: 0 10px 24px rgba(18, 61, 42, 0.08);
    }

    table td {
        border-bottom: 0;
        padding: 8px 0;
        display: flex;
        justify-content: space-between;
        gap: 16px;
        font-size: 0.95rem;
    }

    table td::before {
        content: attr(data-label);
        font-weight: 800;
        color: var(--green-dark);
        flex: 0 0 42%;
    }

    table td .btn,
    table td a.btn {
        width: 100%;
        margin-top: 8px;
    }
}

@media (max-width: 620px) {
    table td {
        display: flex;
        align-items: flex-start;
        gap: 12px;
    }

    table td::before {
        content: attr(data-label);
        font-weight: 800;
        color: var(--green-dark);
        flex: 0 0 110px; /* FAST bredde i px i stedet for % */
    }

    table td {
        word-break: break-word;
    }

    table td > * {
        flex: 1;
        min-width: 0;
    }
}

/* =========================================================
   22. PRODUCT / PRICING / CONTACT / FOOTER
========================================================= */

.pricing-section {
    padding: 12px 0 48px;
}

.pricing-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 36px;
    text-align: center;
}

.pricing-card h2 {
    color: var(--green-dark);
    margin-top: 0;
}

.price-box {
    display: grid;
    gap: 4px;
    margin: 24px 0;
}

.price {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    color: var(--green-main);
}

.price-note {
    color: var(--muted);
    font-weight: 700;
}

.hidden-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 1.1fr;
    gap: 28px;
    text-align: left;
}

.site-footer h3 {
    color: var(--green-dark);
    margin-top: 0;
}

.site-footer p {
    line-height: 1.6;
}

.site-footer a {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}

.site-footer a:hover {
    color: var(--green-main);
}

.footer-bottom {
    margin-top: 24px;
    border-top: 1px solid var(--border);
    padding-top: 18px;
    text-align: center;
}

@media (max-width: 820px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .pricing-card {
        padding: 26px;
    }
}

/* =========================================================
   23. LANGUAGE HEADER
========================================================= */

.language-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.language-switcher a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
}

.language-switcher a.active {
    color: var(--green-main);
    font-weight: 700;
}

.flag {
    width: 18px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.05);
}

.lang-separator {
    color: var(--muted);
}

/* =========================================================
   24. SEO CONTENT
========================================================= */

.seo-content-section {
    padding: 12px 0 48px;
}

.seo-content-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 36px;
}

.seo-content-card h2,
.seo-content-card h3 {
    color: var(--green-dark);
}

.seo-content-card p {
    color: var(--text);
    line-height: 1.75;
}

.seo-list {
    margin: 18px 0 0;
    padding-left: 22px;
    color: var(--text);
    line-height: 1.8;
}

@media (max-width: 620px) {
    .seo-content-card {
        padding: 22px;
        border-radius: 18px;
    }
}

/* =========================================================
   25. HERO PHONE MOCKUP
========================================================= */

.hero-phone-card {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 560px;
    overflow: hidden;
}

.phone-frame {
    width: 290px;
    background: #111827;
    border-radius: 38px;
    padding: 14px;
    box-shadow:
        0 30px 80px rgba(18, 61, 42, 0.28),
        inset 0 0 0 2px rgba(255,255,255,0.04);
    transform: rotate(-6deg);
    position: relative;
    z-index: 2;
}

.phone-notch {
    width: 120px;
    height: 22px;
    background: #0B1220;
    border-radius: 0 0 16px 16px;
    margin: 0 auto 12px;
}

.phone-screen {
    background:
        linear-gradient(
            180deg,
            #F4F8F5 0%,
            #E8F1EB 100%
        );
    border-radius: 28px;
    padding: 18px;
    min-height: 520px;
}

.phone-header {
    margin-bottom: 20px;
}

.phone-header strong {
    display: block;
    color: var(--green-dark);
    font-size: 1.5rem;
}

.phone-header span {
    color: var(--muted);
    font-size: 0.95rem;
}

.phone-activity {
    background: var(--white);
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 10px 24px rgba(18, 61, 42, 0.08);
}

.phone-activity h3 {
    margin: 0 0 6px;
    color: var(--green-dark);
    font-size: 1rem;
}

.phone-activity p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.floating-badge {
    position: absolute;
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 700;
    color: var(--green-dark);
    z-index: 3;
    backdrop-filter: blur(10px);
}

.badge-one {
    top: 70px;
    right: 10px;
}

.badge-two {
    bottom: 120px;
    left: 0;
}

.badge-three {
    bottom: 40px;
    right: 20px;
}

@media (max-width: 820px) {

    .hero-phone-card {
        min-height: auto;
        padding: 20px 0;
    }

    .phone-frame {
        transform: none;
        width: min(320px, 100%);
    }

    .floating-badge {
        position: static;
        margin-top: 12px;
    }
}