:root {

    /* Light Mode Colors */
    --color-background-primary: #F5F5F7;
    --color-surface-raised: rgba(82, 82, 180, 0.848);
    --color-text-primary: #1D1D1F;
    --color-text-secondary: #6E6E73;
    --color-primary-default: #007AFF;
    --color-primary-hover: #0071E3;
    --color-border-subtle: rgba(60, 60, 67, 0.29);
    --color-icons: #08031A;
    --button-bg: #08031A;
    --button-hover-bg: rgb(33, 33, 131);
    --color-text-button: #F5F5F7;
    --color-line-separator: rgb(173, 173, 240);
    --link-color: #1958d6; 

    /* Spacing */
    --spacing-unit: 4px;
    
    font-size: 1.5rem;
    /* Typography */ 
    --font-family-primary: 'Arimo';
    --font-family-headline: 'Arimo';
    --font-size-display: 32px;
    --font-size-headline: 24px;
    --font-size-title: 20px;
    --font-size-body: 16px;
    --font-size-caption: 12px;
    --border-radius-standard: 8px;

    /* Other */
    --border-radius-standard: 12px;
    --shadow-elevation: 0 4px 12px rgba(0,0,0,0.08);
}
html.dark {
/* Dark Mode Colors */
--color-background-primary: #08031A; /* main bagrund color */
--color-surface-raised: rgba(73, 73, 75, 0.75);
--color-text-primary: #F5F5F7;
--color-text-secondary: #8E8E93;
--color-primary-default: #0A84FF;
--color-primary-hover: #3395FF;
--color-border-subtle: rgba(192, 192, 255, 0.848);
--color-icons: #F5F5F7; 
    --button-bg: #F5F5F7;
    --button-hover-bg: rgba(192, 192, 255, 0.848);
    --color-text-button: #08031A;
    --color-line-separator: rgba(202, 202, 255, 0.896);
    --link-color: #f9f5b8;
    
}

html {
    scroll-padding-top: 70px; /* This should match the height of your fixed header */
}
/* --- Base & Typography Styles --- */
body {
    background-color: var(--color-background-primary);
    color: var(--color-text-primary);
    font-family: var(--font-family-primary);
    font-size: 16px;
    line-height: 2;
    margin: 0;
    padding-top: 70px; /* Space for fixed header */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-wrap: break-word;
}

/*Typography Responsiveness */
.text-display { font-size: 32px; /* ... */ }
.text-headline { font-size: 24px; /* ... */ } 
.text-title { font-size: 20px; /* ... */ }


@media (min-width: 600px) { /* Tablet */
    .text-display { font-size: 32px; }
    .text-headline { font-size: 28px; } 
    .text-title { font-size: 24px; }
}
@media (min-width: 1200px) { /* Desktop */
    .text-display { font-size: 34px; }
    .text-headline { font-size: 28px; } 
    .text-title { font-size: 22px; }
}
 

.main-content {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 24px;
}


/* --- Layout & Utility --- */
.container {
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
    padding-up: 24px;
}
.section {
    padding: 64px 0;
}
@media (min-width: 744px) {
    .section { padding: 80px 0; }
}

.image {
    width: 99%;
    height: auto;
    display: block;
    border-radius: 8px;
    align-items: center;
}
 

/* General Hyperlink Styling */
a { color: var(--link-color); text-decoration: none; transition: color 0.3s ease, text-decoration 0.3s ease; }
a:hover { color: var(--link-hover-color); text-decoration: underline; font-weight: bold;}

 
.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-secondary);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle-btn svg {
    width: 22px;
    height: 22px;
}

/* --- Hero Section --- */
.hero-section {
    padding-top: 80px; /* More padding for hero */
    padding-bottom: 80px;
}

.hero-content {
    text-align: center;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}
.hero-content h1 {
    margin-bottom: 12px;
}
.hero-content p {
    margin-bottom: 24px;
}
.hero-mockup {
    margin-top: 48px;
    padding: 12px;
}
.hero-mockup img {
    width: auto;
    height: auto;
    display: block;
    border-radius: 8px;
}


/* --- Typography --- */
h1, .text-display { font-family: var(--font-family-headline); font-size: var(--font-size-display); line-height: 1.5; }
h2, .text-headline { font-family: var(--font-family-headline); font-size: var(--font-size-headline); line-height: 1.5; }
h3, .text-title { font-size: var(--font-size-title); line-height: 1.5; font-weight: 500; }
.text-secondary { color: var(--color-text-secondary); }



/* --- Header & Navigation | navbar --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-background-primary);
    border-bottom: 1px solid var(--color-border-subtle);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    z-index: 1000;
    height: 70px;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}
.nav-brand {
    font-weight: 700;
    font-size: 22px;
    text-decoration: none;
    color: var(--color-text-primary);
}
.nav-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}
.theme-toggle-btn { 
background: none; 
border: none; cursor: 
pointer; color: var(--color-text-secondary); 
padding: 4px; }


/* --- Hero Section --- */
.hero-section {
    padding-top: 80px; /* More padding for hero */
    padding-bottom: 80px;
}

.hero-content {
    text-align: center;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}
.hero-content h1 {
    margin-bottom: 12px;
}
.hero-content p {
    margin-bottom: 24px;
}
.hero-mockup {
    margin-top: 48px;
    padding: 12px;
}
.hero-mockup img {
    width: 100%;
    display: block;
    border-radius: 8px;
}

/* Line break section*/
hr.styled-line {
    max-width: 68%;
    margin-top: 48px;
    margin-bottom: 48px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
    border-top: 1px solid var(--color-text-primary); 
 
}

/* Line break IN-section*/
hr.styled-line-in {
    max-width: 34%;
    margin-top: 48px;
    margin-bottom: 48px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
    border-top: 1px solid var(--color-text-primary); 
 
}

/* Line break separator-in-section*/
hr.styled-line-separator {
    max-width: 20%;
    margin-top: 36px;
    margin-bottom: 36px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
    border-top: 1px solid var(--color-line-separator); 
 
}

/* Default Mobile-First Styles */
.nav-links {
    display: none; /* Hide desktop links on mobile */
}
.btn-cta-header {
    display: none; /* Hide desktop CTA on mobile */
}
.hamburger-icon {
    display: block; /* Show hamburger on mobile */
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
}
.hamburger-icon span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--color-text-primary);
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Desktop Styles */
@media (min-width: 768px) {
    .nav-links {
        display: flex; /* Show desktop links */
        list-style: none;
        margin: 0;
        padding: 0;
        gap: 32px;
    }
    .nav-link {
        font-size: 15px;
        font-weight: 600;
        color: var(--color-text-secondary);
        text-decoration: none;
        transition: color 0.2s;
    }
    .nav-link:hover {
        color: var(--color-text-primary);
    }
    .btn-cta-header {
        display: inline-flex; /* Show desktop CTA */
    }
    .hamburger-icon {
        display: none; /* Hide hamburger on desktop */
    }
}
 
/* --- Side Menu (for Mobile) --- */
.side-menu {
    position: fixed;
    top: 70px; /* Below header */
    left: -100%;
    width: 50%;
    max-width: 300px;
    height: calc(100% - 70px);
    background-color: var(--color-background-primary);
    padding-top: 24px;
    transition: left 0.3s ease;
    z-index: 999;
    border-right: 1px solid var(--color-border-subtle);
}
.side-menu.active {
    left: 0;
}
.side-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.side-menu li a {
    display: block;
    padding: 16px 24px;
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 19px;
    font-weight: 600;
}

.backdrop {
    position: fixed; top: 70px; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.4);
    z-index: 998;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease;
}
.backdrop.active {
    opacity: 1; visibility: visible;
}

/* --- Footer --- */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--color-border-subtle);
    margin-top: 40px;
}
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
@media (min-width: 744px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}
.footer-links {
    display: flex;
    gap: 20px;
}
.footer-links a {
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover {
    color: var(--color-text-primary);
}

/* Features Section */
.card {
    padding: 0px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
    margin-top: 40px;
}

.card-content {
    background-color: var(--color-background-primary);
    border-radius: 8px;  
    padding: 24px;  
    border: 1px solid var(--color-border-subtle);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;

    display: flex;             /* 1. Turns the container into a flexbox */
    flex-direction: column;    /* 2. Stacks items vertically */
    align-items: center;
    text-wrap: wrap;
}

.card-content a {
  white-space: normal;      /* allow wrapping, instead of forcing one line */
  overflow-wrap: break-word; /* break long words/URLs if needed */
  word-wrap: break-word;     /* older browsers */
  word-break: break-word;    /* ensures breaking inside very long strings */
}

.card-content h2 {
    font-size: 2ram;
    margin: 0px;
}

.card-content p { 
    margin: 0px;
    text-align: left;
}

.card-content h5 {
    font-size: 2.5ram;
    text-align: left;
    margin: 4px;
}

.card-content:hover {
    transform: translatex(4px);
    box-shadow: 0 4px 16px var(--color-surface-raised);
}

.card-icon {
    padding-bottom: 20px;
    width: 32px;
    height: 32px;

    /* This sets the COLOR for all icons from your theme variables */
    background-color: var(--color-icons);

    /* General mask settings */
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-position: center;

    transition: background-color 0.3s ease;
}

.card-icon svg {
    width: 32px; /* Large Icon Size */
    height: 32px;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.card-description {
    font-size: 1rem;
    max-width: 100%; /* Override default p max-width */
}
 
selector {
  overflow-wrap: break-word; /* Breaks long words at any point to fit within the container */
}
 
/* svg files - names */
/* Specific rules to set the SHAPE for EACH icon */

.icon-chromosome {
    mask-image: url('chromosome-svgrepo-com.svg'); /* Path to icon */
    -webkit-mask-image: url('chromosome-svgrepo-com.svg');
}

.icon-anomaly {
    mask-image: url('anomaly-found-svgrepo-com.svg'); /* Path to icon */
    -webkit-mask-image: url('anomaly-found-svgrepo-com.svg');
}

.icon-disorder {
    mask-image: url('genetic-research-svgrepo-com.svg'); /* Path to Swyer icon */
    -webkit-mask-image: url('genetic-research-svgrepo-com.svg');
}

.icon-stringchromo {
    mask-image: url('chromosome-string-svgrepo-com.svg'); /* Path to Swyer icon */
    -webkit-mask-image: url('chromosome-string-svgrepo-com.svg');
}

.icon-intersex {
    mask-image: url('intersex-svgrepo-com.svgg'); /* Path to Swyer icon */
    -webkit-mask-image: url('intersex-svgrepo-com.svg');
}

.icon-chemical {
    mask-image: url('chemical-svgrepo-com.svg'); /* Path to Swyer icon */
    -webkit-mask-image: url('chemical-svgrepo-com.svg');
}

.icon-genitals {
    mask-image: url('vagina-svgrepo-com.svg'); /* Path to Swyer icon */
    -webkit-mask-image: url('vagina-svgrepo-com.svg');
}

.icon-contact {
    mask-image: url('blog-writing-svgrepo-com.svg'); /* Path to Swyer icon */
    -webkit-mask-image: url('blog-writing-svgrepo-com.svg');
}





/* --- Images Source Accordion --- */
    .sources-section {
        max-width: 1100px;
        margin: 48px auto;
        padding: 0 24px;
    }

    .accordion-toggle {
        /* Button Reset */
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
        width: 100%;

        /* Layout */
        display: flex;
        justify-content: space-between;
        align-items: center;

        /* Styling */
        padding-bottom: 16px;
        border-bottom: 1px solid var(--color-border-subtle);
        color: var(--color-text-primary);
        font-size: 18px;
        font-weight: 600;
        font-family: var(--font-family-primary);
    }

    .accordion-icon {
        width: 20px;
        height: 20px;
        stroke: var(--color-text-secondary);
        transition: transform 0.3s ease;
    }

    /* Rotate icon when the accordion is open */
    .accordion-toggle[aria-expanded="true"] .accordion-icon {
        transform: rotate(180deg);
    }
    
    .accordion-content {
        /* Smooth transition for opening/closing */
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.3s ease-out;
    }

    .accordion-content ul {
        list-style: none;
        padding: 16px 0 0 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 8px; /* Space between links */
    }

    .accordion-content a {
        color: var(--color-text-secondary);
        text-decoration: none;
        transition: color 0.2s;
    }
    .accordion-content a:hover {
        color: var(--color-text-accent);
    }

    /* --- ADDED/UPDATED: CTA Button & Animation --- */
.cta-buttons-container { 
    display: flex; 
    gap: 16px; 
    justify-content: center; 
    flex-wrap: wrap; 
    margin-top: 32px;
    margin-bottom: 32px;
    border-radius: 4px;
}

    /* CTA Button & Animation */
a.cta-button {
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    padding: 12px 24px;
    border-radius: 99px; /* Pill shape */
    text-decoration: none; 
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s, transform 0.2s ease;
    border: 1px var(--color-surface-raised);
 }

a.cta-button:hover {
    transform: translateY(0px);
    box-shadow: 0 4px 16px var(--color-surface-raised);}

/* Primary Button Style */
a.cta-button.primary {
    background-color: var(--button-bg); 
    color: var(--color-text-button);
}

a.cta-button.primary:hover { 
    background-color: var(--button-hover-bg); 
}

/* Secondary Button Style */
a.cta-button.secondary { 
    background-color: transparent; 
    color: var(--color-text-primary); 
    border-color: var(--color-border-subtle); 
}

a.cta-button.secondary:hover { 
    background-color: var(--color-text-primary); 
    color: var(--color-background-primary);
    border-color: var(--color-text-primary);
}

/* Table */  
        .table-container {
            width: 100%;
            max-width: auto;
            overflow-x: auto;
            background-color: transparent;
            border-radius: 8px;
            border: 1px solid var(--color-border-subtle); 
            margin: 0 auto;
            font-size: 16px;
            text-align: center;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            text-align: left;
        }
        
        caption {
            font-size: 16px;
            font-weight: 500;
            padding: 8px;
            caption-side: top;
            text-align: left;
            color: var(--color-text-primary);
            border: var(--color-border-subtle);
        }

        th, td {
            padding: 8px;
            border-bottom: 1px solid var(--color-border-subtle);
            vertical-align: top;
            border-right: 1px solid var(--color-border-subtle);
        }

        th {
            background-color: var(--header-bg-color);
            font-weight: 200;
        }
        
        thead th {
            font-size: 16px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        tbody tr:hover {
            background-color: var(--hover-bg-color);
        }

        tbody th[scope="row"] {
            font-weight: 200;
            background-color: transparent;
        }
        
        sup {
            font-size: 8px;
            vertical-align: super;
            margin-left: 2px;
            line-height: 1;
            opacity: 0.7;
        }

        .risk-cell {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-weight: 500;
        }

        .risk-very-high { color: var(--risk-very-high-color); }
        .risk-high { color: var(--risk-high-color); }
        .risk-low { color: var(--risk-low-color); }
 

        /* --- Contact Page Styles --- */
.hidden {
    display: none;
}

.contact-grid {
    grid-template-columns: repeat(3);
    align-items: center;
    max-width: uto;
    margin-left: auto;
    margin-right: auto; 
    display: grid;
    gap: 24px;
    margin-top: 48px;
}

.contact-card {
    background-color: var(--color-material-card);
    border-radius: 8px; /* From design system */
    padding: 24px;
    border-radius: var(--border-radius-standard);
    border: 1px solid var(--color-border-subtle);
    box-shadow: var(--shadow-elevation);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
    padding-top: 24px;
    flex: 0 0 320px;
 }

.contact-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%; /* This makes the container circular */
     background-color: var(--color-border-subtle); /* Fallback color */
     flex-shrink: 0;
     align-content:center;
}

.contact-avatar svg {
    stroke: var(--color-text-link);
    width: 70%;
    height: 70%;
}

.contact-card:hover {
    transform: translatex(4px);
    box-shadow: 0 4px 16px var(--color-surface-raised);
}

.contact-channels {
    margin-top: auto; /* Pushes the contact links to the bottom of the card */
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-link);
    text-decoration: underline;
    font-weight: 500;
}

.contact-link:hover {
    text-decoration: underline;
}
 

/* --- Responsive Grid for Contact Cards --- */
@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: repeat(1); /* 2 columns on tablet */
    }
}

@media (min-width: 1024px) {
    .contact-grid {
        grid-template-columns: repeat(1); /* 3 columns on desktop */
    }
}
