/* ============================================
   File Viewers - Category Page Styles
   Indigo theme (#5c6bc0) - 1000px container
   ============================================ */

/* CSS Variables */
:root {
    --primary: #5c6bc0;
    --primary-dark: #3f51b5;
    --secondary: #7986cb;
    --accent: #ff7043;
    --dark: #2c3e50;
    --text: #333;
    --text-muted: #6c757d;
    --bg-light: #f5f5f7;
    --bg-white: #ffffff;
    --border: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

/* Base Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-light);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.5rem 2rem 2rem;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

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

.breadcrumb-current {
    color: var(--text);
    font-weight: 500;
}

/* ============================================
   PAGE HEADER - Compact with inline icon
   ============================================ */
.page-header {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.25rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.header-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 0.5rem;
}

.page-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.page-icon i {
    width: 24px;
    height: 24px;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.page-header .intro-text {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   SEARCH BAR
   ============================================ */
.search-container {
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 45px;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: 15px;
    font-family: inherit;
    background: var(--bg-white);
    transition: var(--transition);
    color: var(--text);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.15);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition);
}

.search-icon i {
    width: 20px;
    height: 20px;
}

.search-input:focus ~ .search-icon {
    color: var(--primary);
}

.clear-search {
    position: absolute;
    right: 12px;
    background: var(--text-muted);
    border: none;
    padding: 5px;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.clear-search i {
    width: 14px;
    height: 14px;
}

.clear-search:hover {
    background: var(--primary);
}

/* ============================================
   FILTER TABS
   ============================================ */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

.filter-tab i {
    width: 16px;
    height: 16px;
}

.filter-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
    color: white;
}

/* ============================================
   SECTION STYLING
   ============================================ */
.converter-section {
    margin-bottom: 2.5rem;
    display: none;
}

.converter-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.25rem;
}

.section-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.section-icon i {
    width: 20px;
    height: 20px;
}

.section-icon.documents { background: linear-gradient(135deg, #5c6bc0, #3f51b5); }
.section-icon.data { background: linear-gradient(135deg, #26a69a, #00897b); }
.section-icon.text { background: linear-gradient(135deg, #7e57c2, #5e35b1); }
.section-icon.tools { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }

.section-header h2 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.section-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    padding-left: 48px;
}

/* ============================================
   CONVERTER CARDS GRID
   ============================================ */
.converters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ============================================
   CONVERTER CARD
   ============================================ */
.converter-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

/* Shine sweep effect */
.converter-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.converter-card:hover::after {
    left: 100%;
}

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

/* Card Icon */
.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.card-icon i {
    width: 26px;
    height: 26px;
    color: white;
}

/* Icon color variations for file types */
.card-icon.file { background: linear-gradient(135deg, #78909c, #607d8b); }
.card-icon.pdf { background: linear-gradient(135deg, #ef5350, #e53935); }
.card-icon.docx { background: linear-gradient(135deg, #42a5f5, #1e88e5); }
.card-icon.excel { background: linear-gradient(135deg, #66bb6a, #43a047); }
.card-icon.csv { background: linear-gradient(135deg, #26a69a, #00897b); }
.card-icon.json { background: linear-gradient(135deg, #ffa726, #fb8c00); }
.card-icon.txt { background: linear-gradient(135deg, #78909c, #607d8b); }
.card-icon.markdown { background: linear-gradient(135deg, #7e57c2, #5e35b1); }
.card-icon.odt { background: linear-gradient(135deg, #5c6bc0, #3f51b5); }
.card-icon.rtf { background: linear-gradient(135deg, #ab47bc, #8e24aa); }

/* Card Content */
.card-content {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.card-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

/* Badges */
.badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.badge-popular {
    background: linear-gradient(135deg, #ff7043, #f4511e);
    color: white;
}

.badge-new {
    background: linear-gradient(135deg, #66bb6a, #43a047);
    color: white;
}

.badge-beta {
    background: linear-gradient(135deg, #42a5f5, #1e88e5);
    color: white;
}

/* Card Arrow */
.card-arrow {
    color: var(--border);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.card-arrow i {
    width: 20px;
    height: 20px;
}

.converter-card:hover .card-arrow {
    color: var(--primary);
    transform: translateX(4px);
}

/* ============================================
   SEARCH RESULTS SECTION
   ============================================ */
.search-results-section {
    display: none;
    margin-bottom: 2.5rem;
}

.search-results-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.search-results-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.75rem;
}

.search-results-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.search-results-icon i {
    width: 20px;
    height: 20px;
}

.search-results-header h2 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.search-results-count {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    padding-left: 48px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.no-results-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--text-muted);
}

.no-results-icon i {
    width: 30px;
    height: 30px;
}

.no-results h3 {
    font-size: 1.25rem;
    color: var(--dark);
    margin: 0 0 0.5rem 0;
}

.no-results p {
    color: var(--text-muted);
    margin: 0;
}

/* ============================================
   POPULAR TOOLS SECTION
   ============================================ */
.popular-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.popular-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.popular-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), #e64a19);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.popular-icon i {
    width: 20px;
    height: 20px;
}

.popular-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.popular-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.popular-tool {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-light);
    border-radius: 50px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.popular-tool i {
    width: 14px;
    height: 14px;
    color: var(--primary);
}

.popular-tool:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.popular-tool:hover i {
    color: white;
}

/* ============================================
   RELATED TOOLS SECTION
   ============================================ */
.related-tools-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.related-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.25rem;
}

.related-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #7986cb, #5c6bc0);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.related-icon i {
    width: 20px;
    height: 20px;
}

.related-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.related-tool-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-light);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition);
}

.related-tool-card:hover {
    border-color: var(--secondary);
    box-shadow: 0 4px 12px rgba(92, 107, 192, 0.15);
    transform: translateY(-2px);
}

.related-tool-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.related-tool-icon i {
    width: 20px;
    height: 20px;
}

.related-tool-content {
    flex: 1;
    min-width: 0;
}

.related-tool-content h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0 0 2px 0;
}

.related-tool-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.related-tool-arrow {
    color: var(--secondary);
    transition: var(--transition);
}

.related-tool-arrow i {
    width: 18px;
    height: 18px;
}

.related-tool-card:hover .related-tool-arrow {
    transform: translateX(4px);
}

/* ============================================
   INFO SECTION
   ============================================ */
.info-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.25rem;
}

.info-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.info-icon i {
    width: 20px;
    height: 20px;
}

.info-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.info-content p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.info-content p:last-child {
    margin-bottom: 0;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.feature-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.feature-icon i {
    width: 16px;
    height: 16px;
}

.feature-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0 0 4px 0;
}

.feature-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

/* ============================================
   FAQ SECTION
   ============================================ */
.faq-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.faq-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.faq-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ffa726, #fb8c00);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.faq-icon i {
    width: 20px;
    height: 20px;
}

.faq-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--primary);
}

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

.faq-question:hover {
    background: #e8e8ea;
}

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

.faq-toggle {
    color: var(--text-muted);
    transition: var(--transition);
}

.faq-toggle i {
    width: 20px;
    height: 20px;
}

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

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

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-content {
    padding: 16px 20px;
    color: var(--text-muted);
    line-height: 1.7;
}

.faq-answer-content p {
    margin: 0;
}

/* ============================================
   AD CONTAINER
   ============================================ */
.ad-container {
    margin: 2rem 0;
    text-align: center;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 992px) {
    .converters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .related-tools-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .page-header {
        padding: 1rem 1.25rem;
    }
    
    .header-title-row {
        gap: 10px;
    }
    
    .page-icon {
        width: 38px;
        height: 38px;
    }
    
    .page-header h1 {
        font-size: 1.4rem;
    }
    
    .converters-grid {
        grid-template-columns: 1fr;
    }
    
    .converter-card {
        padding: 16px;
    }
    
    .section-description {
        padding-left: 0;
    }
    
    .related-tools-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-tabs {
        gap: 8px;
    }
    
    .filter-tab {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .related-tools-section,
    .info-section,
    .faq-section,
    .popular-section {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.25rem;
    }
    
    .section-header h2 {
        font-size: 1.15rem;
    }
    
    .card-icon {
        width: 42px;
        height: 42px;
    }
    
    .card-icon i {
        width: 22px;
        height: 22px;
    }
    
    .popular-tools {
        gap: 8px;
    }
    
    .popular-tool {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion) {
    .converter-card::after {
        display: none;
    }
    
    .converter-card:hover,
    .related-tool-card:hover,
    .popular-tool:hover {
        transform: none;
    }
    
    .faq-answer {
        transition: none;
    }
    
    .converter-section.active {
        animation: none;
    }
}
