/* ==========================================================================
   1. SIDEBAR & LOGO
   ========================================================================== */

.sidebar {
    padding-top: 0 !important;
}

.sidebar-logo {
    margin-top: 0;
    padding-top: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    width: 100%;
}

.sidebar-logo a {
    display: block;
    width: 100%;
    padding: 0 1.5rem;
    box-sizing: border-box;
    text-decoration: none !important;
}

.theme-logo-svg {
    display: block;
    margin: 0 auto;
    width: 100%;
    max-width: 250px;
    /* Perfectly scales the vector width on desktop layouts */
    height: auto;
}

.sidebar-nav {
    padding-left: 0;
    list-style: none;
    margin-top: 3rem;
}

.sidebar-nav li {
    margin-bottom: 1.2rem;
}

.sidebar-nav li a {
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
    transition: color 0.2s;
}

.sidebar-nav li a:hover {
    color: #fff;
}

/* ==========================================================================
   2. GLOBAL TITLES & HEADERS
   ========================================================================== */

html body .service-group-title,
.section-title {
    display: block !important;
    color: #ac4142 !important;
    font-size: 1.8rem !important;
    margin-top: 3.5rem !important;
    margin-bottom: 1.5rem !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 2px solid #eee !important;
    text-transform: uppercase !important;
    font-weight: bold !important;
    letter-spacing: 2px !important;
}

.section-title:first-of-type,
html body .service-group-title:first-of-type {
    margin-top: 0 !important;
}

/* ==========================================================================
   3. SERVICES & LIST PAGES (Horizontal Cards)
   ========================================================================== */

.services-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0 4rem;
}

.service-card {
    display: flex;
    flex-direction: row;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.service-image {
    flex: 1;
    min-width: 200px;
    max-width: 50%;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-details {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 50%;
}

.service-details h2 {
    margin-top: 0;
    color: #ac4142;
    font-size: 1.5rem;
}

.read-more-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    background-color: #ac4142;
    color: #fff !important;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85rem;
    text-decoration: none;
}

/* ==========================================================================
   4. HOME PAGE GRID (3-Column Layout)
   ========================================================================== */

.home-section {
    padding: 3rem 0;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.home-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* Blog Cards */
.blog-preview {
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.image-placeholder {
    width: 100%;
    height: 150px;
    background: #f0f0f0;
}

.card-content {
    padding: 1.2rem;
}

/* Client Logo Cards */
.client-link-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    padding: 1.5rem;
    text-decoration: none !important;
}

.client-logo {
    max-width: 85%;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.home-card:hover .client-logo {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* ==========================================================================
   5. CONTACT & MODERN 3-COLUMN FOOTER (CENTER COMPACT UPGRADE)
   ========================================================================== */

.contact-form {
    background: #fdfdfd;
    padding: 2rem;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 3rem;
}

/* Base Footer Shell */
.site-footer {
    margin-top: 6rem;
    padding: 4rem 2rem 3rem 2rem;
    background-color: #34373b;
    /* Premium desaturated slate charcoal */
    color: #e2e8f0;
    /* Light grey reading tint */
    width: 100%;
    box-sizing: border-box;
}

.footer-container {
    max-width: 1140px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 3rem;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-column h3 {
    color: #ffffff;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

/* Left Column */
.footer-logo-img {
    display: block;
    width: 100%;
    max-width: 200px;
    height: auto;
    margin-bottom: 1rem;
}

.footer-contact {
    margin-bottom: 1.5rem;
}

.footer-contact p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
}

.footer-contact .contact-sub a {
    font-weight: 400;
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-contact .contact-sub a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-legal a {
    font-size: 0.9rem;
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-legal a:hover {
    color: #ac4142;
    text-decoration: underline;
}

/* Center Column (Balanced & Alignment Centered) */
.footer-center {
    align-items: center;
    text-align: center;
}

.footer-sitemap {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    /* Reduced space between sitemap tracking links */
}

.footer-sitemap a {
    color: #a0aec0;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.footer-sitemap a:hover {
    color: #ffffff;
}

.footer-copyright {
    margin-top: auto;
    padding-top: 2rem;
    width: 100%;
}

.footer-copyright p {
    margin: 0;
    font-size: 0.85rem;
    color: #718096;
    line-height: 1.5;
}

.footer-copyright p strong {
    color: #ffffff;
    font-weight: 700;
}

/* Right Column */
.footer-social-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.social-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.25s ease;
}

.social-circle:hover {
    background-color: #ac4142;
    transform: translateY(-3px);
}

/* Align and scale vector logos cleanly inside the circular links */
.social-circle svg {
    width: 18px;
    height: 18px;
    fill: #e2e8f0;
    transition: fill 0.25s ease, transform 0.25s ease;
    display: block;
}

.social-circle:hover svg {
    fill: #ffffff;
    transform: scale(1.05);
}

/* ==========================================================================
   6. RESPONSIVE DESIGN (Consolidated)
   ========================================================================== */

@media (min-width: 48em) {
    .sidebar {
        padding-bottom: 0 !important;
    }

    .sidebar-sticky {
        padding: 0 !important;
        margin-top: 0 !important;
        top: 0 !important;
    }

    .submit-button {
        width: auto;
    }
}

@media (max-width: 48em) {
    .home-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        flex-direction: column;
    }

    .service-image {
        max-width: 100%;
        height: 200px;
    }

    .highlight-wrapper {
        flex-direction: column !important;
    }

    .highlight-visual-side {
        width: 100% !important;
        height: 240px !important;
    }

    .highlight-box-side {
        padding: 3rem 1.25rem 2rem 1.25rem !important;
    }

    .footer-container {
        grid-template-columns: 1fr !important;
        gap: 2rem;
        padding-bottom: 2rem;
    }

    /* Keep center column perfectly stacked and centered on tablet/mobile metrics */
    .footer-center {
        align-items: center;
        text-align: center;
    }

    .footer-copyright {
        margin-top: 1.5rem;
        padding-top: 0;
    }

    .funding-disclaimer {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        align-items: center;
    }

    /* Drop Project Grid to 2 columns on mobile devices */
    .projects-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
    
    .project-overlay-title {
        font-size: 1rem !important;
    }
}

/* ==========================================================================
   7. COMPACT TWO-ROW METADATA & SHARE BAR (REALIGNED)
   ========================================================================== */

.blog-meta-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0 0 0.8rem 0;
    padding-bottom: 0.2rem;
}

.meta-left-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.meta-author-avatar {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 1px solid #eaeaea !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    vertical-align: middle !important;
    align-self: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

.placeholder-avatar {
    background-color: #ac4142;
    opacity: 0.2;
}

.meta-text-rows {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.25;
}

.meta-row-one {
    font-weight: 700;
    color: #313131;
    font-size: 0.95rem;
    margin: 0;
    padding: 0;
}

.meta-row-two {
    font-size: 0.82rem;
    color: #777;
    margin: 0;
    padding: 0;
}

.meta-divider {
    margin: 0 4px;
    color: #ccc;
}

.meta-right-group {
    display: flex;
    align-items: center;
}

.share-btn {
    background: transparent;
    border: none;
    color: #888;
    font-size: 1.4rem;
    line-height: 1;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.share-btn:hover {
    color: #ac4142;
    background-color: #f5f5f5;
}

.service-details h2 {
    margin-top: 0.2rem !important;
    margin-bottom: 0.6rem;
    color: #ac4142;
    font-size: 1.5rem;
}

.post-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: -0.2rem;
    margin-bottom: 0.8rem;
}

.tag-hash {
    color: #ac4142 !important;
    font-weight: 600;
    font-size: 0.85rem;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.tag-hash:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.service-details p {
    margin-top: 0.4rem;
}

/* ==========================================================================
   8. HOME SERVICES HIGHLIGHT SECTION (REFITTED)
   ========================================================================== */

.home-services-highlight {
    padding-top: 0 !important;
    margin-bottom: 1rem;
}

.highlight-wrapper {
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.highlight-visual-side {
    flex: 1;
    min-width: 42%;
}

.highlight-visual-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.highlight-box-side {
    flex: 1.2;
    padding: 2.5rem 2.2rem;
}

.highlight-box-side h2 {
    color: #ac4142 !important;
    font-size: 1.8rem !important;
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
    text-transform: uppercase !important;
    font-weight: bold !important;
    letter-spacing: 2px !important;
    border-bottom: none !important;
}

.highlight-intro {
    color: #555;
    font-size: 1.05rem;
    line-height: 1.55;
    margin-bottom: 1.2rem;
}

.highlight-services-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
}

.highlight-service-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    text-decoration: none !important;
    padding: 0.8rem;
    border-radius: 6px;
    background: transparent;
    transition: all 0.25s ease-in-out;
    opacity: 0.65;
}

.service-bullet {
    width: 9px;
    height: 9px;
    background: #ac4142;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.service-text strong {
    color: #313131;
    font-size: 1.08rem;
    display: block;
    margin-bottom: 0.2rem;
    transition: color 0.25s ease;
}

.service-text p {
    margin: 0 !important;
    font-size: 0.92rem;
    color: #666;
    line-height: 1.4;
}

.highlight-service-item:hover {
    opacity: 1;
    background-color: #fafafa;
    transform: translateX(6px);
    box-shadow: inset 3px 0 0 #ac4142, 0 4px 10px rgba(0, 0, 0, 0.02);
}

.highlight-service-item:hover .service-bullet {
    transform: scale(1.3);
}

.highlight-service-item:hover .service-text strong {
    color: #ac4142;
}

/* ==========================================================================
   9. BLOG POST IMAGE GALLERY GRID (FLATTENED)
   ========================================================================== */

.blog-image-row {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin: 2rem 0;
    width: 100%;
}

.blog-image-row img {
    flex: 1;
    width: 33.33%;
    height: 220px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eee;
    display: block;
    margin: 0 !important;
    transition: transform 0.3s ease;
}

.blog-image-row img:hover {
    transform: scale(1.03);
}

/* ==========================================================================
   10. SINGLE BLOG ARTICLE VIEW TYPOGRAPHY & EU DISCLAIMER
   ========================================================================== */

.single-blog-post {
    padding: 1rem 0 4rem;
    max-width: 800px;
}

.post-page-title {
    color: #313131;
    font-size: 2.4rem;
    line-height: 1.2;
    margin-top: 0.4rem;
    margin-bottom: 0.6rem;
    font-weight: 800;
}

.post-feature-banner {
    width: 100%;
    margin: 1.5rem 0 2rem 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
}

.post-feature-banner img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.post-body-markdown {
    font-size: 1.1rem;
    line-height: 1.65;
    color: #333;
}

.post-body-markdown p {
    margin-bottom: 1.5rem;
}

.post-body-markdown h3 {
    color: #ac4142;
    font-size: 1.6rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

/* EU Funding Disclaimer styled explicitly for light blog page readability */
.funding-disclaimer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 3.5rem auto 1rem auto;
    max-width: 800px;
    padding: 1.5rem;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 6px;
}

.funding-logo {
    width: 85px;
    height: auto;
    object-fit: contain;
    filter: none !important; /* Forces flag colors to remain completely untouched */
    opacity: 1 !important;
}

.funding-disclaimer p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #444444; /* High-contrast charcoal gray for solid compliance reading */
}

/* ==========================================================================
   11. INLINE BRAND LOGO INTERACTIONS
   ========================================================================== */

.theme-logo-svg .cst-text-path {
    transition: fill 0.3s ease;
}

.sidebar-logo a:hover .theme-logo-svg .cst-text-path {
    fill: #ffffff;
}

/* ==========================================================================
   12. PROJECTS SQUARE GALLERY WITH OVERLAY HOVER
   ========================================================================== */

.projects-grid {
    display: grid;
    /* Clean multi-column grid that scales up on larger monitors automatically */
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0 4rem 0;
}

.project-card-link {
    display: block;
    text-decoration: none !important;
}

.project-card {
    position: relative;
    width: 100%;
    /* Locks the element dimensions to form a uniform grid geometry */
    aspect-ratio: 1 / 1; 
    background-color: #ffffff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Assures corporate logo ratios are not stretched */
    padding: 2rem;       /* Padding surrounding logos for a balanced container breath */
    box-sizing: border-box;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: block;
}

/* Backup display wrapper if a project lacks an uploaded asset image */
.project-image-placeholder {
    width: 100%;
    height: 100%;
    background-color: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0aec0;
    font-weight: 600;
}

/* Semi-transparent slate-charcoal presentation cover overlay wrapper */
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(52, 55, 59, 0.88); /* Keeps branding visual trace active behind text */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
    box-sizing: border-box;
    
    /* Prepares animation opacity configurations */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.project-overlay-title {
    color: #ffffff !important;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    line-height: 1.4;
    
    /* Slide effect configuration */
    transform: translateY(12px);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ==========================================================================
   INTERACTIVE TRIGGER STATES
   ========================================================================== */

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-card:hover .project-overlay-title {
    transform: translateY(0);
}

.project-card:hover img {
    transform: scale(1.04); /* Seamless immersion effect when focus takes place */
}