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

:root {
    --primary-color: #2B5F82;
    --secondary-color: #1e4a66;
    --accent-color: #2B5F82;
    --text-color: #2B5F82;
    --text-light: #4a7a9e;
    --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;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 300;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Nunito Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 500;
}

a {
    color: var(--accent-color);
    text-decoration: underline;
    text-decoration-color: rgba(43, 95, 130, 0.35);
    transition: var(--transition);
}

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
}

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

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

.nav-menu a:hover {
    color: var(--accent-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    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: var(--primary-color);
    font-size: 1.2rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.social-icons a:hover {
    color: var(--secondary-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: var(--white);
    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: var(--text-color);
    text-decoration: none;
}

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

/* 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;
    /* Background is set via inline style */
}

/* 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 */
.intro {
    padding: 60px 20px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.intro p {
    font-size: 1.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: 1200px;
    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(--accent-color);
    color: var(--white);
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
}

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

/* 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(--primary-color);
}

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

.page-content h3 {
    font-size: 1.4rem;
    margin: 30px 0 15px;
    color: var(--secondary-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,
.intro .centered-list {
    text-align: center;
}

.page-content .centered-list ul,
.intro .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,
.intro .headline-style {
    font-size: 1.8rem;
}

.page-content .quote-style,
.intro .quote-style {
    font-size: 1.8rem;
}

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

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

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

/* 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: var(--secondary-color);
    color: var(--white);
    padding: 20px;
    text-align: center;
}

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

/* 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;
    }

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

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

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

    .hero {
        height: 250px;
    }

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

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

/* 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);
}
