/* Prevent styles from breaking when dev tools open */
html:not(.debug-mode) {
    /* This helps prevent styles from resetting when inspect is opened */
    contain: layout style;
    /* Ensure scrolling works */
    overflow-y: auto;
}

html.debug-mode * {
    /* Add a subtle outline to elements when in debug mode */
    outline: 1px solid transparent;
}

/* Custom styles for the Workflows templates - Zapier-inspired */

:root {
    /* Tactful AI color palette */
    --primary-color: #0c646e;
    /* Tactful AI teal */
    --primary-hover: #0b464b;
    --secondary-color: #667085;
    /* Tactful AI secondary */
    --text-color: #333;
    /* Default text color for dark text on light backgrounds */
    --text-on-dark: #fff;
    /* White text for dark backgrounds */
    --text-light: #5E6C84;
    --border-color: #E6E8EB;
    --background-light: #F5F8FA;
    --background-white: #FFFFFF;
    --success-color: #36B37E;
    --warning-color: #FFC31E;
    --danger-color: #FF5630;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.05);
    --border-radius-sm: 4px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --transition: all 0.2s ease;
    --category-color-default: #6670851a;
}

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

html,
body {
    height: 100%;
    margin: 0;
    overflow-y: auto;
    /* Enable vertical scrolling */
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--background-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: var(--transition);
}

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

/* Layout & Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    /* Remove comment to ensure container can scroll */
    /* overflow: hidden; Prevent container overflow */
    overflow: visible;
    /* Allow content to be scrollable */
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    padding: 0 15px;
    flex: 1;
}

/* Enhanced Header & Navigation Styles */
.site-header {
    background-color: var(--background-white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    height: 70px;
    /* Fixed height for consistency */
    display: flex;
    align-items: center;
}

.site-header .container {
    width: 100%;
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.site-logo a {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    font-weight: 700;
    letter-spacing: -0.5px;
    padding: 0.5rem 0;
    position: relative;
    overflow: hidden;
}

.site-logo a:hover {
    opacity: 0.9;
}

.site-logo a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.site-logo a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.main-nav {
    height: 100%;
}

.nav-menu {
    display: flex;
    list-style: none;
    height: 100%;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.nav-item {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.nav-link {
    color: var(--text-color);
    font-weight: 500;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    height: 100%;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(12, 100, 110, 0.05);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Active state for navigation */
.nav-item.active .nav-link {
    color: var(--primary-color);
    font-weight: 600;
    background-color: rgba(12, 100, 110, 0.08);
}

.nav-item.active .nav-link::after {
    width: 100%;
}

/* Mobile menu button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Dropdown menu */
.nav-item.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: var(--background-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
    padding: 0.5rem 0;
}

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

.dropdown-item {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: var(--background-light);
    color: var(--primary-color);
}

/* Home page specific navbar styling */
.home-page .site-header {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
}

/* Workflows page specific navbar styling */
.workflows-page .site-header {
    border-bottom: 2px solid var(--primary-color);
}

/* Hero Section */
.hero-section {
    background-color: var(--background-white);
    background-image: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('/images/hero-background.jpg');
    background-size: cover;
    background-position: center;
    padding: 5rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Search Bar and Results */
.search-container {
    max-width: 600px;
    margin: 2rem auto;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    padding-left: 3rem;
    border-radius: 50px;
    border: 2px solid var(--border-color);
    font-size: 1rem;
    background-color: var(--background-white);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(12, 100, 110, 0.2);
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.2rem;
}

/* Search Results Styling */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--background-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

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

.search-result-item:hover {
    background-color: var(--background-light);
}

.search-result-title {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.search-result-description {
    font-size: 0.875rem;
    color: var(--text-light);
}

.search-highlight {
    background-color: rgba(12, 100, 110, 0.1);
    color: var(--primary-color);
    padding: 0 0.25rem;
    border-radius: 2px;
}

.no-results {
    padding: 2rem;
    text-align: center;
    color: var(--text-light);
    background-color: var(--background-light);
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

/* Workflow Cards Grid */
.workflows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

/* Workflow Cards */
.workflow-card {
    background-color: var(--background-white) !important;
    border-radius: var(--border-radius) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    border: 1px solid var(--border-color) !important;
    max-width: 100% !important;
    /* Ensure card doesn't overflow its container */
}

/* New header layout for workflow cards */
.workflow-card-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 1rem !important;
    flex-wrap: wrap !important;
    /* Allow wrapping for smaller screens */
}

/* Icon styling for workflow cards */
.workflow-card-icon {
    display: flex !important;
    align-items: center !important;
    color: var(--primary-color) !important;
    gap: 8px !important;
}

/* Make category card icons slightly smaller */
.category-icon i {
    font-size: 1.5rem;
}

/* Category-specific icon colors */
.workflow-card[data-categories="routing"] .workflow-card-icon {
    color: var(--primary-color);
}

.workflow-card[data-categories="ai"] .workflow-card-icon {
    color: var(--success-color);
}

.workflow-card[data-categories="developer_tools"] .workflow-card-icon {
    color: var(--warning-color);
}

.workflow-card[data-categories="supervisor_routing"] .workflow-card-icon {
    color: var(--secondary-color);
}

/* Default style for any workflow card icon that doesn't match the above rules */
.workflow-card:not([data-categories^="a"]):not([data-categories^="b"]):not([data-categories^="c"]):not([data-categories^="d"]):not([data-categories^="e"]):not([data-categories^="f"]):not([data-categories^="g"]):not([data-categories^="h"]):not([data-categories^="i"]):not([data-categories^="j"]):not([data-categories^="k"]):not([data-categories^="l"]):not([data-categories^="m"]):not([data-categories^="n"]):not([data-categories^="o"]):not([data-categories^="p"]):not([data-categories^="q"]):not([data-categories^="r"]):not([data-categories^="s"]):not([data-categories^="t"]):not([data-categories^="u"]):not([data-categories^="v"]):not([data-categories^="w"]):not([data-categories^="x"]):not([data-categories^="y"]):not([data-categories^="z"]) .workflow-card-icon {
    color: var(--category-color-default);
}

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

/* Card titles - prevent overflow */
.workflow-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    word-break: break-word;
    /* Prevent long titles from overflowing */
    overflow-wrap: break-word;
}

/* Card descriptions - prevent overflow */
.workflow-card-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    overflow-wrap: break-word;
    word-break: break-all;
    /* For really long words/strings */
}

.workflow-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    /* Allow items to wrap on small screens */
    gap: 0.75rem;
    /* Add gap for better spacing when wrapped */
}

.workflow-card-footer .btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    transition: all 0.3s ease;
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
    font-weight: 600;
}

.workflow-card-footer .btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Category Badges */
.category-badges {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    max-width: 100%;
    /* Prevent overflow */
    gap: 0.5rem;
    /* Add spacing between badges */
}

/* Make category badges more prominent in cards */
.workflow-card .category-badge {
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: 20px;
    /* Make badges rounded */
    padding: 0.3rem 0.9rem;
    /* Add more horizontal padding */
    display: inline-block;
    font-size: 0.8rem;
    text-transform: uppercase;
    /* Make text uppercase for better visibility */
}

.category-badge {
    border-radius: 20px;
    padding: 0.3rem 0.9rem;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.category-badge.routing {
    background-color: rgba(12, 100, 110, 0.9);
    color: white;
}

.category-badge.ai {
    background-color: rgba(54, 179, 126, 0.9);
    color: white;
}

.category-badge.developer-tools,
.category-badge.developer_tools {
    background-color: rgba(255, 195, 30, 0.9);
    color: #333;
}

.category-badge.supervisor-routing,
.category-badge.supervisor_routing {
    background-color: rgba(102, 112, 133, 0.9);
    color: white;
}

/* Default style for any category badge that doesn't match specific categories */
.category-badge:not(.routing):not(.ai):not(.developer-tools):not(.developer_tools):not(.supervisor-routing):not(.supervisor_routing) {
    background-color: var(--category-color-default);
    color: var(--text-color);
}

/* Platform badges */
.workflow-card-platform {
    border-radius: 20px;
    padding: 0.3rem 0.9rem;
    font-weight: 600;
    font-size: 0.8rem;
}

.workflow-card-platform:not([class*="category-badge"]) {
    background-color: rgba(102, 112, 133, 0.1);
    color: var(--secondary-color);
}

/* Data-Driven Workflows Grid */
.workflows-section {
    padding: 3rem 0;
}

.workflows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.workflow-card {
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--shadow-sm);
}

.workflow-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.workflow-card-icons {
    display: flex;
    gap: 0.75rem;
    padding: 1.25rem;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.25rem;
}

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

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

.workflow-card-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    flex-grow: 1;
}

.workflow-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: auto;
}

.workflow-card-category {
    background-color: rgba(12, 100, 110, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.workflow-card-platform {
    background-color: rgba(102, 112, 133, 0.1);
    color: var(--secondary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.workflow-card-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    text-indent: -9999px;
}

/* Filter Container */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: var(--background-light);
    border-radius: var(--border-radius);
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.search-group {
    flex: 1;
    min-width: 200px;
}

.search-input-wrapper {
    position: relative;
}

.filter-results {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.result-count {
    font-size: 0.9rem;
    color: var(--text-light);
}

#clear-filters {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    display: none;
}

#clear-filters:hover {
    background-color: var(--background-light);
    border-color: var(--primary-color);
}

/* Animation for filtered cards */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-visible {
    animation: fadeIn 0.3s ease-in-out;
}

/* Workflow Tags */
.workflow-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.workflow-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    background-color: var(--background-light);
    color: var(--text-color);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.workflow-tag:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-on-dark);
}

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

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

.btn-secondary:hover {
    background-color: #555a70;
}

.btn-outline {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--text-light);
    background-color: var(--background-light);
}

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

.btn-icon {
    margin-right: 0.5rem;
}

/* Filter Sidebar */
.filter-sidebar {
    padding: 1.5rem;
    background-color: var(--background-white);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    position: sticky;
    top: 100px;
}

.filter-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.filter-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.filter-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-list {
    list-style: none;
}

.filter-item {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.filter-checkbox {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

/* Style for radio buttons */
.filter-radio {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.filter-label {
    color: var(--text-color);
    cursor: pointer;
}

.filter-count {
    margin-left: auto;
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Workflow Detail Page */
.workflow-header {
    padding: 3rem 0;
    background-color: var(--background-white);
    /* border-bottom: 1px solid var(--border-color); */
}

.workflow-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.workflow-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.workflow-meta-item {
    display: flex;
    align-items: center;
    margin-right: 1.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.workflow-meta-icon {
    margin-right: 0.5rem;
}

.workflow-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.workflow-content {
    padding: 3rem 0;
}

.workflow-section {
    margin-bottom: 3rem;
}

.workflow-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

/* Steps Section */
.steps-container {
    margin: 2rem 0;
}

.step-item {
    display: flex;
    margin-bottom: 2rem;
    position: relative;
}

.step-number {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 1.5rem;
    position: relative;
    z-index: 1;
}

.step-content {
    flex-grow: 1;
    background-color: var(--background-white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.step-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Footer */
footer {
    background-color: var(--background-white);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

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

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

/* Footer Styles - Updated with Tactful branding */
.site-footer {
    flex-shrink: 0;
    background-color: #004952;
    /* Tactful teal color */
    color: white;
    padding: 3rem 0 1rem;
    width: 100%;
}

.site-footer .container {
    width: 100%;
}

.footer-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.footer-branding {
    flex: 0 0 100%;
    max-width: 450px;
    margin-bottom: 2rem;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.25rem;
    letter-spacing: -0.03em;
}

.footer-logo h2 sup {
    font-size: 0.8rem;
    vertical-align: super;
}

.footer-logo p {
    font-size: 0.95rem;
    color: #ffffff;
    margin-bottom: 1rem;
}

.footer-address {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

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

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 2.2rem;
    height: 2.2rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
}

.footer-nav-column h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1.2rem;
}

.footer-nav-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav-column ul li {
    margin-bottom: 0.8rem;
}

.footer-nav-column ul li a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-nav-column ul li a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
    color: white;
}

@media (max-width: 992px) {
    .footer-main {
        flex-direction: column;
    }

    .footer-branding {
        margin-bottom: 3rem;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .footer-nav {
        gap: 2.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-bottom-links {
        flex-direction: column;
        gap: 0.8rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 1rem;
    }

    .logo {
        margin-bottom: 1rem;
    }

    .menu {
        width: 100%;
        justify-content: space-between;
    }

    .hero-title {
        font-size: 2rem;
    }

    .workflows-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .site-header {
        height: 70px;
        /* Keep fixed height even on mobile */
        /* Removed padding that was changing the height */
    }

    .header-wrapper {
        /* Changed to row to maintain header height */
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        height: 100%;
    }

    .main-nav {
        width: auto;
    }

    .nav-menu {
        flex-wrap: nowrap;
        height: 100%;
    }

    .nav-item {
        height: 100%;
    }

    .nav-link {
        height: 100%;
        padding: 0 0.75rem;
    }

    .nav-link::after {
        bottom: 0;
        height: 2px;
    }

    .categories-page .grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .workflow-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .workflow-card-footer .btn {
        width: 100%;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 3rem 0;
    }

    .workflows-grid {
        grid-template-columns: 1fr;
    }

    .workflow-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .workflow-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        width: 100%;
        padding: 0.75rem 0;
        justify-content: center;
    }

    .categories-page .grid {
        grid-template-columns: 1fr;
    }
}

/* Filter Controls - Enhanced Dropdown Styling */
.workflows-filters {
    margin: 2rem 0;
    background-color: var(--background-white);
    border-radius: var(--border-radius);
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid #dde1e7;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
}

.filter-group {
    flex: 1;
    min-width: 220px;
    margin-bottom: 0.5rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.filter-select {
    width: 100%;
    height: 50px;
    padding: 0 1.25rem;
    border-radius: var(--border-radius);
    border: 2px solid #dde1e7;
    background-color: var(--background-white);
    font-size: 1rem;
    color: var(--text-color);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%235E6C84'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.filter-select:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 3px 8px rgba(102, 112, 133, 0.1);
    background-color: #fafbfd;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(12, 100, 110, 0.15);
}

/* Style for select options */
.filter-select option {
    padding: 10px;
    background-color: white;
    color: var(--text-color);
}

@media (max-width: 768px) {
    .filter-controls {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group {
        width: 100%;
    }
}

/* Filter Actions */
.filter-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
}

.filter-actions button {
    flex: 1;
}

/* Active filter styles */
.filter-checkbox:checked+.filter-label {
    color: var(--primary-color);
    font-weight: 600;
}

.filter-item:hover .filter-label {
    color: var(--primary-color);
    cursor: pointer;
}

/* No results message */
.no-results {
    padding: 2.5rem;
    text-align: center;
    background-color: var(--background-light);
    border-radius: var(--border-radius);
    border: 1px dashed var(--border-color);
}

.no-results p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Workflow Icons in detail page */
.workflow-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.workflow-icons i {
    font-size: 2.8rem;
    transition: transform 0.3s ease;
}

.workflow-icons i:hover {
    transform: scale(1.1);
}


/* Fix for category pages grid display */
.categories-page .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
    width: 100%;
    max-width: 100%;
}

/* Ensure proper spacing and alignment for category pages */
.categories-page h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-color);
    word-break: break-word;
    /* Prevent long titles from overflowing */
}

/* Make category pages responsive */
@media (max-width: 768px) {
    .categories-page .grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .categories-page .grid {
        grid-template-columns: 1fr;
    }
}

/* Override any Tailwind classes that might be affecting the grid */
.categories-page .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Workflow Icons in detail page */
.workflow-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.workflow-icons i {
    font-size: 2.8rem;
    transition: transform 0.3s ease;
}

.workflow-icons i:hover {
    transform: scale(1.1);
}

/* Category-specific icon colors in detail page */
.workflow-detail[data-categories="routing"] .workflow-icons i {
    color: var(--primary-color);
}

.workflow-detail[data-categories="ai"] .workflow-icons i {
    color: var(--success-color);
}

.workflow-detail[data-categories="developer_tools"] .workflow-icons i {
    color: var(--warning-color);
}

.workflow-detail[data-categories="supervisor_routing"] .workflow-icons i {
    color: var(--secondary-color);
}

.workflow-card-icon i {
    font-size: 1.5rem !important;
    transition: transform 0.3s ease !important;
    display: inline-block !important;
    /* Force visibility even when dev tools open */
    visibility: visible !important;
    opacity: 1 !important;
}

/* Category Cards Styling */
.category-card {
    border: 1px solid var(--border-color) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.category-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

/* Category Icon Styling */
.category-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
}

.category-icon i {
    font-size: 1.8rem !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: var(--secondary-color);
}

/* Category-specific icon colors */
.category-card[data-categories="routing"] .category-icon i {
    color: var(--primary-color) !important;
}

.category-card[data-categories="ai"] .category-icon i {
    color: var(--success-color) !important;
}

.category-card[data-categories="developer_tools"] .category-icon i {
    color: var(--warning-color) !important;
}

.category-card[data-categories="supervisor_routing"] .category-icon i {
    color: var(--secondary-color) !important;
}

/* Card Header Layout for Categories Page */
.categories-page .workflow-card-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 1.2rem !important;
}

/* Category Page Grid Layout */
.categories-page .grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 2rem !important;
    width: 100% !important;
}

/* Enhanced Category Badges for Workflow Detail Page */
.workflow-detail .category-badges {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    gap: 0.7rem;
    /* Slightly larger gap for detail page badges */
}

.workflow-detail .category-badge {
    font-weight: 700;
    letter-spacing: 0.03em;
    border-radius: 20px;
    padding: 0.4rem 1.1rem;
    /* Larger padding for better visibility */
    display: inline-block;
    font-size: 0.85rem;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* Subtle shadow for depth */
    transition: all 0.2s ease;
}

.workflow-detail .category-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Enhance specific category colors with better opacity and vibrancy */
.workflow-detail .category-badge.routing {
    background-color: rgba(12, 100, 110, 0.95);
    color: white;
}

.workflow-detail .category-badge.ai {
    background-color: rgba(54, 179, 126, 0.95);
    color: white;
}

.workflow-detail .category-badge.developer_tools {
    background-color: rgba(255, 195, 30, 0.95);
    color: #333;
}

.workflow-detail .category-badge.supervisor_routing {
    background-color: rgba(102, 112, 133, 0.95);
    color: white;
}

/* Default style for any workflow detail category badge that doesn't match specific categories */
.workflow-detail .category-badge:not(.routing):not(.ai):not(.developer-tools):not(.developer_tools):not(.supervisor-routing):not(.supervisor_routing) {
    background-color: var(--category-color-default);
    color: var(--text-color);
}

/* Enhanced workflow sidebar styles based on screenshot */
.workflow-sidebar {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-top: 20px;
}

.workflow-sidebar .sidebar-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.workflow-sidebar .sidebar-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.workflow-sidebar .sidebar-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 15px;
}

/* Requirements styling */
.workflow-sidebar .requirements-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.workflow-sidebar .requirements-list .sidebar-item {
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-color);
    display: flex;
    align-items: flex-start;
    line-height: 1.5;
}

.workflow-sidebar .requirements-list .sidebar-item:last-child {
    margin-bottom: 0;
}

/* Tags styling */
.workflow-sidebar .tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.workflow-sidebar .tag {
    display: inline-block;
    padding: 4px 10px;
    background-color: #f5f5f5;
    color: var(--text-color);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition);
}

.workflow-sidebar .tag:hover {
    background-color: #e9e9e9;
    cursor: pointer;
}

/* Tag specific colors */
.workflow-sidebar .tag.routing {
    background-color: rgba(12, 100, 110, 0.1);
    color: var(--primary-color);
}

.workflow-sidebar .tag.agent {
    background-color: rgba(102, 112, 133, 0.1);
    color: var(--secondary-color);
}

.workflow-sidebar .tag.assignment {
    background-color: rgba(54, 179, 126, 0.1);
    color: var(--success-color);
}

.workflow-sidebar .tag.conversation {
    background-color: rgba(255, 195, 30, 0.1);
    color: var(--warning-color);
}

/* Workflow details list */
.workflow-sidebar .workflow-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.workflow-sidebar .workflow-details-list li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.workflow-sidebar .workflow-details-list li:last-child {
    margin-bottom: 0;
}

.workflow-sidebar .detail-label {
    color: var(--text-light);
    font-weight: 500;
}

.workflow-sidebar .detail-value {
    color: var(--text-color);
    font-weight: 500;
}

/* Related workflows list */
.workflow-sidebar .related-workflows {
    list-style: none;
    padding: 0;
    margin: 0;
}

.workflow-sidebar .related-workflows li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.workflow-sidebar .related-workflows li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.workflow-sidebar .related-workflows li a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    display: block;
    padding: 5px 0;
}

.workflow-sidebar .related-workflows li a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}