/**
 * Clean Modern AI Tools Homepage
 * Professional, clean, and interactive design
 */

/* ==========================================
   CSS Variables & Base
   ========================================== */
:root {
    --primary-color: #3b82f6;
    --secondary-color: #10b981;
    --accent-color: #8b5cf6;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --bg-white: #ffffff;
    --bg-gray: #f9fafb;
    --bg-light: #f3f4f6;
    --border-color: #e5e7eb;
    --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);
    --transition: all 0.3s ease;
}

/* ==========================================
   Base Styles
   ========================================== */
.modern-homepage {
    line-height: 1.6;
    color: var(--text-dark);
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================
   Hero Section
   ========================================== */
.hero-section {
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-gray) 100%);
    padding: 0px 0 80px;
    position: relative;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-dark);
    margin-bottom: 24px;
}

.hero-title .highlight {
    color: var(--primary-color);
    position: relative;
}

.hero-title .highlight::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-gray);
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-features {
    display: flex;
    gap: 32px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-gray);
    font-weight: 500;
}

.feature-item i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.hero-cta .cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--primary-color);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.hero-cta .cta-button:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    color: white;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 400px;
}

.floating-cards {
    position: relative;
    width: 100%;
    height: 100%;
}

.tool-preview {
    position: absolute;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    width: 380px;
    overflow: hidden;
    animation: float 6s ease-in-out infinite;
    display: flex;
    flex-direction: column;
}

/* Custom heights for each tool */
.tool-preview.ai-detector-demo {
    height: 380px; /* Reduced from 420px */
}

.tool-preview.ai-writer-demo {
    height: 300px; /* Further reduced for compact look */
}

.tool-preview.ai-contract-demo {
    height: 420px; /* Keep original height */
}

/* Special height for contract demo in result state */
.tool-preview.ai-contract-demo.showing-results {
    height: 425px; /* 5px more for final step */
}

/* Removed old positioning - now using single tool display */

/* All tools use single centered positioning now */

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.preview-header {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.preview-header i {
    color: var(--primary-color);
}

.preview-content {
    position: relative;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Interactive Tool Preview Styles */

/* AI Detection Tool */
.tool-textarea {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    height: 140px; /* Reduced to fit smaller container */
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    overflow-y: auto;
}

.typing-text-content {
    font-size: 0.85rem;
    color: var(--text-dark);
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--primary-color);
    margin-left: 2px;
    animation: blink 1s infinite;
    vertical-align: top;
}

.tool-button-area {
    text-align: left;
}

.analyze-btn, .generate-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.analyze-btn:hover, .generate-btn:hover {
    background: #2563eb;
}

/* Processing State */
.demo-processing-state {
    text-align: center;
    padding: 40px 20px;
}

.processing-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.processing-text {
    color: var(--text-gray);
    font-size: 0.9rem;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Result State */
.demo-result-state .result-percentage {
    text-align: center;
    margin-bottom: 24px;
}

.percentage-number {
    font-size: 3rem;
    font-weight: 700;
    color: #dc2626;
    line-height: 1;
    margin-bottom: 4px;
}

.percentage-label {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.result-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.result-bar {
    width: 100%;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.bar-name {
    font-weight: 600;
    color: var(--text-dark);
}

.bar-percentage {
    font-weight: 700;
    color: var(--text-dark);
}

.progress-track {
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    width: 0;
    transition: width 1.5s ease-out;
}

.progress-fill.animate {
    width: var(--target-width, 0%);
}

.ai-progress {
    background: #dc2626;
    --target-width: 85%;
}

.human-progress {
    background: #16a34a;
    --target-width: 15%;
}

/* AI Writing Tool Styles */
.prompt-section {
    margin-bottom: 16px;
}

.prompt-label {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 8px;
    font-weight: 500;
}

.prompt-typing {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    min-height: 40px;
    font-size: 0.9rem;
    color: var(--text-dark);
    position: relative;
}

.output-section {
    margin-top: 16px;
}

.output-label {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 8px;
    font-weight: 500;
}

.output-text {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    height: 100px; /* Further reduced for the compact container */
    font-size: 0.85rem;
    line-height: 1.4;
    position: relative;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.generated-content {
    color: var(--text-dark);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.writing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--secondary-color);
    margin-left: 2px;
    animation: blink 1s infinite;
    vertical-align: top;
}

.word-count {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-light);
    align-items: center;
}

.word-counter, .char-counter {
    font-weight: 500;
}

.separator {
    color: var(--border-color);
}

/* Single Tool Display System */
.floating-cards {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-preview {
    position: absolute;    
    transform: translate(-50%, -50%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.tool-preview.active {
    opacity: 1;
    visibility: visible;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes typewriter {
    0% { width: 0%; }
    50% { width: 100%; }
    100% { width: 100%; }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.demo-input-state,
.demo-processing-state,
.demo-result-state,
.writer-input-state,
.writer-output-state,
.contract-upload-state,
.contract-role-state,
.contract-result-state {
    animation: fadeIn 0.3s ease-out;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* AI Contract Reviewer Styles */

/* Upload State */
.upload-section {
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.upload-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.upload-subtitle {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 16px;
}

.upload-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 20px 12px;
    background: var(--bg-gray);
    transition: var(--transition);
    margin-bottom: 8px;
}

.upload-dropzone:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.upload-icon {
    font-size: 1.8rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.upload-text {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 6px;
}

.upload-formats {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.browse-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.browse-btn:hover {
    background: #2563eb;
}

/* Role Selection State */
.role-section {
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 4px 0;
}

.role-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.role-subtitle {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-bottom: 12px;
}

.document-info {
    background: var(--bg-light);
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 0.8rem;
}

.document-label {
    color: var(--text-gray);
    font-weight: 500;
}

.document-type {
    color: var(--primary-color);
    font-weight: 600;
    margin-left: 8px;
}

.role-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    flex: 1;
    overflow-y: auto;
    max-height: 180px;
}

.role-option {
    position: relative;
}

.role-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.role-option label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    background: white;
    min-height: 44px;
}

.role-option label:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.role-option input:checked + label {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
}

.role-icon {
    width: 28px;
    height: 28px;
    background: var(--bg-light);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    flex-shrink: 0;
    font-size: 0.9rem;
}

.role-option input:checked + label .role-icon {
    background: var(--primary-color);
    color: white;
}

.role-details {
    text-align: left;
    flex: 1;
}

.role-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.8rem;
    margin-bottom: 2px;
    line-height: 1.2;
}

.role-type {
    font-size: 0.7rem;
    color: var(--text-gray);
    line-height: 1.2;
}

.role-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}

.back-btn, .continue-btn {
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.back-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-gray);
}

.back-btn:hover {
    border-color: var(--text-gray);
    color: var(--text-dark);
}

.continue-btn {
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    color: white;
}

.continue-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* Review Results State */
.result-section {
    text-align: left;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.result-header {
    margin-bottom: 12px;
    flex-shrink: 0;
}

.document-type-info {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.doc-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    font-weight: 500;
}

.doc-type-badge {
    background: #f59e0b;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.doc-type-badge.medium {
    background: #f59e0b;
}

.doc-type-name {
    font-size: 0.8rem;
    color: var(--text-dark);
    font-weight: 500;
}

.issue-found {
    border-left: 3px solid #dc2626;
    background: rgba(220, 38, 38, 0.05);
    padding: 12px;
    border-radius: 0 6px 6px 0;
    flex: 1;
    overflow-y: auto;
}

.issue-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 10px;
}

.suggestion-box {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 8px;
    margin-bottom: 8px;
}

.suggestion-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.suggestion-text {
    font-size: 0.75rem;
    color: var(--text-gray);
    line-height: 1.3;
    font-style: italic;
    max-height: 60px;
    overflow-y: auto;
}

.notes-section {
    margin-bottom: 12px;
}

.notes-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.notes-text {
    font-size: 0.75rem;
    color: var(--text-gray);
    line-height: 1.3;
    max-height: 50px;
    overflow-y: auto;
}

.action-buttons {
    display: flex;
    gap: 6px;
    margin-top: auto;
    flex-shrink: 0;
}

.accept-btn, .reject-btn {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 3px;
}

.accept-btn {
    background: #16a34a;
    color: white;
    border: none;
}

.accept-btn:hover {
    background: #15803d;
}

.reject-btn {
    background: #dc2626;
    color: white;
    border: none;
}

.reject-btn:hover {
    background: #b91c1c;
}

/* ==========================================
   Tools Section
   ========================================== */
.tools-section {
    padding: 100px 0;
    background: white;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.tool-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.popular-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--accent-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tool-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 24px;
    margin-left: auto;
    margin-right: auto;
}

.tool-icon .icon-emoji {
    font-size: 1.8rem;
    line-height: 1;
}

.tool-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.tool-description {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 24px;
}

.tool-button {
    background: transparent;
    border: 2px solid;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
    text-decoration: none;
    margin-top: auto;
}

.tool-button:hover {
    background: #2563eb;
    color: white !important;
    transform: translateY(-2px);
    text-decoration: none;
}

/* ==========================================
   Benefits Section
   ========================================== */
.benefits-section {
    padding: 100px 0;
    background: var(--bg-gray);
}

.benefits-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.benefits-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.benefits-text p {
    font-size: 1.125rem;
    color: var(--text-gray);
    margin-bottom: 40px;
    line-height: 1.6;
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.benefit-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.benefit-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.benefit-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.benefit-content p {
    color: var(--text-gray);
    line-height: 1.5;
}

.stats-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    display: grid;
    gap: 32px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
    line-height: 1;
}

.stat-label {
    color: var(--text-gray);
    font-weight: 500;
    margin-top: 8px;
}

/* ==========================================
   Categories Section
   ========================================== */
.categories-section {
    padding: 100px 0;
    background: white;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
}

.category-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2rem;
    color: white;
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.category-card p {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 24px;
}

.category-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.tool-tag {
    background: var(--bg-light);
    color: var(--text-gray);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.tool-count {
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Tool button styles are defined above in the tools section */

/* ==========================================
   Pre-FAQ Section
   ========================================== */
.pre-faq-section {
    padding: 80px 0 40px;
    background: white;
}

.pre-faq-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.pre-faq-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.pre-faq-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.pre-faq-content p {
    margin-bottom: 20px;
    color: var(--text-gray);
}

.pre-faq-content ul,
.pre-faq-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.pre-faq-content li {
    margin-bottom: 10px;
    color: var(--text-gray);
}

/* ==========================================
   FAQ Section
   ========================================== */
.faq-section {
    padding: 60px 0 100px;
    background: var(--bg-gray);
}

.faq-grid {
    display: grid;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.faq-question {
    padding: 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--bg-gray);
}

.faq-question h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.faq-question i {
    color: var(--text-light);
    transition: var(--transition);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding: 0 24px 24px;
}

.faq-answer p {
    color: var(--text-gray);
    line-height: 1.6;
    margin: 0;
}

/* ==========================================
   AI FAQ Generator Styles
   ========================================== */
.tool-preview.ai-faq-generator-demo {
    height: 440px;
}

/* Input State */
.faq-input-state {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.faq-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.content-textarea {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    height: 150px;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    overflow-y: auto;
    margin-bottom: 8px;
    scroll-behavior: smooth;
}

.input-text-content {
    font-size: 0.85rem;
    color: var(--text-dark);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.character-count {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: right;
    margin-bottom: 16px;
}

.generate-faq-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    margin-top: auto;
}

.generate-faq-btn:hover {
    background: #2563eb;
}

/* Options State */
.faq-options-state {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.options-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.option-group {
    margin-bottom: 20px;
}

.option-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.option-column {
    display: flex;
    flex-direction: column;
}

.option-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.faq-count-input,
.keywords-input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    transition: var(--transition);
    width: 100%;
}

.faq-count-input:focus,
.keywords-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.option-hint {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 4px;
    line-height: 1.4;
}

.format-selection {
    margin-bottom: 20px;
}

.format-dropdown {
    position: relative;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

.dropdown-trigger:hover {
    border-color: var(--primary-color);
}

.selected-format {
    font-size: 0.85rem;
    color: var(--text-dark);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-top: 4px;
    box-shadow: var(--shadow-md);
    z-index: 10;
}

.dropdown-item {
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
}

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

.dropdown-item.active {
    background: var(--primary-color);
    color: white;
}

.continue-faq-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    margin-top: auto;
    width: 100%;
    justify-content: center;
}

.continue-faq-btn:hover {
    background: #2563eb;
}

/* Results State */
.faq-results-state {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.results-header {
    margin-bottom: 16px;
}

.results-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.faq-results-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
}

.generated-faq-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

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

.faq-number {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.faq-content {
    flex: 1;
}

.faq-q {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.85rem;
    margin-bottom: 6px;
    line-height: 1.4;
}

.faq-a {
    font-size: 0.8rem;
    color: var(--text-gray);
    line-height: 1.5;
}

.copy-faq-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    margin-top: 12px;
}

.copy-faq-btn:hover {
    background: #059669;
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
    }
    
    .benefits-content {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .hero-visual {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-features {
        justify-content: center;
        gap: 24px;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .tools-grid,
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-preview {
        position: relative;
        margin-bottom: 20px;
        width: 100%;
        max-width: 350px;
        height: auto;
        min-height: 350px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-features {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    
    .tool-card,
    .category-card {
        padding: 24px;
    }
    
    .stats-card {
        padding: 24px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* ==========================================
   Animation Classes
   ========================================== */
.fade-in-up {
    opacity: 1; /* Changed from 0 to make visible by default */
    transform: translateY(0); /* Start at normal position */
    transition: all 0.6s ease;
}

/* Only hide if JavaScript is enabled and animation not yet triggered */
/* Commented out to prevent disappearing elements
.js .fade-in-up:not(.animate) {
    opacity: 0;
    transform: translateY(30px);
}
*/

.fade-in-up.animate {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   Utility Classes
   ========================================== */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 2rem;
}