@import url('blog.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.site-description {
    color: #ecf0f1;
    margin: 1rem 0;
}

.main-menu ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.main-menu li {
    display: inline-block;
}

.menu-button {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.menu-button:hover {
    background: #2980b9;
}

.container {
    max-width: 800px;
    width: 100%;
    margin: 1rem auto;
    padding: 0 1rem;
    flex: 1;
}

footer {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

h1 {
    text-align: center;
    margin-bottom: 1rem;
    color: #ffffff;
}

.site-title {
    text-align: center;
    margin-bottom: 1rem;
    color: #ffffff;
    font-size: 2rem;  /* Same size as previous h1 */
}

.upload-container {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.upload-area {
    text-align: center;
    margin-bottom: 0.1rem;
    padding: 0.1rem;
}

.supported-formats {
    font-size: 0.9rem;
    color: #888;
}

input[type="file"] {
    display: none;
}

.upload-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-bottom: 1rem;
}

.upload-button:hover {
    background: #2980b9;
}

#upload-status {
    margin-top: 1rem;
    text-align: center;
    color: #666;
}

.divider {
    margin: 2rem 0;
    border: none;
    border-top: 1px solid #eee;
}

.process-section {
    margin-top: 1rem;
    text-align: center;
}

.process-section, .process-section * {
    text-align: center;
}

h2, .process-info {
    text-align: center;
}

.process-info {
    color: #666;
    margin-bottom: 1rem;
}

.process-button {
    display: block;
    width: 100%;
    padding: 1rem;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-bottom: 1rem;
}

.process-button:hover {
    background: #219a52;
}

.download-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: #9b59b6;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    text-align: center;
    text-decoration: none;
    margin-top: 1rem;
}

.download-button:hover {
    background: #8e44ad;
}

#process-status {
    margin-top: 1rem;
    text-align: center;
    color: #666;
}

#waveform-container {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    min-height: 150px;
}

#waveform {
    margin-bottom: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.audio-controls {
    text-align: center;
}

.control-button {
    padding: 0.5rem 2rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.control-button:hover {
    background: #2980b9;
}

.control-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

#processed-waveform-container {
    margin: 2rem 0;
    padding: 1rem;
    background: #f0f7ff;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    min-height: 150px;
}

#processed-waveform-container h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

#processed-waveform {
    margin-bottom: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Wavesurfer controls */
.wavesurfer-handle {
    display: none !important;
}

audio::-webkit-media-controls-panel {
    display: none !important;
}

audio::-webkit-media-controls {
    display: none !important;
}

/* Initial states */
#waveform-container,
.process-section,
#processed-waveform-container,
.download-section,
.pause-text {
    display: none;
}

.loading-message {
    text-align: center;
    color: #666;
    padding: 2rem;
    font-size: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
    margin: 1rem 0;
}

.button-container {
    text-align: center;
    margin: 1rem 0;
}

/* Content Pages Styles */
.content-container {
    max-width: 800px;
}

.about-section, .privacy-section {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.about-section h2, .privacy-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.about-section h3, .privacy-section h3 {
    color: #34495e;
    margin: 1.5rem 0 1rem;
}

.about-section p, .privacy-section p {
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #444;
}

.about-section ul, .about-section ol,
.privacy-section ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.about-section li, .privacy-section li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
    color: #444;
}

/* Navigation Menu Styles */
.main-menu ul {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 0;
    margin: 1rem 0;
    list-style: none;
}

.main-menu .menu-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}

.main-menu .menu-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.main-menu .menu-button:active {
    transform: scale(0.95);
    background-color: rgba(255, 255, 255, 0.25);
}

.main-menu .menu-button.active {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
    font-weight: 500;
}

/* Features Section Styles */
.features-section {
    margin: 2rem auto;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.features-section h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 0.5rem;
}

.feature-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: 8px;
    background: #f8f9fa;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-item h3 {
    color: #2c3e50;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.feature-item p {
    color: #666;
    line-height: 1.6;
}

/* FAQ Section Styles */
.faq-section {
    margin: 2rem auto;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.faq-section h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 2rem;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    background: #f8f9fa;
    transition: transform 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
}

.faq-item h3 {
    color: #2c3e50;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.faq-item p {
    color: #666;
    line-height: 1.6;
}

/* Contact Section Styles */
.contact-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.email-container {
    margin: 2rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.email-link {
    font-size: 1.2rem;
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.email-link:hover {
    color: #2980b9;
}

/* Contact Form Styles */
.contact-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.submit-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.submit-button:hover {
    background: #2980b9;
}

.success-message {
    background: #27ae60;
    color: white;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
}

.error-message {
    background: #e74c3c;
    color: white;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    header {
        padding: 0.1rem 0;
    }

    .header-container {
        padding: 0 0.8rem;
    }

    h1 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }

    .site-title {
        font-size: 1.8rem;
    }

    .site-description {
        font-size: 0.9rem;
        margin: 0.5rem 0;
        padding: 0 1rem;
    }

    .main-menu {
        margin-top: 0.8rem;
    }

    .main-menu ul {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
        margin: 0.5rem 0;
    }

    .main-menu .menu-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
        white-space: nowrap;
        width: auto;
        min-width: 80px;
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }

    .main-menu .menu-button:active {
        transform: scale(0.92);
    }
    
    .container {
        margin: 0.5rem auto;
        padding: 0 0.8rem;
    }

    .main-menu .menu-button.active {
        background-color: rgba(255, 255, 255, 0.25);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4);
    }

    .about-section, .privacy-section {
        padding: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature-item, .faq-item {
        padding: 1rem;
    }

    .feature-icon {
        font-size: 2rem;
    }

    .language-menu {
        margin-top: 0.8rem;
    }

    .language-title {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }

    .lang-button {
        padding: 0.25rem 0.7rem;
        font-size: 0.85rem;
    }
}

/* Extra Small Screens */
@media screen and (max-width: 480px) {
    header {
        padding: 0.6rem 0;
    }

    h1 {
        font-size: 1.5rem;
    }

    .site-title {
        font-size: 20px;
        padding: 0 0.5rem;
    }

    .main-menu ul {
        gap: 0.4rem;
    }

    .main-menu .menu-button {
        padding: 0.35rem 0.7rem;
        font-size: 0.85rem;
        min-width: 70px;
        margin: 0.1rem;
        touch-action: manipulation;
    }

    .about-section h2, .privacy-section h2 {
        font-size: 1.5rem;
    }

    .about-section h3, .privacy-section h3 {
        font-size: 1.2rem;
    }

    .features-section, .faq-section {
        margin: 1rem auto;
    }

    .feature-item h3, .faq-item h3 {
        font-size: 1.1rem;
    }
    
    .feature-item p, .faq-item p {
        font-size: 0.95rem;
    }
    
    .error-icon {
        font-size: 4rem;
    }
    
    .error-404-section h2 {
        font-size: 1.5rem;
    }
    
    .error-404-section {
        padding: 2rem 1rem;
    }
    
    .helpful-links ul {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Text Link Styles */
.text-link {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.text-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Use Cases Styles */
.use-cases ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.use-cases li {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.use-cases li:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.use-cases strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 0.3rem;
}

/* 404 Error Page Styles */
.error-404-section {
    background: var(--bg-white);
    padding: 3rem 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow-sm);
    text-align: center;
    margin: 2rem auto;
}

.error-icon {
    font-size: 6rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px var(--shadow-sm);
}

.error-404-section h2 {
    color: var(--secondary);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.error-404-section p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.helpful-links {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.helpful-links h3 {
    color: var(--secondary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.helpful-links ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.helpful-links li {
    margin: 0.5rem;
}

.quick-upload {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f0f7ff;
    border-radius: 8px;
}

.quick-upload h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Language Menu Styles */
.language-menu {
    margin-top: 1rem;
    text-align: center;
    margin-bottom: 15px;
}

.language-title {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.language-menu ul {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    padding: 0;
    margin: 0;
    list-style: none;
    flex-wrap: wrap;
}

.lang-button {
    display: inline-block;
    padding: 5px 10px;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    border: 1px solid transparent;
    font-weight: 500;
}

.lang-button:hover {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.lang-button.active {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

/* Profile Image Styles */
.profile-image-container {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-image {
    max-width: 200px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: 5px solid #fff;
    transition: transform 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05);
}

/* Responsive adjustments for profile image */
@media screen and (max-width: 480px) {
    .profile-image {
        max-width: 150px;
    }
}

/* RTL Support for Arabic */
[lang="ar"] {
    direction: rtl;
    text-align: right;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Tahoma', 'Arial', sans-serif;
}

[lang="ar"] .header-container,
[lang="ar"] .footer-container,
[lang="ar"] .main-menu ul {
    direction: rtl;
}

[lang="ar"] .header-container,
[lang="ar"] .main-menu,
[lang="ar"] .language-menu,
[lang="ar"] .site-description {
    text-align: center;
}

/* Prevent RTL for audio player components */
[lang="ar"] #waveform-container,
[lang="ar"] #processed-waveform-container,
[lang="ar"] .wavesurfer-handle,
[lang="ar"] #waveform,
[lang="ar"] #processed-waveform {
    direction: ltr;
}

[lang="ar"] .audio-controls,
[lang="ar"] .process-section,
[lang="ar"] .upload-area {
    direction: ltr;
    text-align: center;
}

/* Mobile Responsive for Error Page */
@media screen and (max-width: 480px) {
    .error-icon {
        font-size: 4rem;
    }
    
    .error-404-section h2 {
        font-size: 1.5rem;
    }
    
    .error-404-section {
        padding: 2rem 1rem;
    }
    
    .helpful-links ul {
        flex-direction: column;
        gap: 0.5rem;
    }
}
