/* =============================================================================
   HALLERMANN CONSULTING - MASTER CSS
   Modern, Mobile-First, Performance-Optimized Stylesheet by Paddy
   ============================================================================= */

/* -----------------------------------------------------------------------------
   @FONT-FACE RULES (THESE MUST BE AT THE VERY TOP, OUTSIDE ANY SELECTOR FOR SPEED)
   ----------------------------------------------------------------------------- */

/* 1. Inter Regular (400) - Normal Style: For body text with location preload */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    src: url('../assets/fonts/inter-v19-latin-regular.woff2') format('woff2');
    font-display: swap; /* Keeps text visible during load */
}

/* 2. Inter Bold (700) - Normal Style: Essential for headings */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    src: url('../assets/fonts/inter-v19-latin-700.woff2') format('woff2');
    font-display: swap;
}

/* 3. Inter Regular (400) - Italic Style: For <em> or `font-style: italic` on regular text */
@font-face {
    font-family: 'Inter';
    font-style: italic; /* IMPORTANT: This distinguishes it from the normal style */
    font-weight: 400;
    src: url('../assets/fonts/inter-v19-latin-italic.woff2') format('woff2');
    font-display: swap;
}

/* Inter Medium (500) - Normal Style */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    src: url('../assets/fonts/inter-v19-latin-500.woff2') format('woff2');
    font-display: swap;
}

/* Inter Medium (500) - Italic Style */
@font-face {
    font-family: 'Inter';
    font-style: italic;
    font-weight: 500;
    src: url('../assets/fonts/inter-v19-latin-500italic.woff2') format('woff2');
    font-display: swap;
}

/* Inter Bold (700) - Italic Style */
@font-face {
    font-family: 'Inter';
    font-style: italic;
    font-weight: 700;
    src: url('../assets/fonts/inter-v19-latin-700italic.woff2') format('woff2');
    font-display: swap;
}

/* -----------------------------------------------------------------------------
   CSS CUSTOM PROPERTIES (THIS SECTION AND ALL VARIABLES MUST REMAIN INSIDE :root)
   ----------------------------------------------------------------------------- */
:root {
    /* Colors */
    --color-black: #000000;
    --color-white: #FFFFFF;
    --color-grey-dark: #333333;
    --color-grey-medium: #555555;
    --color-grey-light: #757575;
    --color-grey-lighter: #888888;
    --color-grey-line: #E0E0E0;
    --color-grey-bg: #F8F9FA;
    --color-grey-card: #FFFFFF;
    --color-primary: #a8a8a8;
    --color-primary-hover: #8a8787;
    --color-footer-bg: #595a5c;
    --color-focus: #eecd0e;
    --color-focus-ring: rgba(47, 75, 140, 0.15);
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 700;

    /* Spacing */
    --spacing-xs: 0.25rem;    /* 4px */
    --spacing-sm: 0.5rem;     /* 8px */
    --spacing-md: 1rem;       /* 16px */
    --spacing-lg: 1.5rem;     /* 24px */
    --spacing-xl: 2rem;       /* 32px */
    --spacing-2xl: 2.5rem;    /* 40px */
    --spacing-3xl: 3rem;      /* 48px */
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 50%;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 6px 16px rgba(0, 0, 0, 0.09);
    --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.1);
    
    /* Layout */
    --max-width-sm: 640px;
    --max-width-md: 768px;
    --max-width-lg: 1024px;
    --max-width-xl: 1200px;
    --header-height: 80px;
    --footer-height: 60px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* -----------------------------------------------------------------------------
   RESET & BASE STYLES (These must be placed after :root or ill get errors)
   ----------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-weight: var(--font-weight-normal);
    line-height: 1.6;
    color: var(--color-grey-medium);
    background-color: var(--color-white);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.font-loading {
    font-family: sans-serif;
}

/* -----------------------------------------------------------------------------
   TYPOGRAPHY UTILITIES (These are correctly placed)
   ----------------------------------------------------------------------------- */
.title-paint {
    color: var(--color-black);
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    margin: 0;
}

.text-paint {
    color: var(--color-grey-medium);
    line-height: 1.6;
    margin: 0;

}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* -----------------------------------------------------------------------------
   HEADER STYLES
   ----------------------------------------------------------------------------- */
/* --- Header Shell: ensure horizontal layout and space for centering --- */

.header-shell {
    display: flex;
    flex-direction: column; /* Stack branding and nav vertically */
    align-items: center;    /* Center all header children horizontally */
    padding: 1rem 2rem;
    background: #fff;
}

.header-shell-critical {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--color-grey-line);
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 1;
    min-width: 0;
}

.header-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.header-logo {
    height: 40px;
    width: auto;
    flex-shrink: 0;
}

.site-title-text {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-black);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

/* Navigation */

/* --- Navigation: center links horizontally --- */

.nav-shell {
    display: flex;
    justify-content: center; /* Center menu links in nav-shell */
    gap: 2rem;               /* Space between menu items */
    margin-top: 0.75rem;     /* Adds spacing between logo/branding and menu */
    width: 100%;
}

.nav-link-paint {
    color: var(--color-primary-hover);
    text-decoration: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-weight: var(--font-weight-medium);
    transition: background-color var(--transition-fast), color var(--transition-fast);
    white-space: nowrap;
}

.nav-link-paint:hover {
    background-color: var(--color-grey-lighter);
    color: var(--color-white);
}

.nav-link-paint.active {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast);
    z-index: 1001;
}

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

.hamburger-icon {
    width: 100%;
    height: 3px;
    background-color: var(--color-grey-light);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.hamburger:hover .hamburger-icon {
    background-color: var(--color-white);
}

/* -----------------------------------------------------------------------------
   MAIN CONTENT STYLES
   ----------------------------------------------------------------------------- */
.main-shell {
    flex: 1;
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xl);
}

.main-shell-critical {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-md);
}

/* Image Areas */
.image-area {
    text-align: center;
    width: 100%;
}

.image-area svg {
    max-width: 100%;
    height: auto;
    width: 250px;
    height: 250px;
    border-radius: var(--radius-lg);
    display: block;
    margin: 0 auto;
}

.image-area-critical {
    text-align: center;
}

.image-area-critical svg {
    max-width: 90%;
    width: 250px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Content Boxes */
.content-box,
.content-box-critical {
    background-color: var(--color-grey-bg);
    padding: var(--spacing-xl) var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
}

.content-box-critical h2 {
    margin-top: 0;
    font-size: 1.4rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-black);
}

.content-box-critical p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* -----------------------------------------------------------------------------
   PAGE-SPECIFIC CONTAINERS
   ----------------------------------------------------------------------------- */

/* Home Page */
.top-section-container,
.middle-section-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    width: 100%;
    max-width: var(--max-width-xl);
}

.seo-first-paint-box,
.posts-summary-box,
.articles-summary-box,
.cta-box {
    background-color: var(--color-grey-bg);
    padding: var(--spacing-xl) var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.seo-first-paint-box h2,
.posts-summary-box h2,
.articles-summary-box h2,
.cta-box h2 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-lg);
    color: var(--color-black);
    font-weight: var(--font-weight-bold);
}

/* Articles Page */

/* Article Carousel Styles */
.articles-carousel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2rem 0 1rem 0;
}
.articles-carousel {
    width: 100%;
    min-height: 220px;
}
.articles-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}
.articles-page-nav {
    font-size: 2rem;
    border: none;
    background: none;
    cursor: pointer;
    color: #4b5563;
    transition: color 0.2s;
}
.articles-page-nav:hover {
    color: #1f2937;
}
.articles-page-indicator .articles-page-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin: 0 4px;
    border-radius: 50%;
    background: #d1d5db;
    transition: background 0.2s;
}
.articles-page-indicator .articles-page-dot.active {
    background: #fec01c;
}

.articles-main-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    max-width: var(--max-width-xl);
    width: 100%;
}

.articles-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.articles-header h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-black);
    font-weight: var(--font-weight-bold);
}

.articles-header p {
    font-size: 1.1rem;
    color: var(--color-grey-medium);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.articles-content-wrapper {
    display: flex;
    gap: var(--spacing-3xl);
    align-items: flex-start;
}

.articles-image-section {
    flex: 0 0 40%;
}

.articles-content-section {
    flex: 1;
}

.articles-list-container {
    background-color: var(--color-grey-bg);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.articles-list-container h2 {
    margin-top: 0;
    margin-bottom: var(--spacing-xl);
    font-size: 1.8rem;
    color: var(--color-black);
    font-weight: var(--font-weight-bold);
}

/* Featured Article */
.featured-article {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    color: var(--color-white);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-xl);
    position: relative;
    overflow: hidden;
}

.featured-article-badge {
    position: absolute;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-article-title {
    font-size: 1.6rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-white);
}

.featured-article-title a {
    color: var(--color-white);
    text-decoration: none;
}

.featured-article-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
    opacity: 0.9;
}

/* Article List */

.articles-cards-wrapper {
    min-height: 500px; /* adjust based on your longest possible set */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.article-item {
    min-height: 240px;
    max-height: 280px;   /* adjust as needed */
    overflow: hidden;    /* optional: hides overflow text */
    display: flex;
    flex-direction: column;
}

.article-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.article-number {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius-full);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-bold);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.article-content {
    flex-grow: 1;
}

.article-title {
    font-size: 1.3rem;
    line-height: 1.4;
    font-weight: var(--font-weight-bold);
    color: var(--color-black);
    margin: 0 0 var(--spacing-sm) 0;
}

.article-title a {
    color: var(--color-black);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.article-meta {
    color: var(--color-grey-light);
    font-size: 0.85rem;
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
}

.article-excerpt {
    color: var(--color-grey-medium);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Article Tags */
.article-tags,
.featured-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.article-tag {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: var(--font-weight-medium);
}

.article-item .article-tag {
    background-color: var(--color-grey-line);
    color: var(--color-grey-medium);
    margin-top: var(--spacing-lg);

}

/* Posts Page */
.posts-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    max-width: var(--max-width-xl);
    width: 100%;
}

.posts-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.posts-header h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-black);
    font-weight: var(--font-weight-bold);
}

.posts-header p {
    font-size: 1.1rem;
    color: var(--color-grey-medium);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.posts-content-wrapper {
    display: flex;
    gap: var(--spacing-3xl);
    align-items: flex-start;
}

.posts-image-section {
    flex: 0 0 40%;
}

.posts-content-section {
    flex: 1;
}

.posts-list-container {
    background-color: var(--color-grey-bg);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.post-item {
    display: flex;
    gap: var(--spacing-lg);
    align-items: flex-start;
    padding: var(--spacing-lg);
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.post-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.post-number {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius-full);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-bold);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.post-content {
    flex-grow: 1;
}

.post-title {
    font-size: 1.3rem;
    line-height: 1.4;
    font-weight: var(--font-weight-bold);
    color: var(--color-black);
    margin: 0 0 var(--spacing-sm) 0;
}

.post-title a {
    color: var(--color-black);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.post-meta {
    color: var(--color-grey-light);
    font-size: 0.85rem;
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
}

.post-excerpt {
    color: var(--color-grey-medium);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Services Page */
.services-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    max-width: var(--max-width-xl);
    width: 100%;
}

.services-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.services-header h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-black);
    font-weight: var(--font-weight-bold);
}

.services-header p {
    font-size: 1.1rem;
    color: var(--color-grey-medium);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.services-content-wrapper {
    display: flex;
    gap: var(--spacing-3xl);
    align-items: flex-start;
}

.services-image-section {
    flex: 0 0 40%;
}

.services-content-section {
    flex: 1;
}

.services-text-area {
    background-color: var(--color-grey-bg);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-height: 400px;
    position: relative;
}

.service-page {
    height: 100%;
}

.service-page h2 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-lg);
    color: var(--color-black);
    font-weight: var(--font-weight-bold);
    margin-top: 0;
}

.service-page p {
    color: var(--color-grey-medium);
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: var(--spacing-lg);
}

.service-features {
    margin-top: var(--spacing-xl);
}

.service-features h3 {
    color: var(--color-black);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
}

.service-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-features li {
    padding: var(--spacing-xs) 0;
    color: var(--color-grey-medium);
    position: relative;
    padding-left: var(--spacing-lg);
}

.service-features li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
}

/* Services Pagination */
.services-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--color-grey-line);
}

.page-nav {
    background: none;
    border: 1px solid var(--color-grey-line);
    color: var(--color-grey-light);
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.page-nav:hover {
    background: var(--color-grey-bg);
}

.page-indicator {
    display: flex;
    gap: var(--spacing-sm);
}

.page-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--color-grey-line);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.page-dot.active {
    background: var(--color-black);
}

/* About Page */
.about-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    max-width: var(--max-width-xl);
    width: 100%;
}

.about-image-section {
    flex: 1;
}

.about-content-section {
    flex: 2;
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.about-text-area {
    background-color: var(--color-grey-bg);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    flex: 1;
}

.about-page {
    height: 100%;
}

.about-page h2 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-lg);
    color: var(--color-black);
    font-weight: var(--font-weight-bold);
    margin-top: 0;
}

.about-page p {
    color: var(--color-grey-medium);
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: var(--spacing-lg);
}

.about-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
}

/* Contact Page */
.contact-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    max-width: var(--max-width-xl);
    width: 100%;
}

.contact-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.contact-header h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-black);
    font-weight: var(--font-weight-bold);
}

.contact-header p {
    font-size: 1.1rem;
    color: var(--color-grey-medium);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.contact-content-wrapper {
    display: flex;
    gap: var(--spacing-3xl);
    align-items: flex-start;
}

.contact-image-section {
    flex: 0 0 40%;
}

.contact-form-section {
    flex: 1;
}

.contact-form-area {
    background-color: var(--color-grey-bg);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.contact-form-area h2 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-lg);
    color: var(--color-black);
    font-weight: var(--font-weight-bold);
    margin-top: 0;
}

* -------- CONTACT FORM--------- */

/* Wrapper for each form field (label + input) */

.contact-form-field {
    margin-bottom: var(--spacing-lg);
}

/* Form Labels */

.contact-form-field label {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
    color: var(--color-grey-dark);
    letter-spacing: 0.01em;
}

/* Inputs, textarea, and select: consistent modern look */

.contact-form-field input[type="text"],
.contact-form-field input[type="email"],
.contact-form-field input[type="tel"],
.contact-form-field select,
.contact-form-field textarea {
    width: 100%;
    padding: var(--spacing-md);
    font-size: 1.08rem;
    font-family: var(--font-family);
    border: 1.5px solid var(--color-grey-line);
    border-radius: 1.7em; /* MODERN: rounder pill-like edges */
    background-color: var(--color-white);
    color: var(--color-grey-dark);
    transition: border-color 0.18s, box-shadow 0.18s;
    box-shadow: 0 1px 8px 0 rgba(60,60,60,0.04);
    appearance: none;           /* Remove OS default style */
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Dropdown (select) - add custom arrow, modern look */

.contact-form-field select {
    background-image: url('data:image/svg+xml;utf8,<svg width="18" height="18" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 8L10 12L14 8" stroke="%239a9a9a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat: no-repeat;
    background-position: right 1.2rem center;
    background-size: 1.2em;
    padding-right: 2.7em; /* room for arrow */
    cursor: pointer;
}

/* Inputs and textarea on focus */

.contact-form-field input:focus,
.contact-form-field select:focus,
.contact-form-field textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-light);
    background-color: #f8fafc;
}

/* Textarea specifics */

.contact-form-field textarea {
    min-height: 130px;
    max-height: 340px;
    resize: vertical;
}

/* Submit Button */

.contact-form-submit {
    background: linear-gradient(90deg, #fec01c 0%, #fee59b 100%);
    color: #222;
    font-family: var(--font-family);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.95em 2.5em;
    border: none;
    border-radius: 1.7em;
    cursor: pointer;
    transition: background 0.19s, transform 0.14s, box-shadow 0.17s;
    box-shadow: 0 2px 18px 0 rgba(254,192,28,0.14);
    letter-spacing: 0.01em;
    margin-top: 0.2em;
}

.contact-form-submit:hover,
.contact-form-submit:focus {
    background: linear-gradient(90deg, #f7b015 0%, #ffd474 100%);
    color: #191919;
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 4px 20px 0 rgba(254,192,28,0.18);
}

/* Center the submit button on all screens */

.contact-form-button-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: var(--spacing-lg);
}

/* End of Contact Form CSS */

.simple-social {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--color-grey-line);
    text-align: center;
}

.simple-social p {
    color: var(--color-grey-medium);
    font-size: 0.9rem;
    margin: 0 0 var(--spacing-md) 0;
}

.simple-social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
}

.simple-social-links a {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--color-grey-line);
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast);
}

.simple-social-links a:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}
*---------- FOOTER STYLES HALLERMANN CONSULTING-------------- */

/* Footer shell: simple, solid background (no gradients!) */

.footer-shell {
    background-color: #232323;      /* Use a deep grey for modern, professional look */
    color: #f8fafc;                 /* Off-white text for readability */
    padding: var(--spacing-2xl) var(--spacing-xl);
    border-top: 1px solid #3a3a3a;  /* Subtle line for separation */
    margin-top: auto;
    width: 100%;
}

/* Small footer critical bar (copyright, etc.) */

.footer-shell-critical {
    padding: var(--spacing-md);
    border-top: 1px solid #3a3a3a;
    text-align: center;
    font-size: 0.98rem;
    background: none;               /* Remove any backgrounds/gradients */
    color: #b0b0b0;
}

/* Main footer text */

.footer-shell .text-paint {
    color: #f8fafc;
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

/* Footer content wrap: column on mobile, center everything */

.footer-content-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

/* Newsletter input and button consistent with site */

.subscribe-form-minimal input[type="email"] {
    border-radius: 2em;
    border: 1.5px solid #e2e8f0;
    padding: 0.9em 1.3em;
    font-size: 1rem;
    margin-right: 0.6em;
    background: #fff;
    color: #222;
}

.subscribe-form-minimal button {
    background: #fec01c;
    color: #181818;
    border: none;
    border-radius: 2em;
    font-size: 1rem;
    padding: 0.9em 1.8em;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(254,192,28,0.08);
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.14s;
}

.subscribe-form-minimal button:hover {
    background: #f7b015;
    color: #1a1a1a;
    box-shadow: 0 4px 18px rgba(254,192,28,0.18);
}

/* Social icons: SVGs bigger, on one line, with hover effect */

.social-icons-wrap {
    display: flex;
    gap: 1.6em;
    margin-top: var(--spacing-lg);
    justify-content: center;
}

.social-icon {
    width: 2.1em;
    height: 2.1em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border-radius: 50%;
    transition: background 0.15s, transform 0.13s;
    color: #fec01c;
    fill: #fec01c;
    font-size: 1.6em;
}

.social-icon:hover,
.social-icon:focus {
    background: #2b2b2b;
    transform: scale(1.08);
}

/* -----------------------------------------------------------------------------
   RESPONSIVE DESIGN - MOBILE FIRST
   ----------------------------------------------------------------------------- */

/* Mobile First (up to 768px) */

@media (max-width: 768px) {
    /* Hamburger menu: always visible on mobile */
    .hamburger {
        display: flex;
        position: relative;
        z-index: 1001;
    }

    /* Nav menu: hidden by default, shows when .active is added */
    .nav-shell {
        display: none;                    /* Hide by default */
        flex-direction: column;           /* Stack links vertically */
        align-items: center;              /* Center links horizontally */
        width: 90vw;                      /* 90% of viewport width */
        left: 5vw;                        /* Center horizontally */
        top: var(--header-height);
        background-color: var(--color-grey-lighter);
        position: absolute;
        padding: var(--spacing-lg) 0;
        border-top: 1px solid var(--color-grey-line);
        box-shadow: var(--shadow-xl);
        z-index: 999;
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        transition: display 0.2s, opacity 0.2s;
    }

    /* Show menu when active */
    .nav-shell.active {
        display: flex;
    }

    /* Centered menu links with spacing and border */
    .nav-shell .nav-link-paint {
        text-align: center;
        padding: var(--spacing-md) 0;
        width: 100%;
        border-bottom: 1px solid #F0F0F0;
        color: var(--color-grey-dark); /* Use dark grey variable for consistency */
        font-size: 1.15rem;
        background: transparent;
    }

    /* Remove border from last link */
    .nav-shell .nav-link-paint:last-child {
        border-bottom: none;
    }

    /* Optional: Slightly bigger touch area for mobile nav links */
    .nav-shell .nav-link-paint {
        min-height: 48px;
    }
}

/* Header Container: center everything horizontally */

.header-shell {
    display: flex;
    justify-content: center;    /* Center all children horizontally */
    align-items: center;        /* Vertically center */
    flex-wrap: nowrap;
    gap: 2rem;                  /* Space between site-branding, nav, and hamburger */
    padding: 1rem 2rem;
    background: #fff;
}

/* Site branding stays compact, no forced growth */
.site-branding {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

/* Nav shell (navigation links): center within header */

.nav-shell {
    display: flex;
    flex: 0 1 auto;           /* Shrink/grow as needed */
    justify-content: center;  /* Center nav links */
    align-items: center;
    gap: 2rem;
}

/* Make sure hamburger and logo stay sized */

.header-logo,
.hamburger {
    flex-shrink: 0;
}

.site-title-text {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .header-logo {
        height: 25px;
        flex-shrink: 0;
    }

    .hamburger {
        flex-shrink: 0;
    }

    /* Main Content */
    .main-shell {
        padding: var(--spacing-md);
        gap: var(--spacing-lg);
    }

    /* Page Headers */

    .articles-header h1,
    .posts-header h1,
    .services-header h1,
    .contact-header h1 {
        font-size: 2rem;
    }

    .articles-header p,
    .posts-header p,
    .services-header p,
    .contact-header p {
        font-size: 1rem;
        padding: 0 var(--spacing-lg);
    }

    /* Content Wrappers */
    .articles-content-wrapper,
    .posts-content-wrapper,
    .services-content-wrapper,
    .contact-content-wrapper {
        flex-direction: column;
        gap: var(--spacing-xl);
    }

    .articles-image-section,
    .posts-image-section,
    .services-image-section,
    .contact-image-section {
        flex: none;
        position: static;
    }

    /* Content Areas */
    .articles-list-container,
    .posts-list-container,
    .services-text-area,
    .contact-form-area {
        padding: var(--spacing-xl) var(--spacing-lg);
    }

    /* Article Items */
    .article-item,
    .post-item {
        padding: var(--spacing-lg);
        gap: var(--spacing-md);
        margin-bottom: var(--spacing-lg);
    }

    .article-number,
    .post-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .article-title,
    .post-title {
        font-size: 1.2rem;
    }

    /* Featured Article */
    .featured-article {
        padding: var(--spacing-xl);
    }

    .featured-article-title {
        font-size: 1.4rem;
    }

    /* Services */
    .services-text-area {
        min-height: 300px;
    }

    /* Footer */
    .footer-shell {
        padding: var(--spacing-xl) var(--spacing-lg);
    }

    .subscribe-form-minimal {
        flex-direction: column;
        align-items: stretch;
        padding: var(--spacing-lg);
    }

    .subscribe-form-minimal input[type="email"],
    .subscribe-form-minimal button {
        width: 100%;
    }

    .simple-social-links {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
    }

/* Small Mobile (up to 500px) */

@media (max-width: 500px) {
    .article-item,
    .post-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .article-number,
    .post-number {
        margin-bottom: var(--spacing-sm);
    }

    .contact-form-area {
        max-width: 500px;
    }
}

/* Tablet (600px - 968px) */

@media (min-width: 600px) {
    .main-shell {
        padding: var(--spacing-xl) var(--spacing-2xl);
        gap: var(--spacing-xl);
    }

    .top-section-container {
        flex-direction: row;
        align-items: flex-start;
        gap: var(--spacing-2xl);
        max-width: var(--max-width-lg);
    }

    .image-area {
        flex: 0 0 30%;
        max-width: 300px;
        text-align: left;
    }

    .image-area svg {
        width: 100%;
        height: auto;
        margin: 0;
    }

    .seo-first-paint-box {
        flex: 1;
        max-width: 70%;
        padding: var(--spacing-2xl);
    }

    .middle-section-container {
        flex-direction: row;
        gap: var(--spacing-xl);
        max-width: var(--max-width-lg);
    }

    .posts-summary-box,
    .articles-summary-box {
        flex: 1;
        padding: var(--spacing-2xl);
    }

    .cta-box {
        max-width: var(--max-width-lg);
        padding: var(--spacing-2xl);
    }

    .content-box h2.title-paint {
        font-size: 2rem;
        margin-bottom: var(--spacing-xl);
    }
}

/* Desktop (769px and up) */

@media (min-width: 769px) {
    .header-shell {
        justify-content: flex-start;
        gap: var(--spacing-xl);
        padding: var(--spacing-lg) var(--spacing-2xl);
    }

    .header-shell h1.title-paint {
        margin: 0;
    }

    .nav-shell {
        justify-content: flex-start;
        display: flex;
        position: static;
        box-shadow: none;
        border-top: none;
        gap: 0.75rem;
        background: transparent;
        padding: 0;
        width: auto;
    }

    .nav-shell .nav-link-paint {
        color: var(--color-primary-hover);
        border-bottom: none;
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .hamburger {
        display: none !important;
    }

    .header-logo {
        height: 50px;
    }

    .site-title-text {
        font-size: 1.5rem;
    }

    .contact-content-wrapper {
        align-items: center; /* Center items vertically in the row */
    }

    /* About Page Desktop Layout */
    .about-container {
        flex-direction: row;
        gap: var(--spacing-3xl);
    }

    .about-image-section {
        flex: 1;
    }

    .about-content-section {
        flex: 2;
    }

    .about-pagination {
        justify-content: flex-start;
    }

    /* Article and Post Desktop Improvements */
    .article-content h3,
    .post-title {
        font-size: 1.5rem;
    }

    .article-meta,
    .post-meta {
        font-size: 0.9rem;
    }
}

/* Large Desktop (1024px and up) */
@media (min-width: 1024px) {
    .main-shell {
        gap: var(--spacing-2xl);
    }

    .top-section-container {
        gap: var(--spacing-3xl);
        max-width: var(--max-width-xl);
    }

    .image-area {
        max-width: 350px;
    }

    .seo-first-paint-box {
        padding: var(--spacing-2xl) var(--spacing-3xl);
    }

    .middle-section-container {
        gap: var(--spacing-2xl);
        max-width: var(--max-width-xl);
    }

    .posts-summary-box,
    .articles-summary-box {
        padding: var(--spacing-2xl) var(--spacing-3xl);
    }

    .cta-box {
        max-width: var(--max-width-xl);
        padding: var(--spacing-2xl) var(--spacing-3xl);
    }

    .content-box h2.title-paint {
        font-size: 2.2rem;
    }

    /* Sticky positioning for image sections */

    .articles-image-section,
    .posts-image-section,
    .services-image-section,
    .contact-image-section {
        position: sticky;
        top: var(--spacing-lg);
    }
}

/* Extra Large Desktop (1280px and up) */

@media (min-width: 1280px) {
    .top-section-container,
    .middle-section-container,
    .cta-box,
    .articles-main-container,
    .posts-container,
    .services-container,
    .about-container,
    .contact-container {
        max-width: var(--max-width-xl);
    }

    .image-area {
        max-width: 400px;
    }
}

/* -----------------------------------------------------------------------------
   PERFORMANCE & ACCESSIBILITY OPTIMIZATIONS
   ----------------------------------------------------------------------------- */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-grey-light: #666666;
        --color-grey-medium: #444444;
        --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.2);
        --shadow-lg: 0 6px 16px rgba(0, 0, 0, 0.25);
        --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.3);
    }
}

/* Focus styles for better accessibility */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible,
.nav-link-paint:focus-visible,
.page-nav:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .hamburger,
    .nav-shell,
    .footer-shell,
    .subscribe-form-minimal,
    .social-icons-wrap,
    .services-pagination,
    .about-pagination {
        display: none !important;
    }

    .main-shell {
        padding: 0;
    }

    .article-item,
    .post-item {
        box-shadow: none;
        border: 1px solid var(--color-grey-line);
    }
}

/* -----------------------------------------------------------------------------
   UTILITY CLASSES
   ----------------------------------------------------------------------------- */

/* Text utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Spacing utilities */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-sm { margin-top: var(--spacing-sm); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mb-md { margin-bottom: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-lg { margin-bottom: var(--spacing-lg); }

/* Display utilities */
.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }

/* Flexbox utilities */
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* Width utilities */
.w-full { width: 100%; }
.max-w-sm { max-width: var(--max-width-sm); }
.max-w-md { max-width: var(--max-width-md); }
.max-w-lg { max-width: var(--max-width-lg); }
.max-w-xl { max-width: var(--max-width-xl); }

/* -----------------------------------------------------------------------------
   CASE STUDIES PAGE STYLES (UPDATED)
   ----------------------------------------------------------------------------- */

.case-studies-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    max-width: var(--max-width-xl);
    width: 100%;
}

.case-studies-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.case-studies-header h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-black);
    font-weight: var(--font-weight-bold);
}

.case-studies-header p {
    font-size: 1.1rem;
    color: var(--color-grey-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.case-study-row {
    display: flex;
    gap: var(--spacing-3xl);
    margin-bottom: var(--spacing-3xl);
    align-items: flex-start;
    min-height: 500px; /* Fixed minimum height to prevent jumping */
}

.case-study-row:last-child {
    margin-bottom: 0;
}

.case-image-section {
    flex: 0 0 35%;
}

.case-image-container {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid var(--color-grey-line);
}

.case-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-svg {
    width: 80%;
    height: 70%;
    opacity: 0.6;
}

.nav-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-md);
}

.nav-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-grey-line);
    background: var(--color-white);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 1.2rem;
    color: var(--color-grey-light);
}

.nav-btn:hover {
    border-color: var(--color-grey-medium);
    color: var(--color-grey-medium);
    box-shadow: var(--shadow-sm);
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.case-indicator {
    display: flex;
    gap: var(--spacing-sm);
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--color-grey-line);
    cursor: pointer;
    transition: var(--transition-fast);
}

.indicator-dot.active {
    background: var(--color-black);
}

.case-content-section {
    flex: 1;
    min-height: 450px; /* Ensure consistent height */
    display: flex;
    flex-direction: column;
}

.case-study-header {
    margin-bottom: var(--spacing-lg);
}

.case-study-title {
    font-size: 1.8rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-sm);
    color: var(--color-black);
    line-height: 1.3;
}

.case-study-meta {
    font-size: 0.9rem;
    color: var(--color-grey-light);
    font-weight: var(--font-weight-medium);
}

.case-study-summary {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-grey-medium);
    margin-bottom: var(--spacing-xl);
}

.case-benefits {
    margin-bottom: var(--spacing-xl);
}

.case-benefits h4 {
    font-size: 1rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-md);
    color: var(--color-black);
}

.benefits-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    font-size: 0.9rem;
    color: var(--color-grey-medium);
    position: relative;
    padding-left: 1.5rem;
}

.benefits-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: var(--font-weight-bold);
}

.read-more-btn {
    background: var(--color-grey-dark);
    color: var(--color-white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
    margin-top: auto; /* Push button to bottom */
}

.read-more-btn:hover {
    background: var(--color-grey-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.featured-section {
    margin-top: var(--spacing-3xl);
    padding-top: var(--spacing-3xl);
    border-top: 2px solid var(--color-grey-line);
}

.featured-header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
}

.featured-header h2 {
    font-size: 2rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-sm);
    color: var(--color-black);
}

.featured-header p {
    color: var(--color-grey-light);
    font-size: 1rem;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--color-white);
    max-width: 800px;
    max-height: 90vh;
    width: 90%;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: var(--spacing-xl) var(--spacing-xl) 0;
    position: relative;
}

.modal-close {
    position: absolute;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-grey-light);
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: #f3f4f6;
    color: var(--color-grey-medium);
}

.modal-body {
    padding: var(--spacing-xl);
    overflow-y: auto;
    max-height: calc(90vh - 4rem);
}

.modal-title {
    font-size: 2rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-sm);
    color: var(--color-black);
    line-height: 1.3;
}

.modal-meta {
    font-size: 0.9rem;
    color: var(--color-grey-light);
    margin-bottom: var(--spacing-xl);
    font-weight: var(--font-weight-medium);
}

.modal-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-grey-medium);
}

.modal-text h3 {
    font-size: 1.3rem;
    font-weight: var(--font-weight-bold);
    margin: var(--spacing-xl) 0 var(--spacing-md);
    color: var(--color-black);
}

.modal-text p {
    margin-bottom: var(--spacing-lg);
}

.modal-text ul {
    margin: var(--spacing-md) 0 var(--spacing-lg) var(--spacing-lg);
}

.modal-text li {
    margin-bottom: var(--spacing-sm);
}

/* Mobile Responsive Fixes */
@media (max-width: 968px) {
    .case-studies-container {
        padding: 0 var(--spacing-md); /* Add padding to prevent overflow */
    }
    
    .case-study-row {
        flex-direction: column;
        gap: var(--spacing-xl);
        min-height: auto; /* Remove fixed height on mobile */
        margin-left: 0;
        margin-right: 0;
    }
    
    .case-image-section {
        flex: none;
        width: 100%;
        max-width: 100%;
    }
    
    .case-content-section {
        min-height: auto; /* Remove fixed height on mobile */
        width: 100%;
    }
    
    .case-studies-header h1 {
        font-size: 2rem;
    }
    
    .case-study-title {
        font-size: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: var(--spacing-md);
    }
    
    .modal-body {
        padding: var(--spacing-lg);
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    /* Ensure benefits list doesn't overflow */
    .benefits-list {
        grid-template-columns: 1fr;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Center navigation controls */
    .nav-controls {
        justify-content: center;
        gap: var(--spacing-md);
    }
}

@media (max-width: 640px) {
    .case-studies-container {
        padding: 0 var(--spacing-sm); /* Tighter padding on very small screens */
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .case-study-row {
        margin-left: 0;
        margin-right: 0;
        padding: 0;
        width: 100%;
    }
    
    .case-image-section,
    .case-content-section {
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .benefits-list {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
        margin: 0;
        padding: 0;
    }
    
    .nav-controls {
        justify-content: center;
        gap: var(--spacing-md);
        width: 100%;
    }
    
    /* Ensure text doesn't overflow */
    .case-study-title,
    .case-study-summary,
    .modal-title {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* ============================================================================
   CONTACT FORM - Clean Modern Layout and Consistent Field Styling
   ============================================================================ */

/* Form container */

.contact-form-area {
    max-width: 430px;
    margin: 0 auto;
    background: #fff;
    padding: 2rem 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 4px 32px 0 rgba(40,40,80,0.07);
}

.contact-form-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.25rem;
}

.contact-form-field label {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.55rem;
    color: #292929;
    letter-spacing: .02em;
    font-family: 'Inter', sans-serif;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea,
.contact-form select {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    padding: 0.85rem 1rem;
    border: 1.5px solid #ececec;
    border-radius: 0.7rem;
    background: #fafafd;
    color: #222;
    transition: border .18s;
    outline: none;
    box-shadow: none;
    margin-top: 2px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    border-color: #fec01c; /* Hallermann yellow */
    background: #fffbe8;
}

.contact-form textarea {
    min-height: 110px;
    max-height: 260px;
    resize: vertical;
}

.contact-form select {
    /* Custom arrow for select */
    background-image:
        url("data:image/svg+xml;utf8,<svg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M6 8L10 12L14 8' stroke='%23939393' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 1.15rem;
    padding-right: 2.2rem;
    cursor: pointer;
}

/* Remove ugly focus for select on Windows */

.contact-form select:focus {
    outline: none;
}

.contact-form-submit {
    background: #fec01c;
    color: #272727;
    font-size: 1.09rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    border: none;
    border-radius: 0.7rem;
    padding: 0.95rem 2.2rem;
    cursor: pointer;
    box-shadow: 0 2px 8px 0 rgba(230,190,30,0.09);
    transition: background 0.14s, color 0.14s;
    margin-top: 0.3rem;
}

.contact-form-submit:hover,
.contact-form-submit:focus {
    background: #ffd670;
    color: #000;
}

@media (max-width: 600px) {
    .contact-form-area {
        padding: 1.1rem 0.5rem;
        border-radius: 1rem;
    }
}

/* Table of Contents Card Style */
.toc-container {
    background: #fff;
    border-radius: 1.2rem;
    box-shadow: 0 4px 32px rgba(40,40,60,0.06);
    max-width: 500px;
    margin: 2.5rem auto 2rem auto;
    padding: 2rem 2.2rem;
    font-family: 'Inter', sans-serif;
    color: #232323;
    /* For smaller screens, add breathing room */
    width: 100%;
    transition: box-shadow 0.18s;
}

.toc-container:hover {
    box-shadow: 0 8px 36px rgba(40,40,60,0.12);
}

.toc-title {
    font-weight: 700;
    font-size: 1.13rem;
    margin-bottom: 1.15rem;
    color: #313131;
    letter-spacing: 0.01em;
}

.toc-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 0.55em;
    padding-left: 0.18em;
    font-size: 1.04rem;
}

.toc-list li a {
    color: #222; /* Use your main text color */
    text-decoration: none;
    border-bottom: 1px dotted #fec01c;
    transition: color 0.15s, border-bottom 0.18s;
}

.toc-list li a:hover,
.toc-list li a:focus {
    color: #fec01c;
    border-bottom: 2px solid #fec01c;
    background: #fffbe7;
    outline: none;
    border-radius: 0.3em;
}

/* Optional: subtle divider after TOC */

.toc-container::after {
    content: "";
    display: block;
    height: 1px;
    background: #ececec;
    margin: 2rem 0 0 0;
    width: 70%;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 600px) {
    .toc-container {
        padding: 1.1rem 1rem;
        font-size: 0.99rem;
        margin: 1.5rem 0 1.5rem 0;
        max-width: 99vw;
    }
    .toc-title {
        font-size: 1.01rem;
    }
}

.carousel-card {
    display: flex;
    flex-direction: column;
    min-height: 420px; /* or whatever your minimum box height is */
    background: #fff;
    border-radius: 1.25em;
    box-shadow: 0 6px 32px rgba(80,80,100,0.07);
    padding: 2.2em 2.1em 2.6em 2.1em;
    position: relative;
}

.carousel-items {
    flex: 1 1 auto;
    /* This fills available space */
}

.carousel-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto; /* Forces to bottom of the card */
    min-height: 38px; /* ensures space even if only 1 page */
}

.posts-page-dot,
.articles-page-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 4px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    transition: background 0.17s;
}

.posts-page-dot.active,
.articles-page-dot.active {
    background: #fec01c;
    box-shadow: 0 0 0 2px #fff, 0 1px 4px #fec01c33;
}

.posts-page-nav,
.articles-page-nav {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.2em;
    padding: 0 8px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.13s;
}

.posts-page-nav:hover,
.articles-page-nav:hover {
    background: #f3f4f6;
    color: #222;
}
/* Full width wrapper matches hero width, centers content */
.articles-cards-wrapper {
    max-width: 1200px;
    margin: 2.5rem auto 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* For visual alignment with hero: */
    box-sizing: border-box;
}

/* Row of article cards, static height, aligned */
.articles-list-row {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    min-height: 300px;   /* adjust as needed */
    justify-content: flex-start;
    align-items: stretch;
}

/* Each article card: flex: 1 ensures equal widths, static min-height */
.article-item {
    flex: 1 1 0;
    max-width: 360px;
    min-width: 0;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 1.1rem;
    box-shadow: 0 2px 18px rgba(40,46,60,0.06);
    margin-bottom: 0;
    /* Consistent internal padding */
    padding: 1.4rem 1.2rem 1.1rem 1.4rem;
    transition: box-shadow .17s;
}

.article-item.invisible {
    visibility: hidden; /* Fills the row with blanks if fewer than 3 articles */
}

/* Pagination always at the bottom, centered */
.articles-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.1rem;
    margin: 2.2rem 0 1.5rem 0;
    width: 100%;
}