/* 
 * Truelancers Design System 
 * Minimal, technical, and execution-focused.
 *
 * Variables: 
 * --primary: #632489 (Brand Purple)
 * --secondary: #7656a4 (Light Purple)
 * --tertiary: #283c63 (Navy/Contrast)
 */

:root {
    /* Brand Colors */
    --primary: #632489;
    --secondary: #7656a4;
    --tertiary: #283c63;

    /* Neutrals & Variables */
    --text-dark: #1f2937;
    /* Slate 800 */
    --text-body: #4b5563;
    /* Slate 600 */
    --text-light: #f9fafb;
    /* Slate 50 */
    --bg-white: #ffffff;
    --bg-light: #f3f4f6;
    /* Slate 100 */
    --border-color: #e5e7eb;
    /* Slate 200 */

    /* Elevation */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-body);
    background-color: var(--bg-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-size: 16px;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Typography Scale */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.5rem;
    letter-spacing: -0.01em;
}

h4 {
    font-size: 1.125rem;
    font-weight: 600;
}

p {
    margin-bottom: 1.5rem;
}

/* Layout Utilities */
section {
    padding: 6rem 0;
    /* High spacing */
}

.bg-white {
    background-color: var(--bg-white);
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-brand {
    background-color: var(--tertiary);
    color: rgba(255, 255, 255, 0.85);
}

.bg-brand h1,
.bg-brand h2,
.bg-brand h3,
.bg-brand h4 {
    color: var(--text-light);
}

.text-center {
    text-align: center;
}

.text-light {
    color: var(--text-light);
}

.mt-2 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 3rem;
}

.section-header {
    max-width: 700px;
    margin-bottom: 4rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-body);
}

.text-center .section-header {
    margin-left: auto;
    margin-right: auto;
}

.grid {
    display: grid;
    gap: 2rem;
}

/* Button Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    border-radius: 6px;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: var(--secondary);
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-dark);
    border-color: var(--border-color);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--text-dark);
    color: var(--text-light);
    padding: 1rem 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.cookie-container p {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
    .cookie-container {
        flex-direction: column;
        text-align: center;
    }
}

.btn-secondary:hover {
    background-color: var(--bg-white);
    border-color: var(--text-dark);
    transform: translateY(-2px);
}

.btn-secondary.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.bg-brand .btn-primary {
    background-color: var(--text-light);
    color: var(--tertiary);
}

.bg-brand .btn-primary:hover {
    background-color: var(--border-color);
}

.cta-large {
    font-size: 1.125rem;
    padding: 1rem 2.5rem;
}

/* Header Nav (Global) */
.global-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.3s ease;
}

.global-header.scrolled {
    box-shadow: var(--shadow-sm);
}

.global-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.03em;
}

.logo-dark {
    color: var(--text-dark);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-item {
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
    padding-bottom: 0.25rem;
}

/* Mega Menu Logic */
.nav-dropdown-wrapper {
    position: static;
    /* Let the mega menu be relative to the header */
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 1.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
}

.nav-dropdown-wrapper:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
}

.mega-menu-featured h4 {
    font-size: 1.15rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.mega-menu-featured p {
    font-size: 0.95rem;
    color: #4b5563;
    /* Darker gray for better visibility */
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.mega-menu-item {
    display: block;
    padding: 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
    border: 1px solid transparent;
}

.mega-menu-item:hover {
    background: var(--bg-light);
    border-color: var(--border-color);
}

.mega-menu-title {
    display: block;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.2rem;
    font-size: 1rem;
}

.mega-menu-desc {
    display: block;
    font-size: 0.85rem;
    color: #4b5563;
    /* Darker gray for better visibility */
    line-height: 1.4;
}

.nav-item:hover {
    color: var(--primary);
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    border-radius: 2px;
}


nav a.btn-nav {
    background-color: var(--primary);
    color: var(--bg-white);
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
}

nav a.btn-nav:hover {
    background-color: var(--secondary);
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}


/* Sub-components */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--secondary);
}

/* Section: Hero */
.hero {
    padding: 8rem 0 6rem 0;
    position: relative;
    background-color: var(--bg-light);
    background-image: url('bg-hero.png');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(243, 244, 246, 0.95) 0%, rgba(243, 244, 246, 0.6) 100%);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 850px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.hero-subheadline {
    font-size: 1.25rem;
    color: var(--text-body);
    max-width: 700px;
    margin-bottom: 2.5rem;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    margin-bottom: 3.5rem;
}

.trust-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 500;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trust-item svg {
    color: #10b981;
    /* Green success tick */
}

/* Section: Services Snapshot */
.services-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.service-card {
    text-decoration: none;
    color: inherit;
}

.service-card p {
    flex-grow: 1;
    font-size: 1rem;
    color: var(--text-body);
}

.card-link {
    margin-top: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
}

/* Section: Why Choose Us */
.why-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem 2rem;
}

.why-card .icon-wrap {
    width: 48px;
    height: 48px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.why-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.why-card p {
    font-size: 0.95rem;
}

/* Trust: Built for Real Work */
.built-for-real-work {
    padding: 7rem 0;
}

.lead-text {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

.credibility-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.credibility-item {
    background: rgba(255, 255, 255, 0.05);
    /* very subtle card */
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.credibility-item h3 {
    margin-bottom: 1rem;
}

.credibility-item p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Section: Technologies */
.tech-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    max-width: 100%;
}

.tech-container {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-light);
}

.tech-row {
    display: flex;
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.tech-row:last-child {
    border-bottom: none;
}

.tech-row h4 {
    flex: 0 0 200px;
    margin-bottom: 0;
    color: var(--text-dark);
    font-weight: 600;
}

.tech-items {
    color: var(--text-body);
    font-weight: 500;
}

/* Section: Final CTA */
.final-cta {
    padding: 8rem 0;
}

.cta-container {
    max-width: 800px;
}

.cta-container h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-container p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

/* Global Footer */
.global-footer {
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding-top: 5rem;
}

.global-footer .footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.global-footer .footer-desc {
    margin-top: 1rem;
    font-size: 0.95rem;
    max-width: 250px;
}

.global-footer .footer-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.global-footer .footer-col h4 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.global-footer .footer-col ul {
    list-style: none;
}

.global-footer .footer-col ul li {
    margin-bottom: 0.75rem;
}

.global-footer .footer-col a {
    color: var(--text-body);
    font-size: 0.95rem;
}

.global-footer .footer-col a:hover {
    color: var(--primary);
}

.global-footer .footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: left;
    font-size: 0.875rem;
    color: var(--text-body);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    /* CRITICAL: allows buttons to stack on mobile */
}

.global-footer .footer-bottom p {
    margin: 0;
}

/* Mobile Menu Button (Hidden on Desktop) */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-dark);
}

/* Responsive */
@media (max-width: 900px) {

    .footer-content,
    .global-footer .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .tech-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .tech-row h4 {
        flex: none;
    }

    .tech-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
}


/* Services Hub Page Styles */
.page-intro {
    padding: 8rem 0 5rem 0;
}

.intro-content {
    max-width: 800px;
}

.lead-text-dark {
    font-size: 1.25rem;
    color: var(--text-body);
    line-height: 1.8;
}

.services-detailed-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.detailed-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.detailed-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary);
    transform: translateY(-4px);
}

.detailed-card .card-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 2rem;
}

.detailed-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.detailed-card p {
    color: var(--text-body);
    flex-grow: 1;
    margin-bottom: 2rem;
}

.tech-inline-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tech-inline-list li {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    background: var(--bg-light);
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.detailed-card .btn-secondary {
    align-self: flex-start;
}

@media (max-width: 768px) {
    .services-detailed-grid {
        grid-template-columns: 1fr;
    }

    .detailed-card {
        padding: 2rem;
    }
}

/* Service Detail Pages */
.service-hero {
    padding: 8rem 0 5rem 0;
}

.service-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.service-hero .lead-text-dark {
    font-size: 1.25rem;
    color: var(--text-body);
    max-width: 800px;
}

.content-section {
    padding: 5rem 0;
}

.content-section.bg-light {
    background-color: var(--bg-light);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2.5rem;
}

/* Problems / Deliverables Grids */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-box {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.feature-box h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feature-box p {
    margin-bottom: 0;
}

/* Tech List inside Detail Pages */
.tech-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.tech-item {
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-white);
}

.tech-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.tech-usage strong {
    color: var(--text-dark);
    display: block;
    margin-top: 1rem;
}

/* Process Section */
.process-steps {
    max-width: 800px;
    margin: 0 auto;
}

.process-step {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
}

.process-step:last-child {
    margin-bottom: 0;
}

.step-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.3;
    line-height: 1;
}

.step-content h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.step-content p {
    margin-bottom: 0;
}

/* FAQ Section */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.faq-answer {
    color: var(--text-body);
    margin-bottom: 0;
}

/* Unique Service Page Layout Utilities */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 768px) {
    .split-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.timeline-alt {
    border-left: 2px solid var(--border-color);
    padding-left: 2rem;
    margin-left: 1rem;
}

/* Minimal Grid Accordion Styles */
.tech-micro-accordion {
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.tech-micro-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: color 0.2s;
}

.tech-micro-btn:hover {
    color: var(--primary);
}

.tech-micro-icon {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--tertiary);
    transition: transform 0.3s;
}

.tech-micro-btn.active .tech-micro-icon {
    transform: rotate(45deg);
}

.tech-micro-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.tech-micro-inner {
    padding: 1rem 0;
    font-size: 0.95rem;
    color: var(--text-body);
    line-height: 1.6;
}

/* ========================================================================= */
/* FORMS & CONTACT PAGE  */
/* ========================================================================= */

.contact-form-wrapper {
    background: var(--bg-white);
    padding: 3rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

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

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    color: var(--text-dark);
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Form Grid */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-form-wrapper {
        padding: 2rem;
    }
}

/* Form Feedback States */
.form-feedback {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    display: none;
}

.form-feedback.is-visible {
    display: block;
}

.form-feedback.success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.form-feedback.error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Load State */
.btn.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.is-loading::after {
    content: "";
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    top: 50%;
    left: 50%;
    margin-top: -0.625rem;
    margin-left: -0.625rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: button-spin 0.8s linear infinite;
}

@keyframes button-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Spam Honeypot */
.trap-door {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
}

/* ========================================================================= */
/* BLOG LISTING PAGE */
/* ========================================================================= */

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

@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

.blog-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-body);
}

.blog-tag {
    background: var(--bg-light);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

.blog-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.blog-excerpt {
    font-size: 0.95rem;
    color: var(--text-body);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    /* Pushes the "Read more" link to the bottom */
}

.blog-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.blog-link:hover {
    color: var(--text-dark);
}

/* Section Title Alignment */
.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title svg {
    color: var(--primary);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.4rem;
    top: 0;
    width: 1rem;
    height: 1rem;
    background: var(--primary);
    border-radius: 50%;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.text-lg {
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--text-dark);
}

.card-alt {
    background: var(--bg-light);
    padding: 3rem;
    border-radius: 12px;
}

.card-alt h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.tech-list-simple {
    list-style: none;
    padding: 0;
}

.tech-list-simple li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.tech-list-simple li:last-child {
    border-bottom: none;
}

.tech-list-simple h4 {
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.accent-box {
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    background: var(--bg-white);
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
    .blog-sidebar {
        flex: 1 1 100% !important;
        position: static !important;
        margin-top: 3rem;
    }
}

@media (max-width: 768px) {

    /* Typography Scaling */
    h1,
    .hero h1,
    .service-hero h1,
    .page-intro h1 {
        font-size: 2.25rem;
    }

    h2,
    .cta-container h2 {
        font-size: 1.75rem;
    }

    .cta-container p {
        font-size: 1rem;
    }

    .lead-text,
    .lead-text-dark,
    .lead-text-light,
    .service-hero .lead-text-dark,
    .hero-subheadline {
        font-size: 1.125rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .footer-bottom {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Layout Spacing */
    section {
        padding: 4rem 0;
    }

    .hero,
    .service-hero,
    .page-intro {
        padding: 6rem 0 3rem 0;
        background-position: center;
    }

    /* Hero Adjustments */
    .hero-ctas {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .hero-ctas .btn {
        width: 100%;
        text-align: center;
    }

    .trust-strip {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    /* Grid Stacking */
    .grid,
    .services-grid,
    .detailed-grid,
    .tech-grid,
    .tech-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Header Nav Wrapping */
    header .container,
    .global-header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }

    /* Button Spacing */
    .btn {
        padding: 0.75rem 1rem;
        /* slightly less padding on mobile */
        white-space: normal;
        /* Allow wrapping if absolutely necessary, but center it */
        line-height: 1.4;
    }

    #submitBtn {
        font-size: 1rem;
        padding: 1rem;
    }

    nav {
        display: none;
        width: 100%;
        margin-top: 1rem;
        border-top: 1px solid var(--border-color);
        padding-top: 1rem;
    }

    nav.active {
        display: block;
    }

    nav ul,
    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links li a {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links li:last-child a {
        border-bottom: none;
    }

    /* Mega Menu Adjustments */
    .nav-dropdown {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        margin-top: 0;
        padding: 0;
        border: none;
        width: 100%;
    }

    .mega-menu-inner {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0 0 1rem;
        /* indentation for mobile dropdown */
    }

    .mega-menu-featured {
        display: none;
        /* Hide the bulky featured section on mobile */
    }

    .mega-menu-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .mega-menu-item {
        padding: 0.5rem 0;
    }

    .mega-menu-item:hover {
        background: transparent;
        transform: translateX(5px);
    }

    /* Footer Stacking */
    .footer-nav,
    .global-footer .footer-nav {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cookie-container {
        flex-direction: column;
        text-align: center;
    }
}