/* Word to PDF Converter Page Specific Fixes */

/* Container Alignment Fixes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* PDF Converter Button Override - Match Reference Image */
.nav-link.pdf-home {
    background: #7c3aed !important;
    color: white !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.2) !important;
}

.nav-link.pdf-home:hover {
    background: #6d28d9 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3) !important;
}

/* Header Adjustments */
header {
    margin-top: 0; /* No additional margin needed with body padding */
}

/* Override any conflicting padding from individual pages */
body {
    padding-top: 80px !important;
}

/* Main Content Padding */
main {
    padding: 2rem 0;
    min-height: calc(100vh - 400px);
}

/* Upload Area Improvements */
.upload-area {
    max-width: 800px;
    margin: 0 auto 2rem;
    padding: 3rem 2rem;
    transition: all 0.3s ease;
}

/* Drag and drop states */
.upload-area.drag-over {
    border-color: #667eea !important;
    background-color: #ebf8ff !important;
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

.upload-area.drag-over .upload-content h2 {
    color: #667eea;
}

/* File input styling */
input[type="file"] {
    position: absolute;
    left: -9999px;
}

.upload-area.drag-over {
    border-color: #667eea;
    background-color: #ebf8ff;
    transform: scale(1.02);
}

/* Preview Section Alignment */
#filePreviewSection {
    max-width: 1200px;
    margin: 0 auto;
}

.preview-conversion-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

/* Mobile Responsive Grid */
@media (max-width: 968px) {
    .preview-conversion-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .preview-conversion-grid > div:nth-child(2) {
        order: 3;
        margin: 1rem 0;
    }
}

/* Preview Container Fixes */
#wordPreviewContainer,
#pdfPreviewContainer {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    padding: 1rem;
}

/* File Info Grid */
.file-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .file-info-grid {
        grid-template-columns: 1fr;
        font-size: 0.85rem;
    }
}

/* Text Preview Box */
#wordTextPreview,
#pdfPropertiesPreview {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    max-height: 150px;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Convert Button Styling */
#convertNowBtn {
    font-size: 1.2rem;
    padding: 1rem 2rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.3);
    white-space: nowrap;
}

#convertNowBtn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
}

/* Conversion Status Section */
#conversionStatusSection {
    text-align: center;
    padding: 1.5rem;
    background: #f7fafc;
    border-radius: 8px;
    margin: 1rem 0;
}

#conversionProgress {
    width: 100%;
    max-width: 400px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    margin: 1rem auto;
    overflow: hidden;
}

#conversionProgressFill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* TXT Format Options */
#txtFormatOptions {
    background: #f3e8ff;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#txtFormatOptions select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d8b4fe;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

/* Supported Formats Section */
.supported-formats {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin: 2rem auto;
    max-width: 1400px;
}

.supported-formats h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2d3748;
    font-size: 1.8rem;
    font-weight: 600;
}

/* Individual format card styling */
.formats-grid > div > div:first-child {
    font-size: 2.5rem !important;
    margin-bottom: 0.75rem !important;
    line-height: 1 !important;
}

.formats-grid > div h3 {
    font-size: 1.25rem !important;
    margin-bottom: 0.5rem !important;
    font-weight: 600;
    line-height: 1.2 !important;
}

.formats-grid > div p:first-of-type {
    font-size: 0.9rem !important;
    font-weight: 600;
    margin-bottom: 0.5rem !important;
    line-height: 1.2 !important;
}

.formats-grid > div p:last-of-type {
    font-size: 0.85rem !important;
    margin-top: 0.5rem !important;
    line-height: 1.4 !important;
    opacity: 0.8;
}

.formats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.formats-grid > div {
    width: 100%;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    border-radius: 12px !important;
    border: 2px solid !important;
    padding: 1.5rem !important;
    text-align: center !important;
    box-sizing: border-box;
}

.formats-grid > div:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Position the 5 items across 2 rows */
.formats-grid > div:nth-child(1) { grid-column: 1; grid-row: 1; }
.formats-grid > div:nth-child(2) { grid-column: 2; grid-row: 1; }
.formats-grid > div:nth-child(3) { grid-column: 3; grid-row: 1; }
.formats-grid > div:nth-child(4) { grid-column: 1; grid-row: 2; }
.formats-grid > div:nth-child(5) { grid-column: 2; grid-row: 2; }

/* Tablet responsive - 2 columns */
@media (max-width: 768px) {
    .formats-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, auto);
        gap: 1.5rem;
        max-width: 700px;
    }
    
    .formats-grid > div {
        min-height: 160px;
        padding: 1.25rem !important;
    }
    
    /* Reset positioning for tablet */
    .formats-grid > div:nth-child(1) { grid-column: 1; grid-row: 1; }
    .formats-grid > div:nth-child(2) { grid-column: 2; grid-row: 1; }
    .formats-grid > div:nth-child(3) { grid-column: 1; grid-row: 2; }
    .formats-grid > div:nth-child(4) { grid-column: 2; grid-row: 2; }
    .formats-grid > div:nth-child(5) { 
        grid-column: 1 / 3; 
        grid-row: 3; 
        max-width: 300px;
        justify-self: center;
    }
}

/* Mobile responsive - 1 column */
@media (max-width: 480px) {
    .formats-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(5, auto);
        gap: 1rem;
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .formats-grid > div {
        min-height: 140px;
        padding: 1rem !important;
    }
    
    /* Reset all positioning for mobile */
    .formats-grid > div:nth-child(1),
    .formats-grid > div:nth-child(2),
    .formats-grid > div:nth-child(3),
    .formats-grid > div:nth-child(4),
    .formats-grid > div:nth-child(5) {
        grid-column: 1;
        grid-row: auto;
        max-width: 100%;
        justify-self: stretch;
    }
}

/* Info Cards Alignment */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .info-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Use Cases Grid */
.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .use-case-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* FAQ Section */
.faq-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin: 2rem auto;
    max-width: 1000px;
}

.faq-item {
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3,
.faq-item h4 {
    color: #2d3748;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.faq-item p {
    color: #718096;
    line-height: 1.7;
}

/* Related Tools Section */
.related-tools {
    margin-top: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.related-tools > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .related-tools > div {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Preview Demo Section */
.preview-demo {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin: 2rem auto;
    max-width: 1000px;
}

.preview-demo > div {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
}

@media (max-width: 768px) {
    .preview-demo > div {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
}

/* Button Improvements */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-1px);
}

/* Breadcrumb Navigation */
.breadcrumb {
    background: #f8f9fa;
    padding: 0.75rem 0;
    margin-bottom: 2rem;
}

.breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.9rem;
}

.breadcrumb li {
    display: inline-flex;
    align-items: center;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #5a67d8;
}

/* Footer Improvements */
footer {
    background: #2d3748;
    color: white;
    padding: 3rem 0 2rem 0;
    margin-top: 4rem;
}

footer .container > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    footer .container > div {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Ad Container Alignment */
.ad-container,
.video-ad-container {
    text-align: center;
    margin: 2rem auto;
    padding: 1rem;
    max-width: 1200px;
}

#v-freejobalert {
    margin-bottom: 2rem;
    text-align: center;
    min-height: 100px;
}

/* Accessibility Improvements */
button:focus,
a:focus,
input:focus,
select:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Error States */
.error-message {
    background: #fee;
    color: #c53030;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    text-align: center;
}

/* Success States */
.success-message {
    background: #f0fdf4;
    color: #166534;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    text-align: center;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Print Styles */
@media print {
    .navbar,
    .ad-container,
    .video-ad-container,
    footer,
    .upload-area,
    button {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
}