/* assets/custom.css */

/* --- Google Font & Global Styles --- */
@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/manrope-v19-latin-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/manrope-v19-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/manrope-v19-latin-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/manrope-v19-latin-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/manrope-v19-latin-800.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
    --dark-blue: #1d3557;
    --medium-blue: #457b9d;
    --light-blue-bg: #f0f4f8;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #fdfdfd;
    --border-color: #e0e5ec;
}

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

body {
    font-family: 'Manrope', sans-serif;
    background-color: var(--light-blue-bg);
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 16px;
}

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    color: var(--dark-blue);
    line-height: 1.2;
    margin-bottom: 0.75em;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
a { text-decoration: none; color: var(--medium-blue); }
a:hover { text-decoration: underline; }
p { margin-bottom: 1em; }
hr { border: 0; border-top: 1px solid var(--border-color); margin: 2em 0; }




/* --- Header & Hero Section --- */
.site-header {
    background: linear-gradient(135deg, var(--medium-blue) 0%, var(--dark-blue) 100%);
    color: var(--text-light);
    position: relative;
   /*
   background-image: url('/assets/bg-start.webp'); 
           overflow: hidden;
    background-size: cover;
    background-position: right;
    background-repeat: no-repeat;
  */

}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 15px 0;
    /* Step 1: Ensure nav is above other elements */
    position: relative;
    z-index: 10;
}

.logo {
    background-color: var(--dark-blue);
    padding: 8px 20px;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
    color: var(--white);
}
.logo:hover { text-decoration: none; }

.nav-links {
    display: flex;
    gap: 25px;
    font-weight: 700;
    align-items: center;
}

.nav-links a {
    color: var(--white);
}

.language-switcher summary {
    list-style: none;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    padding: 5px 10px;
    border-radius: 6px;
}
.language-switcher ul {
    position: absolute;
    background: var(--white);
    list-style: none;
    padding: 5px;
    margin-top: 8px;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    width:10em;
}
.language-switcher ul li a {
    color: var(--dark-blue);
    padding: 5px 10px;
    display: block;
}
.language-switcher ul li a:hover {
    background: var(--light-blue-bg);
    text-decoration: none;
}



.hero-section {
    padding-top: 40px;
    display: flex;
    align-items: center;
}

.hero-text {
    max-width: 50%;
    z-index: 2;
}

.hero-text h1 { color: var(--dark-blue); }
.hero-text p { 
    font-size: 1.45rem; 
    max-width: 450px; 
    color: #ffffff;
    font-weight: 500;
    line-height: 1.5;
}

/* Step 3: Add styling for the new CTA button */
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #0055a5;
    color: var(--white);
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    margin: 0 0 20px 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 85, 165, 0.3);
    position: relative;
    overflow: hidden;
}

.hero-cta::after {
    content: '→';
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.hero-cta:hover::after {
    transform: translateX(4px);
}

.hero-cta:hover {
    background-color: #003d75;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 85, 165, 0.4);
    text-decoration: none;
}

.hero-image {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: left;
}
/* Step 2: Make image visible and scale correctly */
.hero-image img {
    max-height: 100%;
    max-width: 100%;
    height: auto;
}



/* Animate the hero text on page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-page .hero-text h1,
.home-page .hero-text p,
.home-page .hero-cta {
    /* Apply the animation */
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0; /* Start as invisible */
}

/* Stagger the animation for a more dynamic effect */
.home-page .hero-text p {
    animation-delay: 0.2s;
}
.home-page .hero-cta {
    animation-delay: 0.4s;
}




/* --- Overlapping Lab Card & Features --- */
.lab-features-section {
    padding: 0 20px;
    margin-top: -80px;
    position: relative;
    z-index: 5;
}
.lab-card {
    max-width: 550px; background-color: var(--dark-blue); color: var(--white);
    padding: 25px 30px; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: flex; align-items: center; gap: 20px; margin: 0 auto;
}
.lab-card .icon { flex-shrink: 0; width: 48px; height: 48px; color: var(--white); }
.lab-card h2 { font-size: 1.5rem; color: var(--white); margin: 0; }
.lab-card p { font-size: 1rem; opacity: 0.9; margin: 0; }

.features-list { display: flex; justify-content: center; gap: 40px; margin-top: 40px; padding: 20px 0; text-align: center; flex-wrap: wrap; }
.feature-item { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.1rem; }
.feature-item .icon { width: 32px; height: 32px; color: var(--dark-blue); }
.icon svg { width: 100%; height: 100%; fill: currentColor; }

/* --- Main Content & Articles Section --- */
.content-section {
    padding: 0;
}
.content-section .container {
    padding: 40px;
    border-radius: 8px;
}

.page-heading { text-align: center; margin-bottom: 40px; text-transform: uppercase; }

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    /* Increase the gap for more "air" between cards */
    gap: 40px; /* Was 30px */
}
.article-card {
    background-color: var(--white); border: 1px solid var(--border-color);
    border-radius: 12px; padding: 25px; box-shadow: 0 5px 15px rgba(0,0,0,0.05);
     transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none!important;
}
.article-card:hover {
    transform: translateY(-8px); /* A slightly more pronounced lift */
    /* Add a subtle "glow" effect using box-shadow */
    box-shadow: 0 12px 25px rgba(29, 53, 87, 0.12); /* Uses your --dark-blue with alpha */
    text-decoration: none;
}
.article-card h3 { margin-top:0!important; font-size: 1.5rem; margin-bottom: 10px; color: var(--dark-blue); }
.article-card p { color: #555; flex-grow: 1; }
.article-tags { 
    display: flex; 
    gap: 10px; 
    font-size: 0.9rem; 
    font-weight: 700; 
    color: var(--medium-blue);  
    text-transform: uppercase;
}

/* --- Footer --- */
.cta-footer {
    background-color: var(--dark-blue); color: var(--white);
    padding: 50px 20px; text-align: center;
}
.cta-content { display: flex; flex-direction: column; align-items: center; gap: 15px; }
.cta-footer .icon { width: 48px; height: 48px; color: var(--white); }
.cta-footer h2 { font-size: 2.2rem; color: var(--white); }
.cta-footer p { font-size: 1.1rem; max-width: 600px; opacity: 0.9; margin: 0; }

.legal-footer {
    padding: 20px;
    text-align: center;
    background-color: #162a45; /* Slightly darker than CTA */
    color: #a0aec0; /* Lighter text color */
    font-size: 0.9rem;
}
.legal-footer a { color: var(--white); }


/* --- Responsive --- */
@media (max-width: 992px) {
    h1 { font-size: 3rem; }
    .hero-text p { font-size: 1.1rem; }
}

@media (max-width: 768px) {
    .site-header { padding-bottom: 40px; }
    .hero-section { flex-direction: column; text-align: center; }
    .hero-text { max-width: 100%; }
    .hero-image { position: static; width: 100%; margin-top: 40px; }
    .hero-image img { max-width: 70%; margin: 0 auto; }
    .lab-features-section { margin-top: 40px; }
    .lab-card { flex-direction: column; text-align: center; gap: 15px; }
}

@media (max-width: 576px) {
    .main-nav { flex-direction: column; gap: 20px; }
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }

    .content-section .container {
    padding: 20px;
    }
}


/* ==========================================================================
   MARKDOWN CONTENT STYLING
   ========================================================================== */

/* This targets the container where your Markdown content is rendered */
.content-section .container {
    max-width: 90ch; /* Optimal line length for reading */
}

/* --- Blog Content Typography --- */
.content-section .container h1,
.content-section .container h2,
.content-section .container h3,
.content-section .container h4 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}
.content-section .container h1 {
   margin-top:0.5em; 
}

.content-section .container p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.25em;
}

.content-section .container a {
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--medium-blue);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: color 0.2s, background-color 0.2s;
}

.content-section .container a:hover {
    background-color: #dbe7ef; /* A very light blue for hover */
}

.content-section .container ul,
.content-section .container ol {
    padding-left: 2em;
    margin-bottom: 1.25em;
    font-size: 1.1rem;
}

.content-section .container li {
    margin-bottom: 0.5em;
}

.content-section .container blockquote {
    margin: 1.5em 0;
    padding: 0.5em 1.5em;
    border-left: 5px solid var(--medium-blue);
    background-color: #f8fafd;
    font-style: italic;
    color: #586a78;
}
.content-section .container blockquote p {
    margin-bottom: 0;
}

/* --- Code Blocks & Syntax Highlighting --- */
/* For inline code */
.content-section .container code {
    background: rgba(135, 145, 155, 0.15);
    color: #b33923;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: 'Manrope', 'Fira Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

/* For code blocks */
.content-section .container pre {
    background-color: #2b303b; /* A soft, dark background */
    color: #d8dee9;
    font-family: 'Manrope', 'Fira Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 1.5em;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5em 0;
    position: relative; /* For the copy button */
}

.content-section .container pre code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

/* Copy Button for Code Blocks */
.copy-button {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  font-family: 'Manrope', sans-serif;
  background-color: rgba(255, 255, 255, 0.1);
  color:#e5e9f0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease-in-out, background-color 0.2s;
}

/* The wrapper div for <pre> is created by JS */
div:has(> pre):hover .copy-button {
  opacity: 1;
}

.copy-button:hover {
   background-color: rgba(255, 255, 255, 0.2);
}


/* --- Custom Containers (.tip, .warning) --- */
.custom-container {
    padding: 1.5em;
    margin: 2em 0;
    border-left: 5px solid;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.6;
}

.custom-container p,
.custom-container ul,
.custom-container ol {
    margin-bottom: 0; /* Remove bottom margin for last element */
    font-size: 1rem;
}

.custom-container p:first-of-type {
    margin-top: 0;
}

.custom-container.tip {
    border-color: #28a745;
    background-color: #e6f4ea;
    color: #1b5e20;
}

.custom-container.warning {
    border-color: #ff9800;
    background-color: #fff3e0;
    color: #e65100;
}

/* --- Images & Tables --- */
.content-section .container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5em 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.content-section .container table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.content-section .container th,
.content-section .container td {
    border: 1px solid var(--border-color);
    padding: 0.75em 1em;
    text-align: left;
}

.content-section .container th {
    background-color: #f8fafd;
    font-weight: 700;
}

.content-section .container tbody tr:nth-of-type(even) {
    background-color: #fcfdfe;
}

span.post-category a {
    text-transform: uppercase;
}

.main-footer {
    background-color: var(--dark-blue);
    color: var(--white);
    padding: 60px 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-column h4 {
    color: var(--white);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--medium-blue);
}

.footer-column p {
    color: var(--light-blue-bg);
    opacity: 0.8;
    font-size: 0.95rem;
    line-height: 1.7;
}

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

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--light-blue-bg);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
    text-transform: uppercase;
}
.footer-social-links a {
    text-transform: none;
}

.social-icon svg {
    vertical-align: middle;
    margin-right: 8px;
    transition: transform 0.2s ease;
}

.footer-social-links a:hover .social-icon svg {
    transform: scale(1.1);
}

.footer-links a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* Make the footer responsive */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}
/* --- Related Posts Section --- */
.related-posts-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.related-posts-heading {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2rem; /* Make it slightly smaller than a main page heading */
}

/* Ensure the grid for related posts doesn't get too wide */
.related-posts-section .articles-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}


/* Client Ticker Section - Full Width Text Version */
.client-ticker-section {
    background: var(--light-blue-bg);
    padding: 1rem 0 2rem 0;
    margin: 0 0 2rem 0;
    overflow: hidden;
    position: relative;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
}

.client-ticker-section .container {
    max-width: 100% !important;
    padding: 0 !important;
}

.client-ticker-section h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-size: 1.6rem;
    font-weight: 700;
    padding: 0 20px;
}

.client-ticker {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.ticker-track {
    display: flex;
    gap: 4rem;
    width: max-content;
    animation: scroll 25s linear infinite;
    -webkit-animation: scroll 25s linear infinite;
    -moz-animation: scroll 25s linear infinite;
    -o-animation: scroll 25s linear infinite;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
}

.client-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 280px;
    padding: 1rem;
    background-color: #FFFFFF;
    border: 1px solid #E8E8EA;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.client-logo:hover {
    transform: translateY(-8px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.client-name {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1.4rem;
    text-align: center;
    line-height: 1.2;
}

.client-service {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: var(--medium-blue);
    text-align: center;
    line-height: 1.3;
    font-weight: 500;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
        -webkit-transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
        -webkit-transform: translateX(-50%);
    }
}

@-webkit-keyframes scroll {
    0% {
        transform: translateX(0);
        -webkit-transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
        -webkit-transform: translateX(-50%);
    }
}

/* Pause on hover */
.client-ticker:hover .ticker-track {
    animation-play-state: paused;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .client-ticker-section {
        padding: 1.5rem 0;
        margin: 1.5rem 0;
    }
    
    .ticker-track {
        gap: 2rem;
    }
    
    .client-logo {
        min-width: 200px;
    }
    
    .client-name {
        font-size: 1.2rem;
    }
    
    .client-service {
        font-size: 0.85rem;
    }
}

/* Mobile: Move ticker up under hero image */
@media (max-width: 768px) {
    .client-ticker-section {
        margin-top: -60px;
        position: relative;
        z-index: 10;
    }
    
    /* Remove margin from the p tag that wraps the ticker on mobile */
    .content-section .container > p:first-child {
        margin: 0 !important;
        padding: 0 !important;
        line-height: 0 !important;
        display: block !important;
        font-size: 0 !important;
    }
    
    /* Also remove any margin from the ticker section itself */
    .content-section .container > p:first-child > .client-ticker-section {
        margin-top: 0 !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .client-ticker-section {
        background: #1a1a1a;
    }
    
    .client-ticker-section h3 {
        color: var(--text-light);
    }
    
    .client-logo {
        background-color: #1a1a1a;
        border: 1px solid #2a2a2a;
        box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    }
    
    .client-logo:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    }
    
    .client-name {
        color: var(--text-light);
    }
    
    .client-service {
        color: var(--light-blue-bg);
    }
}

/* Remove top margin from headings inside client ticker only */
.client-ticker-section .container > h1,
.client-ticker-section .container > h2,
.client-ticker-section .container > h3,
.client-ticker-section .container > h4 {
    margin-top: 0;
}
