* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors extracted from www.innateinnovation.co */
    --primary-color: #FF6262;
    --secondary-color: #1A1A1C;
    --accent-color: var(--secondary-color);
    --accent-decoration-color: rgba(26, 26, 28, 0.35);
    --text-color: var(--secondary-color);
    --text-light: #666666;
    --heading-color: var(--primary-color);
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --border-color: #e0e0e0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --hero-text-color: white;
    
    /* Fonts extracted from www.innateinnovation.co */
    --font-family-body: 'Nunito Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-family-heading: 'Nunito Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-family-subheading: 'Nunito Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    
    /* Logo width - settable in theme */
    --logo-width: 40px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-body);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

h1 {
    font-family: var(--font-family-heading);
    font-weight: 500;
    font-size: 62px;
    color: var(--heading-color);
}

h2 {
    font-family: var(--font-family-subheading);
    font-weight: 500;
    font-size: 30px;
    color: var(--heading-color);
}

h3 {
    font-family: var(--font-family-subheading);
    font-weight: 500;
    font-size: 25px;
    color: var(--heading-color);
}

h4, h5, h6 {
    font-family: var(--font-family-subheading);
    font-weight: 400;
    color: var(--heading-color);
}

a {
    color: var(--accent-color);
    text-decoration: underline;
    text-decoration-color: var(--accent-decoration-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background: #1A1A1C;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    font-family: 'Nunito Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 33px 20px 5px 20px;
    max-width: 1280px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 500;
    color: #ffffff;
    text-decoration: none;
}

.logo-image {
    width: var(--logo-width, 40px);
    min-width: var(--logo-width, 40px);
    height: 40px;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
    background: transparent;
}

.logo-image[src=""] {
    display: none;
}

.site-name-image {
    height: 40px;
    width: auto;
    display: block;
}

.site-name-text {
    display: block;
    color: #ffffff;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: #ffffff;
    font-weight: 400;
    padding: 5px 0;
    position: relative;
    text-decoration: none;
}

.nav-menu a:hover {
    color: #ffffff;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffffff;
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Social Icons */
.social-icons {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 20px;
}

.social-icons a {
    color: #ffffff;
    font-size: 1.2rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.social-icons a:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

/* Blog social icons - visible on light background */
.page-content .blog-social-icons {
    margin-left: 0;
}

.page-content .blog-social-icons a {
    color: var(--secondary-color);
}

.page-content .blog-social-icons a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Dropdown Menu */
.nav-item {
    position: relative;
}

.nav-item .dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: transparent;
    min-width: 220px;
    padding: 15px 0 10px 0;
    z-index: 1000;
    list-style: none;
    margin: 0;
}

.nav-item .dropdown::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1A1A1C;
    border-radius: 4px;
    box-shadow: var(--shadow);
    z-index: -1;
}

/* Prevent dropdown from overflowing right edge - dynamically applied via JavaScript */
.nav-item .dropdown.center-align {
    left: 50%;
    transform: translateX(-50%);
    right: auto;
}

.nav-item .dropdown.right-align {
    /* Position will be set via JavaScript to align to page edge */
    left: auto;
    right: auto;
    transform: none;
}

.nav-item .dropdown li {
    list-style: none;
}

.nav-item:hover .dropdown {
    display: block;
}

.nav-item .dropdown::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 0;
    right: 0;
    height: 5px;
    background: transparent;
    pointer-events: auto;
}

.dropdown a {
    display: block;
    padding: 10px 20px;
    color: #ffffff;
    text-decoration: none;
}

.dropdown a:hover {
    background: var(--gray-light);
    color: var(--primary-color);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    margin-left: auto; /* Right-align hamburger */
}

.hamburger.force-show {
    display: flex;
    margin-right: 15px; /* Space between hamburger and social icons */
}

.nav-menu.hamburger-mode {
    display: none;
}

/* When hamburger is active, show the menu even in hamburger-mode */
.nav-menu.hamburger-mode.active {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    box-shadow: var(--shadow);
    z-index: 1000;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    height: 350px;
    overflow: hidden;
}

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    /* Background is set via inline style */
}

/* Hero text overlay */
.hero-text-overlay {
    position: absolute;
    z-index: 1;
    width: 100%;
    padding: 0 20px;
}

/* Horizontal alignment */
.hero-text-h-left {
    left: 20px;
    right: auto;
    text-align: left;
}

.hero-text-h-center,
.hero-text-h-centre {
    left: 50%;
    right: auto;
    text-align: center;
}

.hero-text-h-right {
    left: auto;
    right: 20px;
    text-align: right;
}

/* Vertical alignment */
.hero-text-v-top {
    top: 20px;
    bottom: auto;
    transform: translateY(0);
}

.hero-text-v-top.hero-text-h-center,
.hero-text-v-top.hero-text-h-centre {
    transform: translateX(-50%);
}

.hero-text-v-middle {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
}

.hero-text-v-middle.hero-text-h-center,
.hero-text-v-middle.hero-text-h-centre {
    transform: translate(-50%, -50%);
}

.hero-text-v-bottom {
    top: auto;
    bottom: 20px;
    transform: translateY(0);
}

.hero-text-v-bottom.hero-text-h-center,
.hero-text-v-bottom.hero-text-h-centre {
    transform: translateX(-50%);
}

.hero-text-overlay h1 {
    font-family: var(--font-family-heading);
    font-weight: 500;
    font-size: 3.5rem;
    color: var(--hero-text-color);
    margin-bottom: 15px;
    line-height: 1.3;
}

.hero-text-overlay p {
    font-family: var(--font-family-body);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--hero-text-color);
    margin-bottom: 0;
}

/* Hero fit-width variant - scales image to width, centers vertically within fixed-height container */
.hero.hero-fit-width img {
    width: 100%;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Hero fit-height variant - scales image to height, centers horizontally within fixed-height container */
.hero.hero-fit-height img {
    height: 100%;
    width: auto;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Intro Section */
.home-content {
    padding: 60px 20px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.home-content h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--heading-color);
}

.home-content h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    color: var(--heading-color);
}

.home-content h3 {
    font-size: 1.4rem;
    margin: 30px 0 15px;
    color: var(--heading-color);
}

.home-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 20px;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    padding: 40px 20px;
    max-width: 1280px;
    margin: 0 auto;
}

.card-grid.tiled {
    gap: 0;
    padding: 0;
}

.card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 25px;
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.card-content p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    background: var(--white);
    color: var(--accent-color);
    border: 1px solid var(--accent-decoration-color);
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    text-decoration-color: var(--accent-decoration-color);
}

.btn:hover {
    background: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
}

/* Image Card - Background Image Style */
.image-card {
    position: relative;
    background-color: var(--primary-color);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.image-card .card-content {
    padding: 25px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.image-card .card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--white);
}

.image-card .card-content p {
    color: var(--white);
    margin-bottom: 15px;
}

.image-card .btn {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--white);
    padding: 10px 25px;
    text-decoration: none;
}

.image-card .btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-color: var(--white);
}

.btn-default {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--text-color);
    padding: 10px 25px;
    text-decoration: none;
}

.btn-default:hover {
    background: rgba(43, 95, 130, 0.1);
    color: var(--text-color);
    border-color: var(--text-color);
}

.image-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    /* Background is set via inline style */
}

.image-card.tiled {
    border-radius: 0;
}

.image-card.tiled:hover {
    transform: none;
    box-shadow: var(--shadow);
}

/* Page Content */
.page-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
}

.page-content h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--heading-color);
    line-height: 1.3;
}

/* Reduce gap between h1 and following paragraph in blog templates */
.page-content > h1:first-child,
.page-content .container > h1:first-child {
    margin-bottom: 0;
}

.page-content > h1:first-child + p,
.page-content .container > h1:first-child + p {
    margin-top: 0;
}

.page-content h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    color: var(--heading-color);
}

.page-content h3 {
    font-size: 1.4rem;
    margin: 30px 0 15px;
    color: var(--heading-color);
}

.page-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.page-content ul, .page-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.page-content li {
    margin-bottom: 10px;
}

.page-content img {
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: var(--shadow);
}

.page-content img.clean_for_me-image {
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-shadow: none;
    max-width: 80%;
    height: auto;
}

.page-content li.no-bullet {
    list-style-type: none;
    margin-left: 1.2em;
}

.page-content .centered-list,
.home-content .centered-list {
    text-align: center;
}

.page-content .centered-list ul,
.home-content .centered-list ul {
    display: inline-block;
    text-align: left;
    padding-left: 0;
    margin: 0;
    list-style-position: inside;
}

.page-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: var(--text-light);
}

.page-content h1.default-heading,
.page-content h2.default-heading {
    text-align: center;
}

.page-content .headline-style,
.home-content .headline-style {
    font-size: 1.8rem;
}

.page-content .quote-style,
.home-content .quote-style {
    font-size: 1.4rem;
}

/* Blog quote style - vertical line instead of quotes */
.page-content .blog-quote-style,
.home-content .blog-quote-style {
    font-size: 1.4rem;
    display: block;
    padding-left: 20px;
    border-left: 6px solid var(--primary-color);
    margin: 1em 0;
}

/* Section Blocks */
.page-content .section,
.home-content .section {
    padding-top: 1em;
    padding-bottom: 1em;
}

.page-content .section:first-child,
.home-content .section:first-child {
    padding-top: 0;
}

.page-content .section:last-child,
.home-content .section:last-child {
    padding-bottom: 0;
}

/* Image Card */
.image-card {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    width: 100%;
    background: transparent;
    border: 1px solid var(--secondary-color);
    margin: 0;
    /* Default to aspect-free and image-above */
    /* Default to rounded borders */
    border-radius: 8px;
    /* Default to hover effect */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-card-image {
    min-width: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 1;
    grid-row: 1;
}

.image-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    max-width: 100%;
    max-height: 100%;
    margin: 0;  /* Override .page-content img margin */
    box-shadow: none;  /* Override .page-content img box-shadow */
    /* Inline styles for width_XX% or height_XX% will override these defaults */
}

/* When image is wrapped in anchor tag, make anchor fill container width */
.image-card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Force image to fill width when using image_width mode with aspect_free */
.image-card.aspect-free .image-card-image a {
    align-self: stretch;
}

.image-card.aspect-free .image-card-image a img.image-fill-width {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}

.image-card-description {
    min-width: 0;
    grid-column: 1;
    grid-row: 2;
    padding: 10px;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.image-card p {
    font-family: var(--font-family-body);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
    text-align: left;
}

/* Aspect ratio enforcement */
.image-card.has-aspect-ratio {
    min-height: 0;
    overflow: hidden;
}

.image-card.has-aspect-ratio .image-card-description {
    overflow: hidden;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Aspect free - allow content to grow naturally (default) */
.image-card.aspect-free .image-card-description {
    overflow: visible;
}

/* Caption text truncation when aspect ratio is enforced */
.image-card.has-aspect-ratio .image-card-caption {
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    text-overflow: ellipsis;
    min-height: 0;
}

.image-card.no-border {
    border: none;
}

/* Border styles */
.image-card.rounded_border {
    border-radius: 8px;
}

.image-card.border {
    border-radius: 0;
}

/* Hover effects */
.image-card.hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-card.hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.image-card.no_hover {
    transition: none;
    box-shadow: none;  /* Remove default shadow when no_hover is specified */
}

.image-card.no_hover:hover {
    transform: none;
    box-shadow: none;
}

/* Caption styling - sizes (card scale: Tiny / Small / Normal / Large) */
.image-card-caption-tiny,
.image-card .caption_tiny {
    font-size: 0.8rem;
}

.image-card-caption-small,
.image-card .caption_small {
    font-size: 0.9rem;
}

.image-card-caption-normal,
.image-card .caption_normal {
    font-size: 1rem;
}

.image-card-caption-large,
.image-card .caption_large {
    font-size: 1.5rem;
}

/* Caption styling - alignment */
.image-card p.image-card-caption-left,
.image-card .image-card-caption-left,
.image-card p.caption_left,
.image-card .caption_left {
    text-align: left;
}

.image-card p.image-card-caption-centre,
.image-card p.image-card-caption-center,
.image-card .image-card-caption-centre,
.image-card .image-card-caption-center,
.image-card p.caption_centre,
.image-card p.caption_center,
.image-card .caption_centre,
.image-card .caption_center {
    text-align: center;
}

.image-card p.image-card-caption-right,
.image-card .image-card-caption-right,
.image-card p.caption_right,
.image-card .caption_right {
    text-align: right;
}

/* Horizontal layouts - two columns, one row */
.image-card.image-lhs,
.image-card.image-rhs,
.image-card.image-left,
.image-card.image-right {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
}

.image-card.image-lhs .image-card-image,
.image-card.image-left .image-card-image {
    grid-column: 1;
    grid-row: 1;
}
.image-card.image-lhs .image-card-description,
.image-card.image-left .image-card-description {
    grid-column: 2;
    grid-row: 1;
}

.image-card.image-rhs .image-card-image,
.image-card.image-right .image-card-image {
    grid-column: 2;
    grid-row: 1;
}
.image-card.image-rhs .image-card-description,
.image-card.image-right .image-card-description {
    grid-column: 1;
    grid-row: 1;
}

/* Vertical layouts - image above (default) or below */
.image-card.image-above,
.image-card.image-below {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
}

.image-card.image-above .image-card-image {
    grid-column: 1;
    grid-row: 1;
}
.image-card.image-above .image-card-description {
    grid-column: 1;
    grid-row: 2;
}

.image-card.image-below .image-card-image {
    grid-column: 1;
    grid-row: 2;
}
.image-card.image-below .image-card-description {
    grid-column: 1;
    grid-row: 1;
}

/* Card container alignment - horizontal */
.image-card.align-h-left {
    margin-left: 0;
    margin-right: auto;
}

.image-card.align-h-right {
    margin-left: auto;
    margin-right: 0;
}

.image-card.align-h-centre,
.image-card.align-h-center {
    margin-left: auto;
    margin-right: auto;
}

/* Card container alignment - vertical */
.image-card.align-v-top {
    margin-top: 0;
    margin-bottom: auto;
}

.image-card.align-v-bottom {
    margin-top: auto;
    margin-bottom: 0;
}

.image-card.align-v-middle {
    margin-top: 30px;
    margin-bottom: 30px;
}

/* Inverted theme - dark background with white text and borders */
.image-card.inverted-theme {
    background: var(--secondary-color);
    border-color: var(--white);
}

.image-card.inverted-theme .image-card-description {
    background: var(--secondary-color);
}

.image-card.inverted-theme p {
    color: var(--white);
}

/* Profile Card - extends image-card */
.profile-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    background: transparent;
    border: 1px solid var(--secondary-color);
    margin: 30px 0;
    /* Default to border (square) and image-rhs (image right) */
    /* Default to square borders (no border-radius) */
    border-radius: 0;
    /* Default to no hover effect */
    transition: none;
}

/* Desktop only: force horizontal grid for lhs/rhs so it wins over any cascade (e.g. at 768px boundary) */
@media (min-width: 769px) {
    .profile-card.image-lhs,
    .profile-card.image-rhs,
    .profile-card.image-left,
    .profile-card.image-right {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr;
    }
    .profile-card.image-lhs .profile-card-image,
    .profile-card.image-left .profile-card-image {
        grid-column: 1;
        grid-row: 1;
    }
    .profile-card.image-lhs .profile-card-description,
    .profile-card.image-left .profile-card-description {
        grid-column: 2;
        grid-row: 1;
    }
    .profile-card.image-rhs .profile-card-image,
    .profile-card.image-right .profile-card-image {
        grid-column: 2;
        grid-row: 1;
    }
    .profile-card.image-rhs .profile-card-description,
    .profile-card.image-right .profile-card-description {
        grid-column: 1;
        grid-row: 1;
    }
}

/* Default: image right (match legacy row-reverse) */
.profile-card .profile-card-image {
    grid-column: 2;
}
.profile-card .profile-card-description {
    grid-column: 1;
}

.profile-card-image {
    min-width: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    max-width: 100%;
    max-height: 100%;
    /* Inline styles for width_XX% or height_XX% will override these defaults */
}

.profile-card-description {
    min-width: 0;
    padding: 1.875rem;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.profile-card h2 {
    font-family: var(--font-family-subheading);
    font-weight: 500;
    font-size: 1.5rem;
    color: var(--heading-color);
    margin: 0;
    text-align: left;
    line-height: 1.6;
}

.profile-card p {
    font-family: var(--font-family-body);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
    text-align: left;
}

.profile-card .profile-card-role,
.profile-card .profile-card-organisation {
    font-weight: 700;
}

.profile-card .profile-card-organisation {
    margin-bottom: 1.5em;
}

/* Aspect ratio enforcement */
.profile-card.has-aspect-ratio {
    min-height: 0;
    overflow: hidden;
}

.profile-card.has-aspect-ratio .profile-card-description {
    overflow: hidden;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Aspect free - allow content to grow naturally */
.profile-card.aspect-free .profile-card-description {
    overflow: visible;
}

/* Bio text truncation when aspect ratio is enforced */
.profile-card.has-aspect-ratio .profile-card-bio {
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    text-overflow: ellipsis;
    min-height: 0;
}

.profile-card .profile-card-btn {
    display: inline-block;
    padding: 10px 25px;
    background: var(--primary-color);
    color: var(--white);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
    align-self: center;
    margin-top: 15px;
}

.profile-card .profile-card-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    opacity: 0.9;
}

.profile-card.no-border {
    border: none;
}

/* Border styles for profile-card */
.profile-card.rounded_border {
    border-radius: 8px;
}

.profile-card.border {
    border-radius: 0;
}

/* Hover effects for profile-card */
.profile-card.hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-card.hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.profile-card.no_hover {
    transition: none;
}

.profile-card.no_hover:hover {
    transform: none;
    box-shadow: none;
}

/* Image left: first child col 1, second col 2 */
.profile-card.image-lhs .profile-card-image,
.profile-card.image-left .profile-card-image {
    grid-column: 1;
}
.profile-card.image-lhs .profile-card-description,
.profile-card.image-left .profile-card-description {
    grid-column: 2;
}

/* Let grid control cell width; override build inline width: 50% for horizontal layouts */
.profile-card.image-lhs .profile-card-image,
.profile-card.image-rhs .profile-card-image,
.profile-card.image-left .profile-card-image,
.profile-card.image-right .profile-card-image,
.profile-card.image-lhs .profile-card-description,
.profile-card.image-rhs .profile-card-description,
.profile-card.image-left .profile-card-description,
.profile-card.image-right .profile-card-description {
    width: auto !important;
}

/* Image right: already default; image-rhs/right use same as base (image col 2, desc col 1) */

/* Vertical layouts - image above or below */
.profile-card.image-above,
.profile-card.image-below {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
}

.profile-card.image-above .profile-card-image {
    grid-column: 1;
    grid-row: 1;
}
.profile-card.image-above .profile-card-description {
    grid-column: 1;
    grid-row: 2;
}

.profile-card.image-below .profile-card-image {
    grid-column: 1;
    grid-row: 2;
}
.profile-card.image-below .profile-card-description {
    grid-column: 1;
    grid-row: 1;
}

/* Card container alignment - horizontal */
.profile-card.align-h-left {
    margin-left: 0;
    margin-right: auto;
}

.profile-card.align-h-right {
    margin-left: auto;
    margin-right: 0;
}

.profile-card.align-h-centre,
.profile-card.align-h-center {
    margin-left: auto;
    margin-right: auto;
}

/* Card container alignment - vertical */
.profile-card.align-v-top {
    margin-top: 0;
    margin-bottom: auto;
}

.profile-card.align-v-bottom {
    margin-top: auto;
    margin-bottom: 0;
}

.profile-card.align-v-middle {
    margin-top: 30px;
    margin-bottom: 30px;
}

/* Inverted theme - dark background with white text and borders */
.profile-card.inverted-theme {
    background: var(--secondary-color);
    border-color: var(--white);
}

.profile-card.inverted-theme .profile-card-description {
    background: var(--secondary-color);
}

.profile-card.inverted-theme p {
    color: var(--white);
}

.profile-card.inverted-theme .profile-card-role,
.profile-card.inverted-theme .profile-card-organisation {
    color: var(--white);
}

/* Contact Section */
.contact {
    background: var(--primary-color);
    color: var(--white);
    padding: 60px 20px;
    text-align: center;
}

.contact h2 {
    font-size: 2rem;
    margin-bottom: 30px;
}

.contact p {
    margin-bottom: 10px;
}

.contact a {
    color: var(--white);
    opacity: 0.9;
}

.contact a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Footer */
footer {
    background: #1A1A1C;
    color: #5E5D5F;
    padding: 40px 20px;
    font-family: 'Nunito Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding: 0 20px;
}

.footer-column {
    font-size: 0.9rem;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer-column h2,
.footer-column h3,
.footer-column h4 {
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    margin-top: 0;
}

.footer-column p {
    margin: 0;
    padding: 0;
}

.footer-column a {
    color: #5E5D5F;
    text-decoration: underline;
}

.footer-column a:hover {
    color: #5E5D5F;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column img {
    max-width: 23px;
    height: auto;
    vertical-align: middle;
    margin-right: 8px;
}

.footer-column img.fit-height {
    max-width: none !important;
    height: 1em !important;
    width: auto !important;
}

.footer-column img.fit-width {
    max-width: none !important;
    width: 100% !important;
    height: auto !important;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-logo-image {
    width: var(--logo-width, 40px);
    height: auto;
    display: block;
}

.footer-name-image {
    height: auto;
    display: block;
    max-height: 2rem;
}

.footer-name-text {
    display: block;
    font-weight: 600;
}

footer p {
    opacity: 0.8;
    font-size: 0.9rem;
}

.small-text {
    font-size: 0.8em;
}

.small-text-center {
    text-align: center;
    display: block;
}

.small-text-left {
    text-align: left;
    display: block;
}

.small-text-right {
    text-align: right;
    display: block;
}

.text-center {
    text-align: center;
    display: block;
}

.text-left {
    text-align: left;
    display: block;
}

.text-right {
    text-align: right;
    display: block;
}

.text-vertical-top {
    vertical-align: top;
}

.text-vertical-bottom {
    vertical-align: bottom;
}

.text-vertical-middle {
    vertical-align: middle;
}

.fit-height {
    height: 1em !important;
    width: auto !important;
    vertical-align: middle;
    max-width: none !important;
}

.fit-width {
    width: 100% !important;
    height: auto !important;
    vertical-align: middle;
    max-width: none !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        box-shadow: var(--shadow);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a,
    .nav-menu .dropdown a {
        color: var(--primary-color);
    }

    .nav-menu a:hover,
    .nav-menu .dropdown a:hover {
        color: var(--primary-color);
    }

    .nav-menu a::after {
        background: var(--primary-color);
    }

    .nav-menu .dropdown a {
        position: relative;
        display: inline-block;
    }

    .nav-menu .dropdown a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 20px;
        width: 0;
        height: 2px;
        background: var(--primary-color);
        transition: var(--transition);
    }

    .nav-menu .dropdown a:hover::after {
        width: calc(100% - 40px);
    }

    .social-icons {
        margin-left: 0;
        gap: 20px;
    }

    .nav-item .dropdown {
        position: static;
        box-shadow: none;
        padding-left: 20px;
        display: none;
    }

    .nav-item .dropdown::after {
        background: var(--white);
    }

    .nav-item.open .dropdown {
        display: block;
    }

    .nav-menu .dropdown a:hover {
        background: var(--white);
    }

    .hero {
        height: 250px;
    }

    .hero-text-overlay h1 {
        font-size: 3rem;
    }

    .hero-text-overlay p {
        font-size: 0.9rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .page-content h1 {
        font-size: 2rem;
    }

    .blog-card-title {
        font-size: 1.2rem;
    }

    .blog-card-preview {
        font-size: 0.9rem;
    }

    .blog-card .blog-card-categories,
    .blog-card .blog-card-info {
        font-size: 0.6rem;
    }

    .image-card-caption-tiny,
    .image-card .caption_tiny {
        font-size: 0.6rem;
    }

    .image-card-caption-small,
    .image-card .caption_small {
        font-size: 0.8rem;
    }

    .image-card-caption-normal,
    .image-card .caption_normal {
        font-size: 0.9rem;
    }

    .image-card-caption-large,
    .image-card .caption_large {
        font-size: 1.2rem;
    }

    .profile-card h2 {
        font-size: 1.2rem;
    }

    .profile-card p {
        font-size: 0.9rem;
    }

    .profile-card-description {
        padding: 1.5rem;
    }

    .blog-card-description {
        padding-top: 0.8rem;
        padding-bottom: 0.8rem;
    }

    /* Stack lhs/rhs cards vertically on mobile; strict 50/50 via grid */
    .profile-card.image-lhs,
    .profile-card.image-rhs,
    .profile-card.image-left,
    .profile-card.image-right {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
    }
    .image-card.image-lhs,
    .image-card.image-rhs,
    .image-card.image-left,
    .image-card.image-right {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
    }

    /* On mobile, card width = desktop image width so image doesn't change size at breakpoint (--card-width-percent from build; default 100 → 50%). Exclude blog cards so they keep 100% width. */
    .profile-card.image-lhs:not(.blog-card),
    .profile-card.image-rhs:not(.blog-card),
    .profile-card.image-left:not(.blog-card),
    .profile-card.image-right:not(.blog-card),
    .image-card.image-lhs,
    .image-card.image-rhs,
    .image-card.image-left,
    .image-card.image-right {
        width: calc(var(--card-width-percent, 100) * 0.5 * 1%) !important;
        min-width: var(--card-mob-min-width, 250px);
    }

    .profile-card.image-lhs .profile-card-image,
    .profile-card.image-rhs .profile-card-image,
    .profile-card.image-left .profile-card-image,
    .profile-card.image-right .profile-card-image {
        grid-column: 1;
        grid-row: 1;
    }
    .profile-card.image-lhs .profile-card-description,
    .profile-card.image-rhs .profile-card-description,
    .profile-card.image-left .profile-card-description,
    .profile-card.image-right .profile-card-description {
        grid-column: 1;
        grid-row: 2;
        min-height: 0;
    }

    .image-card.image-lhs .image-card-image,
    .image-card.image-rhs .image-card-image,
    .image-card.image-left .image-card-image,
    .image-card.image-right .image-card-image {
        grid-column: 1;
        grid-row: 1;
    }
    .image-card.image-lhs .image-card-description,
    .image-card.image-rhs .image-card-description,
    .image-card.image-left .image-card-description,
    .image-card.image-right .image-card-description {
        grid-column: 1;
        grid-row: 2;
        min-height: 0;
    }

    /* Profile cards with aspect ratio (same MD as about us): image fills cell on mobile so it doesn't appear narrow; object-position from build preserved. Exclude blog cards. */
    .profile-card.has-aspect-ratio.image-lhs:not(.blog-card) .profile-card-image img,
    .profile-card.has-aspect-ratio.image-rhs:not(.blog-card) .profile-card-image img,
    .profile-card.has-aspect-ratio.image-left:not(.blog-card) .profile-card-image img,
    .profile-card.has-aspect-ratio.image-right:not(.blog-card) .profile-card-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
    }

    /* When card has aspect ratio: on mobile apply ratio to card height so image cell = 1 unit, description = 1 unit (50/50) */
    /* Inverted aspect on mobile: width = ratio% of height so card is tall and image cell has room. Exclude blog cards: they use image-cell aspect instead. */
    .profile-card.image-lhs.has-aspect-ratio:not(.blog-card),
    .profile-card.image-rhs.has-aspect-ratio:not(.blog-card),
    .profile-card.image-left.has-aspect-ratio:not(.blog-card),
    .profile-card.image-right.has-aspect-ratio:not(.blog-card),
    .image-card.image-lhs.has-aspect-ratio,
    .image-card.image-rhs.has-aspect-ratio,
    .image-card.image-left.has-aspect-ratio,
    .image-card.image-right.has-aspect-ratio {
        aspect-ratio: 1 / var(--card-aspect, 1.5) !important;
    }

    /* Blog cards on mobile: aspect ratio on image cell only (height = width/3), description gets equal space (50/50); card min-height = 2× image height. */
    .profile-card.blog-card.image-lhs,
    .profile-card.blog-card.image-rhs,
    .profile-card.blog-card.image-left,
    .profile-card.blog-card.image-right {
        grid-template-rows: auto 1fr;
        min-height: 66.67vw; /* 2 × (width/3) so image row + description row each get ~50% */
    }
    .profile-card.blog-card .profile-card-image {
        aspect-ratio: var(--card-aspect, 3) / 1;
    }

    /* When card has no aspect ratio: min-height so 50/50 split has space */
    .profile-card.image-lhs.aspect-free,
    .profile-card.image-rhs.aspect-free,
    .profile-card.image-left.aspect-free,
    .profile-card.image-right.aspect-free,
    .image-card.image-lhs.aspect-free,
    .image-card.image-rhs.aspect-free,
    .image-card.image-left.aspect-free,
    .image-card.image-right.aspect-free {
        min-height: 50vh;
    }
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Indent blocks */
.indent {
    margin-left: 2em;
}

/* Blog listing and blog cards */
.blog-listing {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.blog-card-link {
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.blog-card-link .profile-card {
    width: 100%;
    margin: 0;
    border-color: rgba(26, 26, 28, 0.5);
}

.blog-card-description {
    /* Inherit layout from profile-card-description; this class is a styling hook */
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.blog-card-title {
    /* Base style matches profile-card h2; can be customized independently */
    font-family: var(--font-family-subheading);
    font-weight: 500;
    font-size: 1.5rem;
    margin: 0 0 0.25em 0;
    text-align: left;
    line-height: 1.6;
}

.blog-card-categories,
.blog-card-info {
    font-weight: 700;
    font-size: 0.8rem;
}

.blog-card-info {
    margin-bottom: 2em;
}

.blog-card-preview {
    font-family: var(--font-family-body);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.6;
}

.blog-card .blog-card-preview {
    margin-top: 1.2rem;
}

/* Preview text truncation when aspect ratio is enforced - fills available space */
.blog-card.has-aspect-ratio .blog-card-preview {
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 999;
    line-clamp: 999;
    word-wrap: break-word;
    word-break: break-word;
    min-height: 0;
}

/* Blog card text colors */
.blog-card-title,
.blog-card-categories,
.blog-card-info,
.blog-card-preview {
    color: var(--secondary-color);
}

.blog-card-description:hover .blog-card-title,
.blog-card-description:hover .blog-card-categories,
.blog-card-description:hover .blog-card-info,
.blog-card-description:hover .blog-card-preview {
    color: var(--primary-color);
}

/* Override heading styling for blog cards only */
.blog-card h2 {
    color: var(--secondary-color);
    line-height: 1.2;
    margin: 0 0 0.25em 0;
}

.blog-card-description:hover .blog-card h2 {
    color: var(--primary-color);
}

/* Ensure smaller font size for categories and info inside blog cards */
.blog-card .blog-card-categories,
.blog-card .blog-card-info {
    font-size: 0.8rem;
    line-height: 1;
}

@media (max-width: 768px) {
    .blog-card .blog-card-categories,
    .blog-card .blog-card-info {
        font-size: 0.6rem;
    }
}

/* Blog card images should be square (no rounded corners or shadows) */






.blog-card-link .profile-card-image img {
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
    display: block;
}

.blog-card-link .profile-card-image {
    margin: 0;
    padding: 0;
    align-items: stretch;
}

/* Tighter spacing for blog index title */
.page-content h1.blog-index-title {
    margin-bottom: 0.25em;
    line-height: 1.1;
}
