/* ===== QA Warehouse Specific Styles ===== */

.warehouse-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 60px;
    text-align: center;
    margin-top: 70px;
}

.warehouse-header {
    max-width: 800px;
    margin: 0 auto;
}

.warehouse-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.warehouse-title i {
    font-size: 3rem;
}

.warehouse-subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    font-weight: 300;
}

/* ===== Tabs Section ===== */
.tabs-section {
    padding: 4rem 0;
    background: var(--bg-light);
    min-height: 80vh;
}

.tabs-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.tabs-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    justify-content: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -1rem;
    position: relative;
    font-family: 'Poppins', sans-serif;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.tab-btn i {
    font-size: 1.2rem;
}

/* ===== Tab Content ===== */
/* Base state - hidden */
.tab-content {
    display: none;
}

/* Active state - visible */
.tab-content.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    animation: fadeIn 0.5s ease-in;
}

/* Ensure inline styles work */
.tab-content[style*="display: block"] {
    display: block !important;
}

/* Double ensure active tabs show */
.tabs-section .tab-content.active,
.tabs-container .tab-content.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-header {
    text-align: center;
    margin-bottom: 3rem;
}

.content-header h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.content-header h2 i {
    color: var(--primary-color);
}

.content-intro {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* ===== Test Cases Grid ===== */
.test-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
}

.test-case-card {
    background: var(--bg-white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.test-case-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.test-case-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.test-case-id {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    background: rgba(99, 102, 241, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.test-case-priority {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.test-case-priority.high {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.test-case-priority.medium {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.test-case-priority.low {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.test-case-title {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.test-case-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-item {
    line-height: 1.8;
}

.detail-item strong {
    color: var(--text-dark);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.detail-item p {
    color: var(--text-light);
    margin: 0;
}

.detail-item ul,
.detail-item ol {
    margin: 0.5rem 0 0 1.5rem;
    color: var(--text-light);
}

.detail-item li {
    margin-bottom: 0.5rem;
}

.detail-item code {
    background: var(--bg-light);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: block;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-top: 0.5rem;
    border: 1px solid var(--border-color);
}

/* ===== Test Scenarios Grid ===== */
.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.scenario-card {
    background: var(--bg-white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.scenario-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-1);
}

.scenario-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.scenario-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.scenario-icon i {
    font-size: 2rem;
    color: white;
}

.scenario-card h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.scenario-description {
    color: var(--text-light);
    line-height: 1.8;
}

.scenario-description p {
    margin-bottom: 1rem;
    font-weight: 500;
    color: var(--text-dark);
}

.scenario-description ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.scenario-description li {
    margin-bottom: 0.75rem;
}

.scenario-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.scenario-tags .tag {
    padding: 0.4rem 1rem;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* ===== Tips & Tricks Grid ===== */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.tip-card {
    background: var(--bg-white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border-top: 4px solid transparent;
}

.tip-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.tip-category {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    width: fit-content;
}

.tip-category.automation {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.tip-category.testing {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

.tip-category.debugging {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.tip-category.performance {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.tip-category.ci-cd {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.tip-category.api {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.tip-category.locators {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.tip-category.maintenance {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.tip-card h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.tip-content {
    color: var(--text-light);
    line-height: 1.8;
}

.tip-content ul {
    list-style: none;
    padding: 0;
}

.tip-content li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.tip-content li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.tip-content li strong {
    color: var(--text-dark);
}

/* ===== Scripts Container ===== */
.scripts-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.script-card {
    background: var(--bg-white);
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all 0.3s ease;
}

.script-card:hover {
    box-shadow: var(--shadow-xl);
}

.script-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--bg-light);
    border-bottom: 2px solid var(--border-color);
}

.script-header h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.script-header h3 i {
    color: var(--primary-color);
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.copy-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.copy-btn.copied {
    background: #22c55e;
}

.copy-btn.copied::after {
    content: ' Copied!';
}

.script-content {
    padding: 2rem;
    background: #1e1e1e;
    overflow-x: auto;
}

.script-content pre {
    margin: 0;
    color: #d4d4d4;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.script-content code {
    color: #d4d4d4;
}

/* Syntax Highlighting Colors (basic) */
.script-content pre code {
    display: block;
}

.script-content pre .comment {
    color: #6a9955;
}

.script-content pre .keyword {
    color: #569cd6;
}

.script-content pre .string {
    color: #ce9178;
}

.script-content pre .function {
    color: #dcdcaa;
}

/* ===== Responsive Design ===== */
@media (max-width: 968px) {
    .warehouse-title {
        font-size: 2.5rem;
    }

    .warehouse-subtitle {
        font-size: 1.1rem;
    }

    .tabs-header {
        flex-direction: column;
        align-items: stretch;
    }

    .tab-btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 0;
        border-bottom: 2px solid var(--border-color);
        border-left: none;
        padding: 1.25rem;
    }

    .tab-btn.active {
        border-bottom-color: var(--primary-color);
        border-left: 4px solid var(--primary-color);
    }

    .test-cases-grid,
    .scenarios-grid,
    .tips-grid {
        grid-template-columns: 1fr;
    }

    .content-header h2 {
        font-size: 2rem;
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .warehouse-hero {
        padding: 100px 0 40px;
    }

    .warehouse-title {
        font-size: 2rem;
        flex-direction: column;
    }

    .warehouse-title i {
        font-size: 2rem;
    }

    .tab-btn {
        font-size: 0.85rem;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    .tab-btn span {
        display: inline-block;
        font-size: 0.8rem;
    }

    .tab-btn i {
        font-size: 1rem;
    }

    .test-case-card,
    .scenario-card,
    .tip-card {
        padding: 1.5rem;
    }

    .script-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .copy-btn {
        width: 100%;
        justify-content: center;
    }

    .script-content {
        padding: 1rem;
    }

    .script-content pre {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .warehouse-title {
        font-size: 1.75rem;
    }

    .content-header h2 {
        font-size: 1.5rem;
    }

    .tabs-header {
        gap: 0.5rem;
    }

    .tab-btn {
        font-size: 0.75rem;
        padding: 0.6rem 0.8rem;
        gap: 0.4rem;
        flex: 1;
        min-width: 0;
    }

    .tab-btn span {
        display: inline-block;
        font-size: 0.7rem;
        white-space: nowrap;
    }

    .tab-btn i {
        font-size: 0.9rem;
    }

    .test-case-id,
    .test-case-priority {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }

    .scenario-icon {
        width: 60px;
        height: 60px;
    }

    .scenario-icon i {
        font-size: 1.5rem;
    }
}

