/* Existing styles from your resources.css */
body {
    background-image: linear-gradient(to right, rgba(0, 102, 204, 0.03) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(0, 102, 204, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* Search bar styles */
.search-container {
    display: flex;
    margin: 30px auto;
    max-width: 600px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #0066cc;
    box-shadow: 0 2px 10px rgba(0, 102, 204, 0.15);
    outline: none;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    color: #777;
    cursor: pointer;
    padding: 10px;
    transition: color 0.3s ease;
}

.search-btn:hover {
    color: #0066cc;
}

/* Category buttons */
.resource-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 20px 0 40px;
    gap: 10px;
}

.category-btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 30px;
    background-color: white;
    color: #555;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    background-color: #f0f4f8;
    border-color: #0066cc;
    color: #0066cc;
}

.category-btn.active {
    background-color: #0066cc;
    color: white;
    border-color: #0066cc;
}

/* Resource cards grid */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.resource-card {
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.resource-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #ebf5ff;
    border-radius: 10px;
    margin-right: 20px;
    flex-shrink: 0;
}

.resource-icon i {
    font-size: 24px;
    color: #0066cc;
}

.resource-icon .app-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.resource-content {
    flex-grow: 1;
}

.resource-content h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.resource-content p {
    margin: 0;
    font-size: 14px;
    color: #777;
    line-height: 1.4;
}

/* Modal Styles (These extend the global modal styles) */
.resource-modal {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
}

.updated-date {
    font-size: 14px;
    color: #777;
}

.modal-body {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

/* FAQ Accordion Styles for modal content */
.faq-item {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.faq-question {
    padding: 15px 0;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #0066cc;
}

.faq-question:hover {
    color: #004d99;
}

.faq-answer {
    padding: 0 0 15px 0;
    color: #333;
    line-height: 1.6;
}

.faq-icon {
    transition: transform 0.3s ease;
}

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

/* Policy Content Styles */
.policy-section {
    margin-bottom: 30px;
}

.policy-section h3 {
    color: #0066cc;
    margin-bottom: 15px;
    font-size: 20px;
}

.policy-section p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.policy-section ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.policy-section li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Tutorial Content Styles */
.tutorial-step {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.tutorial-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.step-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.step-number {
    background-color: #0066cc;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 15px;
    flex-shrink: 0;
}

.step-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.step-description {
    margin-bottom: 15px;
    line-height: 1.6;
}

.step-image {
    margin-top: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.step-image img {
    max-width: 100%;
    display: block;
}

.step-caption {
    margin-top: 10px;
    font-style: italic;
    color: #777;
    text-align: center;
    font-size: 14px;
}

/* No results message */
.no-results {
    text-align: center;
    padding: 40px 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    margin: 30px 0;
    color: #666;
}

.no-results i {
    font-size: 40px;
    color: #ccc;
    margin-bottom: 15px;
    display: block;
}

/* Print button */
.modal-btn.primary-btn {
    background-color: #0066cc;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.modal-btn.primary-btn i {
    margin-right: 8px;
}

.modal-btn.primary-btn:hover {
    background-color: #0052a3;
}

/* Resource Sections visibility */
.resource-section {
    display: block;
}

.resource-section.hidden {
    display: none;
}

/* Company Tree Styles */
.company-tree {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 50px;
    overflow-x: auto;
}

.tree-column {
    flex: 1;
    min-width: 250px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.tree-column h3 {
    color: #0066cc;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0066cc;
    font-size: 20px;
}

.employee-card {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.employee-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.employee-image-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #ebf5ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.employee-card .employee-icon {
    font-size: 40px;
    color: #0066cc;
}

.employee-card p {
    margin: 5px 0;
    text-align: center;
    color: #333;
}

.employee-card p:first-of-type {
    font-weight: 600;
    font-size: 16px;
}

.employee-card p:last-of-type {
    font-size: 14px;
    color: #666;
}

.tree-connector {
    position: absolute;
    background-color: #0066cc;
    height: 2px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

/* Connectors for tree hierarchy */
.tree-connector {
    position: absolute;
    border: 1px solid #0066cc;
    z-index: -1;
}

.employee-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.employee-details .employee-image-container {
    width: 120px;
    height: 120px;
    margin-bottom: 15px;
}

.employee-details .employee-icon {
    font-size: 60px;
    color: #0066cc;
}

.employee-info p {
    margin: 10px 0;
    font-size: 16px;
    color: #333;
}

.employee-info .employee-description {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-top: 15px;
}

.employee-info a {
    color: #0066cc;
    text-decoration: none;
}

.employee-info a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .resources-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .resource-card {
        padding: 15px;
    }
    
    .resource-icon {
        width: 50px;
        height: 50px;
        margin-right: 15px;
    }
    
    .resource-icon i {
        font-size: 20px;
    }
    
    .resource-content h3 {
        font-size: 16px;
    }
    
    .resource-content p {
        font-size: 13px;
    }
    
    .modal-header {
        padding: 15px 20px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .updated-date {
        margin-top: 5px;
    }
    
    .modal-body {
        padding: 20px;
    }

    .company-tree {
        flex-direction: row;
        padding: 10px;
    }

    .tree-column {
        min-width: 180px;
    }

    .employee-image-container {
        width: 60px;
        height: 60px;
    }

    .employee-card .employee-icon {
        font-size: 30px;
    }

    .employee-details .employee-image-container {
        width: 100px;
        height: 100px;
    }

    .employee-details .employee-icon {
        font-size: 50px;
    }

    .employee-info p {
        font-size: 14px;
    }

    .employee-info .employee-description {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .category-btn {
        font-size: 14px;
        padding: 8px 15px;
    }
    
    .search-container {
        margin: 20px auto;
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    font-weight: 700;
    border: none;
    background: transparent;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    color: #666;
    transition: all 0.2s ease;
    z-index: 10;
}

.close-modal:hover {
    background-color: #f0f0f0;
    color: #0066cc;
}

.modal-header {
    padding-right: 50px;
}

/* Nested search results styles */
.nested-search-results {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
    border-left: 3px solid #0066cc;
}

.nested-search-results ul {
    margin: 0;
    padding-left: 20px;
}

.nested-search-results li {
    margin-bottom: 5px;
    cursor: pointer;
    color: #0066cc;
    transition: color 0.2s ease;
    padding: 5px 10px;
    border-radius: 4px;
}

.nested-search-results li:hover {
    color: #004d99;
    background-color: #f0f4f8;
    text-decoration: underline;
}

.nested-search-results li:active {
    background-color: #e6f0ff;
}

/* Step highlight effect */
.highlight-step {
    animation: highlight-pulse 2s ease-in-out;
}

@keyframes highlight-pulse {
    0% { background-color: #fff3cd; }
    50% { background-color: #fff3cd; }
    100% { background-color: transparent; }
}

.tutorial-step.highlighted {
    background-color: #fff3cd;
    border-left: 3px solid #0066cc;
    border-radius: 4px;
    padding-left: 8px;
    margin-left: -8px;
}

/* Tutorial Modal Accordion Styles */
.tutorial-accordion {
    margin-top: 20px;
}

.accordion-item {
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
}

.accordion-header {
    background-color: #f8f9fa;
    padding: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background-color: #e9ecef;
}

.accordion-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.accordion-icon {
    color: #0066cc;
    transition: transform 0.3s ease;
}

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

.accordion-item.active .accordion-content {
    max-height: 1000px;
    padding: 15px;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

/* Tutorial Steps Styling */
.tutorial-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step-header {
    margin-bottom: 10px;
}

.step-title {
    font-weight: 600;
    color: #0066cc;
    font-size: 16px;
}

.tutorial-step {
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.tutorial-step:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tutorial-modal-content .search-container {
    margin: 0 0 20px 0;
}

.no-results {
    text-align: center;
    padding: 30px;
    color: #666;
}

.no-results i {
    font-size: 30px;
    margin-bottom: 10px;
    color: #ccc;
}

/* SDS Container Styles */
.sds-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 50px;
}

.sds-container iframe {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.blue-separator {
    width: 120px;
    height: 4px;
    background-color: #0066cc;
    margin: 0 auto 24px auto;
    border-radius: 2px;
}