/* Tool Page Specific Styles */

:root {
    --card-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.1);
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
}

/* Hide search box on tool pages - it should only appear on main directory page */
.search-container {
    display: none !important;
}

/* Ensure header layout matches top-100 pages for consistency */
.header-content {
    display: flex !important;
    align-items: center !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 12px 24px !important;
    gap: 32px !important;
}

.main-nav {
    margin-left: auto !important;
    flex-shrink: 0 !important;
}

/* Hide the search-filter-bar on tool pages if present */
.search-filter-bar {
    display: none !important;
}

/* Container for tool detail pages - supports both class names for backward compatibility */
.tool-page-container,
.tool-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Override .container flex layout when used together */
main.tool-page,
main.tool-page-container {
    display: block;
    height: auto;
    flex: none;
}

/* Tool page navigation links - dark on light header */
.tool-nav-link {
    color: #374151 !important;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.tool-nav-link:hover,
.tool-nav-link:focus {
    color: #3498db !important;
}

/* Override main styles.css for tool page header navigation */
.main-nav .nav-link {
    color: #1f2937 !important;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.main-nav .nav-link:hover {
    color: #1f2937 !important;
}

.main-nav .nav-link.submit-btn {
    background: #1f2937;
    color: white !important;
    padding: 8px 16px;
    border-radius: 6px;
}

.main-nav .nav-link.submit-btn:hover {
    background: #374151;
    color: white !important;
}

/* Logo - ensure always visible */
.logo-image {
    opacity: 1 !important;
    max-width: 100%;
    object-fit: contain;
    border-radius: 12px;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 3px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-toggle span {
    width: 20px;
    height: 2px;
    background: #1f2937;
    display: block;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

/* Breadcrumb */
.breadcrumb-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.breadcrumb {
    padding: 1rem 0;
    margin-bottom: 1rem;
    font-size: 14px;
    color: #6c757d;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 8px;
    color: #adb5bd;
}

/* Tool Header */
.tool-header {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius-lg);
    padding: 48px 32px;
    margin-bottom: 32px;
    box-shadow: var(--card-shadow);
    color: #1f2937;
}

.tool-header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.tool-icon-large {
    width: 120px;
    height: 120px;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.tool-icon-large img.favicon-icon {
    width: 120px !important;
    height: 120px !important;
    max-width: 120px !important;
    max-height: 120px !important;
    object-fit: contain;
    padding: 10px;
}

.tool-icon-large .fallback-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    text-transform: uppercase;
    display: none;
}

.tool-info h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    color: #1f2937;
}

.tool-tagline {
    font-size: 1.2rem;
    margin: 0 0 1.5rem 0;
    color: #6b7280;
    line-height: 1.5;
}

.tool-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: var(--spacing-sm) 0;
}

.tool-badges .badge {
    padding: 6px 14px;
    border-radius: var(--border-radius-lg);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: transform 0.2s ease;
}

.tool-badges .badge:hover {
    transform: translateY(-2px);
}

.badge-category {
    background: #f3f4f6;
    color: #1f2937;
    border: 1px solid #e5e7eb;
}

.badge-pricing {
    background: #f3f4f6;
    color: #1f2937;
    border: 1px solid #e5e7eb;
}

.badge-pricing.pricing-free {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.badge-pricing.pricing-freemium {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.badge-pricing.pricing-paid {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.badge-featured {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    font-weight: 700;
}

.badge-new {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    font-weight: 700;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
    }
    50% {
        box-shadow: 0 2px 12px rgba(251, 191, 36, 0.6);
    }
}

.tool-actions {
    display: flex;
    gap: 12px;
    margin-top: var(--spacing-md);
}

.btn {
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: #1f2937;
    color: white;
    border: 2px solid #1f2937;
}

.btn-primary:hover {
    background: #111827;
    border-color: #111827;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.25);
}

.btn-secondary {
    background: white;
    color: #1f2937;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-2px);
}

/* Video Section Enhancement */
.section {
    margin-bottom: 2.5rem;
    background: #ffffff;
    border-radius: var(--border-radius-md);
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.3s ease;
}

.section:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.section h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.section h2 i {
    color: #667eea;
    font-size: 22px;
}

.video-wrapper {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    background: #000;
}

.video-thumbnail {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.video-thumbnail:hover {
    transform: scale(1.02);
}

.video-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(102, 126, 234, 0.95);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.video-thumbnail:hover .play-overlay {
    background: rgba(102, 126, 234, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-overlay i {
    color: white;
    font-size: 32px;
    margin-left: 4px;
}

.video-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 70%, transparent 100%);
    color: white;
    padding: var(--spacing-md);
    font-size: 16px;
    font-weight: 600;
}

.video-source {
    margin-top: var(--spacing-sm);
    color: #6b7280;
    font-size: 14px;
}

/* Pros and Cons Enhancement */
.about-content {
    line-height: 1.8;
    color: #374151;
}

.about-content > p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: #4b5563;
}

.pros-section,
.cons-section {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-md);
    background: #f9fafb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pros-section {
    border-left: 4px solid var(--success-color);
}

.cons-section {
    border-left: 4px solid var(--warning-color);
}

.pros-section h3,
.cons-section h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pros-section h3 {
    color: var(--success-color);
}

.cons-section h3 {
    color: var(--warning-color);
}

.pros-list,
.cons-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pros-list li,
.cons-list li {
    padding: 8px 0 8px 28px;
    position: relative;
    color: #374151;
    line-height: 1.6;
}

.pros-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: 700;
    font-size: 18px;
}

.cons-list li::before {
    content: "!";
    position: absolute;
    left: 4px;
    color: var(--warning-color);
    font-weight: 700;
    font-size: 18px;
}

/* Features Grid Enhancement */
.features-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.features-grid li {
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-sm);
    border-left: 4px solid #667eea;
    font-weight: 500;
    color: #374151;
    transition: all 0.3s ease;
}

.features-grid li:hover {
    transform: translateX(4px);
    box-shadow: var(--card-shadow);
}

/* Pricing Section Enhancement */
.pricing-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: #f9fafb;
    border-radius: var(--border-radius-sm);
}

.pricing-badge {
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-badge.pricing-free {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.pricing-badge.pricing-freemium {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.pricing-badge.pricing-paid {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

/* FAQ Enhancement */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.faq-item {
    background: #f9fafb;
    padding: var(--spacing-md);
    border-radius: var(--border-radius-sm);
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.faq-item:hover {
    background: #f3f4f6;
    box-shadow: var(--card-shadow);
}

.faq-item h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: var(--spacing-sm);
}

.faq-item p {
    color: #4b5563;
    line-height: 1.7;
    margin: 0;
}

/* Similar Tools */
.similar-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.similar-tool {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.2s ease;
}

.similar-tool:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.similar-tool .tool-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3498db;
    color: white;
    font-weight: bold;
}

.similar-tool h3 {
    font-size: 16px;
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.similar-tool p {
    font-size: 14px;
    color: #6c757d;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.similar-tool a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.similar-tool a:hover {
    background: #2980b9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tool-header-content {
        flex-direction: column;
        text-align: center;
    }

    .tool-icon-large {
        margin: 0 auto;
    }

    .tool-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

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

    .pricing-info {
        flex-direction: column;
        text-align: center;
    }
}
