/* Basic Reset & Font */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-padding-top: 90px; /* Adjust based on new header height */
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif; /* Poppins is fine, or use 'Titillium Web', sans-serif; if preferred */
    line-height: 1.6; /* Slightly reduced line-height */
    color: #333;
    background-color: #ffffff;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1140px; /* Slightly wider common standard */
    margin: 0 auto;
    padding: 0 20px; /* Reduced padding slightly */
}

/* Headings & Paragraphs */
h1, h2, h3 {
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 600;
    color: #003399; /* Official EU Blue */
}

h1 {
    font-size: 2.5rem; /* Slightly smaller */
    color: #fff; /* Keep white for hero */
}

h2 {
    font-size: 1.8rem; /* Slightly smaller */
    text-align: center;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.3rem; /* Slightly smaller */
    margin-top: 1.5rem;
    color: #003399; /* EU Blue */
}

p {
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 400; /* Standard weight */
}

a {
    color: #003399; /* EU Blue */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Utility Classes */
.highlight {
    /* Use subtle emphasis instead of bright color */
    font-weight: 700;
    color: inherit; /* Inherit color, maybe slightly darker if needed */
    /* background-color: rgba(0, 51, 153, 0.1); /* Optional subtle blue highlight */
}

.patent-highlight {
    font-weight: 600; /* Default font weight */
    color: #333; /* Default color, suitable for light backgrounds */
    /* Remove red color */
}

.alt-bg {
    background-color: #f0f4f8; /* Lighter, cooler grey */
}

/* --- Header --- */
.main-header {
    background-color: #ffffff;
    padding: 0.8rem 0; /* Adjust padding */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid #dee2e6; /* Standard border color */
}

.header-container { /* Use the new class */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logos {
    display: flex;
    align-items: center;
    gap: 15px; /* Space between logos */
}

.logo-placeholder { /* Basic style for placeholders */
    display: inline-block;
    padding: 5px 10px;
    border: 1px dashed #ccc;
    font-size: 0.8rem;
    color: #999;
}
/* Add specific styles for actual img logos */
.eu-logo { height: 40px; width: auto; } /* Example */


.project-title { /* Style for the project name */
    font-size: 1.4rem;
    font-weight: 700;
    color: #003399; /* EU Blue */
    text-decoration: none;
    text-align: center; /* Center if needed */
    flex-grow: 1; /* Allow it to take space */
    margin: 0 20px; /* Add some margin */
}

.main-nav ul {
    list-style: none;
    display: flex; /* Keep flex for desktop */
    padding: 0;
    margin: 0;
}
.main-nav li {
    margin-left: 1.2rem; /* Adjust spacing */
}
.main-nav a {
    text-decoration: none;
    color: #333; /* Standard text color */
    font-weight: 500; /* Slightly lighter weight */
    transition: color 0.3s ease;
    display: block; /* Helps with padding/clicking on mobile */
    padding: 0.5rem 0; /* Add some padding for mobile */
}
.main-nav a:hover,
.main-nav a.active { /* Add 'active' class via JS if needed for current section */
    color: #003399; /* EU Blue */
    text-decoration: underline;
}

/* Hamburger Menu Button */
.menu-toggle {
    display: none; /* Hidden by default on larger screens */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-left: 0; /* Reset margin-left if needed */
    order: 3; /* Ensure it's on the right */
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #003399; /* Match blue */
    margin: 5px 0;
    transition: transform 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
}

/* --- Sections --- */

/* Add Keyframes for Gradient Animation */
@keyframes animatedGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Hero Section */
.hero-section {
    min-height: 70vh;
    position: relative; /* Needed for absolute positioning of particles-js */
    overflow: hidden; /* Hide anything that might overflow */
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 0;

    /* Gradient Background (similar to reference) */
    background: linear-gradient(125deg, #0c1c3d, #0d6efd); /* Adjust colors as needed */

    /* Keep the container relative for z-index stacking */
    z-index: 1;
}

/* Container for particles.js animation */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1; /* Place it behind the content */

    /* Apply the SVG pattern to the particles container */
    background-image:
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat;
    background-position: center center;
}

.hero-section .container {
    max-width: 900px;
    position: relative; /* Ensure content stays above particles */
    z-index: 2; /* Keep content above particles */
}

.hero-section p {
    font-size: 1.1rem; /* Slightly smaller */
    margin-bottom: 2rem;
    font-weight: 300;
    color: #fff;
}

/* Specific style for patent highlight within the hero section */
.hero-section .patent-highlight {
    color: #fff; /* Ensure text is white like other hero text */
    font-weight: 600; /* Keep or adjust font-weight as needed, already bolder than p (300) */
    /* Optional: Add a subtle visual cue to make it stand out more */
    border-bottom: 1px dotted rgba(255, 255, 255, 0.7); /* Example: a subtle dotted underline */
    padding-bottom: 1px; /* Adjust spacing for the underline if needed */
}

.hero-visual {
    margin: 2rem auto;
    padding: 1rem; /* Reduced padding slightly */
    background-color: rgba(255, 255, 255, 0.08); /* Slightly more opaque */
    border: 1px solid rgba(255, 255, 255, 0.25); /* Optional subtle border */
    border-radius: 8px;
    max-width: 500px; /* Adjust as needed */
    min-height: 100px; /* Reduced min-height */
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px); /* Optional: Frosted glass effect */
    -webkit-backdrop-filter: blur(2px); /* Safari support */
}
.hero-visual p { /* Style for placeholder text */
    font-size: 0.9rem; /* Slightly smaller */
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0;
    font-style: italic; /* Keep italic for placeholder */
}


/* Content Sections */
.content-section {
    padding: 50px 0; /* Adjust padding */
}

.content-section .container {
    max-width: 900px; /* Slightly narrower for readability */
}

/* Custom List Styles */
.content-section ul {
  list-style: none; /* Remove default bullets */
  padding-left: 0; /* Remove default padding */
}

.content-section ul li {
  position: relative;
  padding-left: 30px; /* Space for the custom bullet */
  margin-bottom: 10px; /* Space between list items */
  font-size: 1em; /* Adjust as needed */
  line-height: 1.6;
}

.content-section ul li::before {
content: "\2713"; /* Unicode checkmark (✓) - use hex for better Firefox compatibility */
  position: absolute;
  left: 0;
  top: 0; /* Adjust vertical alignment if needed */
  color: #007bff; /* Primary color for the bullet, or choose another */
  font-weight: bold;
  font-size: 1.2em; /* Adjust size of the bullet */
}

/* Partner Logos Styles */
.partner-logos {
  display: flex;
  flex-wrap: wrap; /* Allows items to wrap to the next line */
  justify-content: center; /* Center logos horizontally */
  align-items: center; /* Align logos vertically */
  gap: 20px; /* Space between logos */
  margin-top: 20px; /* Space above the logos container */
}

.partner-logos img {
  max-width: 150px; /* Adjust as needed - max width for each logo */
  height: auto; /* Maintain aspect ratio */
  object-fit: contain; /* Ensures the entire logo is visible without cropping */
}

/* Features List */
.features-list {
    list-style: none;
    margin-top: 1.5rem;
    padding-left: 0;
}

.features-list li {
    margin-bottom: 0.6rem;
    font-size: 1rem;
    font-weight: 400;
    color: #333;
}

/* Applications Grid */
.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    text-align: center;
}

.app-item {
    background-color: #e0e8f0; /* Lighter blue-grey */
    padding: 1.2rem 1rem;
    border-radius: 4px; /* Standard radius */
    font-weight: 600;
    color: #003399; /* EU Blue */
    box-shadow: none; /* Remove shadow for flatter look */
    border: 1px solid #cdd7e0; /* Subtle border */
    transition: background-color 0.3s ease;
    overflow-wrap: break-word; /* Allow long words to break */
    word-wrap: break-word; /* Legacy support */
    hyphens: auto; /* Optional: Improve breaking with hyphens */
}

.app-item:hover {
    background-color: #d1dce6; /* Slightly darker on hover */
    transform: none; /* Remove transform */
    box-shadow: none;
}

/* CTA Section */
.cta-section {
    background-color: #f0f4f8; /* Light grey background */
    color: #333; /* Dark text */
    padding: 50px 0;
}

.cta-section h2 {
    color: #003399; /* EU Blue heading */
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.cta-button {
    display: inline-block;
    background-color: #003399; /* EU Blue */
    color: #fff;
    padding: 10px 25px; /* Adjust padding */
    border-radius: 4px; /* Standard radius */
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    border: 1px solid #003399;
    cursor: pointer;
}

.cta-button:hover {
    background-color: #002266; /* Darker blue */
    border-color: #002266;
    transform: none; /* Remove transform */
    text-decoration: none;
    opacity: 0.95;
}

/* Specific button in Hero */
.hero-section .cta-button {
    background-color: #fff;
    color: #003399;
    border-color: #fff;
}

.hero-section .cta-button:hover {
    background-color: #eee;
    border-color: #eee;
    color: #002266;
}

/* Specific button in CTA section */
.cta-section .cta-button {
    background-color: #003399; /* Blue button on light background */
    color: #fff;
    border-color: #003399;
}

.cta-section .cta-button:hover {
    background-color: #002266;
    border-color: #002266;
    color: #fff;
}

/* --- Contact Form --- */
.contact-form {
    max-width: 600px; /* Limit form width */
    margin: 2rem auto 0 auto; /* Center form below text */
    background-color: #ffffff; /* White background for the form */
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e8f0;
    text-align: left; /* Align form elements left */
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333; /* Dark label text */
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cdd7e0; /* Subtle border */
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit; /* Use body font */
    background-color: #f8f9fa; /* Very light background for inputs */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    border-color: #003399; /* Highlight border on focus */
    outline: none; /* Remove default outline */
    box-shadow: 0 0 0 2px rgba(0, 51, 153, 0.2); /* Subtle glow on focus */
}

.form-group textarea {
    resize: vertical; /* Allow vertical resize only */
    min-height: 100px;
}

.form-submit {
    text-align: center; /* Center the submit button */
    margin-bottom: 0; /* Remove bottom margin from last group */
}

.form-status { /* Style for success/error messages */
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
}
.form-status.success { color: green; }
.form-status.error { color: red; }

/* Footer */
.footer {
    background-color: #e9ecef; /* Light grey background */
    color: #495057; /* Darker grey text */
    text-align: left; /* Align text left */
    padding: 20px 0;
    font-size: 0.85rem;
    /* margin-top: 3rem; /* Ensure space before footer */
    border-top: 1px solid #dee2e6;
}

.footer-container { /* Use new class */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 20px;
}

.footer-logos {
    display: flex;
    align-items: center;
    gap: 15px;
    order: 1; /* Logos first */
}

.footer-logos .logo-placeholder {
    font-size: 0.75rem;
}

.footer-text {
    order: 2; /* Text second */
    flex-grow: 1; /* Allow text to take space */
    text-align: right; /* Align text right */
}

.footer p {
    margin-bottom: 0.3rem;
    color: #495057;
}

.footer a {
    color: #003399; /* EU Blue */
}

.footer a:hover {
    color: #002266; /* Darker blue */
}


/* --- Cookie Consent Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #2d3748; /* Dark background */
    color: #e2e8f0; /* Light text */
    padding: 20px 0; /* Increased padding slightly */
    z-index: 2000; /* Ensure it's above other content */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    display: none; /* Hidden by default, shown by JS */
    font-size: 0.9rem;
    height: 50vh; /* Set height to 50% of viewport height */
    overflow-y: auto; /* Add scrollbar if content overflows */
}

.cookie-banner.show {
    display: block;
}

.cookie-banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping */
    gap: 15px;
    height: 100%; /* Allow content to potentially fill the height */
    padding: 15px 0; /* Add padding within the container */
}

.cookie-banner p {
    margin: 0;
    flex-grow: 1; /* Allow text to take available space */
    color: #e2e8f0; /* Ensure paragraph text color */
    line-height: 1.5;
}

.cookie-banner a {
    color: #90cdf4; /* Light blue link */
    text-decoration: underline;
}
.cookie-banner a:hover {
    color: #bee3f8; /* Lighter blue on hover */
}

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0; /* Prevent buttons from shrinking too much */
}

.cookie-button {
    padding: 8px 15px; /* Slightly smaller padding */
    font-size: 0.85rem;
    min-width: 80px; /* Minimum width */
}

.cookie-button.secondary {
    background-color: #4a5568; /* Grey background */
    border-color: #4a5568;
    color: #e2e8f0;
}
.cookie-button.secondary:hover {
    background-color: #2d3748; /* Darker grey */
    border-color: #2d3748;
}


/* --- Transitions --- */
.fade-in-element {
    opacity: 0;
    transform: translateY(30px); /* Start slightly lower */
    transition: opacity 0.8s cubic-bezier(0.645, 0.045, 0.355, 1), transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1); /* Smoother ease */
}

.fade-in-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }
.delay-7 { transition-delay: 0.7s; }
.delay-8 { transition-delay: 0.8s; }


/* Responsive Adjustments */
@media (max-width: 992px) {
    .project-title { font-size: 1.2rem; margin: 0 15px;}
    .main-nav li { margin-left: 1rem; }
}

@media (max-width: 768px) {
    html { scroll-padding-top: 70px; } /* Adjust for potentially smaller header */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.2rem; }

    .hero-section {
        min-height: 70vh;
    }
    .applications-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 1rem;
    }
    .app-item {
        padding: 1rem 0.8rem;
    }
    .container {
        padding: 0 20px;
    }

    .header-container {
        position: relative; /* Keep relative for nav */
        flex-wrap: wrap; /* Allow wrapping */
    }
    .header-logos { order: 1; flex-basis: 50%; } /* Logos top-left */
    .project-title { order: 3; flex-basis: 100%; text-align: center; margin: 10px 0 0 0; font-size: 1.3rem;} /* Title below */
    .menu-toggle { order: 2; margin-left: auto; } /* Hamburger top-right */

    .main-header .container {
        flex-direction: row; /* Keep logo and button on same row */
        align-items: center; /* Vertically align logo and button */
        position: relative; /* Needed for absolute positioning of nav */
    }

    .logo {
        margin-bottom: 0; /* Remove bottom margin */
    }

    .menu-toggle {
        display: block; /* Show hamburger button */
    }

    .main-nav {
        /* Position the nav container for absolute positioning of ul */
        position: absolute;
        top: 100%; /* Position below the header */
        left: 0;
        width: 100%;
        background-color: #f8f9fa; /* Slightly off-white background */
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #e9ecef;
        /* Hide nav by default using max-height and overflow */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out;
    }

    .main-nav.is-open {
         max-height: calc(100vh - 80px); /* Or a sufficiently large height */
         overflow-y: auto; /* Allow vertical scrolling ONLY when open and content overflows */
    }

    .main-nav ul {
        flex-direction: column; /* Stack menu items vertically */
        width: 100%;
        padding: 1rem 0; /* Add padding when open */
        height: auto; /* Let the content define the height */
    }

    .main-nav li {
        margin-left: 0;
        margin-bottom: 0;
        text-align: center; /* Center nav items */
        border-bottom: 1px solid #f0f0f0; /* Separator lines */
    }
    .main-nav li:last-child {
        border-bottom: none;
    }

    .main-nav a {
         padding: 1rem 1rem; /* More padding for easier tapping */
    }

    /* Hamburger Animation (Optional) */
    .menu-toggle.is-active .hamburger-line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.is-active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.is-active .hamburger-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .footer-container {
        flex-direction: column; /* Stack elements */
        align-items: center; /* Center items */
        text-align: center;
    }
    .footer-logos { order: 1; margin-bottom: 15px; }
    .footer-text { order: 2; text-align: center; }

    .cookie-banner {
        height: auto; /* Let height adjust to content on smaller screens */
        max-height: 60vh; /* Optional: Limit max height */
        padding: 15px 0; /* Adjust padding */
    }

    .cookie-banner-content {
        flex-direction: column; /* Stack elements vertically */
        align-items: flex-start; /* Align items left */
        text-align: left;
        height: auto; /* Reset height */
        padding: 10px 0; /* Adjust padding */
    }

    #technology .img-fluid {
      max-width: 80%; /* Adjust percentage as needed, e.g., 70%, 90% */
      display: block; /* Needed for margin auto to work for centering */
      margin-left: auto;
      margin-right: auto;
      margin-top: 20px; /* Optional: add some space above the image on mobile */
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }
    .hero-section p { font-size: 1rem; }
    .cta-button { padding: 8px 20px; font-size: 0.9rem; }
    .project-title { font-size: 1.1rem; }
    .header-logos { flex-basis: 70%; } /* Adjust basis */
    .applications-grid {
        /* Further reduce min width on very small screens */
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.8rem; /* Slightly reduce gap */
    }
    .app-item {
        padding: 0.8rem 0.6rem; /* Adjust padding */
        font-size: 0.9rem; /* Slightly smaller font */
    }
}

/* --- Timeline Section --- */
.timeline {
    position: relative;
    max-width: 750px; /* Adjust width as needed */
    margin: 3rem auto;
    padding: 20px 0;
}

/* The central line */
.timeline::after {
    content: '';
    position: absolute;
    width: 4px; /* Line thickness */
    background-color: #cdd7e0; /* Line color */
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px; /* Half of the width */
}

/* Container around content */
.timeline-item {
    padding: 10px 40px; /* General padding for items */
    position: relative;
    background-color: inherit;
    width: 50%;
    margin-bottom: 30px; /* Add some space between timeline items */
}

/* Place the container to the left */
.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 30px; /* Space from content to center line area */
    text-align: right;
}

/* Place the container to the right */
.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 30px; /* Space from content to center line area */
    text-align: left;
}

/* Circle on the timeline */
.timeline-item::after {
  content: '';
  position: absolute;
  width: 20px; /* Circle diameter */
  height: 20px;
  background-color: white; /* Circle fill */
  border: 4px solid #007bff; /* Circle border color (match line) */
  top: 15px; /* Vertical alignment of circle (adjust as needed) */
  border-radius: 50%;
  z-index: 1;
  box-sizing: border-box; /* Add for consistent box model */
}

/* Position the circle for odd items (left side) */
.timeline-item:nth-child(odd)::after {
    right: -10px; /* (Half of circle width) to sit on the line */
    transform: translateX(0); /* No horizontal transform needed if right is precise */
}

/* Position the circle for even items (right side) */
.timeline-item:nth-child(even)::after {
    left: -10px; /* (Half of circle width) to sit on the line */
    transform: translateX(0); /* No horizontal transform needed if left is precise */
}

/* The date */
.timeline-date {
    font-weight: 600;
    color: #0056b3; /* Slightly different blue */
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* The content */
.timeline-content {
    padding: 15px 20px;
    background-color: #ffffff;
    position: relative;
    border-radius: 6px;
    border: 1px solid #e0e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.timeline-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: #003399;
}
 .timeline-content p {
    margin-bottom: 0;
    font-size: 0.95rem;
    line-height: 1.5;
 }

/* Arrow pointers for timeline content */
.timeline-content::before {
    content: " "; /* Important for the pseudo-element to show */
    height: 0;
    position: absolute;
    top: 18px; /* Align with circle's vertical center (approx) */
    width: 0;
    z-index: 1;
    border: solid transparent; /* Base for border arrows */
    border-width: 10px; /* Arrow size */
}

/* Adjust arrow position for odd/even items */
.timeline-item:nth-child(odd) .timeline-content::before {
    left: 100%; /* Arrow points right, from the left edge of the item */
    border-left-color: #ffffff; /* Match content background */
    /* margin-left: -20px; /* Pulls arrow back over the content box edge */
}

.timeline-item:nth-child(even) .timeline-content::before {
    right: 100%; /* Arrow points left, from the right edge of the item */
    border-right-color: #ffffff; /* Match content background */
    /* margin-right: -20px; /* Pulls arrow back over the content box edge */
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .timeline::before { /* This was the old central line, now we use .timeline::after */
    left: 12px; /* Position of the line from the left */
    transform: translateX(0);
  }
  .timeline::after { /* Reposition the main line for mobile */
    left: 12px;
    margin-left: 0; /* Reset margin-left */
  }

  .timeline-item,
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    width: 100%;
    left: 0; /* Align all items to the left */
    padding-left: 45px; /* Space for line and circle + content start */
    padding-right: 15px;
    text-align: left;
    margin-bottom: 30px;
  }

  .timeline-item::after { /* Applies to all .timeline-item::after in mobile */
    left: 2px;  /* (12px line_left - 10px circle_outer_radius) = 2px to center on the 12px line */
    transform: translateX(0); /* Reset desktop transform */
    right: auto; /* Ensure 'right' from desktop odd items is cleared */
    /* top: 15px; is inherited and should be fine */
  }

  .timeline-item:nth-child(odd) .timeline-content::before,
  .timeline-item:nth-child(even) .timeline-content::before {
    /* Common styles for arrows on mobile */
    left: -20px; /* Position arrow to the left of the content box */
    right: auto; /* Clear any right positioning */
    border-left-color: transparent; /* Ensure only one side of arrow is colored */
    border-right-color: #ffffff; /* Arrow points left */
    border-width: 10px 20px 10px 0; /* Shape for left-pointing arrow */
    /* top: 18px; is inherited */
  }

  /* Remove the specific arrow styles for odd/even as they are now common */
  /*
  .timeline-item:nth-child(odd) .timeline-content::before {
    right: 100%; 
    margin-right: 10px; 
  }

  .timeline-item:nth-child(even) .timeline-content::before {
    left: 100%; 
    margin-left: 10px; 
  }
  */
}

/* --- Debugging Styles --- */
/* Remove or comment out in production */
/*
* {
    outline: 1px solid rgba(255, 0, 0, 0.5);
}
*/

.language-switcher {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.language-switcher span,
.language-switcher a {
  display: inline-block;
}
