/* Tailwind CSS Custom Styles - Trello Testing Portfolio */

/* CSS Custom Properties - Light Theme Design System */
:root {
    --background: 0 0% 100%;
    --foreground: 0 0% 3.9%;
    --card: 0 0% 100%;
    --card-foreground: 0 0% 3.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 0 0% 3.9%;
    --primary: 0 0% 9%;
    --primary-foreground: 0 0% 98%;
    --secondary: 0 0% 96.1%;
    --secondary-foreground: 0 0% 9%;
    --muted: 0 0% 96.1%;
    --muted-foreground: 0 0% 45.1%;
    --accent: 0 0% 96.1%;
    --accent-foreground: 0 0% 9%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;
    --border: 0 0% 89.8%;
    --input: 0 0% 100%;
    --ring: 0 0% 3.9%;
    --radius: 0.5rem;

    /* Light Theme Color Palette */
    --light-bg: #ffffff;
    --light-bg-secondary: #f8f9fa;
    --light-card: #ffffff;
    --light-border: #e5e7eb;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;

    /* Lavender/Purple Accent Colors */
    --lavender-light: #f3f0ff;
    --lavender-medium: #e8e2ff;
    --lavender-dark: #ded6ff;
    --lavender-border: #d0c9f5;
    --purple-accent: #8b5cf6;
    --purple-dark: #7c3aed;

    /* Status Colors */
    --success-green: #10b981;
    --success-light: #d1fae5;
    --warning-orange: #f59e0b;
    --warning-light: #fef3c7;
    --error-red: #ef4444;
    --error-light: #fee2e2;

    /* Shadow System */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Base Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-color: var(--light-border);
}

body {
    background-color: var(--light-bg-secondary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    font-feature-settings: "rlig" 1, "calt" 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Enhanced Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    color: var(--text-primary);
    text-wrap: balance;
}

h1 {
    font-size: 48px;
    line-height: 1.1;
    letter-spacing: -0.025em;
    font-weight: 700;
}

h2 {
    font-size: 40px;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

h3 {
    font-size: 32px;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

h4 {
    font-size: 24px;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

h5 {
    font-size: 20px;
    line-height: 1.3;
}

h6 {
    font-size: 18px;
    line-height: 1.35;
}

p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1) rotate(180deg);
        opacity: 0.8;
    }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.text-balance {
    text-wrap: balance;
}

/* Navigation Styles */
.template-nav {
    background: var(--light-card);
    padding: 15px 0;
    border-bottom: 1px solid var(--light-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 0 20px;
    flex-wrap: wrap;
}

.nav-btn {
    background: var(--light-card);
    color: var(--text-primary);
    padding: 8px 16px;
    border: 1px solid var(--light-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-btn:hover {
    background: var(--lavender-light);
    border-color: var(--lavender-border);
    transform: translateY(-1px);
}

.nav-btn.active {
    background: var(--text-primary);
    color: white;
    border-color: var(--text-primary);
}

/* Template Section Management */
.template-section {
    display: none;
    min-height: 100vh;
}

.template-section.active {
    display: block;
}

/* Ensure TC005 and BugReport sections are completely hidden from other pages */
#tc005:not(.active),
#bug001:not(.active) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Hide TC005 and BugReport galleries when not in their respective sections */
.template-section:not(#tc005) #tc005-gallery,
.template-section:not(#bug001) #bugreport-gallery {
    display: none !important;
}

/* Hero Section Styles */
.hero-section {
    text-align: center;
    background: linear-gradient(135deg, var(--lavender-light) 0%, var(--lavender-medium) 100%);
    border-radius: 16px;
    border: 1px solid var(--lavender-border);
    padding: 60px 40px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    animation: pulse 6s ease-in-out infinite;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 24px;
    max-width: 600px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--lavender-border);
    backdrop-filter: blur(10px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    display: block;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Dashboard Grid & Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.dashboard-card {
    background: var(--light-card);
    border-radius: 12px;
    padding: 30px;
    border: 1px solid var(--light-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color, var(--lavender-border));
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-color, var(--purple-accent));
    border-radius: 12px 12px 0 0;
}

.card-completed { --accent-color: var(--success-green); }
.card-progress { --accent-color: var(--warning-orange); }
.card-pending { --accent-color: var(--error-red); }

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.card-icon {
    font-size: 2rem;
    margin-right: 15px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Progress Bar */
.progress-bar {
    background: var(--light-bg-secondary);
    border-radius: 10px;
    height: 8px;
    margin: 15px 0;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--light-border);
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

.progress-completed {
    background: linear-gradient(90deg, var(--success-green), #34d399);
}

.progress-partial {
    background: linear-gradient(90deg, var(--warning-orange), #fbbf24);
}

/* Test Case Detail Styles */
.test-case-detail {
    background: var(--light-card);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 30px;
    border: 1px solid var(--light-border);
    box-shadow: var(--shadow-sm);
}

.test-case-header {
    border-bottom: 2px solid var(--light-border);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.test-case-id-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--purple-accent);
    margin-bottom: 10px;
}

.test-case-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.test-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.meta-item {
    background: var(--light-bg-secondary);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--light-border);
}

.meta-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.meta-value {
    font-weight: 600;
    color: var(--text-primary);
}

.section-header {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 30px 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Test Steps Table */
.test-steps-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--light-card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--light-border);
}

.test-steps-table th,
.test-steps-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--light-border);
}

.test-steps-table th {
    background: var(--lavender-light);
    color: var(--text-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--lavender-border);
}

.test-steps-table tr:hover {
    background: var(--light-bg-secondary);
}

.test-steps-table tr:last-child td {
    border-bottom: none;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
}

.status-pass {
    background: var(--success-light);
    color: var(--success-green);
    border: 1px solid var(--success-green);
}

.status-partial {
    background: var(--warning-light);
    color: var(--warning-orange);
    border: 1px solid var(--warning-orange);
}

/* Findings Section */
.findings-section {
    background: var(--lavender-light);
    border-radius: 8px;
    padding: 25px;
    margin-top: 30px;
    border-left: 4px solid var(--purple-accent);
}

.finding-item {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--lavender-border);
}

.finding-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.finding-title {
    font-weight: 600;
    color: var(--purple-dark);
    margin-bottom: 10px;
}

.finding-content {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Bug Report Styles */
.bug-report {
    background: var(--error-light);
    border: 2px solid var(--error-red);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 30px;
}

.bug-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.bug-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--error-red);
}

.bug-badges {
    display: flex;
    gap: 10px;
}

.bug-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.severity-medium {
    background: var(--warning-orange);
    color: white;
}

.priority-high {
    background: var(--error-red);
    color: white;
}

.bug-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.bug-detail-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--light-border);
}

.bug-detail-title {
    font-weight: 600;
    color: var(--error-red);
    margin-bottom: 10px;
}

/* Page Header Styles */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.back-nav {
    background: var(--text-primary);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.back-nav:hover {
    background: var(--purple-dark);
    transform: translateX(-3px);
}

/* Screenshot Gallery Styles */
.screenshot-gallery {
    margin: 30px 0;
}

.gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.gallery-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.gallery-counter {
    background: var(--purple-accent);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.gallery-item {
    background: var(--light-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--light-border);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--purple-accent);
}

.gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay-icon {
    background: rgba(255,255,255,0.95);
    color: var(--text-primary);
    padding: 12px;
    border-radius: 50%;
    font-size: 1.2rem;
}

.gallery-caption {
    padding: 15px;
    background: var(--light-card);
}

.gallery-caption-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.gallery-caption-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    display: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: var(--shadow-xl);
}

.lightbox-caption {
    color: white;
    margin-top: 20px;
    font-size: 1.1rem;
    font-weight: 500;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0,0,0,0.5);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Gallery Categories */
.gallery-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.gallery-category {
    background: var(--light-card);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--light-border);
    font-weight: 500;
}

.gallery-category:hover,
.gallery-category.active {
    background: var(--text-primary);
    color: white;
    border-color: var(--text-primary);
}

/* Links */
a {
    color: var(--purple-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--purple-dark);
    text-decoration: underline;
}

/* Lists */
ul, ol {
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .nav-container {
        gap: 8px;
    }

    .nav-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .test-steps-table {
        font-size: 0.9rem;
    }

    .test-steps-table th,
    .test-steps-table td {
        padding: 10px 8px;
    }

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

    .gallery-image {
        height: 180px;
    }

    .lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .test-case-detail,
    .bug-report {
        padding: 24px;
    }
}

/* Print Styles */
@media print {
    .template-nav,
    .back-nav,
    .lightbox,
    .gallery-overlay {
        display: none !important;
    }

    body {
        background-color: white;
        color: black;
    }

    .dashboard-card,
    .test-case-detail,
    .bug-report {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
