/* style.css - Twilio Inspired Redesign */

/* 1. Twilio-Inspired Global Styles & Variables */
:root {
    --primary-color: #F22F46; /* Twilio Red */
    --primary-hover-color: #D9243A;
    --secondary-color: #F4F5F8; /* Twilio's off-white background */
    --text-color: #121C2D; /* Twilio's dark navy text */
    --subtle-text-color: #606B85;
    --background-color: #ffffff;
    --border-color: #E1E3EA;
    --focus-ring-color: #0056e0; /* A standard blue for focus states */
    --header-height: 70px;
    --border-radius: 4px; /* Sharper corners like Twilio */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.05);
    --font-primary: 'Inter', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { line-height: 1.2; margin-bottom: 1rem; font-weight: 700; }
h1 { font-size: 3.25rem; letter-spacing: -1px; }
h2 { font-size: 2.5rem; letter-spacing: -0.5px; }
h3 { font-size: 1.25rem; }
p { margin-bottom: 1rem; color: var(--subtle-text-color); }
a { color: var(--focus-ring-color); text-decoration: none; font-weight: 500; }

/* 2. Twilio-Style Components (Buttons, Forms) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.875rem;
    transition: all 0.2s;
    border: 2px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.btn-primary:hover { background-color: var(--primary-hover-color); border-color: var(--primary-hover-color); }
.btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    border-color: var(--border-color);
}
.btn-secondary:hover { 
    border-color: var(--text-color); 
    background-color: var(--secondary-color);
}

.btn-blog {
    background-color: var(--text-color);
    color: #ffffff;
    border-color: var(--text-color);
}

.btn-blog:hover {
    background-color: #2a3b57; /* A slightly lighter navy for hover */
    border-color: #2a3b57;
}

.btn-full { display: block; width: 100%; padding-top: 14px; padding-bottom: 14px; }

.section-header { text-align: center; margin-bottom: 4rem; }
.section-header .section-subheading {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}
.section-header h2 { 
    color: var(--text-color); 
    margin-top: 0;
    margin-bottom: 1rem;
}
.section-header p { max-width: 650px; margin: 0 auto; font-size: 1.125rem; color: var(--subtle-text-color); }

/* 3. Header & Navigation */
.main-header {
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
    position: sticky; top: 0; z-index: 100; width: 100%;
}
.main-header .container { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--text-color); display: flex; align-items: center; }
.logo-img {
    height: 25px;
    width: auto;
    max-height: 25px;
    vertical-align: middle;
    margin-right: 10px; /* Space between logo and text */
}
.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}
.logo-tagline {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 2px;
}
.main-nav ul { list-style: none; display: flex; gap: 1.5rem; }
.main-nav ul { list-style: none; display: flex; gap: 1.5rem; }
.main-nav ul li { margin-left: 0; } /* Reset margin */
.main-nav a { color: var(--text-color); font-weight: 500; transition: color 0.3s; padding: 5px 0; font-size: 0.9rem; }
.main-nav a:hover { color: var(--primary-color); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* Hide mobile actions by default */
.mobile-nav-actions {
    display: none;
}

.mobile-menu-toggle { display: none; background: none; border: none; cursor: pointer; }
.mobile-menu-toggle .icon-bar { display: block; width: 25px; height: 2px; background-color: var(--text-color); margin: 6px 0; }

/* 4. Hero Section */
.hero { padding: 4rem 0; background: var(--background-color); }
.hero-case-study{
    padding: 6rem 0 0 0;
}
.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
}
.hero-content { text-align: left; }
.hero-subheading { display: inline-block; margin-bottom: 1rem; font-weight: 700; color: var(--primary-color); letter-spacing: 1px; font-size: 0.875rem; text-transform: uppercase; }
.hero h1 { color: var(--text-color); }
.hero p { font-size: 1.125rem; margin: 1.5rem 0 2.5rem; color: var(--subtle-text-color); max-width: 500px; }
.hero-buttons { display: flex; gap: 1rem; }

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px; /* Slightly larger radius for a softer look */
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

.hero-social-proof {
    margin-top: 4rem;
}
.hero-social-proof p {
    font-size: 0.875rem;
    color: var(--subtle-text-color);
    margin-bottom: 1rem;
}
.client-logos {
    display: flex;
    align-items: center;
    gap: 2rem;
    opacity: 0.7;
}
.client-logos img {
    height: 25px; /* Use height for consistency */
    width: auto;
    max-width: 100px; /* Prevent oversized logos */
    filter: grayscale(100%);
    opacity: 0.8;
    transition: filter 0.3s, opacity 0.3s;
}
.client-logos img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* 5. Services & Products Sections (Cards) */
.solutions-section { padding: 6rem 0; background: var(--secondary-color); }
.solutions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.solution-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    background: var(--background-color);
    transition: transform 0.3s, box-shadow 0.3s;
}
.solution-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.solution-card .card-icon { width: 40px; height: 40px; margin-bottom: 1.5rem; color: var(--primary-color); }
.solution-card .card-icon svg { width: 100%; height: 100%; }
.solution-card h3 { color: var(--text-color); font-size: 1.125rem; font-weight: 700; }

.demo-projects-section { padding: 6rem 0; }
.demos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.demo-card {
    display: flex; flex-direction: column; justify-content: space-between;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    background-color: var(--background-color);
    text-decoration: none;
    transition: transform 0.3s, background-color 0.3s;
}
.demo-card:hover { transform: translateY(-4px); }
.demo-card h3 { color: var(--text-color); margin-bottom: 0.75rem; }
.demo-card p { color: var(--subtle-text-color); flex-grow: 1; margin-bottom: 1.5rem; }
.demo-link { display: flex; align-items: center; font-weight: 700; color: var(--text-color); }
.demo-link svg { width: 20px; height: 20px; margin-left: 0.5rem; transition: transform 0.3s; }
.demo-card:hover .demo-link svg { transform: translateX(2px); }

/* About Us Section */
.about-us-section {
    padding: 6rem 0;
    background: var(--secondary-color);
    overflow: hidden; /* Prevents horizontal overflow issues */
}

/* 6. Why n8n Section */
.why-n8n-section { padding: 6rem 0; background: var(--background-color); }
.why-n8n-content { display: flex; align-items: center; gap: 5rem; }
.why-n8n-image { flex: 1; text-align: center; }
.why-n8n-image img { max-width: 100%; border-radius: var(--border-radius); box-shadow: var(--shadow-md); }
.why-n8n-text { flex: 1; }
.why-n8n-text ul { list-style: none; padding-left: 0; }
.why-n8n-text li { font-size: 1.1rem; margin-bottom: 1.5rem; padding-left: 2.25rem; position: relative; }
.why-n8n-text li::before {
    content: '';
    position: absolute; left: 0; top: 5px;
    width: 24px; height: 24px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%23F22F46"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd" /></svg>');
    background-size: contain;
}

/* CTA Section */
.cta-section {
    background-color: var(--text-color);
    color: #fff;
    padding: 8rem 0;
    text-align: center;
}
.cta-section-case {
    background-color: #F4F5F8;
    color: #fff;
    padding: 8rem 0;
    text-align: center;
}
.cta-section h2 {
    color: #fff;
    font-size: 2.25rem;
    margin-bottom: 1rem;
}
.cta-case-h2{
    color: #000;
}
.cta-section p {
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    font-size: 1.125rem;
}
.btn-secondary-case {
    background-color: transparent;
    color: #121C2D;
    border-color: #121C2D;
}
.btn-secondary-case:hover { 
    border-color: var(--text-color); 
    background-color: var(--secondary-color);
}
.cta-section p {
    color: var(--subtle-text-color);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    font-size: 1.125rem;
}
.cta-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    justify-content: center;
    gap: 1rem;
    max-width: 600px;
    margin: 2.5rem auto 0;
}
.cta-buttons .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.cta-buttons .btn-primary:hover {
    background-color: var(--primary-hover-color);
    border-color: var(--primary-hover-color);
}
.cta-buttons .btn-secondary {
    background-color: transparent;
    color: #fff;
    border-color: #fff;
}
.cta-buttons .btn-secondary:hover {
    background-color: #fff;
    color: var(--text-color);
}


/* 7. Updated Contact Section */
.contact-section-updated {
    padding: 6rem 0;
    background-color: #ffffff; /* White background as requested */
}

.contact-section-updated .section-header {
    margin-bottom: 3rem;
}

.contact-content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--background-color); /* White background for the container */
    border-radius: 8px;
    border: 1px solid var(--border-color); /* Add a border */
    box-shadow: var(--shadow-md); /* Use consistent shadow */
    overflow: hidden;
}

.contact-form-container {
    padding: 3rem;
    background-color: var(--background-color); /* Ensure form area is white */
}

.contact-form-updated .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact-form-updated .form-group {
    margin-bottom: 1.5rem; /* Add margin to all groups */
}

.contact-form-updated .form-row .form-group {
    margin-bottom: 0; /* Reset margin for groups in a row */
}

.contact-form-updated input,
.contact-form-updated textarea,
.contact-form-updated select {
    width: 100%;
    padding: 14px 18px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    font-family: var(--font-primary);
    font-size: 1rem;
    background-color: #ffffff; /* Change to white for a cleaner look */
    transition: border-color 0.3s, box-shadow 0.3s;
    -webkit-appearance: none; /* Removes default select styling */
    -moz-appearance: none;
    appearance: none;
}

.contact-form-updated select {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="%23606B85" width="20" height="20"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5" /></svg>');
    background-repeat: no-repeat;
    background-position: right 18px center;
    cursor: pointer;
}

.contact-form-updated input::placeholder,
.contact-form-updated textarea::placeholder {
    color: var(--subtle-text-color);
}

.contact-form-updated input:focus,
.contact-form-updated textarea:focus,
.contact-form-updated select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(242, 47, 70, 0.2);
    background-color: #ffffff;
}

.contact-form-updated .form-group:last-child {
    margin-bottom: 0;
}

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

.contact-alternatives {
    display: flex;
    flex-wrap: nowrap; /* Prevents wrapping */
    background-color: var(--secondary-color); /* Light gray background */
    border-top: 1px solid var(--border-color);
}

.contact-option {
    padding: 2rem;
    text-align: center;
    flex: 1; /* Allows items to grow and fill the space */
}

.contact-option:not(:last-child) {
    border-right: 1px solid var(--border-color);
}

.contact-option svg,
.contact-option i {
    width: 32px;
    height: 32px;
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: inline-block;
    line-height: 1;
}

.contact-option h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.contact-option p {
    margin-bottom: 0;
    color: var(--subtle-text-color);
}

.contact-option a {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.3s;
}

.contact-option a:hover {
    text-decoration-color: var(--primary-color);
}

/* 8. Footer */
.main-footer {
    background-color: var(--text-color);
    color: #a9b3c6; /* Lighter text for contrast on dark bg */
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-column .logo {
    color: #ffffff;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.footer-tagline {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: #a9b3c6;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #ffffff;
}

.social-links svg {
    width: 24px;
    height: 24px;
}

.footer-heading {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: #a9b3c6;
    font-weight: 400;
    transition: color 0.3s;
    font-size: 0.9rem;
}

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

.footer-bottom {
    border-top: 1px solid #3a4763; /* Darker border */
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.footer-copyright {
    color: #a9b3c6;
}

.language-switcher-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-switcher-footer .lang-option {
    color: #a9b3c6;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 0;
}

.language-switcher-footer .lang-option.active {
    color: #ffffff;
    background: none;
    box-shadow: none;
}

.language-switcher-footer .lang-separator {
    color: #a9b3c6;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    background-color: var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 4px;
    margin-left: 1rem;
}

.lang-option {
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--subtle-text-color);
    border-radius: var(--border-radius);
    transition: background-color 0.3s, color 0.3s;
    text-transform: uppercase;
    text-decoration: none;
}

.lang-option.active {
    background-color: var(--background-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* Demo products */
.demo-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 400px;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.demo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: #121C2D;
}

.demo-card-content {
    flex-grow: 1;
}

.demo-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.feature-tag {
    border: 1px solid #e2e8f0;
    padding: 0.25rem 0.75rem;
    background: #fff;
    color: #000;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.products-cta {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 12px;
}

.products-cta p {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.btn-products{
    background: #121C2D;
    color: #fff;
}

.btn-products:hover {
    background-color: #2a3b57;
    border-color: #2a3b57;
}

/* Team */

.team-member-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
}

.team-member-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.founder-card {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

.ai-assistant-card {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
}

.member-image {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.member-image img {
    border-radius: 50%;
    border: 4px solid #f1f5f9;
}

.ai-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.linkedin-link {
    margin-left: 8px;
    color: #0077B5;
    text-decoration: none;
    transition: color 0.2s ease;
}

.linkedin-link:hover {
    color: #005885;
}

.member-expertise {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.expertise-tag {
    padding: 0.25rem 0.75rem;
    background: #f1f5f9;
    color: #475569;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    padding: 0.25rem 0.75rem;
    background: #fff;
    color: #000;
}

.founder-card .expertise-tag {
    background: #fff;
    color: #000;
}

.ai-assistant-card .expertise-tag {
    background: #fff;
    color: #000;
}

.team-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 16px;
}

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

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: #121C2D;
    line-height: 1;
}

.stat-label {
    display: block;
    margin-top: 0.5rem;
    color: #64748b;
    font-weight: 500;
}

/* CTA */

.cta-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.benefit-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.benefit-icon {
    font-size: 1.5rem;
}

/* FAQ */

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 1000px;
}

.faq-answer > div {
    padding: 0 1.5rem 1.5rem 1.5rem;
    background: #f8fafc;
}

.faq-answer p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #475569;
}

.faq-answer ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.faq-answer li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: #475569;
}

.faq-answer strong {
    color: #1e293b;
    font-weight: 600;
}

.faq-cta {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: #121C2D;
    border-radius: 16px;
    border: 1px solid #bfdbfe;
}

.faq-cta p {
    margin-bottom: 1rem;
    color: #fff;
}

.faq-cta p:first-child {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Form */

.form-header {
   text-align: center;
   margin-bottom: 2rem;
   padding-bottom: 1rem;
   border-bottom: 1px solid #e2e8f0;
}

.form-header h3 {
   margin: 0 0 0.5rem 0;
   font-size: 1.5rem;
   font-weight: 700;
   color: #1e293b;
}

.form-header p {
   margin: 0;
   color: #64748b;
   font-size: 0.875rem;
}

.form-group label {
   display: block;
   margin-bottom: 0.5rem;
   font-weight: 600;
   color: #374151;
   font-size: 0.875rem;
}

.form-footer {
   text-align: center;
   margin-top: 1rem;
   padding-top: 1rem;
   border-top: 1px solid #e5e7eb;
}

.form-footer p {
   margin: 0;
   font-size: 0.75rem;
   color: #64748b;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 0.5rem;
}


@media (max-width: 768px) {
    .faq-answer > div {
        padding: 0 1rem 1rem 1rem;
    }

    .team-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* 9. Mobile Responsiveness */
@media (max-width: 1100px) {
    .main-nav,
    .desktop-nav-actions {
        display: none;
    }

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

    .main-nav.active {
        display: flex;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: white;
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding-bottom: 1rem; /* Add some padding at the bottom */
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }

    .main-nav.active ul {
        flex-direction: column;
        width: 100%;
    }

    .main-nav.active ul li {
        margin: 0;
        text-align: center;
    }

    .main-nav.active ul li a {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--border-color);
        font-size: 1.05em;
    }

    .main-nav.active ul li:last-child a {
        border-bottom: none;
    }

    .main-nav.active ul li a[href="#solutions"],
    .main-nav.active ul li a[href="pl.html#solutions"],
    .main-nav.active ul li a[href="en.html#solutions"] {
        padding-top: 1.5rem;
    }

    /* Show and style mobile actions when menu is active */
    .main-nav.active .mobile-nav-actions {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
        align-items: center;
        border-top: 1px solid var(--border-color);
        background-color: #f9fafb;
    }

    .main-nav.active .mobile-nav-actions .btn {
        width: 100%;
        max-width: 320px;
        padding: 14px 20px; /* Larger buttons for mobile */
        font-size: 1rem;
    }
    
    /* Style for the primary "Book a Call" button in mobile menu */
    .main-nav.active .mobile-nav-actions .btn-primary {
        color: #fff; /* Ensure text is white */
    }

    /* Style for the secondary "Blog" button in mobile menu */
    .main-nav.active .mobile-nav-actions .btn-blog {
        background-color: var(--text-color);
        color: #fff;
        border-color: var(--text-color);
    }
    
    .main-nav.active .mobile-nav-actions .btn-blog:hover {
        background-color: #2a3b57; /* Lighter navy */
        border-color: #2a3b57;
    }

    /* Improved Language Switcher for Mobile */
    .main-nav.active .mobile-nav-actions .language-switcher {
        width: auto; /* Let it size based on content */
        max-width: none;
        margin-top: 0.5rem;
        padding: 5px;
        background-color: #e1e3ea;
    }

    .main-nav.active .mobile-nav-actions .lang-option {
        padding: 10px 24px; /* Better touch targets */
        font-size: 0.9rem;
    }
}

@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0;
    }
    .hero-content {
        order: 2;
        text-align: center;
    }
    .hero-image {
        order: 1;
        margin-bottom: 3rem;
        width: 100%;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    .hero h1 {
        font-size: 2.75rem;
    }
    .hero p {
        margin-left: auto;
        margin-right: auto;
        max-width: 600px;
    }
    .hero-buttons {
        justify-content: center;
    }
    .client-logos {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }
    .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
    .why-n8n-content { flex-direction: column; text-align: center; }
    .why-n8n-text ul { text-align: left; }
}
@media (max-width: 768px) {
    .section-header-case-study h1 {
        font-size: 2.25rem;
    }

    .case-study-page .hero .section-header p {
        font-size: 1.1rem;
    }

    .case-study-main h2 {
        font-size: 1.75rem;
    }

    .case-study-main p,
    .case-study-main ul,
    .case-study-main ol {
        font-size: 1rem;
    }

    .case-study-main blockquote p {
        font-size: 1.1rem;
    }

    .cta-section-case {
        padding: 4rem 0;
    }

    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }

    .hero {
        padding: 4rem 0;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 350px; /* Set a max-width for the buttons */
    }

    /* Contact Form Responsive */
    .contact-form-updated .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem; /* Add vertical gap for stacked fields */
    }

    .contact-form-updated .form-row .form-group {
        margin-bottom: 0; /* Reset margin as gap is now used */
    }

    .contact-alternatives {
        flex-direction: column;
    }

    .contact-option {
        border-right: none; /* Remove side border */
    }

    .contact-option:not(:last-child) {
        border-bottom: 1px solid var(--border-color); /* Add bottom border to all but the last */
        border-right: none; /* Ensure no right border is applied */
    }
    
    .contact-form-container {
        padding: 2rem;
    }
}

/* Custom styles for product cards */
.centered-button-container {
    text-align: center;
    margin-top: 1.5rem; /* Add some space above the button */
}

.demo-card .btn {
    display: inline-block; /* Ensures it respects text-align: center */
}

/* Custom styles for team members section */
.team-grid {
    display: flex;
    flex-wrap: nowrap; /* Ensure items stay in one row */
    gap: 2rem; /* Consistent gap between cards */
    overflow-x: auto; /* Add horizontal scroll if cards overflow */
    padding-bottom: 1rem; /* Add padding for scrollbar */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    justify-content: center; /* Center the items */
}

.team-grid::-webkit-scrollbar {
    display: none;  /* Chrome, Safari, Opera */
}

.team-member-card {
    flex: 0 0 auto; /* Prevent shrinking, allow growing if needed, base width */
    width: 280px; /* Set a fixed width for each card */
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    background-color: var(--background-color);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
}

.team-member-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.team-member-card img {
    width: 120px; /* Fixed size for profile pictures */
    height: 120px;
    border-radius: 50%; /* Circular images */
    object-fit: cover; /* Ensure images cover the area */
    object-position: center top; /* Align image to the top to prevent cropping heads */
    margin-bottom: 1.5rem;
    border: 3px solid var(--primary-color); /* Highlight border */
}

.team-member-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.team-member-role {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.team-member-card p {
    font-size: 0.875rem;
    color: var(--subtle-text-color);
    margin-bottom: 0; /* Remove bottom margin for the last element */
}

@media (max-width: 992px) {
    .team-grid {
        flex-wrap: wrap;
        justify-content: center;
        overflow-x: hidden; /* Zapobiega "przejmowaniu" przewijania na urządzeniach dotykowych */
    }

    .team-member-card {
        width: 100%;
        max-width: 350px; /* Ograniczenie szerokości na większych ekranach mobilnych */
    }
}

/* 10. FAQ Section */
.faq-section {
    padding: 6rem 0;
    background: var(--secondary-color);
}

.faq-accordion {
    max-width: 750px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-color);
    background-color: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s;
}

.faq-question:hover {
    background-color: #f9fafb;
}

.faq-question span {
    flex-grow: 1;
    padding-right: 1rem;
}

.faq-icon {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
    transition: transform 0.3s ease-in-out;
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    max-height: 300px; /* Adjust as needed */
}

/* 11. Case Study Page Styles - ENHANCED UX/UI */

.hero-case-study {
    padding: 4rem 0;
    background: linear-gradient(45deg, var(--secondary-color), #fff);
}

.section-header-case-study h1 {
    font-size: 3rem;
}

.case-study-content {
    padding: 5rem 0;
}

.case-study-content .content-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile first */
    gap: 3rem;
}

@media (min-width: 992px) {
    .case-study-content .content-grid {
        grid-template-columns: 280px 1fr; /* Fixed sidebar, flexible content */
        gap: 4rem;
    }

    .case-study-sidebar {
        position: sticky;
        top: 100px; /* Apply sticky positioning only on larger screens */
    }
}

/* Enhanced Sidebar */
.case-study-sidebar {
    position: relative; /* Changed from sticky to relative by default */
    top: auto;
}

.case-study-sidebar .sidebar-block {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.case-study-sidebar h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.case-study-sidebar p,
.case-study-sidebar ul {
    margin-bottom: 0;
    color: var(--subtle-text-color);
    font-size: 0.95rem;
}

.case-study-sidebar ul {
    list-style: none;
    padding-left: 0;
}

/* Highlighted Results Block */
.case-study-sidebar .sidebar-block:last-child {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.case-study-sidebar .sidebar-block:last-child h4 {
    color: #fff;
}

.case-study-sidebar .sidebar-block:last-child p,
.case-study-sidebar .sidebar-block:last-child ul,
.case-study-sidebar .sidebar-block:last-child li {
    color: rgba(255, 255, 255, 0.9);
}

.case-study-sidebar ul li {
    font-weight: 500;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.case-study-sidebar ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
}

.case-study-sidebar .sidebar-block:last-child ul li::before {
    color: #fff;
}


/* Enhanced Main Content Area */
.case-study-main > div {
    margin-bottom: 4rem;
}

.case-study-main h2 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    max-width: 100%;
    word-break: break-word;
}

.case-study-main p,
.case-study-main ul,
.case-study-main ol {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 75ch; /* Optimal line length for readability */
}

.case-study-main ul,
.case-study-main ol {
    padding-left: 1.5rem;
}

.case-study-main blockquote {
    margin: 2.5rem 0;
    padding: 2rem;
    border-left: 4px solid var(--primary-color);
    background-color: var(--secondary-color);
    font-style: normal;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.case-study-main blockquote p {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-color);
}

.case-study-main blockquote footer {
    font-style: normal;
    font-weight: 500;
    color: var(--subtle-text-color);
}

.section-header-case-study{
    margin-bottom: 0;
    text-align: left;
}

.case-study-page .hero .section-header p {
    max-width: 75ch;
    margin: 1rem 0 0 0;
    font-size: 1.2rem;
}

/* Refined CTA Section */
.cta-section-case {
    background-color: var(--secondary-color);
    padding: 6rem 0;
    text-align: center;
}
.cta-case-h2 {
    color: var(--text-color);
    font-size: 2rem;
}
.cta-case-p {
    color: var(--subtle-text-color);
    max-width: 600px;
    margin: 1rem auto 2.5rem;
    font-size: 1.125rem;
}
.btn-secondary-case {
    background-color: #fff;
    color: var(--text-color);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}
.btn-secondary-case:hover {
    border-color: var(--text-color);
    background-color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Newsletter Form in Footer */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.newsletter-form input {
    width: 100%;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    border: 1px solid #3a4763;
    background-color: #121c2d;
    color: #ffffff;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.newsletter-form input::placeholder {
    color: #a9b3c6;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(242, 47, 70, 0.3);
}

.newsletter-form .btn {
    width: 100%;
    padding: 10px 20px;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Increase size of LinkedIn icon for team members */
.team-member-role .fa-linkedin {
    font-size: 1.2em; /* Adjust size as needed */
    vertical-align: middle; /* Improves alignment with text */
    transition: transform 0.2s;
}

.team-member-role a:hover .fa-linkedin {
    transform: scale(1.1); /* Slight zoom on hover */
}

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--text-color);
    color: #fff;
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);

    /* Initial state: hidden and off-screen */
    visibility: hidden;
    opacity: 0;
    transform: translateY(100%);
    
    /* Define transitions for when properties change */
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out, visibility 0s linear 0.5s;
}

.cookie-consent-banner.active {
    /* Active state: visible and on-screen */
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    
    /* Ensure transition applies immediately when class is added */
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

.cookie-consent-banner p {
    margin: 0;
    margin-right: 1.5rem;
    color: #fff;
}

.cookie-consent-banner a {
    color: var(--primary-color);
    text-decoration: underline;
}

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

    .cookie-consent-banner p {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

/* 12. Custom Alert Styles */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.custom-alert-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.custom-alert-box {
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.custom-alert-overlay.visible .custom-alert-box {
    transform: scale(1);
}

.custom-alert-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.custom-alert-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.custom-alert-message {
    font-size: 1rem;
    color: var(--subtle-text-color);
    margin-bottom: 2rem;
}

.custom-alert-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.custom-alert-button:hover {
    background-color: var(--primary-hover-color);
}

.btn-book{
    color: #fff;
}

/* 13. Blog Section Styles */
.blog-section {
    padding: 6rem 0;
    background-color: var(--secondary-color);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

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

.blog-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.blog-card-excerpt {
    font-size: 1rem;
    color: var(--subtle-text-color);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.blog-card-link {
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    align-self: flex-start;
}

.blog-cta {
    display: flex;
    justify-content: center;
    text-align: center;
}

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

@media (min-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
