/* Main Navigation */
.main-nav {
    background: white;
    border-bottom: 1px solid #f1f5f9;
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Logo and Navigation Layout */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    padding: 8px 0;
    margin-right: 40px;
}

.nav-logo img {
    height: 52px;
    width: auto;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-item {
    position: relative;
}

.nav-item:not(:last-child) {
    margin-right: 20px;
}

/* Navigation Buttons */
.nav-button {
    position: relative;
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
    color: #4b5563;
    padding: 8px 16px;
    border-radius: 4px;
    transition: color 0.2s ease, transform 0.15s ease;
}

.nav-button:hover {
    color: #000000;
    transform: translateY(-1px);
}

.nav-button:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background-color: #4a6baf;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.nav-button:hover:after {
    transform: scaleX(1);
}

.nav-arrow {
    width: 12px;
    height: 12px;
    margin-left: 4px;
    color: inherit;
    transition: transform 0.2s ease;
}

.nav-item:hover .nav-arrow {
    transform: rotate(180deg);
}

/* Dropdown Styles */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    margin-top: 8px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Products Grid - Two Columns */
.products-grid {
    min-width: 680px;
    max-width: 800px;
    padding: 16px;
}

.products-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.product-column {
    min-width: 240px;
    padding-right: 16px;
    padding-left: 16px;
    border-right: 1px solid #e5e7eb;
}

.product-column:first-child {
    padding-left: 8px;
}

.product-column:last-child {
    border-right: none;
    padding-right: 8px;
}

.products-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 600px;
    overflow-y: auto;
}

/* Add these new classes to differentiate function and industry columns */
.function-column {
    border-right: 1px solid #e5e7eb;
    padding-right: 16px;
}

.industry-column {
    border-right: none;
    background-color: #f9fafb;
    border-radius: 6px;
}

.industry-column:last-child {
    padding-left: 4px;
}

/* Keep these common dropdown styles combined */
.products-grid .dropdown-item,
.solutions-grid .dropdown-item,
.resources-grid .dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px;
    border-radius: 6px;
}

.products-grid .dropdown-item:hover,
.solutions-grid .dropdown-item:hover,
.resources-grid .dropdown-item:hover {
    background-color: #f0f4f9;
}

.products-grid .dropdown-item i,
.solutions-grid .dropdown-item i,
.resources-grid .dropdown-item i {
    flex-shrink: 0;
    font-size: 15px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.products-grid .dropdown-item h4,
.solutions-grid .dropdown-item h4,
.resources-grid .dropdown-item h4 {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 2px;
    margin-right: 20px;
}

.products-grid .dropdown-item p,
.solutions-grid .dropdown-item p,
.resources-grid .dropdown-item p {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    transition: all 0.25s ease-in-out;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(-8px);
    margin: 0;
    pointer-events: none;
}

.products-grid .dropdown-item:hover p,
.solutions-grid .dropdown-item:hover p,
.resources-grid .dropdown-item:hover p {
    color: #000000;
    opacity: 1;
    max-height: 60px; /* Enough for most descriptions */
    transform: translateY(0);
    margin-top: 2px;
    pointer-events: auto;
}

.products-grid .subscription-badge {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 12px;
    background-color: #635bff;
    color: white;
}

/* Solutions Grid - Three Columns */
.solutions-grid {
    min-width: 780px;
    max-width: 900px;
    padding: 10px;
}

.solutions-columns {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1.2fr;
    gap: 8px;
}

.solution-column {
    min-width: 240px;
    padding-right: 10px;
    padding-left: 10px;
}

.solution-column:first-child {
    padding-left: 4px;
}

/* Add these new classes to differentiate function and industry columns */
.function-column {
    border-right: 1px solid #e5e7eb;
    padding-right: 16px;
}

.industry-column {
    border-right: none;
}

/* Second column (first industry column) */
.solutions-columns .industry-column:nth-child(2) {
    padding-left: 16px;
    padding-right: 10px;
    min-width: 220px;
}

/* Third column (second industry column) */
.solutions-columns .industry-column:nth-child(3) {
    padding-left: 10px;
    padding-right: 4px;
    min-width: 220px;
}

.solutions-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
}

/* Resources Grid - Two Columns with Vertical Lists */
.resources-grid {
    min-width: 550px;
    max-width: 670px;
    padding: 10px;
}

.resources-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.resource-column {
    min-width: 220px;
    padding-right: 10px;
    padding-left: 10px;
    border-right: 1px solid #e5e7eb;
}

.resource-column:first-child {
    padding-left: 4px;
}

.resource-column:last-child {
    border-right: none;
    padding-right: 4px;
}

.resources-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
}

/* Common dropdown styles */
.dropdown-content {
    padding: 10px;
}

.dropdown-category {
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Subscription Badge */
.subscription-badge {
    font-size: 11px;
    font-weight: 500;
    color: #635bff;
    background-color: #f5f3ff;
    padding: 2px 6px;
    border-radius: 12px;
    white-space: nowrap;
}

/* Navigation Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    font-size: 15px;
    font-weight: 450;
    transition: all 0.2s;
    white-space: nowrap;
}

.explore-demo {
    background-color: #f6f9fc;
    padding: 8px 14px;
    border-radius: 18px;
    color: #635bff;
    letter-spacing: -0.01em;
}

.explore-demo:hover {
    background-color: #edf1f7;
}

.sign-in {
    color: #4b5563;
}

.sign-in:hover {
    color: #635bff;
}

/* Mobile Menu Button */
.mobile-menu-button {
    display: none;
    padding: 8px;
    color: #4b5563;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background: white;
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.is-open {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-menu-back,
.mobile-menu-close {
    padding: 8px;
    color: #4b5563;
}

.mobile-menu-content {
    height: calc(100% - 64px);
    overflow-y: auto;
    padding: 16px;
}

/* Mobile Menu Items */
.mobile-items {
    display: flex;
    flex-direction: column;
}

.mobile-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    color: #1f2937;
    border-radius: 6px;
}

.mobile-item:hover {
    background-color: #f8fafc;
}

.mobile-item-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.mobile-item-icon {
    font-size: 16px;
    margin-top: 2px;
}

.mobile-item-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-item-title {
    font-size: 15px;
    font-weight: 450;
}

.mobile-item-description {
    font-size: 13px;
    color: #6b7280;
}

.mobile-subscription-badge {
    font-size: 11px;
    font-weight: 500;
    color: #635bff;
    background-color: #f5f3ff;
    padding: 2px 6px;
    border-radius: 12px;
    align-self: flex-start;
}

.mobile-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 16px 12px 8px;
}

/* Mobile Actions */
.mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 12px;
    margin-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.mobile-button {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 450;
    transition: all 0.2s;
}

.mobile-button.primary {
    background-color: #635bff;
    color: white;
}

.mobile-button.primary:hover {
    background-color: #524cdb;
}

.mobile-button.secondary {
    background-color: #f8fafc;
    color: #1f2937;
}

.mobile-button.secondary:hover {
    background-color: #f1f5f9;
}

/* Responsive Design */
@media (max-width: 1300px) {
    .products-grid,
    .solutions-grid,
    .resources-grid {
        min-width: 99%;
        max-width: 100%;
        padding: 20px;
    }
    
    .products-columns {
        gap: 16px;
    }
    
    .product-column {
        min-width: 300px;
        padding-right: 20px;
        padding-left: 20px;
    }
    
    .solution-column,
    .resource-column {
        min-width: 300px;
        padding-right: 20px;
        padding-left: 20px;
    }
    
    .solutions-columns {
        grid-template-columns: 1fr 1.2fr 1.2fr;
    }
    
    /* Adjust industry columns at smaller screens */
    .solutions-columns .industry-column:nth-child(2) {
        padding-left: 20px;
        padding-right: 16px;
        min-width: 300px;
    }
    
    .solutions-columns .industry-column:nth-child(3) {
        padding-left: 16px;
        padding-right: 20px;
        min-width: 300px;
    }

    .products-items,
    .solutions-items,
    .resources-items {
        max-height: 600px;
    }
}

@media (max-width: 1024px) {
    .nav-dropdown {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        width: 100%;
        transform: translateY(0);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .products-columns {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .solutions-columns {
        grid-template-columns: 1fr 1.2fr;
    }
    
    .solutions-columns .industry-column:nth-child(2),
    .solutions-columns .industry-column:nth-child(3) {
        min-width: 230px;
    }
    
    .products-grid .dropdown-item,
    .solutions-grid .dropdown-item,
    .resources-grid .dropdown-item {
        padding: 5px;
    }
    
    .resources-columns {
        gap: 5px;
    }
}

@media (max-width: 992px) {
    .nav-list,
    .nav-dropdown,
    .nav-actions {
        display: none;
    }
    
    .mobile-menu-button {
        display: block;
    }
    
    .nav-container {
        padding: 0 16px;
    }
    
    .nav-logo img {
        height: 36px;
    }
    
    .products-columns,
    .solutions-columns,
    .resources-columns {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    /* Convert right borders to bottom borders on mobile */
    .product-column,
    .solution-column,
    .resource-column {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding: 0 0 24px 0;
        margin-bottom: 24px;
        min-width: 100%;
    }
    
    .product-column:first-child,
    .solution-column:first-child,
    .resource-column:first-child,
    .product-column:last-child,
    .solution-column:last-child,
    .resource-column:last-child {
        padding-left: 0;
        padding-right: 0;
    }
    
    .product-column:last-child,
    .solution-column:last-child,
    .resource-column:last-child {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }
    
    /* Make the dropdown headers more prominent on mobile */
    .dropdown-category {
        padding-bottom: 10px;
        margin-bottom: 16px;
    }
}

/* Section Separator */
.section-separator {
    border-top: 1px solid #f1f5f9;
    margin: 20px 0;
}

/* Common dropdown item styles */
.dropdown-item {
    transition: background-color 0.25s ease-in-out;
    position: relative;
    overflow: hidden;
    padding: 7px 8px;
}

.dropdown-item:after {
    content: none;
}

.dropdown-item h4 {
    transition: color 0.25s ease-in-out;
    position: relative;
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    max-width: 100%;
    white-space: nowrap;
}

/* Add arrow after the title */
.dropdown-item h4:after {
    content: '→';
    display: inline-block;
    margin-left: 8px;
    transform: translateX(-5px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    line-height: 1;
    color: #4a6baf;
}

.dropdown-item:hover h4:after {
    transform: translateX(0);
    opacity: 1;
}

.dropdown-item:hover h4 {
    color: #000000;
}

.dropdown-item i {
    transition: transform 0.25s ease-in-out, color 0.25s ease-in-out;
}

.dropdown-item p {
    transition: all 0.25s ease-in-out;
    font-size: 13px;
    line-height: 1.4;
    color: #4b5563;
    margin-top: 2px;
}

/* Remove the shift effect we added previously */
.dropdown-item div {
    transition: all 0.25s ease-in-out;
    flex: 1;
}

.dropdown-item:hover div {
    transform: none;
}

.dropdown-item:hover i {
    transform: scale(1.15);
    color: #4a6baf;
}

.dropdown-item:hover p {
    color: #000000;
}

/* Section divider */
.section-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 12px 0 10px 0;
}

/* Add a specific rule for Forestry & Timberland to ensure it doesn't wrap */
.solutions-grid .dropdown-item[title="Forestry & Timberland"] h4 {
    white-space: nowrap;
    letter-spacing: -0.01em;
}
